diff --git a/.JuliaFormatter.toml b/.JuliaFormatter.toml new file mode 100644 index 00000000..76389e33 --- /dev/null +++ b/.JuliaFormatter.toml @@ -0,0 +1,10 @@ +style = "blue" +indent = 4 +margin = 132 +always_for_in = true +whitespace_ops_in_indices = true +whitespace_typedefs = false +remove_extra_newlines = true +import_to_using = true +pipe_to_function_call = false +short_to_long_function_def = true diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b1db3844..45a91a09 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -10,17 +10,13 @@ env: BUILD_TYPE: Debug jobs: - shellcheck: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - name: shellcheck - run: shellcheck --exclude SC2086 bin/* build: strategy: matrix: - os: [ubuntu-22.04, macos-12] - fortran: [fortran-off, fortran-on] + # TODO: Build on macOS + # TODO: Build with Clang, Flang + os: [ubuntu-22.04] + mpi: [mpich, openmpi] shared: [shared-off, shared-on] runs-on: ${{matrix.os}} @@ -28,37 +24,159 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Configure + - name: Install ${{matrix.mpi}} + run: | + case "${{matrix.mpi}}" in + mpich) + sudo apt-get update + sudo apt-get install libmpich-dev + ;; + openmpi) + sudo apt-get update + sudo apt-get install libopenmpi-dev + ;; + esac + + # - name: Restore dependencies + # id: cache + # uses: actions/cache/restore@v3 + # with: + # path: /usr/local + # key: ${{runner.os}}-${{matrix.mpi}}-dependencies + # + # - name: Build ${{matrix.mpi}} + # if: steps.cache.outputs.cache-hit != 'true' + # run: | + # case "${{matrix.mpi}}" in + # mpich) + # ;; + # openmpi) + # ./.github/workflows/install-openmpi.sh + # ;; + # esac + # + # - name: Save dependencies + # uses: actions/cache/save@v3 + # with: + # path: /usr/local + # key: ${{steps.cache.cache-primary-key}} + + - name: Configure MPIwrapper + working-directory: ${{github.workspace}}/mpiwrapper + run: | + cmake \ + -B build \ + -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_C_COMPILER=mpicc \ + -DCMAKE_Fortran_COMPILER=mpifort \ + -DCMAKE_INSTALL_PREFIX=$HOME/mpiwrapper-${{matrix.mpi}} + + - name: Build MPIwrapper + working-directory: ${{github.workspace}}/mpiwrapper + run: cmake --build build + + # - name: Test + # working-directory: ${{github.workspace}}/build + # run: ctest -C ${{env.BUILD_TYPE}} + + - name: Install MPIwrapper + working-directory: ${{github.workspace}}/mpiwrapper + run: cmake --install build + + - name: Configure MPItrampoline + working-directory: ${{github.workspace}}/mpitrampoline run: | - fortran=$(echo ${{matrix.fortran}} | sed -e 's/fortran-//') shared=$(echo ${{matrix.shared}} | sed -e 's/shared-//') - case $RUNNER_OS in - Linux) - cmake -B ${{github.workspace}}/build \ - -DENABLE_FORTRAN=${fortran} \ - -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \ - -DBUILD_SHARED_LIBS=${shared} \ - -DCMAKE_INSTALL_PREFIX=$HOME/mpitrampoline - ;; - macOS) - # Use GCC-12 from Homebrew - cmake -B ${{github.workspace}}/build \ - -DENABLE_FORTRAN=${fortran} \ - -DCMAKE_C_COMPILER=gcc-12 \ - -DCMAKE_CXX_COMPILER=g++-12 \ - -DCMAKE_Fortran_COMPILER=gfortran-12 \ - -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \ - -DBUILD_SHARED_LIBS=${shared} \ - -DCMAKE_INSTALL_PREFIX=$HOME/mpitrampoline - ;; + cmake \ + -B build \ + -DBUILD_SHARED_LIBS=${shared} \ + -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_INSTALL_PREFIX=$HOME/mpitrampoline + + - name: Build MPItrampoline + working-directory: ${{github.workspace}}/mpitrampoline + run: cmake --build build + + # - name: Test + # working-directory: ${{github.workspace}}/build, + # run: ctest -C ${{env.BUILD_TYPE}} + + - name: Install MPItrampoline + working-directory: ${{github.workspace}}/mpitrampoline + run: cmake --install build + + - name: Test C + working-directory: ${{github.workspace}}/test + run: | + $HOME/mpitrampoline/bin/mpicc -c hello-world-c.c + $HOME/mpitrampoline/bin/mpicc -o hello-world-c hello-world-c.o + export MPITRAMPOLINE_LIB=$HOME/mpiwrapper-${{matrix.mpi}}/lib/libmpiwrapper.so + case "${{matrix.mpi}}" in + mpich) mpiexec_options='';; + openmpi) mpiexec_options='--oversubscribe';; esac + ./hello-world-c 1 + mpiexec $mpiexec_options -n 4 ./hello-world-c 4 - - name: Build - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --verbose + - name: Test C++ + working-directory: ${{github.workspace}}/test + run: | + $HOME/mpitrampoline/bin/mpicxx -c hello-world-cxx.cxx + $HOME/mpitrampoline/bin/mpicxx -o hello-world-cxx hello-world-cxx.o + export MPITRAMPOLINE_LIB=$HOME/mpiwrapper-${{matrix.mpi}}/lib/libmpiwrapper.so + case "${{matrix.mpi}}" in + mpich) mpiexec_options='';; + openmpi) mpiexec_options='--oversubscribe';; + esac + ./hello-world-cxx 1 + mpiexec $mpiexec_options -n 4 ./hello-world-cxx 4 - - name: Test - working-directory: ${{github.workspace}}/build - run: ctest -C ${{env.BUILD_TYPE}} + - name: Test fixed form Fortran + working-directory: ${{github.workspace}}/test + run: | + $HOME/mpitrampoline/bin/mpifc -c hello-world-f.f + $HOME/mpitrampoline/bin/mpifc -o hello-world-f hello-world-f.o + export MPITRAMPOLINE_LIB=$HOME/mpiwrapper-${{matrix.mpi}}/lib/libmpiwrapper.so + case "${{matrix.mpi}}" in + mpich) mpiexec_options='';; + openmpi) mpiexec_options='--oversubscribe';; + esac + ./hello-world-f 1 + mpiexec $mpiexec_options -n 4 ./hello-world-f 4 - - name: Install - run: cmake --install ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + - name: Test free form Fortran + working-directory: ${{github.workspace}}/test + run: | + $HOME/mpitrampoline/bin/mpifc -c hello-world-f90.f90 + $HOME/mpitrampoline/bin/mpifc -o hello-world-f90 hello-world-f90.o + export MPITRAMPOLINE_LIB=$HOME/mpiwrapper-${{matrix.mpi}}/lib/libmpiwrapper.so + case "${{matrix.mpi}}" in + mpich) mpiexec_options='';; + openmpi) mpiexec_options='--oversubscribe';; + esac + ./hello-world-f90 1 + mpiexec $mpiexec_options -n 4 ./hello-world-f90 4 + - name: Test Fortran 90 + working-directory: ${{github.workspace}}/test + run: | + $HOME/mpitrampoline/bin/mpifc -c hello-world-fortran.f90 + $HOME/mpitrampoline/bin/mpifc -o hello-world-fortran hello-world-fortran.o + export MPITRAMPOLINE_LIB=$HOME/mpiwrapper-${{matrix.mpi}}/lib/libmpiwrapper.so + case "${{matrix.mpi}}" in + mpich) mpiexec_options='';; + openmpi) mpiexec_options='--oversubscribe';; + esac + ./hello-world-fortran 1 + mpiexec $mpiexec_options -n 4 ./hello-world-fortran 4 + - name: Test Fortran 2008 + working-directory: ${{github.workspace}}/test + run: | + $HOME/mpitrampoline/bin/mpifc -c hello-world-fortran08.f90 + $HOME/mpitrampoline/bin/mpifc -o hello-world-fortran08 hello-world-fortran08.o + export MPITRAMPOLINE_LIB=$HOME/mpiwrapper-${{matrix.mpi}}/lib/libmpiwrapper.so + case "${{matrix.mpi}}" in + mpich) mpiexec_options='';; + openmpi) mpiexec_options='--oversubscribe';; + esac + ./hello-world-fortran08 1 + mpiexec $mpiexec_options -n 4 ./hello-world-fortran08 4 diff --git a/.github/workflows/install-openmpi.sh b/.github/workflows/install-openmpi.sh new file mode 100755 index 00000000..323663d8 --- /dev/null +++ b/.github/workflows/install-openmpi.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +set -euxo pipefail + +wget https://download.open-mpi.org/release/open-mpi/v5.0/openmpi-5.0.0.tar.bz2 +tar xjf openmpi-5.0.0.tar.bz2 +cd openmpi-5.0.0 +# We don't want to deal with the `rpath` for the shared libraries +./configure --enable-shared=no --enable-static=yes +make -j$(nproc) +sudo make install diff --git a/.gitignore b/.gitignore index ce8c7f33..52055099 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ -__pycache__ +BUILD.sh build +build-* +build.log diff --git a/.zenodo.json b/.zenodo.json deleted file mode 100644 index e09186fd..00000000 --- a/.zenodo.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "title": "MPItrampoline", - "upload_type": "software", - "creators": [ - { - "name": "Schnetter, Erik", - "affiliation": "Perimeter Institute for Theoretical Physics, Waterloo, Ontario, Canada", - "orcid": "0000-0002-4518-9017" - } - ], - "description": "MPI is the de-facto standard for inter-node communication on HPC systems, and has been for the past 25 years. While highly successful, MPI is a standard for source code (it defines an API), and is not a standard defining binary compatibility (it does not define an ABI). This means that applications running on HPC systems need to be compiled anew on every system. This is tedious, since the software that is available on every HPC system is slightly different.\n\nThis project attempts to remedy this. It defines an ABI for MPI, and provides an MPI implementation based on this ABI. That is, MPItrampoline does not implement any MPI functions itself, it only forwards them to a real implementation via this ABI. The advantage is that one can produce portable applications that can use any given MPI implementation. For example, this will make it possible to build external packages for Julia via Yggdrasil that run efficiently on almost any HPC system.\n\nA small and simple MPIwrapper library is used to provide this ABI for any given MPI installation. MPIwrapper needs to be compiled for each MPI installation that is to be used with MPItrampoline, but this is quick and easy.", - "license": "MIT", - "doi": "10.5281/zenodo.6174408", - "keywords": [ - "MPI", - "distributed computing", - "high-performance computing", - "package management", - "parallel computing" - ], - "related_identifiers": [ - { - "relation": "isSupplementedBy", - "identifier": "10.5281/zenodo.6174342", - "resource_type": "software" - }, - "language": "eng" -} diff --git a/BUILD.md b/BUILD.md deleted file mode 100644 index d0704acd..00000000 --- a/BUILD.md +++ /dev/null @@ -1,38 +0,0 @@ -# Redshift - -## MacPorts - -```sh -# -DBUILD_SHARED_LIBS=ON -rm -rf mpitrampoline $HOME/src/c/MPIstuff/mpitrampoline -cmake -S . -B mpitrampoline -G Ninja -DCMAKE_C_COMPILER=gcc-mp-12 -DCMAKE_CXX_COMPILER=g++-mp-12 -DCMAKE_Fortran_COMPILER=gfortran-mp-12 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$HOME/src/c/MPIstuff/mpitrampoline -cmake --build mpitrampoline && cmake --install mpitrampoline -``` - -# Symmetry - -## Ubuntu - -```sh -module load cmake -rm -rf mpitrampoline-ubuntu $HOME/src/c/MPIstuff/mpitrampoline-ubuntu -cmake -S . -B mpitrampoline-ubuntu -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=$HOME/src/c/MPIstuff/mpitrampoline-ubuntu -cmake --build mpitrampoline-ubuntu -cmake --install mpitrampoline-ubuntu -``` - -## gcc-9 - -```sh -module load cmake -rm -rf mpitrampoline-gcc9 $HOME/src/c/MPIstuff/mpitrampoline-gcc9 -cmake -S . -B mpitrampoline-gcc9 -DCMAKE_C_COMPILER=gcc-9 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$HOME/src/c/MPIstuff/mpitrampoline-gcc9 -cmake --build mpitrampoline-gcc9 -cmake --install mpitrampoline-gcc9 -``` - -# - -rm -rf build $HOME/src/c/MPIstuff/mpitrampoline-nofortran -cmake -S . -B build -G Ninja -DENABLE_FORTRAN=OFF -DCMAKE_C_COMPILER=gcc-mp-11 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$HOME/src/c/MPIstuff/mpitrampoline-nofortran -cmake --build build && cmake --install build diff --git a/CITATION.cff b/CITATION.cff deleted file mode 100644 index b2e14317..00000000 --- a/CITATION.cff +++ /dev/null @@ -1,10 +0,0 @@ -cff-version: 1.1.0 -message: "If you use this software, please cite it as below." -authors: - - family-names: Schnetter - given-names: Erik - orcid: https://orcid.org/0000-0002-4518-9017 -title: MPItrampoline -version: v5.3.1 -doi: 10.5281/zenodo.6174408 -date-released: 2023-06-16 diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index 89a816a6..00000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,344 +0,0 @@ -cmake_minimum_required(VERSION 3.12...3.20) -project( - MPItrampoline VERSION 5.3.1 - DESCRIPTION "MPI trampoline" - HOMEPAGE_URL "https://github.com/eschnett/MPItrampoline" - LANGUAGES NONE - ) - -# SOVERSION is the ABI version of MPItrampoline. (That's different -# from the MPI_ABI version.) -# -# SOVERSION is handled differently under Linux and macOS. We are using -# a single-digit SOVERSION to avoid confusion between VERSION (which -# consists of 3 numbers) and SOVERSION. -# -# Different SOVERSIONs are incompatible; there is no need to have a -# major/minor version number. -set(SOVERSION 5) - -option(ENABLE_FORTRAN "Build Fortran MPI bindings" ON) - -include(CheckLanguage) -check_language(C) -if(NOT(CMAKE_C_COMPILER)) - message(FATAL_ERROR "No C support") -endif() -set(CMAKE_C_STANDARD 99) -enable_language(C) - -check_language(CXX) -if(NOT(CMAKE_CXX_COMPILER)) - message(WARNING "No C++ support") -endif() -enable_language(CXX) - -if(ENABLE_FORTRAN) - check_language(Fortran) - if(NOT(CMAKE_Fortran_COMPILER)) - message(FATAL_ERROR "No Fortran support") - endif() - message(STATUS "Enabling Fortran support") - enable_language(Fortran) - include(CheckFortranCompilerFlag) - check_fortran_compiler_flag(-fallow-argument-mismatch Fortran_flag_allow_argument_mismatch) - if(Fortran_flag_allow_argument_mismatch) - set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch") - endif() - check_fortran_compiler_flag(-fcray-pointer Fortran_flag_cray_pointer) - if(Fortran_flag_cray_pointer) - set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fcray-pointer") - endif() - check_fortran_source_compiles( - " - end - subroutine attr(buf) - integer buf - !dir$ ignore_tkr(tkr) buf - end - " - Fortran_attribute_dir_ignore_tkr - SRC_EXT f90) - if(Fortran_attribute_dir_ignore_tkr) - add_compile_definitions(DIR_IGNORE_TKR=) # enabled - else() - add_compile_definitions(DIR_IGNORE_TKR=!) # disabled - endif() - check_fortran_source_compiles( - " - end - subroutine attr(buf) - integer buf - !gcc$ attributes no_arg_check :: buf - end - " - Fortran_attribute_gcc_attributes_no_arg_check - SRC_EXT f90) - if(Fortran_attribute_gcc_attributes_no_arg_check) - add_compile_definitions(GCC_ATTRIBUTES_NO_ARG_CHECK=) # enabled - else() - add_compile_definitions(GCC_ATTRIBUTES_NO_ARG_CHECK=!) # disabled - endif() - add_compile_definitions(ENABLE_FORTRAN) -else() - message(STATUS "Disabling Fortran support") -endif() - -if(ENABLE_FORTRAN) - set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/include) -endif() - -include(CMakePackageConfigHelpers) -include(GNUInstallDirs) - - - -configure_file(include/mpi_version.h.in include/mpi_version.h @ONLY) -install( - FILES "${CMAKE_CURRENT_BINARY_DIR}/include/mpi_version.h" - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} - ) - -if(ENABLE_FORTRAN) - include(CheckTypeSize) - check_type_size(ptrdiff_t MPITRAMPOLINE_SIZEOF_CPTRDIFF_T LANGUAGE C) - if(${MPITRAMPOLINE_SIZEOF_CPTRDIFF_T} STREQUAL "" OR - ${MPITRAMPOLINE_SIZEOF_CPTRDIFF_T} STREQUAL "0") - message(FATAL_ERROR "Cannot determine sizeof(ptrdiff_t).") - endif() - - configure_file(mpiabi/mpiabif.h.in include/mpiabif.h @ONLY) - install( - FILES "${CMAKE_CURRENT_BINARY_DIR}/include/mpiabif.h" - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} - ) - - configure_file(include/mpif_version.h.in include/mpif_version.h @ONLY) - install( - FILES "${CMAKE_CURRENT_BINARY_DIR}/include/mpif_version.h" - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} - ) - - # configure_file(include/mpi.f90.in include/mpi.f90 @ONLY) - # install( - # FILES "${CMAKE_CURRENT_BINARY_DIR}/include/mpi.f90" - # DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} - # ) - # - # configure_file(include/mpi_f08.f90.in include/mpi_f08.f90 @ONLY) - # install( - # FILES "${CMAKE_CURRENT_BINARY_DIR}/include/mpi_f08.f90" - # DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} - # ) -endif() - -configure_file(src/mpi_defaults.h.in src/mpi_defaults.h @ONLY) - -add_custom_command( - OUTPUT - include/mpi_decl_constants_c.h - include/mpi_decl_functions_c.h - include/mpi_decl_constants_fortran.h - include/mpi_decl_functions_fortran.h - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/gen/gen_decl.py - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/gen/gen_decl.py - ${CMAKE_CURRENT_SOURCE_DIR}/mpiabi/mpi_constants.py - ${CMAKE_CURRENT_SOURCE_DIR}/mpiabi/mpi_functions.py - ${CMAKE_CURRENT_SOURCE_DIR}/mpiabi/mpi_constants_fortran.py - ${CMAKE_CURRENT_SOURCE_DIR}/mpiabi/mpi_functions_fortran.py - ) -install( - FILES - "${CMAKE_CURRENT_BINARY_DIR}/include/mpi_decl_constants_c.h" - "${CMAKE_CURRENT_BINARY_DIR}/include/mpi_decl_functions_c.h" - "${CMAKE_CURRENT_BINARY_DIR}/include/mpi_decl_constants_fortran.h" - "${CMAKE_CURRENT_BINARY_DIR}/include/mpi_decl_functions_fortran.h" - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} - ) - -add_custom_command( - OUTPUT - src/mpi_defn_constants_c.h - src/mpi_defn_functions_c.h - src/mpi_defn_constants_fortran.h - src/mpi_defn_functions_fortran.h - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/gen/gen_defn.py - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/gen/gen_defn.py - ${CMAKE_CURRENT_SOURCE_DIR}/mpiabi/mpi_constants.py - ${CMAKE_CURRENT_SOURCE_DIR}/mpiabi/mpi_functions.py - ${CMAKE_CURRENT_SOURCE_DIR}/mpiabi/mpi_constants_fortran.py - ${CMAKE_CURRENT_SOURCE_DIR}/mpiabi/mpi_functions_fortran.py - ) - -add_custom_command( - OUTPUT - src/mpi_init_constants_c.h - src/mpi_init_functions_c.h - src/mpi_init_constants_fortran.h - src/mpi_init_functions_fortran.h - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/gen/gen_init.py - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/gen/gen_init.py - ${CMAKE_CURRENT_SOURCE_DIR}/mpiabi/mpi_constants.py - ${CMAKE_CURRENT_SOURCE_DIR}/mpiabi/mpi_functions.py - ${CMAKE_CURRENT_SOURCE_DIR}/mpiabi/mpi_constants_fortran.py - ${CMAKE_CURRENT_SOURCE_DIR}/mpiabi/mpi_functions_fortran.py - ) - -if(ENABLE_FORTRAN) - add_library(mpitrampoline - # *** C *** - # source file - src/mpi.c - # header files - include/mpi.h - include/mpio.h - mpiabi/mpiabi.h - # configured header files - include/mpi_version.h - # generated header files - include/mpi_decl_constants_c.h - include/mpi_decl_functions_c.h - # generated source files - src/mpi_defn_constants_c.h - src/mpi_defn_functions_c.h - src/mpi_defn_constants_fortran.h - src/mpi_defn_functions_fortran.h - src/mpi_init_constants_c.h - src/mpi_init_functions_c.h - src/mpi_init_constants_fortran.h - src/mpi_init_functions_fortran.h - # *** Fortran *** - # source file - src/init_mpi_f08.f90 - # header files - include/mpif.h - include/mpi.F90 - include/mpi_f08.F90 - include/mpiabif.h - # configured header files - include/mpif_version.h - # generated header files - include/mpi_decl_constants_fortran.h - include/mpi_decl_functions_fortran.h - ) - target_include_directories( - mpitrampoline - PRIVATE include mpiabi ${CMAKE_CURRENT_BINARY_DIR}/include ${CMAKE_CURRENT_BINARY_DIR}/src - ) - target_link_libraries(mpitrampoline PUBLIC ${CMAKE_DL_LIBS}) - set_target_properties(mpitrampoline PROPERTIES - VERSION ${PROJECT_VERSION} - SOVERSION ${SOVERSION} - # TODO: Add mpi-version.h etc. as public headers instead of installing them manually - PUBLIC_HEADER "include/mpi.h;include/mpio.h;mpiabi/mpiabi.h;include/mpif.h" - ) -else() - add_library(mpitrampoline - # *** C *** - # source file - src/mpi.c - # header files - include/mpi.h - include/mpio.h - mpiabi/mpiabi.h - # configured header files - include/mpi_version.h - # generated header files - include/mpi_decl_constants_c.h - include/mpi_decl_functions_c.h - # generated source files - src/mpi_defn_constants_c.h - src/mpi_defn_functions_c.h - src/mpi_init_constants_c.h - src/mpi_init_functions_c.h - ) - target_include_directories( - mpitrampoline - PRIVATE include mpiabi ${CMAKE_CURRENT_BINARY_DIR}/include ${CMAKE_CURRENT_BINARY_DIR}/src - ) - target_link_libraries(mpitrampoline PUBLIC ${CMAKE_DL_LIBS}) - set_target_properties(mpitrampoline PROPERTIES - VERSION ${PROJECT_VERSION} - SOVERSION ${SOVERSION} - # TODO: Add mpi-version.h etc. as public headers instead of installing them manually - PUBLIC_HEADER "include/mpi.h;include/mpio.h;mpiabi/mpiabi.h" - ) -endif() - -install(TARGETS mpitrampoline EXPORT MPItrampolineTargets) -if(ENABLE_FORTRAN) - install( - FILES - ${CMAKE_Fortran_MODULE_DIRECTORY}/mpi.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/mpi_f08.mod - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} - ) -endif() - -write_basic_package_version_file( - ${CMAKE_CURRENT_BINARY_DIR}/MPItrampolineConfigVersion.cmake - VERSION ${VERSION} - COMPATIBILITY SameMajorVersion - ) -install( - EXPORT MPItrampolineTargets - FILE MPItrampolineTargets.cmake - NAMESPACE MPItrampoline:: - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/MPItrampoline - ) -configure_file(MPItrampolineConfig.cmake.in MPItrampolineConfig.cmake @ONLY) -install( - FILES "${CMAKE_CURRENT_BINARY_DIR}/MPItrampolineConfig.cmake" "${CMAKE_CURRENT_BINARY_DIR}/MPItrampolineConfigVersion.cmake" - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/MPItrampoline - ) - -configure_file(MPItrampoline.pc.in MPItrampoline.pc @ONLY) -configure_file(mpi-c.pc.in mpi-c.pc @ONLY) -configure_file(mpi-cxx.pc.in mpi-cxx.pc @ONLY) -configure_file(mpi-fort.pc.in mpi-fort.pc @ONLY) -install( - FILES - ${CMAKE_BINARY_DIR}/MPItrampoline.pc - ${CMAKE_BINARY_DIR}/mpi-c.pc - ${CMAKE_BINARY_DIR}/mpi-cxx.pc - ${CMAKE_BINARY_DIR}/mpi-fort.pc - DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig - ) -install( - FILES ${CMAKE_BINARY_DIR}/mpi-c.pc - DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig - ) - -configure_file(bin/mpicc.in bin/mpicc @ONLY) -install( - FILES ${CMAKE_CURRENT_BINARY_DIR}/bin/mpicc - DESTINATION ${CMAKE_INSTALL_BINDIR} - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE - ) -if(CMAKE_CXX_COMPILER) - configure_file(bin/mpicxx.in bin/mpicxx @ONLY) - install( - FILES ${CMAKE_CURRENT_BINARY_DIR}/bin/mpicxx - DESTINATION ${CMAKE_INSTALL_BINDIR} - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE - ) -endif() -if(ENABLE_FORTRAN) - configure_file(bin/mpifc.in bin/mpifc @ONLY) - configure_file(bin/mpifort.in bin/mpifort @ONLY) - install( - FILES ${CMAKE_CURRENT_BINARY_DIR}/bin/mpifc ${CMAKE_CURRENT_BINARY_DIR}/bin/mpifort - DESTINATION ${CMAKE_INSTALL_BINDIR} - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE - ) -endif() - -configure_file(bin/mpiexec.in bin/mpiexec @ONLY) -install( - FILES ${CMAKE_CURRENT_BINARY_DIR}/bin/mpiexec - DESTINATION ${CMAKE_INSTALL_BINDIR} - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE - ) diff --git a/LICENSE.md b/LICENSE.md deleted file mode 100644 index b6485213..00000000 --- a/LICENSE.md +++ /dev/null @@ -1,7 +0,0 @@ -Copyright 2021 Erik Schnetter - -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/MPItrampolineConfig.cmake.in b/MPItrampolineConfig.cmake.in deleted file mode 100644 index fb40c2c3..00000000 --- a/MPItrampolineConfig.cmake.in +++ /dev/null @@ -1,12 +0,0 @@ -include(CMakeFindDependencyMacro) - -# # Capturing values from configure (optional) -# set(my-config-var @my-config-var@) - -# # Same syntax as find_package -# find_dependency(MYDEP REQUIRED) - -# Any extra setup - -# Add the targets file -include("${CMAKE_CURRENT_LIST_DIR}/MPItrampolineTargets.cmake") diff --git a/README.md b/README.md index beab1d24..5b7d506f 100644 --- a/README.md +++ b/README.md @@ -1,108 +1,57 @@ # MPItrampoline -* MPI wrapper library: [![GitHub - CI](https://github.com/eschnett/MPIwrapper/actions/workflows/CI.yml/badge.svg)](https://github.com/eschnett/MPIwrapper/actions) -* MPI trampoline library: [![GitHub - CI](https://github.com/eschnett/MPItrampoline/actions/workflows/CI.yml/badge.svg)](https://github.com/eschnett/MPItrampoline/actions) -* MPI integration tests: [![GitHub - CI](https://github.com/eschnett/MPItest/actions/workflows/CI.yml/badge.svg)](https://github.com/eschnett/MPItest/actions) -* [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.6174408.svg)](https://doi.org/10.5281/zenodo.6174408) +* [![CI](https://github.com/eschnett/MPItrampoline/actions/workflows/CI.yml/badge.svg?branch=eschnett/MPItrampoline6)](https://github.com/eschnett/MPItrampoline/actions/workflows/CI.yml) -[MPI](https://www.mpi-forum.org) is the de-facto standard for -inter-node communication on HPC systems, and has been for the past 25 -years. While highly successful, MPI is a standard for source code (it -defines an [API](https://en.wikipedia.org/wiki/API)), and is not a -standard defining binary compatibility (it does not define an -[ABI](https://en.wikipedia.org/wiki/Application_binary_interface)). -This means that applications running on HPC systems need to be -compiled anew on every system. This is tedious, since the software -that is available on every HPC system is slightly different. - -This project attempts to remedy this. It defines an ABI for MPI, and -provides an MPI implementation based on this ABI. That is, -MPItrampoline does not implement any MPI functions itself, it only -forwards them to a "real" implementation via this ABI. The advantage -is that one can produce "portable" applications that can use any given -MPI implementation. For example, this will make it possible to build -external packages for [Julia](https://julialang.org) via -[Yggdrasil](https://github.com/JuliaPackaging/Yggdrasil) that run -efficiently on almost any HPC system. - -A small and simple -[MPIwrapper](https://github.com/eschnett/MPIwrapper) library is used -to provide this ABI for any given MPI installation. MPIwrapper needs -to be compiled for each MPI installation that is to be used with -MPItrampoline, but this is quick and easy. - -## Successfully Tested - -- Debian 11.0 via Docker (MPICH; arm32v5, arm32v7, arm64v8, mips64le, ppc64le, riscv64; C/C++ only) -- Debian 11.0 via Docker (MPICH; i386, x86-64) -- macOS laptop (MPICH, OpenMPI; x86-64) -- macOS via Github Actions (OpenMPI; x86-64) -- Ubuntu 20.04 via Docker (MPICH; x86-64) -- Ubuntu 20.04 via Github Actions (MPICH, OpenMPI; x86-64) -- [Blue Waters](https://bluewaters.ncsa.illinois.edu), HPC system at the [NCSA](http://www.ncsa.illinois.edu) (Cray MPICH; x86-64) -- [Graham](https://docs.computecanada.ca/wiki/Graham), HPC system at [Compute Canada](https://www.computecanada.ca) (Intel MPI; x86-64) -- [Marconi A3](https://www.hpc.cineca.it/hardware/marconi), HPC system at [Cineca](https://www.hpc.cineca.it) (Intel MPI; x86-64) -- [Niagara](https://docs.computecanada.ca/wiki/Niagara), HPC system at [Compute Canada](https://www.computecanada.ca) (OpenMPI; x86-64) -- [Summit](https://www.olcf.ornl.gov/summit/), HPC system at [ORNL](https://www.ornl.gov) (Spectrum MPI; IBM POWER 9) -- Symmetry, in-house HPC system at the [Perimeter Institute](https://perimeterinstitute.ca) (MPICH, OpenMPI; x86-64) - -## Workflow - -### Preparing an HPC system - -Install MPIwrapper, wrapping the MPI installation you want to use -there. You can install MPIwrapper multiple times if you want to wrap -more than one MPI implementation. - -This is possibly as simple as -```sh -cmake -S . -B build -DMPIEXEC_EXECUTABLE=mpiexec -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=$HOME/mpiwrapper -cmake --build build -cmake --install build -``` -but nothing is ever simple on an HPC system. It might be necessary to -load certain modules, or to specify more cmake MPI configuration -options. - -The MPIwrapper libraries remain on the HPC system, they are installed -independently of any application. - -### Building an application - -Build your application as usual, using MPItrampline as MPI library. - -### Running an application - -At startup time, MPItrampoline needs to be told which MPIwrapper -library to use. This is done via the environment variable -`MPITRAMPOLINE_LIB`. You also need to point MPItrampoline's `mpiexec` -to a respective wrapper created by MPIwrapper, using the environment -variable `MPITRAMPOLINE_MPIEXEC`. - -For example: -```sh -env MPITRAMPOLINE_MPIEXEC=$HOME/mpiwrapper/bin/mpiwrapper-mpiexec MPITRAMPOLINE_LIB=$HOME/mpiwrapper/lib/libmpiwrapper.so mpiexec -n 4 ./your-application -``` -The `mpiexec` you run here needs to be the one provided by MPItrampoline. +This is a complete rewrite using the upcoming standard MPI ABI: [Why +and How](http://export.arxiv.org/abs/2308.11214), [proposed +standard](https://github.com/mpiwg-abi/specification-text-draft). ## Current state -MPItrampoline uses the C preprocessor to create wrapper functions for -each MPI function. This is how `MPI_Send` is wrapped: -```C -FUNCTION(int, Send, - (const void *buf, int count, MT(Datatype) datatype, int dest, int tag, - MT(Comm) comm), - (buf, count, (MP(Datatype))datatype, dest, tag, (MP(Comm))comm)) -``` - -Unfortunately, MPItrampoline does not yet wrap the Fortran API. Your -help is welcome. - -Certain MPI types, constants, and functions are difficult to -wrap. Theoretically, there could be MPI libraries where it is not -possible to implement the current MPI ABI. If you encounter this, -please let me know -- maybe there is a work-around. +Supported MPI standard: +- MPI 4.1, except: + - MPI tool interface (planned) + - MPI profiling interface (planned) + - `MPI_Comm_create_errhandler` (vararg functions cannot be forwarded) + - `MPI_File_create_errhandler` (vararg functions cannot be forwarded) + - `MPI_Pcontrol` (vararg functions cannot be forwarded) + - `MPI_Session_create_errhandler` (vararg functions cannot be forwarded) + - `MPI_Win_create_errhandler` (vararg functions cannot be forwarded) + +Tested MPI implementations: +- MPICH +- OpenMPI + +Supported languages: +- C +- C++ (using the MPI C standard) +- fixed-form Fortran (aka "Fortran 77"): nascent, via `mpif.h` +- free-form Fortran (aka "Fortran 90"): nascent, via `mpif.h` + +Tested CPU architectures: +- amd64 +- arm32v5 +- arm32v7 +- arm64v8 +- i386 +- mips64le +- ppc64le +- s390x + +Tested HPC systems: +- none yet + +## Notes + +The MPI ABI reserves handles in the range 0...0x3fff (16383). The +underlying MPI implementation might use this range as well. This case +is currently detected but not yet handled. + +There is a hardcoded limit on the number of operators that can be +created via `MPI_Op_create` (and `MPI_Op_create_c`). This limit can be +increased if necessary. + +`MPI_Comm_idup` (and `MPI_Comm_idup_with_info`) are awkward -- they +require attaching clean-up actions to these requests. Each completed +request then needs to be checked whether it has a cleanup action +attached to it. There is a fast-path; let's see how expensive this is. diff --git a/bin/mpiexec.in b/bin/mpiexec.in deleted file mode 100755 index fd356762..00000000 --- a/bin/mpiexec.in +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -MPITRAMPOLINE_DEFAULT_MPIEXEC='@MPITRAMPOLINE_DEFAULT_MPIEXEC@' -if [ -n "${MPITRAMPOLINE_MPIEXEC+x}" ]; then - mpiexec="${MPITRAMPOLINE_MPIEXEC}" -elif [ -n "${MPITRAMPOLINE_DEFAULT_MPIEXEC}" ]; then - mpiexec="${MPITRAMPOLINE_DEFAULT_MPIEXEC}" -else - echo "The environment variable MPITRAMPOLINE_MPIEXEC is not set." - echo "Running the application directly." 1>&2 - sleep 1 - exec "$@" -fi -exec "${mpiexec}" "$@" diff --git a/doc/2308.11214.pdf b/doc/2308.11214.pdf new file mode 100644 index 00000000..6f92a13f Binary files /dev/null and b/doc/2308.11214.pdf differ diff --git a/doc/HandleConstants.txt b/doc/HandleConstants.txt new file mode 100644 index 00000000..76f79be8 --- /dev/null +++ b/doc/HandleConstants.txt @@ -0,0 +1,124 @@ + 0 000000000000 invalid (uninitialized) + 32 000000100000 MPI_OP_NULL + 33 000000100001 MPI_OP_SUM + 34 000000100010 MPI_OP_MIN + 35 000000100011 MPI_OP_MAX + 36 000000100100 MPI_OP_PROD + 40 000000101000 MPI_OP_BAND + 41 000000101001 MPI_OP_BOR + 42 000000101010 MPI_OP_BXOR + 48 000000110000 MPI_OP_LAND + 49 000000110001 MPI_OP_LOR + 50 000000110010 MPI_OP_LXOR + 56 000000111000 MPI_OP_MINLOC + 57 000000111001 MPI_OP_MAXLOC + 60 000000111100 MPI_OP_REPLACE + 61 000000111101 MPI_NO_OP + 256 000100000000 MPI_COMM_NULL + 257 000100000001 MPI_COMM_WORLD + 258 000100000010 MPI_COMM_SELF + 264 000100001000 MPI_GROUP_NULL + 265 000100001001 MPI_GROUP_EMPTY + 272 000100010000 MPI_WIN_NULL + 280 000100011000 MPI_FILE_NULL + 288 000100100000 MPI_SESSION_NULL + 296 000100101000 MPI_MESSAGE_NULL + 297 000100101001 MPI_MESSAGE_NO_PROC + 304 000100110000 MPI_INFO_NULL + 320 000101000000 MPI_ERRHANDLER_NULL + 321 000101000001 MPI_ERRORS_ARE_FATAL + 322 000101000010 MPI_ERRORS_RETURN + 323 000101000011 MPI_ERRORS_ABORT + 384 000110000000 MPI_REQUEST_NULL + 512 001000000000 MPI_DATATYPE_NULL + 513 001000000001 MPI_AINT + 514 001000000010 MPI_COUNT + 515 001000000011 MPI_OFFSET + 519 001000000111 MPI_PACKED + 520 001000001000 MPI_SHORT + 521 001000001001 MPI_INT + 522 001000001010 MPI_LONG + 523 001000001011 MPI_LONG_LONG + 524 001000001100 MPI_UNSIGNED_SHORT + 525 001000001101 MPI_UNSIGNED + 526 001000001110 MPI_UNSIGNED_LONG + 527 001000001111 MPI_UNSIGNED_LONG_LONG + 528 001000010000 MPI_FLOAT + 530 001000010010 MPI_C_FLOAT_COMPLEX + 531 001000010011 MPI_CXX_FLOAT_COMPLEX + 532 001000010100 MPI_DOUBLE + 534 001000010110 MPI_C_DOUBLE_COMPLEX + 535 001000010111 MPI_CXX_DOUBLE_COMPLEX + 536 001000011000 MPI_INTEGER + 537 001000011001 MPI_LOGICAL + 538 001000011010 MPI_REAL + 539 001000011011 MPI_COMPLEX + 540 001000011100 MPI_DOUBLE_PRECISION + 541 001000011101 MPI_DOUBLE_COMPLEX + 544 001000100000 MPI_LONG_DOUBLE + 546 001000100010 + 548 001000100100 MPI_C_LONG_DOUBLE_COMPLEX + 549 001000100101 MPI_CXX_LONG_DOUBLE_COMPLEX + 550 001000100110 + 552 001000101000 MPI_FLOAT_INT + 553 001000101001 MPI_DOUBLE_INT + 554 001000101010 MPI_LONG_INT + 555 001000101011 MPI_2INT + 556 001000101100 MPI_SHORT_INT + 557 001000101101 MPI_LONG_DOUBLE_INT + 560 001000110000 MPI_2REAL + 561 001000110001 MPI_2DOUBLE_PRECISION + 562 001000110010 MPI_2INTEGER + 568 001000111000 MPI_C_BOOL + 569 001000111001 MPI_CXX_BOOL + 572 001000111100 MPI_WCHAR + 576 001001000000 MPI_INT8_T + 577 001001000001 MPI_UINT8_T + 578 001001000010 + 579 001001000011 MPI_CHAR + 580 001001000100 MPI_SIGNED_CHAR + 581 001001000101 MPI_UNSIGNED_CHAR + 583 001001000111 MPI_BYTE + 584 001001001000 MPI_INT16_T + 585 001001001001 MPI_UINT16_T + 586 001001001010 + 587 001001001011 + 591 001001001111 + 592 001001010000 MPI_INT32_T + 593 001001010001 MPI_UINT32_T + 594 001001010010 + 595 001001010011 + 599 001001010111 + 600 001001011000 MPI_INT64_T + 601 001001011001 MPI_UINT64_T + 602 001001011010 + 603 001001011011 + 607 001001011111 + 608 001001100000 + 609 001001100001 + 610 001001100010 + 611 001001100011 + 615 001001100111 + 619 001001101011 + 623 001001101111 + 704 001011000000 MPI_INTEGER1 + 705 001011000001 MPIX_LOGICAL1 + 706 001011000010 MPIX_REAL1 + 707 001011000011 MPI_CHARACTER + 712 001011001000 MPI_INTEGER2 + 713 001011001001 MPIX_LOGICAL2 + 714 001011001010 MPI_REAL2 + 715 001011001011 + 720 001011010000 MPI_INTEGER4 + 721 001011010001 MPIX_LOGICAL4 + 722 001011010010 MPI_REAL4 + 723 001011010011 MPI_COMPLEX4 + 728 001011011000 MPI_INTEGER8 + 729 001011011001 MPIX_LOGICAL8 + 730 001011011010 MPI_REAL8 + 731 001011011011 MPI_COMPLEX8 + 736 001011100000 MPI_INTEGER16 + 738 001011100010 MPI_REAL16 + 739 001011100011 MPI_COMPLEX16 + 747 001011101011 MPI_COMPLEX32 +1024 010000000000 not a predefined handle constant diff --git a/doc/IntegerConstants.md b/doc/IntegerConstants.md new file mode 100644 index 00000000..9e538ff9 --- /dev/null +++ b/doc/IntegerConstants.md @@ -0,0 +1,279 @@ +```c +enum { + // Status indexing - must match MPI_Status definition + MPI_F_SOURCE = 0, + MPI_F_TAG = 1, + MPI_F_ERROR = 2, + // Fortran status array size and reserved index values (in C) + MPI_F_STATUS_SIZE = 8 +}; +``` + +```c +// Error classes +enum { + MPI_SUCCESS = 0, + MPI_ERR_BUFFER = 1, + MPI_ERR_COUNT = 2, + MPI_ERR_TYPE = 3, + MPI_ERR_TAG = 4, + MPI_ERR_COMM = 5, + MPI_ERR_RANK = 6, + MPI_ERR_REQUEST = 7, + MPI_ERR_ROOT = 8, + MPI_ERR_GROUP = 9, + MPI_ERR_OP = 10, + MPI_ERR_TOPOLOGY = 11, + MPI_ERR_DIMS = 12, + MPI_ERR_ARG = 13, + MPI_ERR_UNKNOWN = 14, + MPI_ERR_TRUNCATE = 15, + MPI_ERR_OTHER = 16, + MPI_ERR_INTERN = 17, + MPI_ERR_PENDING = 18, + MPI_ERR_IN_STATUS = 19, + MPI_ERR_ACCESS = 20, + MPI_ERR_AMODE = 21, + MPI_ERR_ASSERT = 22, + MPI_ERR_BAD_FILE = 23, + MPI_ERR_BASE = 24, + MPI_ERR_CONVERSION = 25, + MPI_ERR_DISP = 26, + MPI_ERR_DUP_DATAREP = 27, + MPI_ERR_FILE_EXISTS = 28, + MPI_ERR_FILE_IN_USE = 29, + MPI_ERR_FILE = 30, + MPI_ERR_INFO_KEY = 31, + MPI_ERR_INFO_NOKEY = 32, + MPI_ERR_INFO_VALUE = 33, + MPI_ERR_INFO = 34, + MPI_ERR_IO = 35, + MPI_ERR_KEYVAL = 36, + MPI_ERR_LOCKTYPE = 37, + MPI_ERR_NAME = 38, + MPI_ERR_NO_MEM = 39, + MPI_ERR_NOT_SAME = 40, + MPI_ERR_NO_SPACE = 41, + MPI_ERR_NO_SUCH_FILE = 42, + MPI_ERR_PORT = 43, + MPI_ERR_PROC_ABORTED = 44, + MPI_ERR_QUOTA = 45, + MPI_ERR_READ_ONLY = 46, + MPI_ERR_RMA_ATTACH = 47, + MPI_ERR_RMA_CONFLICT = 48, + MPI_ERR_RMA_RANGE = 49, + MPI_ERR_RMA_SHARED = 50, + MPI_ERR_RMA_SYNC = 51, + MPI_ERR_RMA_FLAVOR = 52, + MPI_ERR_SERVICE = 53, + MPI_ERR_SESSION = 54, + MPI_ERR_SIZE = 55, + MPI_ERR_SPAWN = 56, + MPI_ERR_UNSUPPORTED_DATAREP = 57, + MPI_ERR_UNSUPPORTED_OPERATION = 58, + MPI_ERR_VALUE_TOO_LARGE = 59, + MPI_ERR_WIN = 60, + MPI_ERR_ERRHANDLER = 61, + MPI_T_ERR_CANNOT_INIT = 1000, + MPI_T_ERR_NOT_ACCESSIBLE = 1001, + MPI_T_ERR_NOT_INITIALIZED = 1002, + MPI_T_ERR_NOT_SUPPORTED = 1003, + MPI_T_ERR_MEMORY = 1004, + MPI_T_ERR_INVALID = 1005, + MPI_T_ERR_INVALID_INDEX = 1006, + MPI_T_ERR_INVALID_ITEM = 1007, + MPI_T_ERR_INVALID_SESSION = 1008, + MPI_T_ERR_INVALID_HANDLE = 1009, + MPI_T_ERR_INVALID_NAME = 1010, + MPI_T_ERR_OUT_OF_HANDLES = 1011, + MPI_T_ERR_OUT_OF_SESSIONS = 1012, + MPI_T_ERR_CVAR_SET_NOT_NOW = 1013, + MPI_T_ERR_CVAR_SET_NEVER = 1014, + MPI_T_ERR_PVAR_NO_WRITE = 1015, + MPI_T_ERR_PVAR_NO_STARTSTOP = 1016, + MPI_T_ERR_PVAR_NO_ATOMIC = 1017, + MPI_ERR_LASTCODE = 0x3fff // half of the minimum required value of INT_MAX +}; +``` + +```c +// Buffer Address Constants +#define MPI_BOTTOM ((void*)0) +#define MPI_IN_PLACE ((void*)1) + +// Constants Specifying Empty or Ignored Input +#define MPI_ARGV_NULL ((char**)0) +#define MPI_ARGVS_NULL ((char***)0) +#define MPI_ERRCODES_IGNORE ((int*)0) +#define MPI_STATUS_IGNORE ((MPI_Status*)0) +#define MPI_STATUSES_IGNORE ((MPI_Status**)0) +#define MPI_UNWEIGHTED ((int*)2) +#define MPI_WEIGHTS_EMPTY ((int*)3) + +// Other constants +#define MPI_BSEND_OVERHEAD 512 // MPICH=96, OMPI=128 + +// String size constants +#define MPI_MAX_DATAREP_STRING 128 // MPICH=OMPI=128 (MPICH has it in `mpio.h`) +#define MPI_MAX_ERROR_STRING 512 // MPICH was bigger +#define MPI_MAX_INFO_KEY 256 // MPICH was bigger +#define MPI_MAX_INFO_VAL 1024 // MPICH was bigger +#define MPI_MAX_LIBRARY_VERSION_STRING 8192 // MPICH was bigger +#define MPI_MAX_OBJECT_NAME 128 // MPICH was bigger +#define MPI_MAX_PORT_NAME 1024 // OMPI was bigger +#define MPI_MAX_PROCESSOR_NAME 256 // OMPI was bigger +#define MPI_MAX_STRINGTAG_LEN 1024 // OMPI was bigger (v5.0+) +#define MPI_MAX_PSET_NAME_LEN 512 // OMPI was bigger (v5.0+) +``` + +```c +// Mode Constants +// must be powers-of-2 to support OR-ing +enum { + // Files + MPI_MODE_APPEND = 1, + MPI_MODE_CREATE = 2, + MPI_MODE_DELETE_ON_CLOSE = 4, + MPI_MODE_EXCL = 8, + MPI_MODE_RDONLY = 16, + MPI_MODE_RDWR = 32, + MPI_MODE_SEQUENTIAL = 64, + MPI_MODE_UNIQUE_OPEN = 128, + MPI_MODE_WRONLY = 256, + // Windows + MPI_MODE_NOCHECK = 1024, + MPI_MODE_NOPRECEDE = 2048, + MPI_MODE_NOPUT = 4096, + MPI_MODE_NOSTORE = 8192, + MPI_MODE_NOSUCCEED = 16384 +}; +``` + +```c +enum { + // rank sentinels - must be negative + MPI_ANY_SOURCE = -1, + MPI_PROC_NULL = -2, + MPI_ROOT = -3, + + // tag sentinels - should be negative + MPI_ANY_TAG = -101, + + // These apply to MPI_COMM_WORLD + MPI_TAG_UB = -201, + MPI_IO = -202, + MPI_HOST = -203, + MPI_WTIME_IS_GLOBAL = -204, + MPI_APPNUM = -205, + MPI_LASTUSEDCODE = -206, + MPI_UNIVERSE_SIZE = -207, + + // Predefined Attribute Keys + // These apply to Windows + MPI_WIN_BASE = -301, + MPI_WIN_DISP_UNIT = -302, + MPI_WIN_SIZE = -303, + MPI_WIN_CREATE_FLAVOR = -304, + MPI_WIN_MODEL = -305, + + // attribute constant - should be negative + MPI_KEYVAL_INVALID = -401, + + // special displacement for sequential access file - should be negative + MPI_DISPLACEMENT_CURRENT = -501, + + // multi-purpose sentinel - must be negative + MPI_UNDEFINED = -601, + + //Results of communicator and group comparisons + MPI_IDENT = -701, + MPI_CONGRUENT = -702, + MPI_SIMILAR = -703, + MPI_UNEQUAL = -704, + + // Environmental inquiry keys and Predefined Attribute Keys + // Threads Constants + // These values are monotonic; i.e., SINGLE < FUNNELED < SERIALIZED < MULTIPLE. + MPI_THREAD_MULTIPLE = -801, + MPI_THREAD_SERIALIZED = -802, + MPI_THREAD_FUNNELED = -803, + MPI_THREAD_SINGLE = -804, + + // RMA lock constants - arbitrary values + MPI_LOCK_EXCLUSIVE = -901, + MPI_LOCK_SHARED = -902, + + // Communicator split type constants - arbitrary values + MPI_COMM_TYPE_SHARED = -1001, + MPI_COMM_TYPE_HW_UNGUIDED = -1002, + MPI_COMM_TYPE_HW_GUIDED = -1003, + + // MPI Window Create Flavors + MPI_WIN_FLAVOR_ALLOCATE = -1101, + MPI_WIN_FLAVOR_CREATE = -1102, + MPI_WIN_FLAVOR_DYNAMIC = -1103, + MPI_WIN_FLAVOR_SHARED = -1104, + + // MPI Window Models + MPI_WIN_SEPARATE = -1201, + MPI_WIN_UNIFIED = -1202, + + // Datatype Decoding Constants + MPI_COMBINER_NAMED = -1301, + MPI_COMBINER_DUP = -1302, + MPI_COMBINER_CONTIGUOUS = -1303, + MPI_COMBINER_VECTOR = -1304, + MPI_COMBINER_HVECTOR = -1305, + MPI_COMBINER_INDEXED = -1306, + MPI_COMBINER_HINDEXED = -1307, + MPI_COMBINER_INDEXED_BLOCK = -1308, + MPI_COMBINER_HINDEXED_BLOCK = -1309, + MPI_COMBINER_STRUCT = -1310, + MPI_COMBINER_SUBARRAY = -1311, + MPI_COMBINER_DARRAY = -1312, + MPI_COMBINER_F90_REAL = -1313, + MPI_COMBINER_F90_COMPLEX = -1314, + MPI_COMBINER_F90_INTEGER = -1315, + MPI_COMBINER_RESIZED = -1316, + + // File Operation Constants (?) + MPI_DISTRIBUTE_BLOCK = -1401, + MPI_DISTRIBUTE_CYCLIC = -1402, + MPI_DISTRIBUTE_DFLT_DARG = -1403, + MPI_DISTRIBUTE_NONE = -1404, + + MPI_ORDER_C = -1501, + MPI_ORDER_FORTRAN = -1502, + + MPI_SEEK_CUR = -1601, + MPI_SEEK_END = -1602, + MPI_SEEK_SET = -1603, + + // F90 Datatype Matching Constants + MPI_TYPECLASS_REAL = -1701, + MPI_TYPECLASS_COMPLEX = -1702, + MPI_TYPECLASS_INTEGER = -1703, + + // MPI_Topo_test + MPI_GRAPH = -1801, + MPI_DIST_GRAPH = -1802, + MPI_CART = -1803 +} +``` + +```c +#define MPI_NULL_COPY_FN ((MPI_Copy_function*)0x0) +#define MPI_DUP_FN ((MPI_Copy_function*)0x1) +#define MPI_NULL_DELETE_FN ((MPI_Delete_function*)0x0) +#define MPI_COMM_NULL_COPY_FN ((MPI_Comm_copy_attr_function*)0x0) +#define MPI_COMM_DUP_FN ((MPI_Comm_copy_attr_function*)0x1) +#define MPI_COMM_NULL_DELETE_FN ((MPI_Comm_delete_attr_function*)0x0) +#define MPI_TYPE_NULL_COPY_FN ((MPI_Type_copy_attr_function*)0x0) +#define MPI_TYPE_DUP_FN ((MPI_Type_copy_attr_function*)0x1) +#define MPI_TYPE_NULL_DELETE_FN ((MPI_Type_delete_attr_function*)0x0) +#define MPI_WIN_NULL_COPY_FN ((MPI_Win_copy_attr_function*)0x0) +#define MPI_WIN_DUP_FN ((MPI_Win_copy_attr_function*)0x1) +#define MPI_WIN_NULL_DELETE_FN ((MPI_Win_delete_attr_function*)0x0) +#define MPI_CONVERSION_FN_NULL ((MPI_Datarep_conversion_function)0x0) +#define MPI_CONVERSION_FN_NULL_C ((MPI_Datarep_conversion_function_c)0x0) +``` diff --git a/doc/documentation.md b/doc/documentation.md deleted file mode 100644 index b61b3ae1..00000000 --- a/doc/documentation.md +++ /dev/null @@ -1,110 +0,0 @@ -# MPItrampoline - -[MPItrampoline](https://github.com/eschnett/MPItrampoline) is an MPI -implementation that works by forwarding all MPI calls to another MPI -library, which can be chosen at run time. This make it much easier to -build software on HPC systems, where one often cannot build and -install one's own MPI library. - -## Background - -[MPI](https://www.mpi-forum.org) is the de-facto standard for -inter-node communication on HPC systems, and has been for the past 25 -years. While highly successful, MPI is a standard for source code (it -defines an [API](https://en.wikipedia.org/wiki/API)), and is not a -standard defining binary compatibility (it does not define an -[ABI](https://en.wikipedia.org/wiki/Application_binary_interface)). -This means that applications running on HPC systems need to be -compiled anew on every system. This is tedious, since the software -that is available on every HPC system is slightly different. Modern -approaches based on Docker or on statically linked binaries do not -work. - -MPI libraries are different from most other libraries (such as FFTW, -HDF5, PETSc): to run efficiently, MPI needs to access the high-speed -networking hardware. Therefore, MPI is usually either distributed with -the operating system (Cray) or is installed by system administrators. -CUDA faces a similar issue, as it needs to access the GPU hardware. -CUDA solves this by being distributed in two pieces: The CUDA driver, -which needs to be installed by a system administrator, and the CUDA -toolkit, which can be installed by anybody. As long as a CUDA driver -is installed on the system, one can bring one's own CUDA toolkit. MPI -libraries are, unfortunately, not split into two pieces like this, and -one can therefore not use one's own MPI library. On each HPC system, -one needs to compile applications from scratch, using the MPI -libraries that are installed there, and (by transitivity) using the -C++ and Fortran compilers that where used to build these MPI -libraries. This leads to much headache and suffering. - -## How it works - -MPItrampoline aims to address this. It comes in two pieces, -*MPIwrapper* and *MPItrampoline* itself. MPItrampoline is highly -portable, and one can build applications against it. It is possible to -create statically linked, portable binaries (within the usual -limitations), and download and run them on HPC systems. - -At run time, MPItrampoline needs access a real MPI implementation. For -each MPI implementation that is to be used with MPItrampoline, one -needs to build the MPIwrapper library, which links against the real -MPI implementation. MPItrampoline and MPIwrapper communicate via an -*MPI ABI* that effectively isolates applications from system-dependent -MPI implementations. MPItrampoline and MPIwrapper can be built by -different compilers. - -## Example - -We use the following scenario as example: We have an application that -uses FFTW, HDF5, and MPI. The application is written mostly in C++ -with some kernels in Fortran and some glue code in C. Both FFTW and -HDF5 also use MPI. For consistency, it will be necessary to build all -software (FFTW, HDF5, MPI, and the application) with the same C, C++, -and Fortran compilers, and both FFTW and HDF5 need to be built using -the same MPI library as Cactus. - -### Current state - -Usually, one has to go through the following steps for each HPC system -where the application should be installed: - -- Choose an MPI implementation from among those available on the - system. This determines which C, C++, and Fortran compilers need to - be used. -- Check whether there is a matching FFTW library available on the - system. It must be build by the same compilers, and must be using - the same MPI library. If none is there (or if it is too old), one - has to build and install FFTW oneself (or ask the system - administrators for help). -- Ditto for HDF5. HDF5 has many more configuration options that FFTW, - and it is less likely that a matching version is available. -- Finally, one configures one's application (here: Cactus) to uses - these compilers and these FFTW, HDF5, and MPI libraries. - -When the application needs to be installed on a different system (a -student's laptop, a workstation, a different HPC system, ...), then -all these steps need to be repeated. When researchers want to make -changes to the application, then each member of the research group -needs to install the application by themselves, and needs to acquire -the respective system administration skills. - -This is a very frustrating experience. The complexity in these steps -is, in my opinion, one of the largest stumbling blocks for new HPC -users, and is one of the main reasons why HPC remains a niche field. -It takes a lot of experience to successfully install software on HPC -systems. - -### MPItrampoline - -With MPItrampoline, this is much simplified: - -- Start out by choosing a C, C++, and Fortran compiler. You are free - to choose a modern C++ compiler if needed, or stay away from - vendor-provided compilers that are difficult to use. -- Build MPItrampoline -- Build FFTW -- Build HDF5 -- Build the application - -One is free to - -THIS DOESN'T LOOK MUCH SIMPLER diff --git a/doc/mpi31-report.pdf b/doc/mpi31-report.pdf new file mode 100644 index 00000000..ffa66050 Binary files /dev/null and b/doc/mpi31-report.pdf differ diff --git a/doc/mpi40-report.pdf b/doc/mpi40-report.pdf new file mode 100644 index 00000000..58fe676e Binary files /dev/null and b/doc/mpi40-report.pdf differ diff --git a/doc/mpi41-report.pdf b/doc/mpi41-report.pdf new file mode 100644 index 00000000..d080d238 Binary files /dev/null and b/doc/mpi41-report.pdf differ diff --git a/doc/print-handle-constants.py b/doc/print-handle-constants.py new file mode 100644 index 00000000..d260297c --- /dev/null +++ b/doc/print-handle-constants.py @@ -0,0 +1,537 @@ +#!/usr/bin/env python3 + +import sys + +constants = ["" for x in range(0,1025)] +handle_types = ["" for x in range(0,1025)] + +def parse_datatype(h): + handle_types[h] = "MPI_Datatype" + if not(h & 0b1_0000_0000): + category = (h & 0b_1111_1000) >> 3 + kind = (h & 0b_0000_0111) + # category buckets: + # 00... not strictly fixed-size + # 01... C/C++ fixed-size + # 10... reserved + # 11... Fortran fixed-size + # ^ fixed-size bit + # ^^^ encoded size bits (log2 of size in bytes) + match category: + # language-independent types + case 0b00_000: + match kind: + case 0b000: + constants[h] = "MPI_DATATYPE_NULL" + case 0b001: + constants[h] = "MPI_AINT" + case 0b010: + constants[h] = "MPI_COUNT" + case 0b011: + constants[h] = "MPI_OFFSET" + case 0b111: + constants[h] = "MPI_PACKED" + case _: + constants[h] = "reserved datatype" + + # C integers + case 0b00_001: + signed = not(h & 0b100) + kind = (h & 0b11) + if signed: + match kind: + case 0b00: + constants[h] = "MPI_SHORT" + case 0b01: + constants[h] = "MPI_INT" + case 0b10: + constants[h] = "MPI_LONG" + case 0b11: + constants[h] = "MPI_LONG_LONG" + else: + match kind: + case 0b00: + constants[h] = "MPI_UNSIGNED_SHORT" + case 0b01: + constants[h] = "MPI_UNSIGNED" + case 0b10: + constants[h] = "MPI_UNSIGNED_LONG" + case 0b11: + constants[h] = "MPI_UNSIGNED_LONG_LONG" + + # C/C++ floating-point types + case 0b00_010: + is_float = not(h & 0b100) + kind = (h & 0b11) + if is_float: + match kind: + case 0b00: + constants[h] = "MPI_FLOAT" + case 0b10: + constants[h] = "MPI_C_FLOAT_COMPLEX" + case 0b11: + constants[h] = "MPI_CXX_FLOAT_COMPLEX" + case _: + constants[h] = "reserved datatype" + else: + match kind: + case 0b00: + constants[h] = "MPI_DOUBLE" + case 0b10: + constants[h] = "MPI_C_DOUBLE_COMPLEX" + case 0b11: + constants[h] = "MPI_CXX_DOUBLE_COMPLEX" + case _: + constants[h] = "reserved datatype" + + # Fortran types + case 0b00_011: + match kind: + case 0b000: + constants[h] = "MPI_INTEGER" + case 0b001: + constants[h] = "MPI_LOGICAL" + case 0b010: + constants[h] = "MPI_REAL" + case 0b011: + constants[h] = "MPI_COMPLEX" + case 0b100: + constants[h] = "MPI_DOUBLE_PRECISION" + case 0b101: + constants[h] = "MPI_DOUBLE_COMPLEX" + case _: + constants[h] = "reserved datatype" + + # long double + case 0b00_100: + real = not(h & 0b100) + kind = (h & 0b11) + if real: + match kind: + case 0b00: + constants[h] = "MPI_LONG_DOUBLE" + case 0b10: + constants[h] = "" + case _: + constants[h] = "reserved datatype" + else: + match kind: + case 0b00: + constants[h] = "MPI_C_LONG_DOUBLE_COMPLEX" + case 0b01: + constants[h] = "MPI_CXX_LONG_DOUBLE_COMPLEX" + case 0b10: + constants[h] = "" + case _: + constants[h] = "reserved datatype" + + # C pair types + case 0b00_101: + match kind: + case 0b000: + constants[h] = "MPI_FLOAT_INT" + case 0b001: + constants[h] = "MPI_DOUBLE_INT" + case 0b010: + constants[h] = "MPI_LONG_INT" + case 0b011: + constants[h] = "MPI_2INT" + case 0b100: + constants[h] = "MPI_SHORT_INT" + case 0b101: + constants[h] = "MPI_LONG_DOUBLE_INT" + case _: + constants[h] = "reserved datatype" + + # Fortran pair types + case 0b00_110: + match kind: + case 0b000: + constants[h] = "MPI_2REAL" + case 0b001: + constants[h] = "MPI_2DOUBLE_PRECISION" + case 0b010: + constants[h] = "MPI_2INTEGER" + # these are trash (https://github.com/open-mpi/ompi/issues/11556) + #case 0b011: + # constants[h] = "MPI_2COMPLEX (non-standard)" + #case 0b100: + # constants[h] = "MPI_2DOUBLE_COMPLEX (non-standard)" + case _: + constants[h] = "reserved datatype" + + # other C/C++ types + case 0b00_111: + match kind: + case 0b000: + constants[h] = "MPI_C_BOOL" + case 0b001: + constants[h] = "MPI_CXX_BOOL" + case 0b100: + constants[h] = "MPI_WCHAR" + case _: + constants[h] = "reserved datatype" + + # scheme + # C/C++ + # 0b000: "MPI_INT(n)_T" + # 0b001: "MPI_UINT(n)_T" + # 0b010: "" + # 0b011: (size=1) ? "MPI_CHAR" : """" + # 0b100: (size=1) ? "MPI_SIGNED_CHAR" : "reserved datatype" + # 0b101: (size=1) ? "MPI_UNSIGNED_CHAR" : "reserved datatype" + # 0b110: (size=2) ? "" : "reserved datatype" + # 0b111: (size=1) ? "MPI_BYTE" : """" + # Fortran + # 0b000: "MPI_INTEGER(n)" + # 0b001: "MPI_LOGICAL(n) (not standard)" + # 0b010: "MPI_REAL(n)" + # 0b011: (size=1) ? "MPI_CHARACTER" : "MPI_COMPLEX(n)" + + case 0b01_000: # 1 byte C/C++ + match kind: + case 0b000: + constants[h] = "MPI_INT8_T" + case 0b001: + constants[h] = "MPI_UINT8_T" + case 0b010: + constants[h] = "" + case 0b011: + constants[h] = "MPI_CHAR" + case 0b100: + constants[h] = "MPI_SIGNED_CHAR" + case 0b101: + constants[h] = "MPI_UNSIGNED_CHAR" + case 0b111: + constants[h] = "MPI_BYTE" + case _: + constants[h] = "reserved datatype" + + case 0b01_001: # 2 byte C/C++ + match kind: + case 0b000: + constants[h] = "MPI_INT16_T" + case 0b001: + constants[h] = "MPI_UINT16_T" + case 0b010: + constants[h] = "" + case 0b011: + constants[h] = "" + case 0b111: + constants[h] = "" + case _: + constants[h] = "reserved datatype" + + case 0b01_010: # 4 byte C/C++ + match kind: + case 0b000: + constants[h] = "MPI_INT32_T" + case 0b001: + constants[h] = "MPI_UINT32_T" + case 0b010: + constants[h] = "" + case 0b011: + constants[h] = "" + case 0b111: + constants[h] = "" + case _: + constants[h] = "reserved datatype" + + case 0b01_011: # 8 byte C/C++ + match kind: + case 0b000: + constants[h] = "MPI_INT64_T" + case 0b001: + constants[h] = "MPI_UINT64_T" + case 0b010: + constants[h] = "" + case 0b011: + constants[h] = "" + case 0b111: + constants[h] = "" + case _: + constants[h] = "reserved datatype" + + case 0b01_100: # 16 byte C/C++ + match kind: + case 0b0000: + constants[h] = "" + case 0b0001: + constants[h] = "" + case 0b0010: + constants[h] = "" + case 0b0011: + constants[h] = "" + case 0b0111: + constants[h] = "" + case _: + constants[h] = "reserved datatype" + + case 0b01_101: # 32 byte C/C++ + match kind: + case 0b0011: + constants[h] = "" + case 0b0111: + constants[h] = "" + case _: + constants[h] = "reserved datatype" + + case 0b11_000: # 1 byte Fortran + match kind: + case 0b000: + constants[h] = "MPI_INTEGER1" + case 0b001: + constants[h] = "MPIX_LOGICAL1" + case 0b010: + constants[h] = "MPIX_REAL1" + case 0b011: + constants[h] = "MPI_CHARACTER" + case _: + constants[h] = "reserved datatype" + + case 0b11_001: # 2 byte Fortran + match kind: + case 0b000: + constants[h] = "MPI_INTEGER2" + case 0b001: + constants[h] = "MPIX_LOGICAL2" + case 0b010: + constants[h] = "MPI_REAL2" + case 0b011: + constants[h] = "" + case _: + constants[h] = "reserved datatype" + + case 0b11_010: # 4 byte Fortran + match kind: + case 0b000: + constants[h] = "MPI_INTEGER4" + case 0b001: + constants[h] = "MPIX_LOGICAL4" + case 0b010: + constants[h] = "MPI_REAL4" + case 0b011: + constants[h] = "MPI_COMPLEX4" + case _: + constants[h] = "reserved datatype" + + case 0b11_011: # 8 byte Fortran + match kind: + case 0b0000: + constants[h] = "MPI_INTEGER8" + case 0b0001: + constants[h] = "MPIX_LOGICAL8" + case 0b0010: + constants[h] = "MPI_REAL8" + case 0b0011: + constants[h] = "MPI_COMPLEX8" + case _: + constants[h] = "reserved datatype" + + case 0b11_100: # 16 byte Fortran + match kind: + case 0b0000: + constants[h] = "MPI_INTEGER16" + case 0b0010: + constants[h] = "MPI_REAL16" + case 0b0011: + constants[h] = "MPI_COMPLEX16" + case _: + constants[h] = "reserved datatype" + + case 0b11_101: # 32 byte Fortran + match kind: + case 0b0011: + constants[h] = "MPI_COMPLEX32" + case _: + constants[h] = "reserved datatype" + + case _: + constants[h] = "reserved datatype" + + else: + constants[h] = "reserved datatype" + +def parse_other(h): + handle_type = (h & 0b11111_000) >> 3; + if (handle_type == 0b00000): + handle_types[h] = "MPI_Comm" + comm_type = (h & 0b111) + if (comm_type == 0b000): + constants[h] = "MPI_COMM_NULL" + elif (comm_type == 0b001): + constants[h] = "MPI_COMM_WORLD" + elif (comm_type == 0b010): + constants[h] = "MPI_COMM_SELF" + else: + constants[h] = "reserved comm" + elif (handle_type == 0b00001): + handle_types[h] = "MPI_Group" + group_type = (h & 0b111) + if (group_type == 0b000): + constants[h] = "MPI_GROUP_NULL" + elif (group_type == 0b001): + constants[h] = "MPI_GROUP_EMPTY" + else: + constants[h] = "reserved group" + elif (handle_type == 0b00010): + handle_types[h] = "MPI_Win" + win_type = (h & 0b111) + if (win_type == 0b000): + constants[h] = "MPI_WIN_NULL" + else: + constants[h] = "reserved win" + elif (handle_type == 0b00011): + handle_types[h] = "MPI_File" + file_type = (h & 0b111) + if (file_type == 0b000): + constants[h] = "MPI_FILE_NULL" + else: + constants[h] = "reserved file" + elif (handle_type == 0b00100): + handle_types[h] = "MPI_Session" + session_type = (h & 0b111) + if (session_type == 0b000): + constants[h] = "MPI_SESSION_NULL" + else: + constants[h] = "reserved session" + elif (handle_type == 0b00101): + handle_types[h] = "MPI_Message" + message_type = (h & 0b111) + if (message_type == 0b000): + constants[h] = "MPI_MESSAGE_NULL" + elif (message_type == 0b001): + constants[h] = "MPI_MESSAGE_NO_PROC" + else: + constants[h] = "reserved message" + elif (handle_type == 0b00110): + handle_types[h] = "MPI_Info" + info_type = (h & 0b111) + if (info_type == 0b000): + constants[h] = "MPI_INFO_NULL" + else: + constants[h] = "reserved info" + # 0b00111 (space for new handle that only needs 8 slots) + elif (handle_type == 0b01000): + handle_types[h] = "MPI_Errhandler" + errhandler_type = (h & 0b111) + if (errhandler_type == 0b000): + constants[h] = "MPI_ERRHANDLER_NULL" + elif (errhandler_type == 0b001): + constants[h] = "MPI_ERRORS_ARE_FATAL" + elif (errhandler_type == 0b010): + constants[h] = "MPI_ERRORS_RETURN" + elif (errhandler_type == 0b011): + constants[h] = "MPI_ERRORS_ABORT" + else: + constants[h] = "reserved errhandler" + # 0b01... (lots of space for errhandlers, if necessary) + elif (handle_type == 0b10000): + handle_types[h] = "MPI_Request" + request_type = (h & 0b111) + if (request_type == 0b000): + constants[h] = "MPI_REQUEST_NULL" + else: + constants[h] = "reserved request" + else: + constants[h] = "reserved handle" + + + +def parse_op(h): + handle_types[h] = "MPI_Op" + op_type = (h & 0b11000) >> 3 + op = h & 0b111 + if (op_type == 0b00): # arithmetic + if (op == 0b000): + constants[h] = "MPI_OP_NULL" + elif (op == 0b001): + constants[h] = "MPI_OP_SUM" + elif (op == 0b010): + constants[h] = "MPI_OP_MIN" + elif (op == 0b011): + constants[h] = "MPI_OP_MAX" + elif (op == 0b100): + constants[h] = "MPI_OP_PROD" + else: + constants[h] = "reserved arithmetic op" + elif (op_type == 0b01): # bit ops + if (op == 0b000): + constants[h] = "MPI_OP_BAND" + elif (op == 0b001): + constants[h] = "MPI_OP_BOR" + elif (op == 0b010): + constants[h] = "MPI_OP_BXOR" + else: + constants[h] = "reserved bit op" + elif (op_type == 0b10): # logical ops + op = h & 0b111 + if (op == 0b000): + constants[h] = "MPI_OP_LAND" + elif (op == 0b001): + constants[h] = "MPI_OP_LOR" + elif (op == 0b010): + constants[h] = "MPI_OP_LXOR" + else: + constants[h] = "reserved logical op" + elif (op_type == 0b11): # other ops + op = h & 0b111 + if (op == 0b000): + constants[h] = "MPI_OP_MINLOC" + elif (op == 0b001): + constants[h] = "MPI_OP_MAXLOC" + elif (op == 0b100): + constants[h] = "MPI_OP_REPLACE" + elif (op == 0b101): + constants[h] = "MPI_NO_OP" + else: + constants[h] = "reserved other op" + +def parse_handle(h): + + # uninitialized handle + if (h == 0b0): + constants[h] = "invalid (uninitialized)" + return + + # if h > 1023 also works :-) + if (h & 0b1111111111111111111111111111111111111111111111111111110000000000): + constants[h] = "not a predefined handle constant" + return + + # datatype: 0b10_..._..... + if (h & 0b10_000_00000): + parse_datatype(h) + # other: 0b01_..._..... + elif (h & 0b01_000_00000): + parse_other(h) + # op: 0b00_001_..... + elif (h & 0b11_111_00000 == 0b00_001_00000): + parse_op(h) + # reserved: 0b11_..._..... or 0b00_(not op) + else: + constants[h] = "reserved handle" + + +def main(): + for h in range(0,1025): + parse_handle(h) + #print(h,constants[h]) + + if ( len(sys.argv) == 1 ): + for h in range(0,1025): + #print(h,bin(h),constants[h],handle_types[h],hex(h)) + print(format(h,"4d"),format(h,"012b"),constants[h]) + #print(h,constants[h]) + + # make mpi.h + if ( len(sys.argv) > 1 ): + for h in range(0,1025): + if (constants[h][0:3] == "MPI"): + #print(format('#define',"7s"),constants[h],'(',handle_types[h],') 0x',format(h,"4x")) + line = '#define ' + format(constants[h],"30s") + " (" + handle_types[h] + ")" + "0x" + format(h,"08x") + print(line) + +if __name__ == '__main__': + main() + diff --git a/docker/.gitignore b/docker/.gitignore new file mode 100644 index 00000000..9f67e221 --- /dev/null +++ b/docker/.gitignore @@ -0,0 +1,3 @@ +mpi-test-suite-*.log +mpi-test-suite-*.succeeded +mpi-test-suite-*.failed diff --git a/docker/Dockerfile.gcc b/docker/Dockerfile.gcc new file mode 100644 index 00000000..e2a039d8 --- /dev/null +++ b/docker/Dockerfile.gcc @@ -0,0 +1,202 @@ +# docker build --build-arg cpuarch=amd64 --build-arg githash=$(git rev-parse HEAD) --build-arg mpivendor=mpich --tag mpitrampoline6 --progress plain . +# docker run --interactive --rm --tty mpitrampoline6 + +# amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, riscv64 +ARG cpuarch=amd64 + +FROM ${cpuarch}/debian:12.4 + +# 1.1. Install dependencies + +ENV DEBIAN_FRONTEND=noninteractive +RUN apt update && \ + apt --yes --no-install-recommends install \ + autoconf \ + automake \ + autotools-dev \ + ca-certificates \ + cmake \ + g++ \ + gcc \ + gengetopt \ + gfortran \ + git \ + less \ + make \ + ninja-build + +# 1.2. Download OpenMPI test suite + +WORKDIR /home/cactus +ADD https://github.com/open-mpi/mpi-test-suite/archive/refs/tags/v1.1.1.tar.gz /home/cactus/mpi-test-suite-1.1.1.tar.gz +RUN tar xzf mpi-test-suite-1.1.1.tar.gz +WORKDIR /home/cactus/mpi-test-suite-1.1.1 +RUN ./autogen.sh + +# 1.3 Download MPItrampoline + +WORKDIR /home/cactus +ARG githash +RUN git clone -b eschnett/MPItrampoline6 https://github.com/eschnett/MPItrampoline && \ + cd MPItrampoline && \ + git checkout ${githash} + +# 2.1 Build MPItrampoline + +WORKDIR /home/cactus/MPItrampoline/mpitrampoline +RUN cmake -B build -G Ninja \ + -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_INSTALL_PREFIX=/mpitrampoline +RUN cmake --build build +RUN cmake --install build + +# 2.2. Build simple tests + +WORKDIR /home/cactus/MPItrampoline/test + +RUN /mpitrampoline/bin/mpicc -c hello-world-c.c +RUN /mpitrampoline/bin/mpicc -o hello-world-c hello-world-c.o + +RUN /mpitrampoline/bin/mpicxx -c hello-world-cxx.cxx +RUN /mpitrampoline/bin/mpicxx -o hello-world-cxx hello-world-cxx.o + +RUN /mpitrampoline/bin/mpifc -c hello-world-f.f +RUN /mpitrampoline/bin/mpifc -o hello-world-f hello-world-f.o + +RUN /mpitrampoline/bin/mpifc -c hello-world-f90.f90 +RUN /mpitrampoline/bin/mpifc -o hello-world-f90 hello-world-f90.o + +RUN /mpitrampoline/bin/mpifc -c hello-world-fortran.f90 +RUN /mpitrampoline/bin/mpifc -o hello-world-fortran hello-world-fortran.o + +RUN /mpitrampoline/bin/mpifc -c hello-world-fortran08.f90 +RUN /mpitrampoline/bin/mpifc -o hello-world-fortran08 hello-world-fortran08.o + +# 2.3. Build OpenMPI test suite + +WORKDIR /home/cactus/mpi-test-suite-1.1.1 +RUN ./configure CC=/mpitrampoline/bin/mpicc +RUN make -j$(nproc) + +# 3.1 Install system MPI + +# mpich, openmpi +ARG mpivendor=mpich + +RUN apt update && \ + case ${mpivendor} in \ + mpich) pkgs=libmpich-dev;; \ + openmpi) pkgs=libopenmpi-dev;; \ + *) exit 1;; \ + esac && \ + apt-get --yes --no-install-recommends install ${pkgs} + +# 3.2 Build MPIwrapper + +WORKDIR /home/cactus/MPItrampoline/mpiwrapper +RUN cmake -B build -G Ninja \ + -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_C_COMPILER=mpicc \ + -DCMAKE_Fortran_COMPILER=mpifort \ + -DCMAKE_INSTALL_PREFIX=/mpiwrapper +RUN cmake --build build +RUN cmake --install build +ENV MPITRAMPOLINE_LIB=/mpiwrapper/lib/libmpiwrapper.so + +# 3.3. Run simple tests + +WORKDIR /home/cactus/MPItrampoline/test + +RUN ./hello-world-c 1 +RUN case "${mpivendor}" in \ + mpich) mpiexec_options='';; \ + openmpi) mpiexec_options='--allow-run-as-root --oversubscribe';; \ + esac && \ + timeout -k 1m -v 5m mpiexec ${mpiexec_options} -n 4 ./hello-world-c 4 + +RUN ./hello-world-cxx 1 +RUN case "${mpivendor}" in \ + mpich) mpiexec_options='';; \ + openmpi) mpiexec_options='--allow-run-as-root --oversubscribe';; \ + esac && \ + timeout -k 1m -v 5m mpiexec ${mpiexec_options} -n 4 ./hello-world-cxx 4 + +RUN ./hello-world-f 1 +RUN case "${mpivendor}" in \ + mpich) mpiexec_options='';; \ + openmpi) mpiexec_options='--allow-run-as-root --oversubscribe';; \ + esac && \ + timeout -k 1m -v 5m mpiexec ${mpiexec_options} -n 4 ./hello-world-f 4 + +RUN ./hello-world-f90 1 +RUN case "${mpivendor}" in \ + mpich) mpiexec_options='';; \ + openmpi) mpiexec_options='--allow-run-as-root --oversubscribe';; \ + esac && \ + timeout -k 1m -v 5m mpiexec ${mpiexec_options} -n 4 ./hello-world-f90 4 + +RUN ./hello-world-fortran 1 +RUN case "${mpivendor}" in \ + mpich) mpiexec_options='';; \ + openmpi) mpiexec_options='--allow-run-as-root --oversubscribe';; \ + esac && \ + timeout -k 1m -v 5m mpiexec ${mpiexec_options} -n 4 ./hello-world-fortran 4 + +RUN ./hello-world-fortran08 1 +RUN case "${mpivendor}" in \ + mpich) mpiexec_options='';; \ + openmpi) mpiexec_options='--allow-run-as-root --oversubscribe';; \ + esac && \ + timeout -k 1m -v 5m mpiexec ${mpiexec_options} -n 4 ./hello-world-fortran08 4 + +# 3.4. Run OpenMPI test suite + +WORKDIR /home/cactus/mpi-test-suite-1.1.1 +RUN case "${mpivendor}" in \ + mpich) \ + mpiexec_options='' && \ + tests='0 1 2 3 4 5 6 13 14 15 16 17 18 19 20 28 29 30 32 33 34 36 37 38 39 40 41 42 43 43 44 45 46 47' && \ + true;; \ + openmpi) \ + mpiexec_options='--allow-run-as-root --oversubscribe' && \ + tests=$(seq 0 47) && \ + true;; \ + esac && \ + for testnum in ${tests}; do \ + timeout -k 1m -v 5m ./mpi_test_suite --test ${testnum} 2>&1 | \ + tee test-${testnum}.log && \ + if ! grep -q 'Number of failed tests: 0$' test-${testnum}.log; then \ + echo "Test ${testnum} failed" >>test-broken && \ + true; \ + fi && \ + true; \ + done && \ + if test -f test-broken; then \ + cat test-broken && \ + false && \ + true; \ + fi +RUN case "${mpivendor}" in \ + mpich) \ + mpiexec_options='' && \ + tests='0 1 2 3 4 5 6 13 14 15 16 17 18 19 20 28 29 30 32 33 34 36 37 38 39 40 41 42 43 43 44 45 46 47' && \ + true;; \ + openmpi) \ + mpiexec_options='--allow-run-as-root --oversubscribe' && \ + tests=$(seq 0 47) && \ + true;; \ + esac && \ + for testnum in ${tests}; do \ + timeout -k 1m -v 5m mpiexec ${mpiexec_options} -n 4 ./mpi_test_suite --test ${testnum} 2>&1 | \ + tee test-${testnum}.log && \ + if ! grep -q 'Number of failed tests: 0$' test-${testnum}.log; then \ + echo "Test ${testnum} failed" >>test-broken && \ + true; \ + fi && \ + true; \ + done && \ + if test -f test-broken; then \ + cat test-broken && \ + false && \ + true; \ + fi diff --git a/docker/Dockerfile.llvm b/docker/Dockerfile.llvm new file mode 100644 index 00000000..8d1842ee --- /dev/null +++ b/docker/Dockerfile.llvm @@ -0,0 +1,204 @@ +# docker build --file Dockerfile.clang --build-arg cpuarch=amd64 --build-arg githash=$(git rev-parse HEAD) --build-arg mpivendor=mpich --tag mpitrampoline6.clang --progress plain . +# docker run --interactive --rm --tty mpitrampoline6.clang + +# amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, riscv64 +ARG cpuarch=amd64 + +FROM ${cpuarch}/debian:trixie-20231218 + +# 1.1. Install dependencies + +ENV DEBIAN_FRONTEND=noninteractive +RUN apt update && \ + apt --yes --no-install-recommends install \ + autoconf \ + automake \ + autotools-dev \ + ca-certificates \ + clang-17 \ + cmake \ + flang-17 \ + gengetopt \ + git \ + less \ + make \ + ninja-build + +# 1.2. Download OpenMPI test suite + +WORKDIR /home/cactus +ADD https://github.com/open-mpi/mpi-test-suite/archive/refs/tags/v1.1.1.tar.gz /home/cactus/mpi-test-suite-1.1.1.tar.gz +RUN tar xzf mpi-test-suite-1.1.1.tar.gz +WORKDIR /home/cactus/mpi-test-suite-1.1.1 +RUN ./autogen.sh + +# 1.3 Download MPItrampoline + +WORKDIR /home/cactus +ARG githash +RUN git clone -b eschnett/MPItrampoline6 https://github.com/eschnett/MPItrampoline && \ + cd MPItrampoline && \ + git checkout ${githash} + +# 2.1 Build MPItrampoline + +WORKDIR /home/cactus/MPItrampoline/mpitrampoline +RUN cmake -B build -G Ninja \ + -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_C_COMPILER=clang-17 \ + -DCMAKE_CXX_COMPILER=clang++-17 \ + -DCMAKE_Fortran_COMPILER=flang-new-17 \ + -DCMAKE_INSTALL_PREFIX=/mpitrampoline +RUN cmake --build build +RUN cmake --install build + +# 2.2. Build simple tests + +WORKDIR /home/cactus/MPItrampoline/test + +RUN /mpitrampoline/bin/mpicc -c hello-world-c.c +RUN /mpitrampoline/bin/mpicc -o hello-world-c hello-world-c.o + +RUN /mpitrampoline/bin/mpicxx -c hello-world-cxx.cxx +RUN /mpitrampoline/bin/mpicxx -o hello-world-cxx hello-world-cxx.o + +RUN /mpitrampoline/bin/mpifc -c hello-world-f.f +RUN /mpitrampoline/bin/mpifc -o hello-world-f hello-world-f.o + +RUN /mpitrampoline/bin/mpifc -c hello-world-f90.f90 +RUN /mpitrampoline/bin/mpifc -o hello-world-f90 hello-world-f90.o + +RUN /mpitrampoline/bin/mpifc -c hello-world-fortran.f90 +RUN /mpitrampoline/bin/mpifc -o hello-world-fortran hello-world-fortran.o + +RUN /mpitrampoline/bin/mpifc -c hello-world-fortran08.f90 +RUN /mpitrampoline/bin/mpifc -o hello-world-fortran08 hello-world-fortran08.o + +# 2.3. Build OpenMPI test suite + +WORKDIR /home/cactus/mpi-test-suite-1.1.1 +RUN ./configure CC=/mpitrampoline/bin/mpicc +RUN make -j$(nproc) + +# 3.1 Install system MPI + +# mpich, openmpi +ARG mpivendor=mpich + +RUN apt update && \ + case ${mpivendor} in \ + mpich) pkgs=libmpich-dev;; \ + openmpi) pkgs=libopenmpi-dev;; \ + *) exit 1;; \ + esac && \ + apt-get --yes --no-install-recommends install gfortran ${pkgs} + +# 3.2 Build MPIwrapper + +WORKDIR /home/cactus/MPItrampoline/mpiwrapper +RUN cmake -B build -G Ninja \ + -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_C_COMPILER=mpicc \ + -DCMAKE_Fortran_COMPILER=mpifort \ + -DCMAKE_INSTALL_PREFIX=/mpiwrapper +RUN cmake --build build +RUN cmake --install build +ENV MPITRAMPOLINE_LIB=/mpiwrapper/lib/libmpiwrapper.so + +# 3.3. Run simple tests + +WORKDIR /home/cactus/MPItrampoline/test + +RUN ./hello-world-c 1 +RUN case "${mpivendor}" in \ + mpich) mpiexec_options='';; \ + openmpi) mpiexec_options='--allow-run-as-root --oversubscribe';; \ + esac && \ + timeout -k 1m -v 5m mpiexec $mpiexec_options -n 4 ./hello-world-c 4 + +RUN ./hello-world-cxx 1 +RUN case "${mpivendor}" in \ + mpich) mpiexec_options='';; \ + openmpi) mpiexec_options='--allow-run-as-root --oversubscribe';; \ + esac && \ + timeout -k 1m -v 5m mpiexec $mpiexec_options -n 4 ./hello-world-cxx 4 + +RUN ./hello-world-f 1 +RUN case "${mpivendor}" in \ + mpich) mpiexec_options='';; \ + openmpi) mpiexec_options='--allow-run-as-root --oversubscribe';; \ + esac && \ + timeout -k 1m -v 5m mpiexec $mpiexec_options -n 4 ./hello-world-f 4 + +RUN ./hello-world-f90 1 +RUN case "${mpivendor}" in \ + mpich) mpiexec_options='';; \ + openmpi) mpiexec_options='--allow-run-as-root --oversubscribe';; \ + esac && \ + timeout -k 1m -v 5m mpiexec $mpiexec_options -n 4 ./hello-world-f90 4 + +RUN ./hello-world-fortran 1 +RUN case "${mpivendor}" in \ + mpich) mpiexec_options='';; \ + openmpi) mpiexec_options='--allow-run-as-root --oversubscribe';; \ + esac && \ + timeout -k 1m -v 5m mpiexec $mpiexec_options -n 4 ./hello-world-fortran 4 + +RUN ./hello-world-fortran08 1 +RUN case "${mpivendor}" in \ + mpich) mpiexec_options='';; \ + openmpi) mpiexec_options='--allow-run-as-root --oversubscribe';; \ + esac && \ + timeout -k 1m -v 5m mpiexec $mpiexec_options -n 4 ./hello-world-fortran08 4 + +# 3.4. Run OpenMPI test suite + +WORKDIR /home/cactus/mpi-test-suite-1.1.1 +RUN case "${mpivendor}" in \ + mpich) \ + mpiexec_options='' && \ + tests='0 1 2 4 5 6 13 14 15 17 18 19 20 28 29 30 32 33 34 36 37 38 39 40 41 42 43 43 44 45 46 47' && \ + true;; \ + openmpi) \ + mpiexec_options='--allow-run-as-root --oversubscribe' && \ + tests=$(seq 0 47) && \ + true;; \ + esac && \ + for testnum in ${tests}; do \ + timeout -k 1m -v 5m ./mpi_test_suite --report=full --test ${testnum} 2>&1 | \ + tee test-${testnum}.log && \ + if ! grep -q 'Number of failed tests: 0$' test-${testnum}.log; then \ + echo "Test ${testnum} failed" >>test-broken && \ + true; \ + fi && \ + true; \ + done && \ + if test -f test-broken; then \ + cat test-broken && \ + false && \ + true; \ + fi +RUN case "${mpivendor}" in \ + mpich) \ + mpiexec_options='' && \ + tests='0 1 2 4 5 6 13 14 15 17 18 19 20 28 29 30 32 33 34 36 37 38 39 40 41 42 43 43 44 45 46 47' && \ + true;; \ + openmpi) \ + mpiexec_options='--allow-run-as-root --oversubscribe' && \ + tests=$(seq 0 47) && \ + true;; \ + esac && \ + for testnum in ${tests}; do \ + timeout -k 1m -v 5m mpiexec ${mpiexec_options} -n 4 ./mpi_test_suite --test ${testnum} 2>&1 | \ + tee test-${testnum}.log && \ + if ! grep -q 'Number of failed tests: 0$' test-${testnum}.log; then \ + echo "Test ${testnum} failed" >>test-broken && \ + true; \ + fi && \ + true; \ + done && \ + if test -f test-broken; then \ + cat test-broken && \ + false && \ + true; \ + fi diff --git a/docker/Dockerfile.musl b/docker/Dockerfile.musl new file mode 100644 index 00000000..24aa5734 --- /dev/null +++ b/docker/Dockerfile.musl @@ -0,0 +1,196 @@ +# docker build --build-arg cpuarch=amd64 --build-arg githash=$(git rev-parse HEAD) --build-arg mpivendor=mpich --tag mpitrampoline6 --progress plain . +# docker run --interactive --rm --tty mpitrampoline6 + +# amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, riscv64, s390x +ARG cpuarch=amd64 + +# FROM muslcc/x86_64:x86_64-linux-musl +FROM ${cpuarch}/alpine:3.19.0 + +# 1.1. Install dependencies + +RUN apk update && \ + apk add \ + autoconf \ + automake \ + bash \ + binutils \ + cmake \ + gcc \ + g++ \ + gengetopt \ + gfortran \ + git \ + make \ + musl-dev \ + ninja \ + openssh \ + python3 + +SHELL ["/bin/bash", "-c"] + +# 1.2 Install MPI + +# mpich, openmpi +ARG mpivendor=openmpi + +WORKDIR /home/cactus +# RUN case ${mpivendor} in \ +# mpich) pkgs=mpich;; \ +# openmpi) pkgs=openmpi-dev;; \ +# *) exit 1;; \ +# esac && \ +# apk add ${pkgs} && \ +# ln -s /usr /mpi +RUN case ${mpivendor} in \ + mpich) \ + mkdir /home/cactus/mpich-4.1.2 && \ + cd /home/cactus/mpich-4.1.2 && \ + wget https://www.mpich.org/static/downloads/4.1.2/mpich-4.1.2.tar.gz && \ + tar xzf mpich-4.1.2.tar.gz && \ + cd mpich-4.1.2 && \ + mkdir build && \ + cd build && \ + ../configure --prefix=/mpi && \ + make -j$(nproc) && \ + make install && \ + true \ + ;; \ + openmpi) \ + mkdir /home/cactus/openmpi-5.0.1 && \ + cd /home/cactus/openmpi-5.0.1 && \ + wget https://download.open-mpi.org/release/open-mpi/v5.0/openmpi-5.0.1.tar.gz && \ + tar xzf openmpi-5.0.1.tar.gz && \ + cd openmpi-5.0.1 && \ + mkdir build && \ + cd build && \ + ../configure --enable-mpi-fortran --prefix=/mpi && \ + make -j$(nproc) && \ + make install && \ + true \ + ;; \ + *) exit 1;; \ + esac + +# 1.3. Download OpenMPI test suite + +ADD https://github.com/open-mpi/mpi-test-suite/archive/refs/tags/v1.1.1.tar.gz /home/cactus/mpi-test-suite-1.1.1.tar.gz +RUN tar xzf mpi-test-suite-1.1.1.tar.gz +WORKDIR /home/cactus/mpi-test-suite-1.1.1 +RUN ./autogen.sh + +# 1.4 Download MPItrampoline + +WORKDIR /home/cactus +ARG githash +RUN git clone -b eschnett/MPItrampoline6 https://github.com/eschnett/MPItrampoline && \ + cd MPItrampoline && \ + git checkout ${githash} + +# 2.1 Build MPItrampoline + +WORKDIR /home/cactus/MPItrampoline/mpitrampoline +RUN cmake -B build \ + -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_C_COMPILER=gcc \ + -DCMAKE_CXX_COMPILER=g++ \ + -DCMAKE_Fortran_COMPILER=gfortran \ + -DCMAKE_INSTALL_PREFIX=/mpitrampoline +RUN cmake --build build --parallel $(nproc) +RUN cmake --install build + +# 2.2. Build simple tests + +WORKDIR /home/cactus/MPItrampoline/test + +RUN /mpitrampoline/bin/mpicc -c hello-world-c.c +RUN /mpitrampoline/bin/mpicc -o hello-world-c hello-world-c.o + +RUN /mpitrampoline/bin/mpicxx -c hello-world-cxx.cxx +RUN /mpitrampoline/bin/mpicxx -o hello-world-cxx hello-world-cxx.o + +RUN /mpitrampoline/bin/mpifc -c hello-world-f.f +RUN /mpitrampoline/bin/mpifc -o hello-world-f hello-world-f.o + +RUN /mpitrampoline/bin/mpifc -c hello-world-f90.f90 +RUN /mpitrampoline/bin/mpifc -o hello-world-f90 hello-world-f90.o + +RUN /mpitrampoline/bin/mpifc -c hello-world-fortran.f90 +RUN /mpitrampoline/bin/mpifc -o hello-world-fortran hello-world-fortran.o + +RUN /mpitrampoline/bin/mpifc -c hello-world-fortran08.f90 +RUN /mpitrampoline/bin/mpifc -o hello-world-fortran08 hello-world-fortran08.o + +# 2.3. Build OpenMPI test suite + +WORKDIR /home/cactus/mpi-test-suite-1.1.1 +RUN ./configure CC=/mpitrampoline/bin/mpicc +RUN make -j$(nproc) + +# 3.1 Build MPIwrapper + +WORKDIR /home/cactus/MPItrampoline/mpiwrapper +RUN cmake -B build \ + -DCMAKE_BUILD_TYPE=Debug \ + -DMPI_C_COMPILER=/mpi/bin/mpicc \ + -DMPI_Fortran_COMPILER=/mpi/bin/mpifort \ + -DCMAKE_INSTALL_PREFIX=/mpiwrapper +RUN cmake --build build +RUN cmake --install build +ENV MPITRAMPOLINE_LIB=/mpiwrapper/lib/libmpiwrapper.so + +# 3.2. Run simple tests + +WORKDIR /home/cactus/MPItrampoline/test + +RUN ./hello-world-c 1 +RUN case "${mpivendor}" in \ + mpich) mpiexec_options='';; \ + openmpi) mpiexec_options='--allow-run-as-root --oversubscribe';; \ + esac && \ + timeout -k 1m 5m /mpi/bin/mpiexec $mpiexec_options -n 4 ./hello-world-c 4 + +RUN ./hello-world-cxx 1 +RUN case "${mpivendor}" in \ + mpich) mpiexec_options='';; \ + openmpi) mpiexec_options='--allow-run-as-root --oversubscribe';; \ + esac && \ + timeout -k 1m 5m /mpi/bin/mpiexec $mpiexec_options -n 4 ./hello-world-cxx 4 + +RUN ./hello-world-f 1 +RUN case "${mpivendor}" in \ + mpich) mpiexec_options='';; \ + openmpi) mpiexec_options='--allow-run-as-root --oversubscribe';; \ + esac && \ + timeout -k 1m 5m /mpi/bin/mpiexec $mpiexec_options -n 4 ./hello-world-f 4 + +RUN ./hello-world-f90 1 +RUN case "${mpivendor}" in \ + mpich) mpiexec_options='';; \ + openmpi) mpiexec_options='--allow-run-as-root --oversubscribe';; \ + esac && \ + timeout -k 1m 5m /mpi/bin/mpiexec $mpiexec_options -n 4 ./hello-world-f90 4 + +RUN ./hello-world-fortran 1 +RUN case "${mpivendor}" in \ + mpich) mpiexec_options='';; \ + openmpi) mpiexec_options='--allow-run-as-root --oversubscribe';; \ + esac && \ + timeout -k 1m 5m /mpi/bin/mpiexec $mpiexec_options -n 4 ./hello-world-fortran 4 + +RUN ./hello-world-fortran08 1 +RUN case "${mpivendor}" in \ + mpich) mpiexec_options='';; \ + openmpi) mpiexec_options='--allow-run-as-root --oversubscribe';; \ + esac && \ + timeout -k 1m 5m /mpi/bin/mpiexec $mpiexec_options -n 4 ./hello-world-fortran08 4 + +# 3.3. Run OpenMPI test suite + +WORKDIR /home/cactus/mpi-test-suite-1.1.1 +RUN if [ ${mpivendor} = openmpi ]; then ./mpi_test_suite; fi +RUN case "${mpivendor}" in \ + mpich) mpiexec_options='';; \ + openmpi) mpiexec_options='--allow-run-as-root --oversubscribe';; \ + esac && \ + if [ ${mpivendor} = openmpi ] ; then timeout -k 1m 5m /mpi/bin/mpiexec $mpiexec_options -n 4 ./mpi_test_suite; fi diff --git a/docker/test-all-gcc.sh b/docker/test-all-gcc.sh new file mode 100755 index 00000000..a5fca91e --- /dev/null +++ b/docker/test-all-gcc.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +cpuarchs="amd64 arm32v5 arm32v7 arm64v8 i386 mips64le ppc64le riscv64 s390x" +mpivendors="mpich openmpi" + +githash=$(git rev-parse HEAD) +for cpuarch in ${cpuarchs}; do + for mpivendor in ${mpivendors}; do + tag="mpi-test-suite-debian.compiler-gcc.cpuarch-${cpuarch}.mpivendor-${mpivendor}" + rm -f "${tag}".* + { + docker build --build-arg cpuarch="${cpuarch}" --build-arg githash="${githash}" --build-arg mpivendor="${mpivendor}" --file Dockerfile.gcc --progress plain --tag "mpitrampoline6-gcc-${cpuarch}-${mpivendor}" . && + : >"${tag}.succeeded" || + : >"${tag}.failed"; + } 2>&1 | + tee "${tag}.log" + done +done diff --git a/docker/test-all-llvm.sh b/docker/test-all-llvm.sh new file mode 100755 index 00000000..2a68aedf --- /dev/null +++ b/docker/test-all-llvm.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +cpuarchs="amd64 arm32v5 arm32v7 arm64v8 i386 mips64le ppc64le riscv64 s390x" +mpivendors="mpich openmpi" + +githash=$(git rev-parse HEAD) +for cpuarch in ${cpuarchs}; do + for mpivendor in ${mpivendors}; do + tag="mpi-test-suite-debian.compiler-llvm.cpuarch-${cpuarch}.mpivendor-${mpivendor}" + rm -f "${tag}".* + { + docker build --build-arg cpuarch="${cpuarch}" --build-arg githash="${githash}" --build-arg mpivendor="${mpivendor}" --file Dockerfile.llvm --progress plain --tag "mpitrampoline6-llvm-${cpuarch}-${mpivendor}" . && + : >"${tag}.succeeded" || + : >"${tag}.failed"; + } 2>&1 | + tee "${tag}.log" + done +done diff --git a/docker/test-all-musl.sh b/docker/test-all-musl.sh new file mode 100755 index 00000000..1bcef45a --- /dev/null +++ b/docker/test-all-musl.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +cpuarchs="amd64 arm32v5 arm32v7 arm64v8 i386 ppc64le riscv64 s390x" +# mpich does not build with musl? +# mpivendors="mpich openmpi" +mpivendors="openmpi" + +githash=$(git rev-parse HEAD) +for cpuarch in ${cpuarchs}; do + for mpivendor in ${mpivendors}; do + tag="mpi-test-suite-alpine.libc-musl.cpuarch-${cpuarch}.mpivendor-${mpivendor}" + rm -f "${tag}".* + { + docker build --build-arg cpuarch="${cpuarch}" --build-arg githash="${githash}" --build-arg mpivendor="${mpivendor}" --file Dockerfile.musl --progress plain --tag "mpitrampoline6-musl-${cpuarch}-${mpivendor}" . && + : >"${tag}.succeeded" || + : >"${tag}.failed"; + } 2>&1 | + tee "${tag}.log" + done +done diff --git a/gen/gen_decl.py b/gen/gen_decl.py deleted file mode 100755 index 1005b95f..00000000 --- a/gen/gen_decl.py +++ /dev/null @@ -1,124 +0,0 @@ -#!/usr/bin/env python3 - -import os -import re -from string import Template -import sys - -sys.path.append(os.path.join(os.path.dirname(__file__), "..", "mpiabi")) - -from mpi_constants import constants -from mpi_functions import functions -from mpi_constants_fortran import constants_fortran -from mpi_functions_fortran import functions_fortran - -support_profiling = True -have_weak_symbols = False -replace_sentinels = False - -def wrap(line): - lines = [] - while len(line) > 72: - lines.append(line[0:72] + "&") - line = " &" + line[72:] - lines.append(line) - return "\n".join(lines) - -with open("include/mpi_decl_constants_c.h", "w") as file: - file.write("// Declare C MPI constants\n") - file.write("\n") - for (tp, nm) in constants: - subs = {'mpi_tp': tp, - 'mpi_nm': nm} - file.write(Template("extern $mpi_tp MPITRAMPOLINE_CONST $mpi_nm;\n").substitute(subs)) - -with open("include/mpi_decl_functions_c.h", "w") as file: - file.write("// Declare C MPI functions\n") - file.write("\n") - for (tp, nm, args, flags) in functions: - subs = {'mpi_tp': tp, - 'abi_tp': re.sub(r"MPI(X?)_", r"MPI\1ABI_", tp), - 'mpi_nm': nm, - 'abi_nm': re.sub(r"MPI(X?)_", r"MPI\1ABI_", nm)} - for (i, (atp, anm)) in enumerate(args): - subs['mpi_atp{0}'.format(i)] = atp - subs['abi_atp{0}'.format(i)] = re.sub(r"MPI(X?)_", r"MPI\1ABI_", atp) - subs['anm{0}'.format(i)] = anm - - tmpl = [] - tmpl.append("extern $abi_tp (* MPITRAMPOLINE_CONST $abi_nm)(") - for (i, (atp, anm)) in enumerate(args): - tmpl.append(" $abi_atp{0} $anm{0},".format(i)) - tmpl[-1] = re.sub(r",?$", "", tmpl[-1]) # remove trailing comma of last argument - tmpl.append(");") - - if not support_profiling: - - # We declare the MPI functions inline if we don't have to support the - # PMPI interface - tmpl.append("inline $mpi_tp P$mpi_nm(") - for (i, (atp, anm)) in enumerate(args): - tmpl.append(" $mpi_atp{0} $anm{0},".format(i)) - tmpl[-1] = re.sub(r",?$", "", tmpl[-1]) # remove trailing comma of last argument - tmpl.append(") {") - rcast = "($mpi_tp)".format(i) if re.search(r"MPI(X?)_", tp) else "" - tmpl.append(" return "+rcast+"(*$abi_nm)(") - for (i, (atp, anm)) in enumerate(args): - acast = "($abi_atp{0})".format(i) if re.search(r"MPI(X?)_", atp) else "" - tmpl.append(" "+acast+"$anm{0},".format(i)) - tmpl[-1] = re.sub(r",?$", "", tmpl[-1]) # remove trailing comma of last argument - tmpl.append(" );") - tmpl.append("}") - - else: - - if have_weak_symbols: - tmpl.append("#pragma weak $mpi_nm = P$mpi_nm") - else: - tmpl.append("$mpi_tp $mpi_nm(") - for (i, (atp, anm)) in enumerate(args): - tmpl.append(" $mpi_atp{0} $anm{0},".format(i)) - tmpl[-1] = re.sub(r",?$", "", tmpl[-1]) # remove trailing comma of last argument - tmpl.append(");") - - tmpl.append("$mpi_tp P$mpi_nm(") - for (i, (atp, anm)) in enumerate(args): - tmpl.append(" $mpi_atp{0} $anm{0},".format(i)) - tmpl[-1] = re.sub(r",?$", "", tmpl[-1]) # remove trailing comma of last argument - tmpl.append(");") - - file.write(Template("\n".join(tmpl)).substitute(subs)) - file.write("\n") - -with open("include/mpi_decl_constants_fortran.h", "w") as file: - file.write("! Declare Fortran MPI constants\n") - file.write("\n") - for (tp, nm) in constants_fortran: - subs = {'mpi_nm': nm, - 'abi_nm': re.sub(r"MPI(X?)_", r"MPI\1ABI_", nm)} - tmpl = [] - - tmpl.append(" integer $mpi_nm") - tmpl.append(" common /$abi_nm/ $mpi_nm") - - file.write("\n".join(map(lambda line: wrap(Template(line).substitute(subs)), tmpl))) - file.write("\n") - -with open("include/mpi_decl_functions_fortran.h", "w") as file: - file.write("! Declare Fortran MPI functions\n") - file.write("\n") - for (tp, nm, args) in functions_fortran: - subs = {'mpi_nm': nm} - tmpl = [] - - tmpl.append(" external $mpi_nm") - if tp != "void": - if tp == "double": - tmpl.append(" double precision $mpi_nm") - elif tp == "MPI_Aint": - tmpl.append(" integer(MPI_ADDRESS_KIND) $mpi_nm") - else: - assert False - - file.write("\n".join(map(lambda line: wrap(Template(line).substitute(subs)), tmpl))) - file.write("\n") diff --git a/gen/gen_defn.py b/gen/gen_defn.py deleted file mode 100755 index bf31f35a..00000000 --- a/gen/gen_defn.py +++ /dev/null @@ -1,198 +0,0 @@ -#!/usr/bin/env python3 - -import os -import re -from string import Template -import sys - -sys.path.append(os.path.join(os.path.dirname(__file__), "..", "mpiabi")) - -from mpi_constants import constants -from mpi_functions import functions -from mpi_constants_fortran import constants_fortran -from mpi_functions_fortran import functions_fortran - -support_profiling = True -have_weak_symbols = False -replace_sentinels = False - -with open("src/mpi_defn_constants_c.h", "w") as file: - file.write("// Define C MPI constants") - file.write("\n") - for (tp, nm) in constants: - subs = {'mpi_tp': tp, - 'mpi_nm': nm} - file.write(Template("$mpi_tp $mpi_nm = ($mpi_tp)0xdeadbeef;\n").substitute(subs)) - -with open("src/mpi_defn_functions_c.h", "w") as file: - file.write("// Define C MPI functions\n") - file.write("\n") - for (tp, nm, args, flags) in functions: - subs = {'mpi_tp': tp, - 'abi_tp': re.sub(r"MPI(X?)_", r"MPI\1ABI_", tp), - 'mpi_nm': nm, - 'abi_nm': re.sub(r"MPI(X?)_", r"MPI\1ABI_", nm)} - for (i, (atp, anm)) in enumerate(args): - subs['mpi_atp{0}'.format(i)] = atp - subs['abi_atp{0}'.format(i)] = re.sub(r"MPI(X?)_", r"MPI\1ABI_", atp) - subs['anm{0}'.format(i)] = anm - tmpl = [] - - tmpl.append("$abi_tp (* $abi_nm)(") - for (i, (atp, anm)) in enumerate(args): - tmpl.append(" $abi_atp{0} $anm{0},".format(i)) - tmpl[-1] = re.sub(r",?$", "", tmpl[-1]) # remove trailing comma of last argument - tmpl.append(") = NULL;") - - if not support_profiling: - - # We declare the MPI functions inline if we don't have to support the - # PMPI interface - tmpl.append("extern inline $mpi_tp P$mpi_nm(") - for (i, (atp, anm)) in enumerate(args): - tmpl.append(" $mpi_atp{0} $anm{0},".format(i)) - tmpl[-1] = re.sub(r",?$", "", tmpl[-1]) # remove trailing comma of last argument - tmpl.append(");") - - else: - - if not have_weak_symbols: - tmpl.append("$mpi_tp $mpi_nm(") - for (i, (atp, anm)) in enumerate(args): - tmpl.append(" $mpi_atp{0} $anm{0},".format(i)) - tmpl[-1] = re.sub(r",?$", "", tmpl[-1]) # remove trailing comma of last argument - tmpl.append(") {") - rcast = "($mpi_tp)".format(i) if re.search(r"MPI(X?)_", tp) else "" - tmpl.append(" return "+rcast+"(*$abi_nm)(") - for (i, (atp, anm)) in enumerate(args): - acast = "($abi_atp{0})".format(i) if re.search(r"MPI(X?)_", atp) else "" - tmpl.append(" "+acast+"$anm{0},".format(i)) - tmpl[-1] = re.sub(r",?$", "", tmpl[-1]) # remove trailing comma of last argument - tmpl.append(" );") - tmpl.append("}") - - tmpl.append("$mpi_tp P$mpi_nm(") - for (i, (atp, anm)) in enumerate(args): - tmpl.append(" $mpi_atp{0} $anm{0},".format(i)) - tmpl[-1] = re.sub(r",?$", "", tmpl[-1]) # remove trailing comma of last argument - tmpl.append(") {") - rcast = "($mpi_tp)".format(i) if re.search(r"MPI(X?)_", tp) else "" - tmpl.append(" return "+rcast+"(*$abi_nm)(") - for (i, (atp, anm)) in enumerate(args): - acast = "($abi_atp{0})".format(i) if re.search(r"MPI(X?)_", atp) else "" - tmpl.append(" "+acast+"$anm{0},".format(i)) - tmpl[-1] = re.sub(r",?$", "", tmpl[-1]) # remove trailing comma of last argument - tmpl.append(" );") - tmpl.append("}") - - file.write("\n") - file.write(Template("\n".join(tmpl)).substitute(subs)) - file.write("\n") - -with open("src/mpi_defn_constants_fortran.h", "w") as file: - file.write("// Define Fortran MPI constants\n") - file.write("\n") - for (tp, nm) in constants_fortran: - subs = {'mpi_tp': re.sub(r"MPI(X?)_\w+", r"MPI\1ABI_Fint", tp), - 'abi_nm': re.sub(r"MPI(X?)_", r"MPI\1ABI_", nm).lower() + "_"} - # Fortran common blocks with `-march=skylake-avx512` are aligned to 64 bytes - file.write(Template("$mpi_tp $abi_nm __attribute__((__aligned__(64))) = (int)0xdeadbeef;\n").substitute(subs)) - -with open("src/mpi_defn_functions_fortran.h", "w") as file: - file.write("// Define Fortran MPI functions\n") - file.write("\n") - for (tp, nm, args) in functions_fortran: - subs = {'abi_tp': re.sub(r"MPI(X?)_\w+", r"MPIABI_Fint", tp), - 'mpi_nm': nm.lower() + "_", - 'abi_nm': re.sub(r"MPI(X?)_", r"MPI\1ABI_", nm).lower() + "_"} - for (i, (atp, anm)) in enumerate(args): - subs['mpi_atp{0}'.format(i)] = re.sub(r"MPI(X?)_\w+", r"MPIABI_Fint", atp) - subs['abi_atp{0}'.format(i)] = re.sub(r"MPI(X?)_\w+", r"MPIABI_Fint", atp) - subs['anm{0}'.format(i)] = anm - tmpl = [] - - tmpl.append("$abi_tp (* $abi_nm)(") - for (i, (atp, anm)) in enumerate(args): - tmpl.append(" $abi_atp{0} $anm{0},".format(i)) - tmpl[-1] = re.sub(r",?$", "", tmpl[-1]) # remove trailing comma of last argument - tmpl.append(") = NULL;") - - if not support_profiling: - - tmpl.append("$abi_tp $mpi_nm(") - for (i, (atp, anm)) in enumerate(args): - tmpl.append(" $mpi_atp{0} $anm{0},".format(i)) - tmpl[-1] = re.sub(r",?$", "", tmpl[-1]) # remove trailing comma of last argument - tmpl.append(") {") - if replace_sentinels: - for (i, (atp, anm)) in enumerate(args): - if "MPI_Status" in atp: - if anm == "status": - tmpl.append(" if ($anm{0} == mpi_status_ignore_)".format(i)) - tmpl.append(" $anm{0} = mpiabi_status_ignore_;".format(i)) - elif anm == "array_of_statuses": - tmpl.append(" if ($anm{0} == mpi_statuses_ignore_)".format(i)) - tmpl.append(" $anm{0} = mpiabi_statuses_ignore_;".format(i)) - else: - assert False - tmpl.append(" return (* $abi_nm)(") - for (i, (atp, anm)) in enumerate(args): - tmpl.append(" $anm{0},".format(i)) - tmpl[-1] = re.sub(r",?$", "", tmpl[-1]) # remove trailing comma of last argument - tmpl.append(" );") - tmpl.append("}") - - else: - - if have_weak_symbols: - tmpl.append("#pragma weak $mpi_nm = p$mpi_nm") - else: - tmpl.append("$abi_tp $mpi_nm(") - for (i, (atp, anm)) in enumerate(args): - tmpl.append(" $mpi_atp{0} $anm{0},".format(i)) - tmpl[-1] = re.sub(r",?$", "", tmpl[-1]) # remove trailing comma of last argument - tmpl.append(") {") - if replace_sentinels: - for (i, (atp, anm)) in enumerate(args): - if "MPI_Status" in atp: - if anm == "status": - tmpl.append(" if ($anm{0} == mpi_status_ignore_)".format(i)) - tmpl.append(" $anm{0} = mpiabi_status_ignore_;".format(i)) - elif anm == "array_of_statuses": - tmpl.append(" if ($anm{0} == mpi_statuses_ignore_)".format(i)) - tmpl.append(" $anm{0} = mpiabi_statuses_ignore_;".format(i)) - else: - assert False - tmpl.append(" return (* $abi_nm)(") - for (i, (atp, anm)) in enumerate(args): - tmpl.append(" $anm{0},".format(i)) - tmpl[-1] = re.sub(r",?$", "", tmpl[-1]) # remove trailing comma of last argument - tmpl.append(" );") - tmpl.append("}") - - tmpl.append("$abi_tp p$mpi_nm(") - for (i, (atp, anm)) in enumerate(args): - tmpl.append(" $mpi_atp{0} $anm{0},".format(i)) - tmpl[-1] = re.sub(r",?$", "", tmpl[-1]) # remove trailing comma of last argument - tmpl.append(") {") - if replace_sentinels: - for (i, (atp, anm)) in enumerate(args): - if "MPI_Status" in atp: - if anm == "status": - tmpl.append(" if ($anm{0} == mpi_status_ignore_)".format(i)) - tmpl.append(" $anm{0} = mpiabi_status_ignore_;".format(i)) - elif anm == "array_of_statuses": - tmpl.append(" if ($anm{0} == mpi_statuses_ignore_)".format(i)) - tmpl.append(" $anm{0} = mpiabi_statuses_ignore_;".format(i)) - else: - assert False - tmpl.append(" return (* $abi_nm)(") - for (i, (atp, anm)) in enumerate(args): - tmpl.append(" $anm{0},".format(i)) - tmpl[-1] = re.sub(r",?$", "", tmpl[-1]) # remove trailing comma of last argument - tmpl.append(" );") - tmpl.append("}") - - file.write("\n") - file.write(Template("\n".join(tmpl)).substitute(subs)) - file.write("\n") diff --git a/gen/gen_init.py b/gen/gen_init.py deleted file mode 100755 index 49392614..00000000 --- a/gen/gen_init.py +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env python3 - -import os -import re -from string import Template -import sys - -sys.path.append(os.path.join(os.path.dirname(__file__), "..", "mpiabi")) - -from mpi_constants import constants -from mpi_functions import functions -from mpi_constants_fortran import constants_fortran -from mpi_functions_fortran import functions_fortran - -support_profiling = True -have_weak_symbols = False -replace_sentinels = False - -with open("src/mpi_init_constants_c.h", "w") as file: - file.write("// Initialize C MPI constants") - file.write("\n") - for (tp, nm) in constants: - subs = {'mpi_tp': tp, - 'mpi_nm': nm, - 'abi_nm': re.sub(r"MPI(X?)_", r"MPI\1ABI_", nm)} - file.write(Template("$mpi_nm = *($mpi_tp const *)get_symbol(handle, \"$abi_nm\");\n").substitute(subs)) - -with open("src/mpi_init_functions_c.h", "w") as file: - file.write("// Initialize C MPI functions\n") - file.write("\n") - for (tp, nm, args, flags) in functions: - subs = {'mpi_tp': tp, - 'abi_tp': re.sub(r"MPI(X?)_", r"MPI\1ABI_", tp), - 'mpi_nm': nm, - 'abi_nm': re.sub(r"MPI(X?)_", r"MPI\1ABI_", nm)} - for (i, (atp, anm)) in enumerate(args): - subs['mpi_atp{0}'.format(i)] = atp - subs['abi_atp{0}'.format(i)] = re.sub(r"MPI(X?)_", r"MPI\1ABI_", atp) - subs['anm{0}'.format(i)] = anm - file.write(Template("$abi_nm = get_symbol(handle, \"$abi_nm\");\n").substitute(subs)) - -with open("src/mpi_init_constants_fortran.h", "w") as file: - file.write("// Initialize Fortran MPI constants\n") - file.write("\n") - for (tp, nm) in constants_fortran: - subs = {'abi_tp': re.sub(r"MPI(X?)_\w+", r"MPI\1ABI_Fint", tp), - 'abi_nm': re.sub(r"MPI(X?)_", r"MPI\1ABI_", nm).lower() + "_"} - file.write(Template("$abi_nm = *($abi_tp const*)get_symbol(handle, \"$abi_nm\");\n").substitute(subs)) - -with open("src/mpi_init_functions_fortran.h", "w") as file: - file.write("// Initialize Fortran MPI functions\n") - file.write("\n") - for (tp, nm, args) in functions_fortran: - subs = {'abi_tp': re.sub(r"MPI(X?)_\w+", r"MPI\1ABI_Fint", tp), - 'mpi_nm': nm.lower() + "_", - 'abi_nm': re.sub(r"MPI(X?)_", r"MPI\1ABI_", nm).lower() + "_"} - file.write(Template("$abi_nm = get_symbol(handle, \"$abi_nm\");\n").substitute(subs)) diff --git a/include/mpi.F90 b/include/mpi.F90 deleted file mode 100644 index 5e9a46b1..00000000 --- a/include/mpi.F90 +++ /dev/null @@ -1,181 +0,0 @@ -module mpi - implicit none - public - save - - include "mpif_version.h" - include "mpiabif.h" - - integer, parameter :: MPI_VERSION = MPIABI_MPI_VERSION - integer, parameter :: MPI_SUBVERSION = MPIABI_MPI_SUBVERSION - - integer, parameter :: MPI_MAX_DATAREP_STRING = MPIABI_MAX_DATAREP_STRING - integer, parameter :: MPI_MAX_ERROR_STRING = MPIABI_MAX_ERROR_STRING - integer, parameter :: MPI_MAX_INFO_KEY = MPIABI_MAX_INFO_KEY - integer, parameter :: MPI_MAX_INFO_VAL = MPIABI_MAX_INFO_VAL - integer, parameter :: MPI_MAX_LIBRARY_VERSION_STRING = MPIABI_MAX_LIBRARY_VERSION_STRING - integer, parameter :: MPI_MAX_OBJECT_NAME = MPIABI_MAX_OBJECT_NAME - integer, parameter :: MPI_MAX_PORT_NAME = MPIABI_MAX_PORT_NAME - integer, parameter :: MPI_MAX_PROCESSOR_NAME = MPIABI_MAX_PROCESSOR_NAME - - logical, parameter :: MPI_ASYNC_PROTECTS_NONBLOCKING = .false. - logical, parameter :: MPI_SUBARRAYS_SUPPORTED = .false. - - integer, parameter :: MPI_ADDRESS_KIND = MPIABI_ADDRESS_KIND - integer, parameter :: MPI_COUNT_KIND = MPIABI_COUNT_KIND - integer, parameter :: MPI_INTEGER_KIND = MPIABI_INTEGER_KIND - integer, parameter :: MPI_OFFSET_KIND = MPIABI_OFFSET_KIND - - integer, parameter :: MPI_STATUS_SIZE = MPIABI_STATUS_SIZE - - ! character(1) MPI_ARGV_NULL(1) - ! common /MPIABI_ARGV_NULL/ MPI_ARGV_NULL - ! character(1) MPI_ARGVS_NULL(1, 1) - ! common /MPIABI_ARGVS_NULL/ MPI_ARGVS_NULL - ! - ! integer MPI_BOTTOM - ! common /MPIABI_BOTTOM/ MPI_BOTTOM - ! - ! integer MPI_ERRCODES_IGNORE(1) - ! common /MPIABI_ERRCODES_IGNORE/ MPI_ERRCODES_IGNORE - ! - ! integer MPI_IN_PLACE - ! common /MPIABI_IN_PLACE/ MPI_IN_PLACE - ! - ! integer MPI_STATUS_IGNORE(MPI_STATUS_SIZE) - ! common /MPIABI_STATUS_IGNORE/ MPI_STATUS_IGNORE - ! integer MPI_STATUSES_IGNORE(MPI_STATUS_SIZE, 1) - ! common /MPIABI_STATUSES_IGNORE/ MPI_STATUSES_IGNORE - ! - ! integer MPI_UNWEIGHTED(1) - ! common /MPIABI_UNWEIGHTED/ MPI_UNWEIGHTED - ! - ! integer MPI_WEIGHTS_EMPTY(1) - ! common /MPIABI_WEIGHTS_EMPTY/ MPI_WEIGHTS_EMPTY - - character(1) MPI_ARGV_NULL(1) - integer(MPI_ADDRESS_KIND), private :: MPI_ARGV_NULL_PTR - pointer (MPI_ARGV_NULL_PTR, MPI_ARGV_NULL) - common /MPIABI_ARGV_NULL_PTR/ MPI_ARGV_NULL_PTR - - character(1) MPI_ARGVS_NULL(1, 1) - integer(MPI_ADDRESS_KIND), private :: MPI_ARGVS_NULL_PTR - pointer (MPI_ARGVS_NULL_PTR, MPI_ARGVS_NULL) - common /MPIABI_ARGVS_NULL_PTR/ MPI_ARGVS_NULL_PTR - - integer MPI_BOTTOM - integer(MPI_ADDRESS_KIND), private :: MPI_BOTTOM_PTR - pointer (MPI_BOTTOM_PTR, MPI_BOTTOM) - common /MPIABI_BOTTOM_PTR/ MPI_BOTTOM_PTR - - integer MPI_ERRCODES_IGNORE(1) - integer(MPI_ADDRESS_KIND), private :: MPI_ERRCODES_IGNORE_PTR - pointer (MPI_ERRCODES_IGNORE_PTR, MPI_ERRCODES_IGNORE) - common /MPIABI_ERRCODES_IGNORE_PTR/ MPI_ERRCODES_IGNORE_PTR - - integer MPI_IN_PLACE - integer(MPI_ADDRESS_KIND) MPI_IN_PLACE_PTR - pointer (MPI_IN_PLACE_PTR, MPI_IN_PLACE) - common /MPIABI_IN_PLACE_PTR/ MPI_IN_PLACE_PTR - - integer MPI_STATUS_IGNORE(MPI_STATUS_SIZE) - integer(MPI_ADDRESS_KIND), private :: MPI_STATUS_IGNORE_PTR - pointer (MPI_STATUS_IGNORE_PTR, MPI_STATUS_IGNORE) - common /MPIABI_STATUS_IGNORE_PTR/ MPI_STATUS_IGNORE_PTR - - integer MPI_STATUSES_IGNORE(MPI_STATUS_SIZE, 1) - integer(MPI_ADDRESS_KIND), private :: MPI_STATUSES_IGNORE_PTR - pointer (MPI_STATUSES_IGNORE_PTR, MPI_STATUSES_IGNORE) - common /MPIABI_STATUSES_IGNORE_PTR/ MPI_STATUSES_IGNORE_PTR - - integer MPI_UNWEIGHTED(1) - integer(MPI_ADDRESS_KIND), private :: MPI_UNWEIGHTED_PTR - pointer (MPI_UNWEIGHTED_PTR, MPI_UNWEIGHTED) - common /MPIABI_UNWEIGHTED_PTR/ MPI_UNWEIGHTED_PTR - - integer MPI_WEIGHTS_EMPTY(1) - integer(MPI_ADDRESS_KIND), private :: MPI_WEIGHTS_EMPTY_PTR - pointer (MPI_WEIGHTS_EMPTY_PTR, MPI_WEIGHTS_EMPTY) - common /MPIABI_WEIGHTS_EMPTY_PTR/ MPI_WEIGHTS_EMPTY_PTR - - include "mpi_decl_constants_fortran.h" - - interface - subroutine mpi_send(buf, count, datatype, dest, tag, comm, ierror) - implicit none - DIR_IGNORE_TKR !dir$ ignore_tkr(tkr) buf - GCC_ATTRIBUTES_NO_ARG_CHECK !gcc$ attributes no_arg_check :: buf - integer, intent(in) :: buf(*) - integer, intent(in) :: count - integer, intent(in) :: datatype - integer, intent(in) :: dest - integer, intent(in) :: tag - integer, intent(in) :: comm - integer, intent(out) :: ierror - end subroutine mpi_send - - subroutine mpi_recv(buf, count, datatype, source, tag, comm, status, ierror) - import mpi_status_size - implicit none - DIR_IGNORE_TKR !dir$ ignore_tkr(tkr) buf - GCC_ATTRIBUTES_NO_ARG_CHECK !gcc$ attributes no_arg_check :: buf - integer :: buf(*) - integer, intent(in) :: count - integer, intent(in) :: datatype - integer, intent(in) :: source - integer, intent(in) :: tag - integer, intent(in) :: comm - integer, intent(out) :: status(mpi_status_size) - integer, intent(out) :: ierror - end subroutine mpi_recv - - subroutine mpi_get_count(status, datatype, count, ierror) - import mpi_status_size - implicit none - integer, intent(in) :: status(mpi_status_size) - integer, intent(in) :: datatype - integer, intent(out) :: count - integer, intent(out) :: ierror - end subroutine mpi_get_count - - subroutine mpi_comm_size(comm, size, ierror) - implicit none - integer, intent(in) :: comm - integer, intent(out) :: size - integer, intent(out) :: ierror - end subroutine mpi_comm_size - - subroutine mpi_comm_rank(comm, rank, ierror) - implicit none - integer, intent(in) :: comm - integer, intent(out) :: rank - integer, intent(out) :: ierror - end subroutine mpi_comm_rank - - subroutine mpi_init(ierror) - implicit none - integer, intent(out) :: ierror - end subroutine mpi_init - - subroutine mpi_finalize(ierror) - implicit none - integer, intent(out) :: ierror - end subroutine mpi_finalize - - subroutine mpi_abort(comm, errorcode, ierror) - implicit none - integer, intent(in) :: comm - integer, intent(in) :: errorcode - integer, intent(out) :: ierror - end subroutine mpi_abort - - double precision function mpi_wtime() - implicit none - end function mpi_wtime - - double precision function mpi_wtick() - implicit none - end function mpi_wtick - end interface - -end module mpi diff --git a/include/mpi.h b/include/mpi.h deleted file mode 100644 index 4e317118..00000000 --- a/include/mpi.h +++ /dev/null @@ -1,126 +0,0 @@ -#ifndef MPITRAMPOLINE_MPI_H -#define MPITRAMPOLINE_MPI_H - -#include "mpi_version.h" - -#include "mpiabi.h" - -#include -#include - -#ifndef MPITRAMPOLINE_CONST -#define MPITRAMPOLINE_CONST const -#endif - -// Compile-time constants - -#define MPI_VERSION MPIABI_MPI_VERSION -#define MPI_SUBVERSION MPIABI_MPI_SUBVERSION - -#define MPI_MAX_DATAREP_STRING MPIABI_MAX_DATAREP_STRING -#define MPI_MAX_ERROR_STRING MPIABI_MAX_ERROR_STRING -#define MPI_MAX_INFO_KEY MPIABI_MAX_INFO_KEY -#define MPI_MAX_INFO_VAL MPIABI_MAX_INFO_VAL -#define MPI_MAX_LIBRARY_VERSION_STRING MPIABI_MAX_LIBRARY_VERSION_STRING -#define MPI_MAX_OBJECT_NAME MPIABI_MAX_OBJECT_NAME -#define MPI_MAX_PORT_NAME MPIABI_MAX_PORT_NAME -#define MPI_MAX_PROCESSOR_NAME MPIABI_MAX_PROCESSOR_NAME - -// Simple types - -typedef MPIABI_Aint MPI_Aint; -typedef MPIABI_Count MPI_Count; -typedef MPIABI_Fint MPI_Fint; -typedef MPIABI_Offset MPI_Offset; - -// Handles - -// Use pointers for MPI handles. This is safer since we can use -// different pointer types for different handle types. We cannot use -// structs directly because MPI requires that handles can be compared -// for equality. -typedef struct MPItrampoline_Comm *MPI_Comm; -typedef struct MPItrampoline_Datatype *MPI_Datatype; -typedef struct MPItrampoline_Errhandler *MPI_Errhandler; -typedef struct MPItrampoline_File *MPI_File; -typedef struct MPItrampoline_Group *MPI_Group; -typedef struct MPItrampoline_Info *MPI_Info; -typedef struct MPItrampoline_Message *MPI_Message; -typedef struct MPItrampoline_Op *MPI_Op; -typedef struct MPItrampoline_Request *MPI_Request; -typedef struct MPItrampoline_Win *MPI_Win; - -// MPI_Status - -#define MPI_STATUS_SIZE MPIABI_STATUS_SIZE -typedef MPIABI_Status MPI_Status; - -// Callback function types - -typedef int MPI_Comm_copy_attr_function(MPI_Comm oldcomm, int comm_keyval, - void *extra_state, - void *attribute_val_in, - void *attribute_val, int *flag); -typedef int MPI_Comm_delete_attr_function(MPI_Comm comm, int comm_keyval, - void *attribute_val, - void *extra_state); -typedef void MPI_Comm_errhandler_function(MPI_Comm *, int *, ...); -typedef MPI_Comm_errhandler_function MPI_Comm_errhandler_fn; -typedef MPI_Comm_copy_attr_function MPI_Copy_function; -typedef int MPI_Datarep_conversion_function(void *userbuf, - MPI_Datatype datatype, int count, - void *filebuf, MPI_Offset position, - void *extra_state); -typedef int MPI_Datarep_extent_function(MPI_Datatype datatype, - MPI_Aint *file_extent, - void *extra_state); -typedef MPI_Comm_delete_attr_function MPI_Delete_function; -typedef void MPI_File_errhandler_function(MPI_File *, int *, ...); -typedef MPI_File_errhandler_function MPI_File_errhandler_fn; -typedef int MPI_Grequest_cancel_function(void *extra_state, int complete); -typedef int MPI_Grequest_free_function(void *extra_state); -typedef int MPI_Grequest_query_function(void *extra_state, MPI_Status *status); -typedef int MPI_Type_copy_attr_function(MPI_Datatype oldtype, int type_keyval, - void *extra_state, - void *attribute_val_in, - void *attribute_val_out, int *flag); -typedef int MPI_Type_delete_attr_function(MPI_Datatype datatype, - int type_keyval, void *attribute_val, - void *extra_state); -typedef void MPI_User_function(void *invec, void *inoutvec, int *len, - MPI_Datatype *datatype); -typedef int MPI_Win_copy_attr_function(MPI_Win oldwin, int win_keyval, - void *extra_state, - void *attribute_val_in, - void *attribute_val_out, int *flag); -typedef int MPI_Win_delete_attr_function(MPI_Win win, int win_keyval, - void *attribute_val, - void *extra_state); -typedef void MPI_Win_errhandler_function(MPI_Win *, int *, ...); -typedef MPI_Win_errhandler_function MPI_Win_errhandler_fn; - -// Constants and Functions - -#ifdef __cplusplus -extern "C" { -#endif - -extern int MPITRAMPOLINE_CONST mpiwrapper_version_major; -extern int MPITRAMPOLINE_CONST mpiwrapper_version_minor; -extern int MPITRAMPOLINE_CONST mpiwrapper_version_patch; - -extern int MPITRAMPOLINE_CONST mpiabi_loaded_version_major; -extern int MPITRAMPOLINE_CONST mpiabi_loaded_version_minor; -extern int MPITRAMPOLINE_CONST mpiabi_loaded_version_patch; - -#include "mpi_decl_constants_c.h" -#include "mpi_decl_functions_c.h" - -int PMPI_Pcontrol(int level, ...); -int MPI_Pcontrol(int level, ...); - -#ifdef __cplusplus -} -#endif - -#endif // #ifndef MPITRAMPOLINE_MPI_H diff --git a/include/mpi_f08.F90 b/include/mpi_f08.F90 deleted file mode 100644 index 4b2dda53..00000000 --- a/include/mpi_f08.F90 +++ /dev/null @@ -1,504 +0,0 @@ -module mpi_f08 - implicit none - private - save - - ! - - include "mpif_version.h" - public MPITRAMPOLINE_VERSION - public MPITRAMPOLINE_VERSION_MAJOR - public MPITRAMPOLINE_VERSION_MINOR - public MPITRAMPOLINE_VERSION_PATCH - - include "mpiabif.h" - public MPIABI_VERSION_MAJOR - public MPIABI_VERSION_MINOR - public MPIABI_VERSION_PATCH - - integer, public :: MPI_VERSION - parameter (MPI_VERSION = MPIABI_MPI_VERSION) - integer, public :: MPI_SUBVERSION - parameter (MPI_SUBVERSION = MPIABI_MPI_SUBVERSION) - - integer, public :: MPI_MAX_DATAREP_STRING - parameter (MPI_MAX_DATAREP_STRING = MPIABI_MAX_DATAREP_STRING) - integer, public :: MPI_MAX_ERROR_STRING - parameter (MPI_MAX_ERROR_STRING = MPIABI_MAX_ERROR_STRING) - integer, public :: MPI_MAX_INFO_KEY - parameter (MPI_MAX_INFO_KEY = MPIABI_MAX_INFO_KEY) - integer, public :: MPI_MAX_INFO_VAL - parameter (MPI_MAX_INFO_VAL = MPIABI_MAX_INFO_VAL) - integer, public :: MPI_MAX_LIBRARY_VERSION_STRING - parameter (MPI_MAX_LIBRARY_VERSION_STRING = MPIABI_MAX_LIBRARY_VERSION_STRING) - integer, public :: MPI_MAX_OBJECT_NAME - parameter (MPI_MAX_OBJECT_NAME = MPIABI_MAX_OBJECT_NAME) - integer, public :: MPI_MAX_PORT_NAME - parameter (MPI_MAX_PORT_NAME = MPIABI_MAX_PORT_NAME) - integer, public :: MPI_MAX_PROCESSOR_NAME - parameter (MPI_MAX_PROCESSOR_NAME = MPIABI_MAX_PROCESSOR_NAME) - - logical, public :: MPI_ASYNC_PROTECTS_NONBLOCKING - parameter (MPI_ASYNC_PROTECTS_NONBLOCKING = .false.) - logical, public :: MPI_SUBARRAYS_SUPPORTED - parameter (MPI_SUBARRAYS_SUPPORTED = .false.) - - integer, public :: MPI_ADDRESS_KIND - parameter (MPI_ADDRESS_KIND = MPIABI_ADDRESS_KIND) - integer, public :: MPI_COUNT_KIND - parameter (MPI_COUNT_KIND = MPIABI_COUNT_KIND) - integer, public :: MPI_INTEGER_KIND - parameter (MPI_INTEGER_KIND = MPIABI_INTEGER_KIND) - integer, public :: MPI_OFFSET_KIND - parameter (MPI_OFFSET_KIND = MPIABI_OFFSET_KIND) - - integer :: MPI_STATUS_SIZE - parameter (MPI_STATUS_SIZE = MPIABI_STATUS_SIZE) - - ! character(1) MPI_ARGV_NULL(1) - ! common /MPIABI_ARGV_NULL/ MPI_ARGV_NULL - ! character(1) MPI_ARGVS_NULL(1, 1) - ! common /MPIABI_ARGVS_NULL/ MPI_ARGVS_NULL - ! - ! integer, public :: MPI_BOTTOM - ! common /MPIABI_BOTTOM/ MPI_BOTTOM - ! - ! integer, public :: MPI_ERRCODES_IGNORE(1) - ! common /MPIABI_ERRCODES_IGNORE/ MPI_ERRCODES_IGNORE - ! - ! integer, public :: MPI_IN_PLACE - ! common /MPIABI_IN_PLACE/ MPI_IN_PLACE - ! - ! integer, public :: MPI_STATUS_IGNORE(MPI_STATUS_SIZE) - ! common /MPIABI_STATUS_IGNORE/ MPI_STATUS_IGNORE - ! integer, public :: MPI_STATUSES_IGNORE(MPI_STATUS_SIZE, 1) - ! common /MPIABI_STATUSES_IGNORE/ MPI_STATUSES_IGNORE - ! - ! integer, public :: MPI_UNWEIGHTED(1) - ! common /MPIABI_UNWEIGHTED/ MPI_UNWEIGHTED - ! - ! integer, public :: MPI_WEIGHTS_EMPTY(1) - ! common /MPIABI_WEIGHTS_EMPTY/ MPI_WEIGHTS_EMPTY - - character(1), public :: MPI_ARGV_NULL(1) - integer(MPI_ADDRESS_KIND) MPI_ARGV_NULL_PTR - pointer (MPI_ARGV_NULL_PTR, MPI_ARGV_NULL) - common /MPIABI_ARGV_NULL_PTR/ MPI_ARGV_NULL_PTR - - character(1), public :: MPI_ARGVS_NULL(1, 1) - integer(MPI_ADDRESS_KIND) MPI_ARGVS_NULL_PTR - pointer (MPI_ARGVS_NULL_PTR, MPI_ARGVS_NULL) - common /MPIABI_ARGVS_NULL_PTR/ MPI_ARGVS_NULL_PTR - - integer, public :: MPI_BOTTOM - integer(MPI_ADDRESS_KIND) MPI_BOTTOM_PTR - pointer (MPI_BOTTOM_PTR, MPI_BOTTOM) - common /MPIABI_BOTTOM_PTR/ MPI_BOTTOM_PTR - - integer, public :: MPI_ERRCODES_IGNORE(1) - integer(MPI_ADDRESS_KIND) MPI_ERRCODES_IGNORE_PTR - pointer (MPI_ERRCODES_IGNORE_PTR, MPI_ERRCODES_IGNORE) - common /MPIABI_ERRCODES_IGNORE_PTR/ MPI_ERRCODES_IGNORE_PTR - - integer, public :: MPI_IN_PLACE - integer(MPI_ADDRESS_KIND) MPI_IN_PLACE_PTR - pointer (MPI_IN_PLACE_PTR, MPI_IN_PLACE) - common /MPIABI_IN_PLACE_PTR/ MPI_IN_PLACE_PTR - - integer, public :: MPI_STATUS_IGNORE(MPI_STATUS_SIZE) - integer(MPI_ADDRESS_KIND) MPI_STATUS_IGNORE_PTR - pointer (MPI_STATUS_IGNORE_PTR, MPI_STATUS_IGNORE) - common /MPIABI_STATUS_IGNORE_PTR/ MPI_STATUS_IGNORE_PTR - - integer, public :: MPI_STATUSES_IGNORE(MPI_STATUS_SIZE, 1) - integer(MPI_ADDRESS_KIND) MPI_STATUSES_IGNORE_PTR - pointer (MPI_STATUSES_IGNORE_PTR, MPI_STATUSES_IGNORE) - common /MPIABI_STATUSES_IGNORE_PTR/ MPI_STATUSES_IGNORE_PTR - - integer, public :: MPI_UNWEIGHTED(1) - integer(MPI_ADDRESS_KIND) MPI_UNWEIGHTED_PTR - pointer (MPI_UNWEIGHTED_PTR, MPI_UNWEIGHTED) - common /MPIABI_UNWEIGHTED_PTR/ MPI_UNWEIGHTED_PTR - - integer, public :: MPI_WEIGHTS_EMPTY(1) - integer(MPI_ADDRESS_KIND) MPI_WEIGHTS_EMPTY_PTR - pointer (MPI_WEIGHTS_EMPTY_PTR, MPI_WEIGHTS_EMPTY) - common /MPIABI_WEIGHTS_EMPTY_PTR/ MPI_WEIGHTS_EMPTY_PTR - - ! - - type, bind(C), public :: mpi_comm - integer :: mpi_val - end type mpi_comm - - type, bind(C), public :: mpi_datatype - integer :: mpi_val - end type mpi_datatype - - type, bind(C), public :: mpi_errhandler - integer :: mpi_val - end type mpi_errhandler - - type, bind(C), public :: mpi_file - integer :: mpi_val - end type mpi_file - - type, bind(C), public :: mpi_group - integer :: mpi_val - end type mpi_group - - type, bind(C), public :: mpi_info - integer :: mpi_val - end type mpi_info - - type, bind(C), public :: mpi_message - integer :: mpi_val - end type mpi_message - - type, bind(C), public :: mpi_op - integer :: mpi_val - end type mpi_op - - type, bind(C), public :: mpi_request - integer :: mpi_val - end type mpi_request - - type, bind(C), public :: mpi_win - integer :: mpi_val - end type mpi_win - - type, bind(C), public :: mpi_status - integer :: mpi_val(mpi_status_size) - integer :: mpi_source - integer :: mpi_tag - integer :: mpi_error - end type mpi_status - - ! - - type(mpi_comm), public :: mpi_comm_null - type(mpi_comm), public :: mpi_comm_self - type(mpi_comm), public :: mpi_comm_world - - type(mpi_datatype), public :: mpi_int - type(mpi_datatype), public :: mpi_integer - - ! - - interface operator (.eq.) - module procedure mpi_comm_eq - module procedure mpi_datatype_eq - module procedure mpi_errhandler_eq - module procedure mpi_file_eq - module procedure mpi_group_eq - module procedure mpi_info_eq - module procedure mpi_message_eq - module procedure mpi_op_eq - module procedure mpi_request_eq - module procedure mpi_win_eq - end interface operator (.eq.) - - interface operator (.ne.) - module procedure mpi_comm_ne - module procedure mpi_datatype_ne - module procedure mpi_errhandler_ne - module procedure mpi_file_ne - module procedure mpi_group_ne - module procedure mpi_info_ne - module procedure mpi_message_ne - module procedure mpi_op_ne - module procedure mpi_request_ne - module procedure mpi_win_ne - end interface operator (.ne.) - - ! - - interface mpi_send - module procedure mpi_send_impl - end interface - public mpi_send - - interface mpi_recv - module procedure mpi_recv_impl - end interface mpi_recv - public mpi_recv - - interface mpi_get_count - module procedure mpi_get_count_impl - end interface mpi_get_count - public mpi_get_count - - interface mpi_comm_size - module procedure mpi_comm_size_impl - end interface mpi_comm_size - public mpi_comm_size - - interface mpi_comm_rank - module procedure mpi_comm_rank_impl - end interface mpi_comm_rank - public mpi_comm_rank - - interface mpi_init - module procedure mpi_init_impl - end interface mpi_init - public mpi_init - - interface mpi_finalize - module procedure mpi_finalize_impl - end interface mpi_finalize - public mpi_finalize - - interface mpi_abort - module procedure mpi_abort_impl - end interface mpi_abort - public mpi_abort - - interface mpi_wtime - double precision function mpi_wtime() - implicit none - end function mpi_wtime - end interface mpi_wtime - public mpi_wtime - - interface mpi_wtick - double precision function mpi_wtick() - implicit none - end function mpi_wtick - end interface mpi_wtick - public mpi_wtick - -contains - - logical function mpi_comm_eq(comm1, comm2) - type(mpi_comm), intent(in) :: comm1, comm2 - mpi_comm_eq = comm1%mpi_val .eq. comm2%mpi_val - end function mpi_comm_eq - - logical function mpi_comm_ne(comm1, comm2) - type(mpi_comm), intent(in) :: comm1, comm2 - mpi_comm_ne = comm1%mpi_val .ne. comm2%mpi_val - end function mpi_comm_ne - - logical function mpi_datatype_eq(datatype1, datatype2) - type(mpi_datatype), intent(in) :: datatype1, datatype2 - mpi_datatype_eq = datatype1%mpi_val .eq. datatype2%mpi_val - end function mpi_datatype_eq - - logical function mpi_datatype_ne(datatype1, datatype2) - type(mpi_datatype), intent(in) :: datatype1, datatype2 - mpi_datatype_ne = datatype1%mpi_val .ne. datatype2%mpi_val - end function mpi_datatype_ne - - logical function mpi_errhandler_eq(errhandler1, errhandler2) - type(mpi_errhandler), intent(in) :: errhandler1, errhandler2 - mpi_errhandler_eq = errhandler1%mpi_val .eq. errhandler2%mpi_val - end function mpi_errhandler_eq - - logical function mpi_errhandler_ne(errhandler1, errhandler2) - type(mpi_errhandler), intent(in) :: errhandler1, errhandler2 - mpi_errhandler_ne = errhandler1%mpi_val .ne. errhandler2%mpi_val - end function mpi_errhandler_ne - - logical function mpi_file_eq(file1, file2) - type(mpi_file), intent(in) :: file1, file2 - mpi_file_eq = file1%mpi_val .eq. file2%mpi_val - end function mpi_file_eq - - logical function mpi_file_ne(file1, file2) - type(mpi_file), intent(in) :: file1, file2 - mpi_file_ne = file1%mpi_val .ne. file2%mpi_val - end function mpi_file_ne - - logical function mpi_group_eq(group1, group2) - type(mpi_group), intent(in) :: group1, group2 - mpi_group_eq = group1%mpi_val .eq. group2%mpi_val - end function mpi_group_eq - - logical function mpi_group_ne(group1, group2) - type(mpi_group), intent(in) :: group1, group2 - mpi_group_ne = group1%mpi_val .ne. group2%mpi_val - end function mpi_group_ne - - logical function mpi_info_eq(info1, info2) - type(mpi_info), intent(in) :: info1, info2 - mpi_info_eq = info1%mpi_val .eq. info2%mpi_val - end function mpi_info_eq - - logical function mpi_info_ne(info1, info2) - type(mpi_info), intent(in) :: info1, info2 - mpi_info_ne = info1%mpi_val .ne. info2%mpi_val - end function mpi_info_ne - - logical function mpi_message_eq(message1, message2) - type(mpi_message), intent(in) :: message1, message2 - mpi_message_eq = message1%mpi_val .eq. message2%mpi_val - end function mpi_message_eq - - logical function mpi_message_ne(message1, message2) - type(mpi_message), intent(in) :: message1, message2 - mpi_message_ne = message1%mpi_val .ne. message2%mpi_val - end function mpi_message_ne - - logical function mpi_op_eq(op1, op2) - type(mpi_op), intent(in) :: op1, op2 - mpi_op_eq = op1%mpi_val .eq. op2%mpi_val - end function mpi_op_eq - - logical function mpi_op_ne(op1, op2) - type(mpi_op), intent(in) :: op1, op2 - mpi_op_ne = op1%mpi_val .ne. op2%mpi_val - end function mpi_op_ne - - logical function mpi_request_eq(request1, request2) - type(mpi_request), intent(in) :: request1, request2 - mpi_request_eq = request1%mpi_val .eq. request2%mpi_val - end function mpi_request_eq - - logical function mpi_request_ne(request1, request2) - type(mpi_request), intent(in) :: request1, request2 - mpi_request_ne = request1%mpi_val .ne. request2%mpi_val - end function mpi_request_ne - - logical function mpi_win_eq(win1, win2) - type(mpi_win), intent(in) :: win1, win2 - mpi_win_eq = win1%mpi_val .eq. win2%mpi_val - end function mpi_win_eq - - logical function mpi_win_ne(win1, win2) - type(mpi_win), intent(in) :: win1, win2 - mpi_win_ne = win1%mpi_val .ne. win2%mpi_val - end function mpi_win_ne - - ! - - subroutine mpi_send_impl(buf, count, datatype, dest, tag, comm, ierror) - use mpi, only: mpi_send - DIR_IGNORE_TKR !dir$ ignore_tkr(tkr) buf - GCC_ATTRIBUTES_NO_ARG_CHECK !gcc$ attributes no_arg_check :: buf - integer, intent(in) :: buf(*) - integer, intent(in) :: count - type(mpi_datatype), intent(in) :: datatype - integer, intent(in) :: dest - integer, intent(in) :: tag - type(mpi_comm), intent(in) :: comm - integer, optional, intent(out) :: ierror - - integer ierror1 - - call mpi_send(buf, count, datatype%mpi_val, dest, tag, comm%mpi_val, ierror1) - - if (present(ierror)) ierror = ierror1 - end subroutine mpi_send_impl - - subroutine mpi_recv_impl(buf, count, datatype, source, tag, comm, status, ierror) - use mpi, only: mpi_source, mpi_tag, mpi_error, mpi_recv - DIR_IGNORE_TKR !dir$ ignore_tkr(tkr) buf - GCC_ATTRIBUTES_NO_ARG_CHECK !gcc$ attributes no_arg_check :: buf - integer :: buf(*) - integer, intent(in) :: count - type(mpi_datatype), intent(in) :: datatype - integer, intent(in) :: source - integer, intent(in) :: tag - type(mpi_comm), intent(in) :: comm - type(mpi_status), intent(out) :: status - integer, optional, intent(out) :: ierror - - integer ierror1 - - call mpi_recv(buf, count, datatype%mpi_val, source, tag, comm%mpi_val, status%mpi_val, ierror1) - - status%mpi_source = status%mpi_val(mpi_source) - status%mpi_tag = status%mpi_val(mpi_tag) - status%mpi_error = status%mpi_val(mpi_error) - - if (present(ierror)) ierror = ierror1 - end subroutine mpi_recv_impl - - subroutine mpi_get_count_impl(status, datatype, count, ierror) - use mpi, only: mpi_source, mpi_tag, mpi_error, mpi_get_count - implicit none - type(mpi_status), intent(in) :: status - type(mpi_datatype), intent(in) :: datatype - integer, intent(out) :: count - integer, optional, intent(out) :: ierror - - integer ierror1 - integer status1(mpi_status_size) - - status1 = status%mpi_val - status1(mpi_source) = status%mpi_source - status1(mpi_tag) = status%mpi_tag - status1(mpi_error) = status%mpi_error - - call mpi_get_count(status1, datatype%mpi_val, count, ierror1) - - if (present(ierror)) ierror = ierror1 - end subroutine mpi_get_count_impl - - subroutine mpi_comm_size_impl(comm, size, ierror) - use mpi, only: mpi_comm_size - implicit none - type(mpi_comm), intent(in) :: comm - integer, intent(out) :: size - integer, optional, intent(out) :: ierror - - integer ierror1 - - call mpi_comm_size(comm%mpi_val, size, ierror1) - - if (present(ierror)) ierror = ierror1 - end subroutine mpi_comm_size_impl - - subroutine mpi_comm_rank_impl(comm, rank, ierror) - use mpi, only: mpi_comm_rank - implicit none - type(mpi_comm), intent(in) :: comm - integer, intent(out) :: rank - integer, optional, intent(out) :: ierror - - integer ierror1 - - call mpi_comm_rank(comm%mpi_val, rank, ierror1) - - if (present(ierror)) ierror = ierror1 - end subroutine mpi_comm_rank_impl - - subroutine mpi_init_impl(ierror) - use mpi, only: mpi_init - implicit none - integer, optional, intent(out) :: ierror - - integer ierror1 - - call mpi_init(ierror1) - - if (present(ierror)) ierror = ierror1 - end subroutine mpi_init_impl - - subroutine mpi_finalize_impl(ierror) - use mpi, only: mpi_finalize - implicit none - integer, optional, intent(out) :: ierror - - integer ierror1 - - call mpi_finalize(ierror1) - - if (present(ierror)) ierror = ierror1 - end subroutine mpi_finalize_impl - - subroutine mpi_abort_impl(comm, errorcode, ierror) - use mpi, only: mpi_abort - implicit none - type(mpi_comm), intent(in) :: comm - integer, intent(in) :: errorcode - integer, optional, intent(out) :: ierror - - integer ierror1 - - call mpi_abort(comm%mpi_val, errorcode, ierror1) - - if (present(ierror)) ierror = ierror1 - end subroutine mpi_abort_impl - -end module mpi_f08 diff --git a/include/mpif.h b/include/mpif.h deleted file mode 100644 index de50de87..00000000 --- a/include/mpif.h +++ /dev/null @@ -1,150 +0,0 @@ - include "mpif_version.h" - include "mpiabif.h" - -! Constants - - integer MPI_VERSION - parameter (MPI_VERSION = MPIABI_MPI_VERSION) - integer MPI_SUBVERSION - parameter (MPI_SUBVERSION = MPIABI_MPI_SUBVERSION) - - integer MPI_MAX_DATAREP_STRING - parameter (MPI_MAX_DATAREP_STRING = MPIABI_MAX_DATAREP_STRING) - integer MPI_MAX_ERROR_STRING - parameter (MPI_MAX_ERROR_STRING = MPIABI_MAX_ERROR_STRING) - integer MPI_MAX_INFO_KEY - parameter (MPI_MAX_INFO_KEY = MPIABI_MAX_INFO_KEY) - integer MPI_MAX_INFO_VAL - parameter (MPI_MAX_INFO_VAL = MPIABI_MAX_INFO_VAL) - integer MPI_MAX_LIBRARY_VERSION_STRING - parameter (MPI_MAX_LIBRARY_VERSION_STRING = & - & MPIABI_MAX_LIBRARY_VERSION_STRING) - integer MPI_MAX_OBJECT_NAME - parameter (MPI_MAX_OBJECT_NAME = MPIABI_MAX_OBJECT_NAME) - integer MPI_MAX_PORT_NAME - parameter (MPI_MAX_PORT_NAME = MPIABI_MAX_PORT_NAME) - integer MPI_MAX_PROCESSOR_NAME - parameter (MPI_MAX_PROCESSOR_NAME = MPIABI_MAX_PROCESSOR_NAME) - - logical MPI_ASYNC_PROTECTS_NONBLOCKING - parameter (MPI_ASYNC_PROTECTS_NONBLOCKING = .false.) - logical MPI_SUBARRAYS_SUPPORTED - parameter (MPI_SUBARRAYS_SUPPORTED = .false.) - - integer MPI_ADDRESS_KIND - parameter (MPI_ADDRESS_KIND = MPIABI_ADDRESS_KIND) - integer MPI_COUNT_KIND - parameter (MPI_COUNT_KIND = MPIABI_COUNT_KIND) - integer MPI_INTEGER_KIND - parameter (MPI_INTEGER_KIND = MPIABI_INTEGER_KIND) - integer MPI_OFFSET_KIND - parameter (MPI_OFFSET_KIND = MPIABI_OFFSET_KIND) - - integer MPI_STATUS_SIZE - parameter (MPI_STATUS_SIZE = MPIABI_STATUS_SIZE) - -! Sentinel values - -! Option 1 to handle sentinel values: -! -! Define copies here in MPItrampoline, and convert them using -! explicit comparisons in the C wrapper functions here in -! MPItrampoline. - -! character(1) MPI_ARGV_NULL(1) -! common /MPIABI_ARGV_NULL/ MPI_ARGV_NULL -! character(1) MPI_ARGVS_NULL(1, 1) -! common /MPIABI_ARGVS_NULL/ MPI_ARGVS_NULL -! -! integer MPI_BOTTOM -! common /MPIABI_BOTTOM/ MPI_BOTTOM -! -! integer MPI_ERRCODES_IGNORE(1) -! common /MPIABI_ERRCODES_IGNORE/ MPI_ERRCODES_IGNORE -! -! integer MPI_IN_PLACE -! common /MPIABI_IN_PLACE/ MPI_IN_PLACE -! -! integer MPI_STATUS_IGNORE(MPI_STATUS_SIZE) -! common /MPIABI_STATUS_IGNORE/ MPI_STATUS_IGNORE -! integer MPI_STATUSES_IGNORE(MPI_STATUS_SIZE, 1) -! common /MPIABI_STATUSES_IGNORE/ MPI_STATUSES_IGNORE -! -! integer MPI_UNWEIGHTED(1) -! common /MPIABI_UNWEIGHTED/ MPI_UNWEIGHTED -! -! integer MPI_WEIGHTS_EMPTY(1) -! common /MPIABI_WEIGHTS_EMPTY/ MPI_WEIGHTS_EMPTY - -! Option 2 to handle sentinel values: - -! Use Cray pointers. Unfortunately, these might not be supported -! everywhere, and if they are, they require special compiler -! options. - - character(1) MPI_ARGV_NULL(1) - integer(MPI_ADDRESS_KIND) MPI_ARGV_NULL_PTR - pointer (MPI_ARGV_NULL_PTR, MPI_ARGV_NULL) - common /MPIABI_ARGV_NULL_PTR/ MPI_ARGV_NULL_PTR - - character(1) MPI_ARGVS_NULL(1, 1) - integer(MPI_ADDRESS_KIND) MPI_ARGVS_NULL_PTR - pointer (MPI_ARGVS_NULL_PTR, MPI_ARGVS_NULL) - common /MPIABI_ARGVS_NULL_PTR/ MPI_ARGVS_NULL_PTR - - integer MPI_BOTTOM - integer(MPI_ADDRESS_KIND) MPI_BOTTOM_PTR - pointer (MPI_BOTTOM_PTR, MPI_BOTTOM) - common /MPIABI_BOTTOM_PTR/ MPI_BOTTOM_PTR - - integer MPI_ERRCODES_IGNORE(1) - integer(MPI_ADDRESS_KIND) MPI_ERRCODES_IGNORE_PTR - pointer (MPI_ERRCODES_IGNORE_PTR, MPI_ERRCODES_IGNORE) - common /MPIABI_ERRCODES_IGNORE_PTR/ MPI_ERRCODES_IGNORE_PTR - - integer MPI_IN_PLACE - integer(MPI_ADDRESS_KIND) MPI_IN_PLACE_PTR - pointer (MPI_IN_PLACE_PTR, MPI_IN_PLACE) - common /MPIABI_IN_PLACE_PTR/ MPI_IN_PLACE_PTR - - integer MPI_STATUS_IGNORE(MPI_STATUS_SIZE) - integer(MPI_ADDRESS_KIND) MPI_STATUS_IGNORE_PTR - pointer (MPI_STATUS_IGNORE_PTR, MPI_STATUS_IGNORE) - common /MPIABI_STATUS_IGNORE_PTR/ MPI_STATUS_IGNORE_PTR - - integer MPI_STATUSES_IGNORE(MPI_STATUS_SIZE, 1) - integer(MPI_ADDRESS_KIND) MPI_STATUSES_IGNORE_PTR - pointer (MPI_STATUSES_IGNORE_PTR, MPI_STATUSES_IGNORE) - common /MPIABI_STATUSES_IGNORE_PTR/ MPI_STATUSES_IGNORE_PTR - - integer MPI_UNWEIGHTED(1) - integer(MPI_ADDRESS_KIND) MPI_UNWEIGHTED_PTR - pointer (MPI_UNWEIGHTED_PTR, MPI_UNWEIGHTED) - common /MPIABI_UNWEIGHTED_PTR/ MPI_UNWEIGHTED_PTR - - integer MPI_WEIGHTS_EMPTY(1) - integer(MPI_ADDRESS_KIND) MPI_WEIGHTS_EMPTY_PTR - pointer (MPI_WEIGHTS_EMPTY_PTR, MPI_WEIGHTS_EMPTY) - common /MPIABI_WEIGHTS_EMPTY_PTR/ MPI_WEIGHTS_EMPTY_PTR - -! Option 3 to handle sentinel values: -! -! Use Fortran pointers. Unfortunately, pointers to arrays cannot -! have a fixed size, and accessing the pointer requires a run-time -! check whether the array is contiguous. This might make a copy, and -! thus the sentinel doesn't actually work. - -! TODO: try this with "CONTIGUOUS" attribute - -! integer MPI_STATUS_IGNORE(:) -! pointer MPI_STATUS_IGNORE -! common /MPIABI_STATUS_IGNORE/ MPI_STATUS_IGNORE -! -! integer MPI_STATUSES_IGNORE(:) -! pointer MPI_STATUSES_IGNORE -! common /MPIABI_STATUSES_IGNORE/ MPI_STATUSES_IGNORE - -! Most constants and functions - - include "mpi_decl_constants_fortran.h" - include "mpi_decl_functions_fortran.h" diff --git a/include/mpio.h b/include/mpio.h deleted file mode 100644 index 86fc7c40..00000000 --- a/include/mpio.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MPITRAMPOLINE_MPIO_H -#define MPITRAMPOLINE_MPIO_H -#include "mpi.h" -#endif // #ifndef MPITRAMPOLINE_MPIO_H diff --git a/mpiabi/mpi_constants.py b/mpiabi/mpi_constants.py deleted file mode 100755 index 1b69d583..00000000 --- a/mpiabi/mpi_constants.py +++ /dev/null @@ -1,334 +0,0 @@ -constants = [ - ("int", "MPI_ANY_SOURCE"), # mpich: -2; openmpi: -1 - ("int", "MPI_ANY_TAG"), # mpich: -1; openmpi: -1 - ("int", "MPI_PROC_NULL"), # mpich: -1; openmpi: -2 - ("int", "MPI_ROOT"), # mpich: -3; openmpi: -4 - - ("int", "MPI_CART"), # mpich: 2; openmpi: 1 - ("int", "MPI_DIST_GRAPH"), # mpich: 3; openmpi: 3 - ("int", "MPI_GRAPH"), # mpich: 1; openmpi: 2 - - # Results of compare operations - ("int", "MPI_CONGRUENT"), # mpich: 1; openmpi: 1 - ("int", "MPI_IDENT"), # mpich: 0; openmpi: 0 - ("int", "MPI_SIMILAR"), # mpich: 2; openmpi: 2 - ("int", "MPI_UNEQUAL"), # mpich: 3; openmpi: 3 - - # Predefined constants - ("int", "MPI_BSEND_OVERHEAD"), # openmpi: 128 - ("int", "MPI_KEYVAL_INVALID"), # mpich: 0x24000000; openmpi: -1 - ("int", "MPI_UNDEFINED"), # mpich: -32766; openmpi: -32766 - - # Key values - ("int", "MPI_APPNUM"), # mpich: 0x6440000d; openmpi: 4 - ("int", "MPI_HOST"), # mpich: 0x64400003; openmpi: 1 - ("int", "MPI_IO"), # mpich: 0x64400005; openmpi: 2 - ("int", "MPI_LASTUSEDCODE"), # mpich: 0x6440000b; openmpi: 5 - ("int", "MPI_TAG_UB"), # mpich: 0x64400001; openmpi: 0 - ("int", "MPI_UNIVERSE_SIZE"), # mpich: 0x64400009; openmpi: 6 - ("int", "MPI_WIN_BASE"), # mpich: 0x66000001; openmpi: 7 - ("int", "MPI_WIN_CREATE_FLAVOR"), # mpich: 0x66000007; openmpi: 10 - ("int", "MPI_WIN_DISP_UNIT"), # mpich: 0x66000005; openmpi: 9 - ("int", "MPI_WIN_MODEL"), # mpich: 0x66000009; openmpi: 11 - ("int", "MPI_WIN_SIZE"), # mpich: 0x66000003; openmpi: 8 - ("int", "MPI_WTIME_IS_GLOBAL"), # mpich: 0x64400007; openmpi: 3 - - ("int", "MPI_COMBINER_CONTIGUOUS"), # mpich: 3; openmpi: 2 - ("int", "MPI_COMBINER_DARRAY"), # mpich: 14; openmpi: 13 - ("int", "MPI_COMBINER_DUP"), # mpich: 2; openmpi: 1 - ("int", "MPI_COMBINER_F90_COMPLEX"), # mpich: 16; openmpi: 15 - ("int", "MPI_COMBINER_F90_INTEGER"), # mpich: 17; openmpi: 16 - ("int", "MPI_COMBINER_F90_REAL"), # mpich: 15; openmpi: 14 - ("int", "MPI_COMBINER_HINDEXED"), # mpich: 9; openmpi: 8 - ("int", "MPI_COMBINER_HINDEXED_BLOCK"), # mpich: 10; openmpi: 9 - # ("int", "MPI_COMBINER_HINDEXED_INTEGER"), # mpich: 8; openmpi: 7 - ("int", "MPI_COMBINER_HVECTOR"), # mpich: 6; openmpi: 5 - # ("int", "MPI_COMBINER_HVECTOR_INTEGER"), # mpich: 5; openmpi: 4 - ("int", "MPI_COMBINER_INDEXED"), # mpich: 7; openmpi: 6 - ("int", "MPI_COMBINER_INDEXED_BLOCK"), # mpich: 19; openmpi: 18 - ("int", "MPI_COMBINER_NAMED"), # mpich: 1; openmpi: 0 - ("int", "MPI_COMBINER_RESIZED"), # mpich: 18; openmpi: 17 - ("int", "MPI_COMBINER_STRUCT"), # mpich: 12; openmpi: 11 - # ("int", "MPI_COMBINER_STRUCT_INTEGER"), # mpich: 11; openmpi: 10 - ("int", "MPI_COMBINER_SUBARRAY"), # mpich: 13; openmpi: 12 - ("int", "MPI_COMBINER_VECTOR"), # mpich: 4; openmpi: 3 - - ("int", "MPI_COMM_TYPE_SHARED"), # mpich: 1; openmpi: 0 - - # File operation constants - ("int", "MPI_DISTRIBUTE_BLOCK"), # mpich: 121; openmpi: 0 - ("int", "MPI_DISTRIBUTE_CYCLIC"), # mpich: 122; openmpi: 1 - ("int", "MPI_DISTRIBUTE_DFLT_DARG"), # mpich: -49767; openmpi: -1 - ("int", "MPI_DISTRIBUTE_NONE"), # mpich: 123; openmpi: 2 - - # mpich: small integers (below less than 100) - # openmpi: small integers (below less than 100) - ("int", "MPI_ERR_ACCESS"), - ("int", "MPI_ERR_AMODE"), - ("int", "MPI_ERR_ARG"), - ("int", "MPI_ERR_ASSERT"), - ("int", "MPI_ERR_BAD_FILE"), - ("int", "MPI_ERR_BASE"), - ("int", "MPI_ERR_BUFFER"), - ("int", "MPI_ERR_COMM"), - ("int", "MPI_ERR_CONVERSION"), - ("int", "MPI_ERR_COUNT"), - ("int", "MPI_ERR_DIMS"), - ("int", "MPI_ERR_DISP"), - ("int", "MPI_ERR_DUP_DATAREP"), - ("int", "MPI_ERR_FILE"), - ("int", "MPI_ERR_FILE_EXISTS"), - ("int", "MPI_ERR_FILE_IN_USE"), - ("int", "MPI_ERR_GROUP"), - ("int", "MPI_ERR_INFO"), - ("int", "MPI_ERR_INFO_KEY"), - ("int", "MPI_ERR_INFO_NOKEY"), - ("int", "MPI_ERR_INFO_VALUE"), - ("int", "MPI_ERR_INTERN"), - ("int", "MPI_ERR_IN_STATUS"), - ("int", "MPI_ERR_IO"), - ("int", "MPI_ERR_KEYVAL"), - ("int", "MPI_ERR_LASTCODE"), # mpich: 0x3fffffff; openmpi: 92 - ("int", "MPI_ERR_LOCKTYPE"), - ("int", "MPI_ERR_NAME"), - ("int", "MPI_ERR_NOT_SAME"), - ("int", "MPI_ERR_NO_MEM"), - ("int", "MPI_ERR_NO_SPACE"), - ("int", "MPI_ERR_NO_SUCH_FILE"), - ("int", "MPI_ERR_OP"), - ("int", "MPI_ERR_OTHER"), - ("int", "MPI_ERR_PENDING"), - ("int", "MPI_ERR_PORT"), - ("int", "MPI_ERR_QUOTA"), - ("int", "MPI_ERR_RANK"), - ("int", "MPI_ERR_READ_ONLY"), - ("int", "MPI_ERR_REQUEST"), - ("int", "MPI_ERR_RMA_ATTACH"), - ("int", "MPI_ERR_RMA_CONFLICT"), - ("int", "MPI_ERR_RMA_FLAVOR"), - ("int", "MPI_ERR_RMA_RANGE"), - ("int", "MPI_ERR_RMA_SHARED"), - ("int", "MPI_ERR_RMA_SYNC"), - ("int", "MPI_ERR_ROOT"), - ("int", "MPI_ERR_SERVICE"), - ("int", "MPI_ERR_SIZE"), - ("int", "MPI_ERR_SPAWN"), - ("int", "MPI_ERR_TAG"), - ("int", "MPI_ERR_TOPOLOGY"), - ("int", "MPI_ERR_TRUNCATE"), - ("int", "MPI_ERR_TYPE"), - ("int", "MPI_ERR_UNKNOWN"), - ("int", "MPI_ERR_UNSUPPORTED_DATAREP"), - ("int", "MPI_ERR_UNSUPPORTED_OPERATION"), - ("int", "MPI_ERR_WIN"), - ("int", "MPI_SUCCESS"), # mpich: 0; openmpi: 0 - - ("int", "MPI_LOCK_EXCLUSIVE"), # mpich: 234; openmpi: 1 - ("int", "MPI_LOCK_SHARED"), # mpich: 235; openmpi: 2 - - ("int", "MPI_MODE_APPEND"), # openmpi: 128 - ("int", "MPI_MODE_CREATE"), # openmpi: 1 - ("int", "MPI_MODE_DELETE_ON_CLOSE"), # openmpi: 16 - ("int", "MPI_MODE_EXCL"), # openmpi: 64 - ("int", "MPI_MODE_NOCHECK"), # mpich: 1024; openmpi: 1 - ("int", "MPI_MODE_NOPRECEDE"), # mpich: 8192; openmpi: 2 - ("int", "MPI_MODE_NOPUT"), # mpich: 4096; openmpi: 4 - ("int", "MPI_MODE_NOSTORE"), # mpich: 2048; openmpi: 8 - ("int", "MPI_MODE_NOSUCCEED"), # mpich: 16384; openmpi: 16 - ("int", "MPI_MODE_RDONLY"), # openmpi: 2 - ("int", "MPI_MODE_RDWR"), # openmpi: 8 - ("int", "MPI_MODE_SEQUENTIAL"), # openmpi: 256 - ("int", "MPI_MODE_UNIQUE_OPEN"), # openmpi: 32 - ("int", "MPI_MODE_WRONLY"), # openmpi: 4 - - # File operation constants - ("int", "MPI_ORDER_C"), # mpich: 56; openmpi: 0 - ("int", "MPI_ORDER_FORTRAN"), # mpich: 57; openmpi: 1 - - # File operation constants - ("int", "MPI_SEEK_CUR"), # openmpi: 602 - ("int", "MPI_SEEK_END"), # openmpi: 604 - ("int", "MPI_SEEK_SET"), # openmpi: 600 - - # Thread support - ("int", "MPI_THREAD_FUNNELED"), # mpich: 1; openmpi: 1 - ("int", "MPI_THREAD_MULTIPLE"), # mpich: 3; openmpi: 3 - ("int", "MPI_THREAD_SERIALIZED"), # mpich: 2; openmpi: 2 - ("int", "MPI_THREAD_SINGLE"), # mpich: 0; openmpi: 0 - - # File operation constants - ("int", "MPI_TYPECLASS_COMPLEX"), # mpich: 3; openmpi: 3 - ("int", "MPI_TYPECLASS_INTEGER"), # mpich: 2; openmpi: 1 - ("int", "MPI_TYPECLASS_REAL"), # mpich: 1; openmpi: 2 - - # Windows - ("int", "MPI_WIN_FLAVOR_ALLOCATE"), # mpich: 2; openmpi: 2 - ("int", "MPI_WIN_FLAVOR_CREATE"), # mpich: 1; openmpi: 1 - ("int", "MPI_WIN_FLAVOR_DYNAMIC"), # mpich: 3; openmpi: 3 - ("int", "MPI_WIN_FLAVOR_SHARED"), # mpich: 4; openmpi: 4 - ("int", "MPI_WIN_SEPARATE"), # mpich: 1; openmpi: 1 - ("int", "MPI_WIN_UNIFIED"), # mpich: 2; openmpi: 0 - - ("char **", "MPI_ARGV_NULL"), # mpich: 0; openmpi: 0 - - ("char ***", "MPI_ARGVS_NULL"), # mpich: 0; openmpi: 0 - - ("int *", "MPI_ERRCODES_IGNORE"), # mpich: 0 - ("int *", "MPI_UNWEIGHTED"), # mpich: object address; openmpi: 2 - ("int *", "MPI_WEIGHTS_EMPTY"), # mpich: object address; openmpi: 3 - - ("void *", "MPI_BOTTOM"), # mpich: 0; openmpi: 1 - - ("void *", "MPI_IN_PLACE"), # mpich: -1; openmpi: 1 - - ("MPI_Comm", "MPI_COMM_NULL"), # mpich: 0x04000000 - ("MPI_Comm", "MPI_COMM_SELF"), # mpich: 0x44000001 - ("MPI_Comm", "MPI_COMM_WORLD"), # mpich: 0x44000000 - - ("MPI_Comm_copy_attr_function *", "MPI_COMM_DUP_FN"), - ("MPI_Comm_copy_attr_function *", "MPI_COMM_NULL_COPY_FN"), # mpich: 0 - - ("MPI_Comm_delete_attr_function *", "MPI_COMM_NULL_DELETE_FN"), # mpich: 0 - - ("MPI_Copy_function *", "MPI_DUP_FN"), - ("MPI_Copy_function *", "MPI_NULL_COPY_FN"), # mpich: 0 - - ("MPI_Datarep_conversion_function *", "MPI_CONVERSION_FN_NULL"), # openmpi: 0 - - # ("MPI_Datatype", "MPI_2COMPLEX"), - # ("MPI_Datatype", "MPI_2DOUBLE"), - # ("MPI_Datatype", "MPI_2DOUBLE_COMPLEX"), - ("MPI_Datatype", "MPI_2DOUBLE_PRECISION"), - # ("MPI_Datatype", "MPI_2FLOAT"), - ("MPI_Datatype", "MPI_2INT"), - ("MPI_Datatype", "MPI_2INTEGER"), - ("MPI_Datatype", "MPI_2REAL"), - ("MPI_Datatype", "MPI_AINT"), - ("MPI_Datatype", "MPI_BYTE"), - ("MPI_Datatype", "MPI_CHAR"), - ("MPI_Datatype", "MPI_CHARACTER"), - ("MPI_Datatype", "MPI_COMPLEX"), - ("MPI_Datatype", "MPI_COMPLEX16"), - ("MPI_Datatype", "MPI_COMPLEX32"), - # ("MPI_Datatype", "MPI_COMPLEX4"), - ("MPI_Datatype", "MPI_COMPLEX8"), - ("MPI_Datatype", "MPI_COUNT"), - ("MPI_Datatype", "MPI_CXX_BOOL"), - ("MPI_Datatype", "MPI_CXX_DOUBLE_COMPLEX"), - ("MPI_Datatype", "MPI_CXX_FLOAT_COMPLEX"), - ("MPI_Datatype", "MPI_CXX_LONG_DOUBLE_COMPLEX"), - ("MPI_Datatype", "MPI_C_BOOL"), - ("MPI_Datatype", "MPI_C_COMPLEX"), - ("MPI_Datatype", "MPI_C_DOUBLE_COMPLEX"), - ("MPI_Datatype", "MPI_C_FLOAT_COMPLEX"), - ("MPI_Datatype", "MPI_C_LONG_DOUBLE_COMPLEX"), - ("MPI_Datatype", "MPI_DATATYPE_NULL"), # mpich: 0x0c000000 - ("MPI_Datatype", "MPI_DOUBLE"), - ("MPI_Datatype", "MPI_DOUBLE_COMPLEX"), - ("MPI_Datatype", "MPI_DOUBLE_INT"), - ("MPI_Datatype", "MPI_DOUBLE_PRECISION"), - ("MPI_Datatype", "MPI_FLOAT"), - ("MPI_Datatype", "MPI_FLOAT_INT"), - ("MPI_Datatype", "MPI_INT"), - ("MPI_Datatype", "MPI_INT16_T"), - ("MPI_Datatype", "MPI_INT32_T"), - ("MPI_Datatype", "MPI_INT64_T"), - ("MPI_Datatype", "MPI_INT8_T"), - ("MPI_Datatype", "MPI_INTEGER"), - ("MPI_Datatype", "MPI_INTEGER1"), - # ("MPI_Datatype", "MPI_INTEGER16"), - ("MPI_Datatype", "MPI_INTEGER2"), - ("MPI_Datatype", "MPI_INTEGER4"), - ("MPI_Datatype", "MPI_INTEGER8"), - # ("MPI_Datatype", "MPI_LB"), - ("MPI_Datatype", "MPI_LOGICAL"), - # ("MPI_Datatype", "MPI_LOGICAL1"), - # ("MPI_Datatype", "MPI_LOGICAL2"), - # ("MPI_Datatype", "MPI_LOGICAL4"), - # ("MPI_Datatype", "MPI_LOGICAL8"), - ("MPI_Datatype", "MPI_LONG"), - ("MPI_Datatype", "MPI_LONG_DOUBLE"), - ("MPI_Datatype", "MPI_LONG_DOUBLE_INT"), - ("MPI_Datatype", "MPI_LONG_INT"), - ("MPI_Datatype", "MPI_LONG_LONG"), # mpich: MPI_LONG_LONG_INT - ("MPI_Datatype", "MPI_LONG_LONG_INT"), - ("MPI_Datatype", "MPI_OFFSET"), - ("MPI_Datatype", "MPI_PACKED"), - ("MPI_Datatype", "MPI_REAL"), - ("MPI_Datatype", "MPI_REAL16"), - # ("MPI_Datatype", "MPI_REAL2"), - ("MPI_Datatype", "MPI_REAL4"), - ("MPI_Datatype", "MPI_REAL8"), - ("MPI_Datatype", "MPI_SHORT"), - ("MPI_Datatype", "MPI_SHORT_INT"), - ("MPI_Datatype", "MPI_SIGNED_CHAR"), - # ("MPI_Datatype", "MPI_UB"), - ("MPI_Datatype", "MPI_UINT16_T"), - ("MPI_Datatype", "MPI_UINT32_T"), - ("MPI_Datatype", "MPI_UINT64_T"), - ("MPI_Datatype", "MPI_UINT8_T"), - ("MPI_Datatype", "MPI_UNSIGNED"), - ("MPI_Datatype", "MPI_UNSIGNED_CHAR"), - ("MPI_Datatype", "MPI_UNSIGNED_LONG"), - ("MPI_Datatype", "MPI_UNSIGNED_LONG_LONG"), - ("MPI_Datatype", "MPI_UNSIGNED_SHORT"), - ("MPI_Datatype", "MPI_WCHAR"), - - ("MPI_Delete_function *", "MPI_NULL_DELETE_FN"), # mpich: 0 - - ("MPI_Errhandler", "MPI_ERRHANDLER_NULL"), # mpich: 0x14000000 - ("MPI_Errhandler", "MPI_ERRORS_ARE_FATAL"), # mpich: 0x54000000 - ("MPI_Errhandler", "MPI_ERRORS_RETURN"), # mpich: 0x54000001 - - ("MPI_File", "MPI_FILE_NULL"), - - ("MPI_Fint *", "MPI_F_STATUS_IGNORE"), - ("MPI_Fint *", "MPI_F_STATUSES_IGNORE"), - # ("MPI_F08_status *", "MPI_F08_STATUS_IGNORE"), - # ("MPI_F08_status *", "MPI_F08_STATUSES_IGNORE"), - - ("MPI_Group", "MPI_GROUP_EMPTY"), # mpich: 0x48000000 - ("MPI_Group", "MPI_GROUP_NULL"), # mpich: 0x08000000 - - ("MPI_Info", "MPI_INFO_ENV"), # mpich: 0x5c000001 - ("MPI_Info", "MPI_INFO_NULL"), # mpich: 0x1c000000 - - ("MPI_Message", "MPI_MESSAGE_NO_PROC"), # mpich: 0x6c000000 - ("MPI_Message", "MPI_MESSAGE_NULL"), # mpich: 0x2c000000 - - # File operation constants - ("MPI_Offset", "MPI_DISPLACEMENT_CURRENT"), # openmpi: -54278278 - - ("MPI_Op", "MPI_BAND"), # mpich: 0x58000006 - ("MPI_Op", "MPI_BOR"), # mpich: 0x58000008 - ("MPI_Op", "MPI_BXOR"), # mpich: 0x5800000a - ("MPI_Op", "MPI_LAND"), # mpich: 0x58000005 - ("MPI_Op", "MPI_LOR"), # mpich: 0x58000007 - ("MPI_Op", "MPI_LXOR"), # mpich: 0x58000009 - ("MPI_Op", "MPI_MAX"), # mpich: 0x58000001 - ("MPI_Op", "MPI_MAXLOC"), # mpich: 0x5800000c - ("MPI_Op", "MPI_MIN"), # mpich: 0x58000002 - ("MPI_Op", "MPI_MINLOC"), # mpich: 0x5800000b - ("MPI_Op", "MPI_NO_OP"), # mpich: 0x5800000e - ("MPI_Op", "MPI_OP_NULL"), # mpich: 0x18000000 - ("MPI_Op", "MPI_PROD"), # mpich: 0x58000004 - ("MPI_Op", "MPI_REPLACE"), # mpich: 0x5800000d - ("MPI_Op", "MPI_SUM"), # mpich: 0x58000003 - - ("MPI_Request", "MPI_REQUEST_NULL"), # mpich: 0x2c000000 - - ("MPI_Status *", "MPI_STATUS_IGNORE"), # mpich: 1; openmpi: 0 - ("MPI_Status *", "MPI_STATUSES_IGNORE"), # mpich: 1; openmpi: 0 - - ("MPI_Type_copy_attr_function *", "MPI_TYPE_DUP_FN"), # mpich: 0 - ("MPI_Type_copy_attr_function *", "MPI_TYPE_NULL_COPY_FN"), # mpich: 0 - - ("MPI_Type_delete_attr_function *", "MPI_TYPE_NULL_DELETE_FN"), - - ("MPI_Win", "MPI_WIN_NULL"), # mpich: 0x20000000 - - ("MPI_Win_copy_attr_function *", "MPI_WIN_DUP_FN"), - ("MPI_Win_copy_attr_function *", "MPI_WIN_NULL_COPY_FN"), # mpich: 0 - - ("MPI_Win_delete_attr_function *", "MPI_WIN_NULL_DELETE_FN"), # mpich: 0 -] diff --git a/mpiabi/mpi_constants_fortran.py b/mpiabi/mpi_constants_fortran.py deleted file mode 100755 index e9f7bf01..00000000 --- a/mpiabi/mpi_constants_fortran.py +++ /dev/null @@ -1,320 +0,0 @@ -constants_fortran = [ - ("MPI_Fint", "MPI_ANY_SOURCE"), - ("MPI_Fint", "MPI_ANY_TAG"), - ("MPI_Fint", "MPI_PROC_NULL"), - ("MPI_Fint", "MPI_ROOT"), - - ("MPI_Fint", "MPI_CART"), - ("MPI_Fint", "MPI_DIST_GRAPH"), - ("MPI_Fint", "MPI_GRAPH"), - - # Results of compare operations - ("MPI_Fint", "MPI_CONGRUENT"), - ("MPI_Fint", "MPI_IDENT"), - ("MPI_Fint", "MPI_SIMILAR"), - ("MPI_Fint", "MPI_UNEQUAL"), - - ("MPI_Fint", "MPI_ERROR"), - ("MPI_Fint", "MPI_SOURCE"), - ("MPI_Fint", "MPI_TAG"), - - # Predefined constants - ("MPI_Fint", "MPI_BSEND_OVERHEAD"), - ("MPI_Fint", "MPI_KEYVAL_INVALID"), - ("MPI_Fint", "MPI_UNDEFINED"), - - ("MPI_Fint", "MPI_COMBINER_CONTIGUOUS"), - ("MPI_Fint", "MPI_COMBINER_DARRAY"), - ("MPI_Fint", "MPI_COMBINER_DUP"), - ("MPI_Fint", "MPI_COMBINER_F90_COMPLEX"), - ("MPI_Fint", "MPI_COMBINER_F90_INTEGER"), - ("MPI_Fint", "MPI_COMBINER_F90_REAL"), - ("MPI_Fint", "MPI_COMBINER_HINDEXED"), - ("MPI_Fint", "MPI_COMBINER_HINDEXED_BLOCK"), - # ("MPI_Fint", "MPI_COMBINER_HINDEXED_INTEGER"), - ("MPI_Fint", "MPI_COMBINER_HVECTOR"), - # ("MPI_Fint", "MPI_COMBINER_HVECTOR_INTEGER"), - ("MPI_Fint", "MPI_COMBINER_INDEXED"), - ("MPI_Fint", "MPI_COMBINER_INDEXED_BLOCK"), - ("MPI_Fint", "MPI_COMBINER_NAMED"), - ("MPI_Fint", "MPI_COMBINER_RESIZED"), - ("MPI_Fint", "MPI_COMBINER_STRUCT"), - # ("MPI_Fint", "MPI_COMBINER_STRUCT_INTEGER"), - ("MPI_Fint", "MPI_COMBINER_SUBARRAY"), - ("MPI_Fint", "MPI_COMBINER_VECTOR"), - - ("MPI_Fint", "MPI_COMM_TYPE_SHARED"), - - # File operation constants - ("MPI_Fint", "MPI_DISTRIBUTE_BLOCK"), - ("MPI_Fint", "MPI_DISTRIBUTE_CYCLIC"), - ("MPI_Fint", "MPI_DISTRIBUTE_DFLT_DARG"), - ("MPI_Fint", "MPI_DISTRIBUTE_NONE"), - - ("MPI_Fint", "MPI_ERR_ACCESS"), - ("MPI_Fint", "MPI_ERR_AMODE"), - ("MPI_Fint", "MPI_ERR_ARG"), - ("MPI_Fint", "MPI_ERR_ASSERT"), - ("MPI_Fint", "MPI_ERR_BAD_FILE"), - ("MPI_Fint", "MPI_ERR_BASE"), - ("MPI_Fint", "MPI_ERR_BUFFER"), - ("MPI_Fint", "MPI_ERR_COMM"), - ("MPI_Fint", "MPI_ERR_CONVERSION"), - ("MPI_Fint", "MPI_ERR_COUNT"), - ("MPI_Fint", "MPI_ERR_DIMS"), - ("MPI_Fint", "MPI_ERR_DISP"), - ("MPI_Fint", "MPI_ERR_DUP_DATAREP"), - ("MPI_Fint", "MPI_ERR_FILE"), - ("MPI_Fint", "MPI_ERR_FILE_EXISTS"), - ("MPI_Fint", "MPI_ERR_FILE_IN_USE"), - ("MPI_Fint", "MPI_ERR_GROUP"), - ("MPI_Fint", "MPI_ERR_INFO"), - ("MPI_Fint", "MPI_ERR_INFO_KEY"), - ("MPI_Fint", "MPI_ERR_INFO_NOKEY"), - ("MPI_Fint", "MPI_ERR_INFO_VALUE"), - ("MPI_Fint", "MPI_ERR_INTERN"), - ("MPI_Fint", "MPI_ERR_IN_STATUS"), - ("MPI_Fint", "MPI_ERR_IO"), - ("MPI_Fint", "MPI_ERR_KEYVAL"), - ("MPI_Fint", "MPI_ERR_LOCKTYPE"), - ("MPI_Fint", "MPI_ERR_NAME"), - ("MPI_Fint", "MPI_ERR_NOT_SAME"), - ("MPI_Fint", "MPI_ERR_NO_MEM"), - ("MPI_Fint", "MPI_ERR_NO_SPACE"), - ("MPI_Fint", "MPI_ERR_NO_SUCH_FILE"), - ("MPI_Fint", "MPI_ERR_OP"), - ("MPI_Fint", "MPI_ERR_OTHER"), - ("MPI_Fint", "MPI_ERR_PENDING"), - ("MPI_Fint", "MPI_ERR_PORT"), - ("MPI_Fint", "MPI_ERR_QUOTA"), - ("MPI_Fint", "MPI_ERR_RANK"), - ("MPI_Fint", "MPI_ERR_READ_ONLY"), - ("MPI_Fint", "MPI_ERR_REQUEST"), - ("MPI_Fint", "MPI_ERR_RMA_ATTACH"), - ("MPI_Fint", "MPI_ERR_RMA_CONFLICT"), - ("MPI_Fint", "MPI_ERR_RMA_FLAVOR"), - ("MPI_Fint", "MPI_ERR_RMA_RANGE"), - ("MPI_Fint", "MPI_ERR_RMA_SHARED"), - ("MPI_Fint", "MPI_ERR_RMA_SYNC"), - ("MPI_Fint", "MPI_ERR_ROOT"), - ("MPI_Fint", "MPI_ERR_SERVICE"), - ("MPI_Fint", "MPI_ERR_SIZE"), - ("MPI_Fint", "MPI_ERR_SPAWN"), - ("MPI_Fint", "MPI_ERR_TAG"), - ("MPI_Fint", "MPI_ERR_TOPOLOGY"), - ("MPI_Fint", "MPI_ERR_TRUNCATE"), - ("MPI_Fint", "MPI_ERR_TYPE"), - ("MPI_Fint", "MPI_ERR_UNKNOWN"), - ("MPI_Fint", "MPI_ERR_UNSUPPORTED_DATAREP"), - ("MPI_Fint", "MPI_ERR_UNSUPPORTED_OPERATION"), - ("MPI_Fint", "MPI_ERR_WIN"), - ("MPI_Fint", "MPI_SUCCESS"), - - ("MPI_Fint", "MPI_LOCK_EXCLUSIVE"), - ("MPI_Fint", "MPI_LOCK_SHARED"), - - ("MPI_Fint", "MPI_MODE_APPEND"), - ("MPI_Fint", "MPI_MODE_CREATE"), - ("MPI_Fint", "MPI_MODE_DELETE_ON_CLOSE"), - ("MPI_Fint", "MPI_MODE_EXCL"), - ("MPI_Fint", "MPI_MODE_NOCHECK"), - ("MPI_Fint", "MPI_MODE_NOPRECEDE"), - ("MPI_Fint", "MPI_MODE_NOPUT"), - ("MPI_Fint", "MPI_MODE_NOSTORE"), - ("MPI_Fint", "MPI_MODE_NOSUCCEED"), - ("MPI_Fint", "MPI_MODE_RDONLY"), - ("MPI_Fint", "MPI_MODE_RDWR"), - ("MPI_Fint", "MPI_MODE_SEQUENTIAL"), - ("MPI_Fint", "MPI_MODE_UNIQUE_OPEN"), - ("MPI_Fint", "MPI_MODE_WRONLY"), - - # File operation constants - ("MPI_Fint", "MPI_ORDER_C"), - ("MPI_Fint", "MPI_ORDER_FORTRAN"), - - # File operation constants - ("MPI_Fint", "MPI_SEEK_CUR"), - ("MPI_Fint", "MPI_SEEK_END"), - ("MPI_Fint", "MPI_SEEK_SET"), - - # Thread support - ("MPI_Fint", "MPI_THREAD_SINGLE"), - ("MPI_Fint", "MPI_THREAD_FUNNELED"), - ("MPI_Fint", "MPI_THREAD_SERIALIZED"), - ("MPI_Fint", "MPI_THREAD_MULTIPLE"), - - # File operation constants - ("MPI_Fint", "MPI_TYPECLASS_COMPLEX"), - ("MPI_Fint", "MPI_TYPECLASS_INTEGER"), - ("MPI_Fint", "MPI_TYPECLASS_REAL"), - - # Windows - ("MPI_Fint", "MPI_WIN_FLAVOR_ALLOCATE"), - ("MPI_Fint", "MPI_WIN_FLAVOR_CREATE"), - ("MPI_Fint", "MPI_WIN_FLAVOR_DYNAMIC"), - ("MPI_Fint", "MPI_WIN_FLAVOR_SHARED"), - ("MPI_Fint", "MPI_WIN_SEPARATE"), - ("MPI_Fint", "MPI_WIN_UNIFIED"), - - # (Declared manually) - # ("char **", "MPI_ARGV_NULL"), - # ("char ***", "MPI_ARGVS_NULL"), - - # (Declared manually) - # ("int *", "MPI_ERRCODES_IGNORE"), - # ("int *", "MPI_UNWEIGHTED"), - # ("int *", "MPI_WEIGHTS_EMPTY"), - - # (Declared manually) - # ("void *", "MPI_BOTTOM"), - - # (Declared manually) - # ("void *", "MPI_IN_PLACE"), - - ("MPI_Comm", "MPI_COMM_NULL"), - ("MPI_Comm", "MPI_COMM_SELF"), - ("MPI_Comm", "MPI_COMM_WORLD"), - - # ("MPI_Comm_copy_attr_function *", "MPI_COMM_DUP_FN"), - # ("MPI_Comm_copy_attr_function *", "MPI_COMM_NULL_COPY_FN"), - - # ("MPI_Comm_delete_attr_function *", "MPI_COMM_NULL_DELETE_FN"), - - # ("MPI_Copy_function *", "MPI_DUP_FN"), - # ("MPI_Copy_function *", "MPI_NULL_COPY_FN"), - - # ("MPI_Datarep_conversion_function *", "MPI_CONVERSION_FN_NULL"), - - # ("MPI_Datatype", "MPI_2COMPLEX"), - # ("MPI_Datatype", "MPI_2DOUBLE"), - # ("MPI_Datatype", "MPI_2DOUBLE_COMPLEX"), - ("MPI_Datatype", "MPI_2DOUBLE_PRECISION"), - # ("MPI_Datatype", "MPI_2FLOAT"), - ("MPI_Datatype", "MPI_2INT"), - ("MPI_Datatype", "MPI_2INTEGER"), - ("MPI_Datatype", "MPI_2REAL"), - ("MPI_Datatype", "MPI_AINT"), - ("MPI_Datatype", "MPI_BYTE"), - ("MPI_Datatype", "MPI_CHAR"), - ("MPI_Datatype", "MPI_CHARACTER"), - ("MPI_Datatype", "MPI_COMPLEX"), - ("MPI_Datatype", "MPI_COMPLEX16"), - ("MPI_Datatype", "MPI_COMPLEX32"), - # ("MPI_Datatype", "MPI_COMPLEX4"), - ("MPI_Datatype", "MPI_COMPLEX8"), - ("MPI_Datatype", "MPI_COUNT"), - ("MPI_Datatype", "MPI_CXX_BOOL"), - ("MPI_Datatype", "MPI_CXX_DOUBLE_COMPLEX"), - ("MPI_Datatype", "MPI_CXX_FLOAT_COMPLEX"), - ("MPI_Datatype", "MPI_CXX_LONG_DOUBLE_COMPLEX"), - ("MPI_Datatype", "MPI_C_BOOL"), - ("MPI_Datatype", "MPI_C_COMPLEX"), - ("MPI_Datatype", "MPI_C_DOUBLE_COMPLEX"), - ("MPI_Datatype", "MPI_C_FLOAT_COMPLEX"), - ("MPI_Datatype", "MPI_C_LONG_DOUBLE_COMPLEX"), - ("MPI_Datatype", "MPI_DATATYPE_NULL"), - ("MPI_Datatype", "MPI_DOUBLE"), - ("MPI_Datatype", "MPI_DOUBLE_COMPLEX"), - ("MPI_Datatype", "MPI_DOUBLE_INT"), - ("MPI_Datatype", "MPI_DOUBLE_PRECISION"), - ("MPI_Datatype", "MPI_FLOAT"), - ("MPI_Datatype", "MPI_FLOAT_INT"), - ("MPI_Datatype", "MPI_INT"), - ("MPI_Datatype", "MPI_INT16_T"), - ("MPI_Datatype", "MPI_INT32_T"), - ("MPI_Datatype", "MPI_INT64_T"), - ("MPI_Datatype", "MPI_INT8_T"), - ("MPI_Datatype", "MPI_INTEGER"), - ("MPI_Datatype", "MPI_INTEGER1"), - # ("MPI_Datatype", "MPI_INTEGER16"), - ("MPI_Datatype", "MPI_INTEGER2"), - ("MPI_Datatype", "MPI_INTEGER4"), - ("MPI_Datatype", "MPI_INTEGER8"), - # ("MPI_Datatype", "MPI_LB"), - ("MPI_Datatype", "MPI_LOGICAL"), - # ("MPI_Datatype", "MPI_LOGICAL1"), - # ("MPI_Datatype", "MPI_LOGICAL2"), - # ("MPI_Datatype", "MPI_LOGICAL4"), - # ("MPI_Datatype", "MPI_LOGICAL8"), - ("MPI_Datatype", "MPI_LONG"), - ("MPI_Datatype", "MPI_LONG_DOUBLE"), - ("MPI_Datatype", "MPI_LONG_DOUBLE_INT"), - ("MPI_Datatype", "MPI_LONG_INT"), - ("MPI_Datatype", "MPI_LONG_LONG"), - ("MPI_Datatype", "MPI_LONG_LONG_INT"), - ("MPI_Datatype", "MPI_OFFSET"), - ("MPI_Datatype", "MPI_PACKED"), - ("MPI_Datatype", "MPI_REAL"), - ("MPI_Datatype", "MPI_REAL16"), - # ("MPI_Datatype", "MPI_REAL2"), - ("MPI_Datatype", "MPI_REAL4"), - ("MPI_Datatype", "MPI_REAL8"), - ("MPI_Datatype", "MPI_SHORT"), - ("MPI_Datatype", "MPI_SHORT_INT"), - ("MPI_Datatype", "MPI_SIGNED_CHAR"), - # ("MPI_Datatype", "MPI_UB"), - ("MPI_Datatype", "MPI_UINT16_T"), - ("MPI_Datatype", "MPI_UINT32_T"), - ("MPI_Datatype", "MPI_UINT64_T"), - ("MPI_Datatype", "MPI_UINT8_T"), - ("MPI_Datatype", "MPI_UNSIGNED"), - ("MPI_Datatype", "MPI_UNSIGNED_CHAR"), - ("MPI_Datatype", "MPI_UNSIGNED_LONG"), - ("MPI_Datatype", "MPI_UNSIGNED_LONG_LONG"), - ("MPI_Datatype", "MPI_UNSIGNED_SHORT"), - ("MPI_Datatype", "MPI_WCHAR"), - - # ("MPI_Delete_function *", "MPI_NULL_DELETE_FN"), - - ("MPI_Errhandler", "MPI_ERRHANDLER_NULL"), - ("MPI_Errhandler", "MPI_ERRORS_ARE_FATAL"), - ("MPI_Errhandler", "MPI_ERRORS_RETURN"), - - ("MPI_File", "MPI_FILE_NULL"), - - ("MPI_Group", "MPI_GROUP_EMPTY"), - ("MPI_Group", "MPI_GROUP_NULL"), - - ("MPI_Info", "MPI_INFO_ENV"), - ("MPI_Info", "MPI_INFO_NULL"), - - ("MPI_Message", "MPI_MESSAGE_NO_PROC"), - ("MPI_Message", "MPI_MESSAGE_NULL"), - - # File operation constants - ("MPI_Offset", "MPI_DISPLACEMENT_CURRENT"), - - ("MPI_Op", "MPI_BAND"), - ("MPI_Op", "MPI_BOR"), - ("MPI_Op", "MPI_BXOR"), - ("MPI_Op", "MPI_LAND"), - ("MPI_Op", "MPI_LOR"), - ("MPI_Op", "MPI_LXOR"), - ("MPI_Op", "MPI_MAX"), - ("MPI_Op", "MPI_MAXLOC"), - ("MPI_Op", "MPI_MIN"), - ("MPI_Op", "MPI_MINLOC"), - ("MPI_Op", "MPI_NO_OP"), - ("MPI_Op", "MPI_OP_NULL"), - ("MPI_Op", "MPI_PROD"), - ("MPI_Op", "MPI_REPLACE"), - ("MPI_Op", "MPI_SUM"), - - ("MPI_Request", "MPI_REQUEST_NULL"), - - # (Declared manually) - # ("MPI_Status *", "MPI_STATUS_IGNORE"), - # ("MPI_Status *", "MPI_STATUSES_IGNORE"), - - # ("MPI_Type_copy_attr_function *", "MPI_TYPE_DUP_FN"), - # ("MPI_Type_copy_attr_function *", "MPI_TYPE_NULL_COPY_FN"), - - # ("MPI_Type_delete_attr_function *", "MPI_TYPE_NULL_DELETE_FN"), - - ("MPI_Win", "MPI_WIN_NULL"), - - # ("MPI_Win_copy_attr_function *", "MPI_WIN_DUP_FN"), - # ("MPI_Win_copy_attr_function *", "MPI_WIN_NULL_COPY_FN"), - - # ("MPI_Win_delete_attr_function *", "MPI_WIN_NULL_DELETE_FN"), -] diff --git a/mpiabi/mpi_functions.py b/mpiabi/mpi_functions.py deleted file mode 100755 index 995d7ad7..00000000 --- a/mpiabi/mpi_functions.py +++ /dev/null @@ -1,2840 +0,0 @@ -# The section names and function parameter names follow the MPI 3.1 standard - -functions = [ - - # 3.2 Blocking Send and Receive Operations - - ("int", "MPI_Send", [ - ("const void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("int", "dest"), - ("int", "tag"), - ("MPI_Comm", "comm"), - ], None), - - ("int", "MPI_Recv", [ - ("void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("int", "source"), - ("int", "tag"), - ("MPI_Comm", "comm"), - ("MPI_Status *", "status"), - ], None), - - ("int", "MPI_Get_count", [ - ("const MPI_Status *", "status"), - ("MPI_Datatype", "datatype"), - ("int *", "count"), - ], None), - - # 3.4 Communication Modes - - ("int", "MPI_Bsend", [ - ("const void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("int", "dest"), - ("int", "tag"), - ("MPI_Comm", "comm"), - ], None), - - ("int", "MPI_Ssend", [ - ("const void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("int", "dest"), - ("int", "tag"), - ("MPI_Comm", "comm"), - ], None), - - ("int", "MPI_Rsend", [ - ("const void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("int", "dest"), - ("int", "tag"), - ("MPI_Comm", "comm"), - ], None), - - # 3.6 Buffer Allocation and Usage - - ("int", "MPI_Buffer_attach", [ - ("void *", "buffer"), - ("int", "size"), - ], None), - - ("int", "MPI_Buffer_detach", [ - ("void *", "buffer_addr"), - ("int *", "size"), - ], None), - - # 3.7 Nonblocking Communication - - ("int", "MPI_Isend", [ - ("const void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("int", "dest"), - ("int", "tag"), - ("MPI_Comm", "comm"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_Ibsend", [ - ("const void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("int", "dest"), - ("int", "tag"), - ("MPI_Comm", "comm"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_Issend", [ - ("const void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("int", "dest"), - ("int", "tag"), - ("MPI_Comm", "comm"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_Irsend", [ - ("const void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("int", "dest"), - ("int", "tag"), - ("MPI_Comm", "comm"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_Irecv", [ - ("void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("int", "source"), - ("int", "tag"), - ("MPI_Comm", "comm"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_Wait", [ - ("MPI_Request *", "request"), - ("MPI_Status *", "status"), - ], None), - - ("int", "MPI_Test", [ - ("MPI_Request *", "request"), - ("int *", "flag"), - ("MPI_Status *", "status"), - ], None), - - ("int", "MPI_Request_free", [ - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_Waitany", [ - ("int", "count"), - ("MPI_Request *", "array_of_requests"), - ("int *", "index"), - ("MPI_Status *", "status"), - ], "manual"), - - ("int", "MPI_Testany", [ - ("int", "count"), - ("MPI_Request *", "array_of_requests"), - ("int *", "index"), - ("int *", "flag"), - ("MPI_Status *", "status"), - ], "manual"), - - ("int", "MPI_Waitall", [ - ("int", "count"), - ("MPI_Request *", "array_of_requests"), - ("MPI_Status *", "array_of_statuses"), - ], "manual"), - - ("int", "MPI_Testall", [ - ("int", "count"), - ("MPI_Request *", "array_of_requests"), - ("int *", "flag"), - ("MPI_Status *", "array_of_statuses"), - ], "manual"), - - ("int", "MPI_Waitsome", [ - ("int", "incount"), - ("MPI_Request *", "array_of_requests"), - ("int *", "outcount"), - ("int *", "array_of_indices"), - ("MPI_Status *", "array_of_statuses"), - ], "manual"), - - ("int", "MPI_Testsome", [ - ("int", "incount"), - ("MPI_Request *", "array_of_requests"), - ("int *", "outcount"), - ("int *", "array_of_indices"), - ("MPI_Status *", "array_of_statuses"), - ], "manual"), - - ("int", "MPI_Request_get_status", [ - ("MPI_Request", "request"), - ("int *", "flag"), - ("MPI_Status *", "status"), - ], None), - - # 3.8 Probe and Cancel - - ("int", "MPI_Iprobe", [ - ("int", "source"), - ("int", "tag"), - ("MPI_Comm", "comm"), - ("int *", "flag"), - ("MPI_Status *", "status"), - ], None), - - ("int", "MPI_Probe", [ - ("int", "source"), - ("int", "tag"), - ("MPI_Comm", "comm"), - ("MPI_Status *", "status"), - ], None), - - ("int", "MPI_Improbe", [ - ("int", "source"), - ("int", "tag"), - ("MPI_Comm", "comm"), - ("int *", "flag"), - ("MPI_Message *", "message"), - ("MPI_Status *", "status"), - ], None), - - ("int", "MPI_Mprobe", [ - ("int", "source"), - ("int", "tag"), - ("MPI_Comm", "comm"), - ("MPI_Message *", "message"), - ("MPI_Status *", "status"), - ], None), - - ("int", "MPI_Mrecv", [ - ("void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("MPI_Message *", "message"), - ("MPI_Status *", "status"), - ], None), - - ("int", "MPI_Imrecv", [ - ("void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("MPI_Message *", "message"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_Cancel", [ - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_Test_cancelled", [ - ("const MPI_Status *", "status"), - ("int *", "flag"), - ], None), - - # 3.9 Persistent Communication Requests - - ("int", "MPI_Send_init", [ - ("const void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("int", "dest"), - ("int", "tag"), - ("MPI_Comm", "comm"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_Bsend_init", [ - ("const void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("int", "dest"), - ("int", "tag"), - ("MPI_Comm", "comm"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_Ssend_init", [ - ("const void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("int", "dest"), - ("int", "tag"), - ("MPI_Comm", "comm"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_Rsend_init", [ - ("const void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("int", "dest"), - ("int", "tag"), - ("MPI_Comm", "comm"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_Recv_init", [ - ("void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("int", "source"), - ("int", "tag"), - ("MPI_Comm", "comm"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_Start", [ - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_Startall", [ - ("int", "count"), - ("MPI_Request *", "array_of_requests"), - ], "manual"), - - # 3.10 Send-Receive - - ("int", "MPI_Sendrecv", [ - ("const void *", "sendbuf"), - ("int", "sendcount"), - ("MPI_Datatype", "sendtype"), - ("int", "dest"), - ("int", "sendtag"), - ("void *", "recvbuf"), - ("int", "recvcount"), - ("MPI_Datatype", "recvtype"), - ("int", "source"), - ("int", "recvtag"), - ("MPI_Comm", "comm"), - ("MPI_Status *", "status"), - ], None), - - ("int", "MPI_Sendrecv_replace", [ - ("void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("int", "dest"), - ("int", "sendtag"), - ("int", "source"), - ("int", "recvtag"), - ("MPI_Comm", "comm"), - ("MPI_Status *", "status"), - ], None), - - # 4.1 Derived Datatypes - - ("int", "MPI_Type_contiguous", [ - ("int", "count"), - ("MPI_Datatype", "oldtype"), - ("MPI_Datatype *", "newtype"), - ], None), - - ("int", "MPI_Type_vector", [ - ("int", "count"), - ("int", "blocklength"), - ("int", "stride"), - ("MPI_Datatype", "oldtype"), - ("MPI_Datatype *", "newtype"), - ], None), - - ("int", "MPI_Type_create_hvector", [ - ("int", "count"), - ("int", "blocklength"), - ("MPI_Aint", "stride"), - ("MPI_Datatype", "oldtype"), - ("MPI_Datatype *", "newtype"), - ], None), - - # # removed - # ("int", "MPI_Type_hvector", [ - # ("int", "count"), - # ("int", "blocklength"), - # ("MPI_Aint", "stride"), - # ("MPI_Datatype", "oldtype"), - # ("MPI_Datatype *", "newtype"), - # ], None), - - ("int", "MPI_Type_indexed", [ - ("int", "count"), - ("const int *", "array_of_blocklengths"), - ("const int *", "array_of_displacements"), - ("MPI_Datatype", "oldtype"), - ("MPI_Datatype *", "newtype"), - ], None), - - ("int", "MPI_Type_create_hindexed", [ - ("int", "count"), - ("const int *", "array_of_blocklengths"), - ("const MPI_Aint *", "array_of_displacements"), - ("MPI_Datatype", "oldtype"), - ("MPI_Datatype *", "newtype"), - ], None), - - # # removed - # ("int", "MPI_Type_hindexed", [ - # ("int", "count"), - # ("const int *", "array_of_blocklengths"), - # ("const MPI_Aint *", "array_of_displacements"), - # ("MPI_Datatype", "oldtype"), - # ("MPI_Datatype *", "newtype"), - # ], None), - - ("int", "MPI_Type_create_indexed_block", [ - ("int", "count"), - ("int", "blocklength"), - ("const int *", "array_of_displacements"), - ("MPI_Datatype", "oldtype"), - ("MPI_Datatype *", "newtype"), - ], None), - - ("int", "MPI_Type_create_hindexed_block", [ - ("int", "count"), - ("int", "blocklength"), - ("const MPI_Aint *", "array_of_displacements"), - ("MPI_Datatype", "oldtype"), - ("MPI_Datatype *", "newtype"), - ], None), - - ("int", "MPI_Type_create_struct", [ - ("int", "count"), - ("const int *", "array_of_blocklengths"), - ("const MPI_Aint *", "array_of_displacements"), - ("const MPI_Datatype *", "array_of_types"), - ("MPI_Datatype *", "newtype"), - ], "manual"), - - # removed - ("int", "MPI_Type_struct", [ - ("int", "count"), - ("const int *", "array_of_blocklengths"), - ("const MPI_Aint *", "array_of_displacements"), - ("const MPI_Datatype *", "array_of_types"), - ("MPI_Datatype *", "newtype"), - ], "manual"), - - ("int", "MPI_Type_create_subarray", [ - ("int", "ndims"), - ("const int *", "array_of_sizes"), - ("const int *", "array_of_subsizes"), - ("const int *", "array_of_starts"), - ("int", "ordder"), - ("MPI_Datatype", "oldtype"), - ("MPI_Datatype *", "newtype"), - ], None), - - ("int", "MPI_Type_create_darray", [ - ("int", "size"), - ("int", "rank"), - ("int", "ndims"), - ("const int *", "array_of_gsizes"), - ("const int *", "array_of_distribs"), - ("const int *", "array_of_dargs"), - ("const int *", "array_of_psizes"), - ("int", "order"), - ("MPI_Datatype", "oldtype"), - ("MPI_Datatype *", "newtype"), - ], None), - - ("int", "MPI_Get_address", [ - ("const void *", "location"), - ("MPI_Aint *", "address"), - ], None), - - # # removed - # ("int", "MPI_address", [ - # ("const void *", "location"), - # ("MPI_Aint *", "address"), - # ], None), - - ("MPI_Aint", "MPI_Aint_add", [ - ("MPI_Aint", "base"), - ("MPI_Aint", "disp"), - ], None), - - ("MPI_Aint", "MPI_Aint_diff", [ - ("MPI_Aint", "addr1"), - ("MPI_Aint", "addr2"), - ], None), - - ("int", "MPI_Type_size", [ - ("MPI_Datatype", "datatype"), - ("int *", "size"), - ], None), - - ("int", "MPI_Type_size_x", [ - ("MPI_Datatype", "datatype"), - ("MPI_Count *", "size"), - ], None), - - ("int", "MPI_Type_get_extent", [ - ("MPI_Datatype", "datatype"), - ("MPI_Aint *", "lb"), - ("MPI_Aint *", "extent"), - ], None), - - # # removed - # ("int", "MPI_Type_extent", [ - # ("MPI_Datatype", "datatype"), - # ("MPI_Aint *", "extent"), - # ], None), - - # # removed - # ("int", "MPI_Type_lb", [ - # ("MPI_Datatype", "datatype"), - # ("MPI_Aint *", "displacement"), - # ], None), - - # # removed - # ("int", "MPI_Type_ub", [ - # ("MPI_Datatype", "datatype"), - # ("MPI_Aint *", "displacement"), - # ], None), - - ("int", "MPI_Type_get_extent_x", [ - ("MPI_Datatype", "datatype"), - ("MPI_Count *", "lb"), - ("MPI_Count *", "extent"), - ], None), - - ("int", "MPI_Type_create_resized", [ - ("MPI_Datatype", "oldtype"), - ("MPI_Aint", "lb"), - ("MPI_Aint", "extent"), - ("MPI_Datatype *", "newtype"), - ], None), - - ("int", "MPI_Type_get_true_extent", [ - ("MPI_Datatype", "datatype"), - ("MPI_Aint *", "true_lb"), - ("MPI_Aint *", "true_extent"), - ], None), - - ("int", "MPI_Type_get_true_extent_x", [ - ("MPI_Datatype", "datatype"), - ("MPI_Count *", "true_lb"), - ("MPI_Count *", "true_extent"), - ], None), - - ("int", "MPI_Type_commit", [ - ("MPI_Datatype *", "datatype"), - ], None), - - ("int", "MPI_Type_free", [ - ("MPI_Datatype *", "datatype"), - ], None), - - ("int", "MPI_Type_dup", [ - ("MPI_Datatype", "oldtype"), - ("MPI_Datatype *", "newtype"), - ], None), - - ("int", "MPI_Get_elements", [ - ("const MPI_Status *", "status"), - ("MPI_Datatype", "datatype"), - ("int *", "count"), - ], None), - - ("int", "MPI_Get_elements_x", [ - ("const MPI_Status *", "status"), - ("MPI_Datatype", "datatype"), - ("MPI_Count *", "count"), - ], None), - - ("int", "MPI_Type_get_envelope", [ - ("MPI_Datatype", "datatype"), - ("int *", "num_integers"), - ("int *", "num_addresses"), - ("int *", "num_datatypes"), - ("int *", "combiner"), - ], None), - - ("int", "MPI_Type_get_contents", [ - ("MPI_Datatype", "datatype"), - ("int", "max_integers"), - ("int", "max_addresses"), - ("int", "max_datatypes"), - ("int *", "array_of_integers"), - ("MPI_Aint *", "array_of_addresses"), - ("MPI_Datatype *", "array_of_datatypes"), - ], "manual"), - - # 4.2 Pack and Unpack - - ("int", "MPI_Pack", [ - ("const void *", "inbuf"), - ("int", "incount"), - ("MPI_Datatype", "datatype"), - ("void *", "outbuf"), - ("int", "outsize"), - ("int *", "position"), - ("MPI_Comm", "comm"), - ], None), - - ("int", "MPI_Unpack", [ - ("const void *", "inbuf"), - ("int", "insize"), - ("int *", "position"), - ("void *", "outbuf"), - ("int", "outcount"), - ("MPI_Datatype", "datatype"), - ("MPI_Comm", "comm"), - ], None), - - ("int", "MPI_Pack_size", [ - ("int", "incount"), - ("MPI_Datatype", "datatype"), - ("MPI_Comm", "comm"), - ("int *", "size"), - ], None), - - # 4.3 Canonical MPI_PACK and MPI_UNPACK - - ("int", "MPI_Pack_external", [ - ("const char *", "datarep"), - ("const void *", "inbuf"), - ("int", "incount"), - ("MPI_Datatype", "datatype"), - ("void *", "outbuf"), - ("MPI_Aint", "outsize"), - ("MPI_Aint *", "position"), - ], None), - - ("int", "MPI_Unpack_external", [ - ("const char *", "datarep"), - ("const void *", "inbuf"), - ("MPI_Aint", "insize"), - ("MPI_Aint *", "position"), - ("void *", "outbuf"), - ("int", "outcount"), - ("MPI_Datatype", "datatype"), - ], None), - - ("int", "MPI_Pack_external_size", [ - ("const char *", "datarep"), - ("int", "incount"), - ("MPI_Datatype", "datatype"), - ("MPI_Aint *", "size"), - ], None), - - # 5.3 Barrier Synchronization - - ("int", "MPI_Barrier", [ - ("MPI_Comm", "comm"), - ], None), - - # 5.4 Broadcast - - ("int", "MPI_Bcast", [ - ("void *", "buffer"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("int", "root"), - ("MPI_Comm", "comm"), - ], None), - - # 5.5 Gather - - ("int", "MPI_Gather", [ - ("const void *", "sendbuf"), - ("int", "sendcount"), - ("MPI_Datatype", "sendtype"), - ("void *", "recvbuf"), - ("int", "recvcount"), - ("MPI_Datatype", "recvtype"), - ("int", "root"), - ("MPI_Comm", "comm"), - ], None), - - ("int", "MPI_Gatherv", [ - ("const void *", "sendbuf"), - ("int", "sendcount"), - ("MPI_Datatype", "sendtype"), - ("void *", "recvbuf"), - ("const int *", "recvcounts"), - ("const int *", "displs"), - ("MPI_Datatype", "recvtype"), - ("int", "root"), - ("MPI_Comm", "comm"), - ], None), - - # 5.6 Scatter - - ("int", "MPI_Scatter", [ - ("const void *", "sendbuf"), - ("int", "sendcount"), - ("MPI_Datatype", "sendtype"), - ("void *", "recvbuf"), - ("int", "recvcount"), - ("MPI_Datatype", "recvtype"), - ("int", "root"), - ("MPI_Comm", "comm"), - ], None), - - ("int", "MPI_Scatterv", [ - ("const void *", "sendbuf"), - ("const int *", "sendcounts"), - ("const int *", "displs"), - ("MPI_Datatype", "sendtype"), - ("void *", "recvbuf"), - ("int", "recvcount"), - ("MPI_Datatype", "recvtype"), - ("int", "root"), - ("MPI_Comm", "comm"), - ], None), - - # 5.7 Gather-to-all - - ("int", "MPI_Allgather", [ - ("const void *", "sendbuf"), - ("int", "sendcount"), - ("MPI_Datatype", "sendtype"), - ("void *", "recvbuf"), - ("int", "recvcount"), - ("MPI_Datatype", "recvtype"), - ("MPI_Comm", "comm"), - ], None), - - ("int", "MPI_Allgatherv", [ - ("const void *", "sendbuf"), - ("int", "sendcount"), - ("MPI_Datatype", "sendtype"), - ("void *", "recvbuf"), - ("const int *", "recvcounts"), - ("const int *", "displs"), - ("MPI_Datatype", "recvtype"), - ("MPI_Comm", "comm"), - ], None), - - # 5.8 All-to-All Scatter/Gather - - ("int", "MPI_Alltoall", [ - ("const void *", "sendbuf"), - ("int", "sendcount"), - ("MPI_Datatype", "sendtype"), - ("void *", "recvbuf"), - ("int", "recvcount"), - ("MPI_Datatype", "recvtype"), - ("MPI_Comm", "comm"), - ], None), - - ("int", "MPI_Alltoallv", [ - ("const void *", "sendbuf"), - ("const int *", "sendcounts"), - ("const int *", "sdispls"), - ("MPI_Datatype", "sendtype"), - ("void *", "recvbuf"), - ("const int *", "recvcounts"), - ("const int *", "rdispls"), - ("MPI_Datatype", "recvtype"), - ("MPI_Comm", "comm"), - ], None), - - ("int", "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"), - ("MPI_Comm", "comm"), - ], "manual"), - - # 5.9 Global Reduction Operations - - ("int", "MPI_Reduce", [ - ("const void *", "sendbuf"), - ("void *", "recvbuf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("MPI_Op", "op"), - ("int", "root"), - ("MPI_Comm", "comm"), - ], None), - - ("int", "MPI_Op_create", [ - ("MPI_User_function *", "user_fn"), - ("int", "commute"), - ("MPI_Op *", "op"), - ], "manual"), - - ("int", "MPI_Op_free", [ - ("MPI_Op *", "op"), - ], "manual"), - - ("int", "MPI_Allreduce", [ - ("const void *", "sendbuf"), - ("void *", "recvbuf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("MPI_Op", "op"), - ("MPI_Comm", "comm"), - ], None), - - ("int", "MPI_Op_commutative", [ - ("MPI_Op", "op"), - ("int *", "commute"), - ], None), - - ("int", "MPI_Reduce_local", [ - ("const void *", "inbuf"), - ("void *", "inoutbuf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("MPI_Op", "op"), - ], None), - - # 5.10 Reduce-Scatter - - ("int", "MPI_Reduce_scatter_block", [ - ("const void *", "sendbuf"), - ("void *", "recvbuf"), - ("int", "recvcount"), - ("MPI_Datatype", "datatype"), - ("MPI_Op", "op"), - ("MPI_Comm", "comm"), - ], None), - - ("int", "MPI_Reduce_scatter", [ - ("const void *", "sendbuf"), - ("void *", "recvbuf"), - ("const int *", "recvcounts"), - ("MPI_Datatype", "datatype"), - ("MPI_Op", "op"), - ("MPI_Comm", "comm"), - ], None), - - # 5.11 Scan - - ("int", "MPI_Scan", [ - ("const void *", "sendbuf"), - ("void *", "recvbuf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("MPI_Op", "op"), - ("MPI_Comm", "comm"), - ], None), - - ("int", "MPI_Exscan", [ - ("const void *", "sendbuf"), - ("void *", "recvbuf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("MPI_Op", "op"), - ("MPI_Comm", "comm"), - ], None), - - # 5.12 Nonblocking Collective Operations - - ("int", "MPI_Ibarrier", [ - ("MPI_Comm", "comm"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_Ibcast", [ - ("void *", "buffer"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("int", "root"), - ("MPI_Comm", "comm"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_Igather", [ - ("const void *", "sendbuf"), - ("int", "sendcount"), - ("MPI_Datatype", "sendtype"), - ("void *", "recvbuf"), - ("int", "recvcount"), - ("MPI_Datatype", "recvtype"), - ("int", "root"), - ("MPI_Comm", "comm"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_Igatherv", [ - ("const void *", "sendbuf"), - ("int", "sendcount"), - ("MPI_Datatype", "sendtype"), - ("void *", "recvbuf"), - ("const int *", "recvcounts"), - ("const int *", "displs"), - ("MPI_Datatype", "recvtype"), - ("int", "root"), - ("MPI_Comm", "comm"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_Iscatter", [ - ("const void *", "sendbuf"), - ("int", "sendcount"), - ("MPI_Datatype", "sendtype"), - ("void *", "recvbuf"), - ("int", "recvcount"), - ("MPI_Datatype", "recvtype"), - ("int", "root"), - ("MPI_Comm", "comm"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_Iscatterv", [ - ("const void *", "sendbuf"), - ("const int *", "sendcounts"), - ("const int *", "displs"), - ("MPI_Datatype", "sendtype"), - ("void *", "recvbuf"), - ("int", "recvcount"), - ("MPI_Datatype", "recvtype"), - ("int", "root"), - ("MPI_Comm", "comm"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_Iallgather", [ - ("const void *", "sendbuf"), - ("int", "sendcount"), - ("MPI_Datatype", "sendtype"), - ("void *", "recvbuf"), - ("int", "recvcount"), - ("MPI_Datatype", "recvtype"), - ("MPI_Comm", "comm"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_Iallgatherv", [ - ("const void *", "sendbuf"), - ("int", "sendcount"), - ("MPI_Datatype", "sendtype"), - ("void *", "recvbuf"), - ("const int *", "recvcounts"), - ("const int *", "displs"), - ("MPI_Datatype", "recvtype"), - ("MPI_Comm", "comm"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_Ialltoall", [ - ("const void *", "sendbuf"), - ("int", "sendcount"), - ("MPI_Datatype", "sendtype"), - ("void *", "recvbuf"), - ("int", "recvcount"), - ("MPI_Datatype", "recvtype"), - ("MPI_Comm", "comm"), - ("MPI_Request *", "request"), - ], None), - - ("int", "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"), - ("MPI_Comm", "comm"), - ("MPI_Request *", "request"), - ], None), - - ("int", "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"), - ("MPI_Comm", "comm"), - ("MPI_Request *", "request"), - ], "manual"), - - ("int", "MPI_Ireduce", [ - ("const void *", "sendbuf"), - ("void *", "recvbuf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("MPI_Op", "op"), - ("int", "root"), - ("MPI_Comm", "comm"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_Iallreduce", [ - ("const void *", "sendbuf"), - ("void *", "recvbuf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("MPI_Op", "op"), - ("MPI_Comm", "comm"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_Ireduce_scatter_block", [ - ("const void *", "sendbuf"), - ("void *", "recvbuf"), - ("int", "recvcount"), - ("MPI_Datatype", "datatype"), - ("MPI_Op", "op"), - ("MPI_Comm", "comm"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_Ireduce_scatter", [ - ("const void *", "sendbuf"), - ("void *", "recvbuf"), - ("const int *", "recvcounts"), - ("MPI_Datatype", "datatype"), - ("MPI_Op", "op"), - ("MPI_Comm", "comm"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_Iscan", [ - ("const void *", "sendbuf"), - ("void *", "recvbuf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("MPI_Op", "op"), - ("MPI_Comm", "comm"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_Iexscan", [ - ("const void *", "sendbuf"), - ("void *", "recvbuf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("MPI_Op", "op"), - ("MPI_Comm", "comm"), - ("MPI_Request *", "request"), - ], None), - - # 6.3 Group Management - - ("int", "MPI_Group_size", [ - ("MPI_Group", "group"), - ("int *", "size"), - ], None), - - ("int", "MPI_Group_rank", [ - ("MPI_Group", "group"), - ("int *", "rank"), - ], None), - - ("int", "MPI_Group_translate_ranks", [ - ("MPI_Group", "group1"), - ("int", "n"), - ("const int *", "ranks1"), - ("MPI_Group", "group2"), - ("int *", "ranks2"), - ], None), - - ("int", "MPI_Group_compare", [ - ("MPI_Group", "group1"), - ("MPI_Group", "group2"), - ("int *", "result"), - ], None), - - ("int", "MPI_Comm_group", [ - ("MPI_Comm", "comm"), - ("MPI_Group *", "group"), - ], None), - - ("int", "MPI_Group_union", [ - ("MPI_Group", "group1"), - ("MPI_Group", "group2"), - ("MPI_Group *", "newgroup"), - ], None), - - ("int", "MPI_Group_intersection", [ - ("MPI_Group", "group1"), - ("MPI_Group", "group2"), - ("MPI_Group *", "newgroup"), - ], None), - - ("int", "MPI_Group_difference", [ - ("MPI_Group", "group1"), - ("MPI_Group", "group2"), - ("MPI_Group *", "newgroup"), - ], None), - - ("int", "MPI_Group_incl", [ - ("MPI_Group", "group"), - ("int", "n"), - ("const int *", "ranks"), - ("MPI_Group *", "newgroup"), - ], None), - - ("int", "MPI_Group_excl", [ - ("MPI_Group", "group"), - ("int", "n"), - ("const int *", "ranks"), - ("MPI_Group *", "newgroup"), - ], None), - - ("int", "MPI_Group_range_incl", [ - ("MPI_Group", "group"), - ("int", "n"), - ("MPIABI_array_int_3 *", "ranges"), - ("MPI_Group *", "newgroup"), - ], None), - - ("int", "MPI_Group_range_excl", [ - ("MPI_Group", "group"), - ("int", "n"), - ("MPIABI_array_int_3 *", "ranges"), - ("MPI_Group *", "newgroup"), - ], None), - - ("int", "MPI_Group_free", [ - ("MPI_Group *", "group"), - ], None), - - # 6.4 Communicator Management - - ("int", "MPI_Comm_size", [ - ("MPI_Comm", "comm"), - ("int *", "size"), - ], None), - - ("int", "MPI_Comm_rank", [ - ("MPI_Comm", "comm"), - ("int *", "rank"), - ], None), - - ("int", "MPI_Comm_compare", [ - ("MPI_Comm", "comm1"), - ("MPI_Comm", "comm2"), - ("int *", "result"), - ], None), - - ("int", "MPI_Comm_dup", [ - ("MPI_Comm", "comm"), - ("MPI_Comm *", "newcomm"), - ], None), - - ("int", "MPI_Comm_dup_with_info", [ - ("MPI_Comm", "comm"), - ("MPI_Info", "info"), - ("MPI_Comm *", "newcomm"), - ], None), - - ("int", "MPI_Comm_idup", [ - ("MPI_Comm", "comm"), - ("MPI_Comm *", "newcomm"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_Comm_create", [ - ("MPI_Comm", "comm"), - ("MPI_Group", "group"), - ("MPI_Comm *", "newcomm"), - ], None), - - ("int", "MPI_Comm_create_group", [ - ("MPI_Comm", "comm"), - ("MPI_Group", "group"), - ("int", "tag"), - ("MPI_Comm *", "newcomm"), - ], None), - - ("int", "MPI_Comm_split", [ - ("MPI_Comm", "comm"), - ("int", "color"), - ("int", "key"), - ("MPI_Comm *", "newcomm"), - ], None), - - ("int", "MPI_Comm_split_type", [ - ("MPI_Comm", "comm"), - ("int", "split_type"), - ("int", "key"), - ("MPI_Info", "info"), - ("MPI_Comm *", "newcomm"), - ], None), - - ("int", "MPI_Comm_free", [ - ("MPI_Comm *", "comm"), - ], None), - - ("int", "MPI_Comm_set_info", [ - ("MPI_Comm", "comm"), - ("MPI_Info", "info"), - ], None), - - ("int", "MPI_Comm_get_info", [ - ("MPI_Comm", "comm"), - ("MPI_Info *", "info"), - ], None), - - # 6.6 Inter-Communication - - ("int", "MPI_Comm_test_inter", [ - ("MPI_Comm", "comm"), - ("int *", "flag"), - ], None), - - ("int", "MPI_Comm_remote_size", [ - ("MPI_Comm", "comm"), - ("int *", "size"), - ], None), - - ("int", "MPI_Comm_remote_group", [ - ("MPI_Comm", "comm"), - ("MPI_Group *", "group"), - ], None), - - ("int", "MPI_Intercomm_create", [ - ("MPI_Comm", "local_comm"), - ("int", "local_leader"), - ("MPI_Comm", "peer_comm"), - ("int", "remote_leader"), - ("int", "tag"), - ("MPI_Comm *", "newintercomm"), - ], None), - - ("int", "MPI_Intercomm_merge", [ - ("MPI_Comm", "intercomm"), - ("int", "high"), - ("MPI_Comm *", "newintracomm"), - ], None), - - # 6.7 Communicators - - ("int", "MPI_Comm_create_keyval", [ - ("MPI_Comm_copy_attr_function *", "comm_copy_attr_fn"), - ("MPI_Comm_delete_attr_function *", "comm_delete_attr_fn"), - ("int *", "comm_keyval"), - ("void *", "extra_state"), - ], None), - - # # removed - # ("int", "MPI_Keyval_create", [ - # ("MPI_Comm_copy_attr_function *", "comm_copy_attr_fn"), - # ("MPI_Comm_delete_attr_function *", "comm_delete_attr_fn"), - # ("int *", "comm_keyval"), - # ("void *", "extra_state"), - # ], None), - - ("int", "MPI_Comm_free_keyval", [ - ("int *", "comm_keyval"), - ], None), - - # # removed - # ("int", "MPI_Keyval_free", [ - # ("int *", "comm_keyval"), - # ], None), - - ("int", "MPI_Comm_set_attr", [ - ("MPI_Comm", "comm"), - ("int", "comm_keyval"), - ("void *", "attribute_val"), - ], None), - - # # removed - # ("int", "MPI_Attr_put", [ - # ("MPI_Comm", "comm"), - # ("int", "comm_keyval"), - # ("void *", "attribute_val"), - # ], None), - - ("int", "MPI_Comm_get_attr", [ - ("MPI_Comm", "comm"), - ("int", "comm_keyval"), - ("void *", "attribute_val"), - ("int *", "flag"), - ], None), - - # # removed - # ("int", "MPI_Attr_get", [ - # ("MPI_Comm", "comm"), - # ("int", "comm_keyval"), - # ("void *", "attribute_val"), - # ("int *", "flag"), - # ], None), - - ("int", "MPI_Comm_delete_attr", [ - ("MPI_Comm", "comm"), - ("int", "comm_keyval"), - ], None), - - # # removed - # ("int", "MPI_Attr_delete", [ - # ("MPI_Comm", "comm"), - # ("int", "comm_keyval"), - # ], None), - - ("int", "MPI_Win_create_keyval", [ - ("MPI_Win_copy_attr_function *", "win_copy_attr_fn"), - ("MPI_Win_delete_attr_function *", "win_delete_attr_fn"), - ("int *", "win_keyval"), - ("void *", "extra_state"), - ], None), - - ("int", "MPI_Win_free_keyval", [ - ("int *", "win_keyval"), - ], None), - - ("int", "MPI_Win_set_attr", [ - ("MPI_Win", "win"), - ("int", "win_keyval"), - ("void *", "attribute_val"), - ], None), - - ("int", "MPI_Win_get_attr", [ - ("MPI_Win", "win"), - ("int", "win_keyval"), - ("void *", "attribute_val"), - ("int *", "flag"), - ], None), - - ("int", "MPI_Win_delete_attr", [ - ("MPI_Win", "win"), - ("int", "win_keyval"), - ], None), - - ("int", "MPI_Type_create_keyval", [ - ("MPI_Type_copy_attr_function *", "type_copy_attr_fn"), - ("MPI_Type_delete_attr_function *", "type_delete_attr_fn"), - ("int *", "type_keyval"), - ("void *", "extra_state"), - ], None), - - ("int", "MPI_Type_free_keyval", [ - ("int *", "type_keyval"), - ], None), - - ("int", "MPI_Type_set_attr", [ - ("MPI_Datatype", "type"), - ("int", "type_keyval"), - ("void *", "attribute_val"), - ], None), - - ("int", "MPI_Type_get_attr", [ - ("MPI_Datatype", "type"), - ("int", "type_keyval"), - ("void *", "attribute_val"), - ("int *", "flag"), - ], None), - - ("int", "MPI_Type_delete_attr", [ - ("MPI_Datatype", "type"), - ("int", "type_keyval"), - ], None), - - # 6.8 Naming Objects - - ("int", "MPI_Comm_set_name", [ - ("MPI_Comm", "comm"), - ("const char *", "comm_name"), - ], None), - - ("int", "MPI_Comm_get_name", [ - ("MPI_Comm", "comm"), - ("char *", "comm_name"), - ("int *", "resultlen"), - ], None), - - ("int", "MPI_Type_set_name", [ - ("MPI_Datatype", "type"), - ("const char *", "type_name"), - ], None), - - ("int", "MPI_Type_get_name", [ - ("MPI_Datatype", "type"), - ("char *", "type_name"), - ("int *", "resultlen"), - ], None), - - ("int", "MPI_Win_set_name", [ - ("MPI_Win", "win"), - ("const char *", "win_name"), - ], None), - - ("int", "MPI_Win_get_name", [ - ("MPI_Win", "win"), - ("char *", "win_name"), - ("int *", "resultlen"), - ], None), - - # 7.5 Topology Constructors - - ("int", "MPI_Cart_create", [ - ("MPI_Comm", "comm_old"), - ("int", "ndims"), - ("const int *", "dims"), - ("const int *", "periods"), - ("int", "reorder"), - ("MPI_Comm *", "comm_cart"), - ], None), - - ("int", "MPI_Dims_create", [ - ("int", "nnodes"), - ("int", "ndims"), - ("int *", "dims"), - ], None), - - ("int", "MPI_Graph_create", [ - ("MPI_Comm", "comm_old"), - ("int", "nnodes"), - ("const int *", "index"), - ("const int *", "edges"), - ("int", "reorder"), - ("MPI_Comm *", "comm_graph"), - ], None), - - ("int", "MPI_Dist_graph_create_adjacent", [ - ("MPI_Comm", "comm_old"), - ("int", "indegree"), - ("const int *", "sources"), - ("const int *", "sourceweights"), - ("int", "outdegree"), - ("const int *", "destinations"), - ("const int *", "destweights"), - ("MPI_Info", "info"), - ("int", "reorder"), - ("MPI_Comm *", "comm_dist_graph"), - ], None), - - ("int", "MPI_Dist_graph_create", [ - ("MPI_Comm", "comm_old"), - ("int", "n"), - ("const int *", "sources"), - ("const int *", "degrees"), - ("const int *", "destinations"), - ("const int *", "weights"), - ("MPI_Info", "info"), - ("int", "reorder"), - ("MPI_Comm *", "comm_dist_graph"), - ], None), - - ("int", "MPI_Topo_test", [ - ("MPI_Comm", "comm"), - ("int *", "status"), - ], None), - - ("int", "MPI_Graphdims_get", [ - ("MPI_Comm", "comm"), - ("int *", "nnodes"), - ("int *", "nedges"), - ], None), - - ("int", "MPI_Graph_get", [ - ("MPI_Comm", "comm"), - ("int", "maxindex"), - ("int", "maxedges"), - ("int *", "index"), - ("int *", "edges"), - ], None), - - ("int", "MPI_Cartdim_get", [ - ("MPI_Comm", "comm"), - ("int *", "ndims"), - ], None), - - ("int", "MPI_Cart_get", [ - ("MPI_Comm", "comm"), - ("int", "maxdims"), - ("int *", "dims"), - ("int *", "periods"), - ("int *", "coords"), - ], None), - - ("int", "MPI_Cart_rank", [ - ("MPI_Comm", "comm"), - ("const int *", "coords"), - ("int *", "rank"), - ], None), - - ("int", "MPI_Cart_coords", [ - ("MPI_Comm", "comm"), - ("int", "rank"), - ("int", "maxdims"), - ("int *", "coords"), - ], None), - - ("int", "MPI_Graph_neighbors_count", [ - ("MPI_Comm", "comm"), - ("int", "rank"), - ("int *", "nneighbors"), - ], None), - - ("int", "MPI_Graph_neighbors", [ - ("MPI_Comm", "comm"), - ("int", "rank"), - ("int", "maxneighbors"), - ("int *", "neighbors"), - ], None), - - ("int", "MPI_Dist_graph_neighbors_count", [ - ("MPI_Comm", "comm"), - ("int *", "indegree"), - ("int *", "outdegree"), - ("int *", "weighted"), - ], None), - - ("int", "MPI_Dist_graph_neighbors", [ - ("MPI_Comm", "comm"), - ("int", "maxindeegree"), - ("int *", "sources"), - ("int *", "wourceweights"), - ("int", "maxoutdegree"), - ("int *", "destinations"), - ("int *", "destweights"), - ], None), - - ("int", "MPI_Cart_shift", [ - ("MPI_Comm", "comm"), - ("int", "direction"), - ("int", "disp"), - ("int *", "rank_source"), - ("int *", "rank_dest"), - ], None), - - ("int", "MPI_Cart_sub", [ - ("MPI_Comm", "comm"), - ("const int *", "remain_dims"), - ("MPI_Comm *", "newcomm"), - ], None), - - ("int", "MPI_Cart_map", [ - ("MPI_Comm", "comm"), - ("int", "ndims"), - ("const int *", "dims"), - ("const int *", "periods"), - ("int *", "newrank"), - ], None), - - ("int", "MPI_Graph_map", [ - ("MPI_Comm", "comm"), - ("int", "nnodes"), - ("const int *", "index"), - ("const int *", "edges"), - ("int *", "newrank"), - ], None), - - # 7.6 Neighborhood Collective Communication on Procerss Topologies - - ("int", "MPI_Neighbor_allgather", [ - ("const void *", "sendbuf"), - ("int", "sendcount"), - ("MPI_Datatype", "sendtype"), - ("void *", "recvbuf"), - ("int", "recvcount"), - ("MPI_Datatype", "recvtype"), - ("MPI_Comm", "comm"), - ], None), - - ("int", "MPI_Neighbor_allgatherv", [ - ("const void *", "sendbuf"), - ("int", "sendcount"), - ("MPI_Datatype", "sendtype"), - ("void *", "recvbuf"), - ("const int *", "recvcounts"), - ("const int *", "displs"), - ("MPI_Datatype", "recvtype"), - ("MPI_Comm", "comm"), - ], None), - - ("int", "MPI_Neighbor_alltoall", [ - ("const void *", "sendbuf"), - ("int", "sendcount"), - ("MPI_Datatype", "senddtype"), - ("void *", "recvbuf"), - ("int", "recvcount"), - ("MPI_Datatype", "recvtype"), - ("MPI_Comm", "comm"), - ], None), - - ("int", "MPI_Neighbor_alltoallv", [ - ("const void *", "sendbuf"), - ("const int *", "sendcounts"), - ("const int *", "sdispls"), - ("MPI_Datatype", "senddtype"), - ("void *", "recvbuf"), - ("const int *", "recvcounts"), - ("const int *", "rdispls"), - ("MPI_Datatype", "recvtype"), - ("MPI_Comm", "comm"), - ], None), - - ("int", "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"), - ("MPI_Comm", "comm"), - ], "manual"), - - # 7.7 Nonblocking Neighborhood Communication on Process Topologies - - ("int", "MPI_Ineighbor_allgather", [ - ("const void *", "sendbuf"), - ("int", "sendcount"), - ("MPI_Datatype", "sendtype"), - ("void *", "recvbuf"), - ("int", "recvcount"), - ("MPI_Datatype", "recvtype"), - ("MPI_Comm", "comm"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_Ineighbor_allgatherv", [ - ("const void *", "sendbuf"), - ("int", "sendcount"), - ("MPI_Datatype", "sendtype"), - ("void *", "recvbuf"), - ("const int *", "recvcounts"), - ("const int *", "displs"), - ("MPI_Datatype", "recvtype"), - ("MPI_Comm", "comm"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_Ineighbor_alltoall", [ - ("const void *", "sendbuf"), - ("int", "sendcount"), - ("MPI_Datatype", "senddtype"), - ("void *", "recvbuf"), - ("int", "recvcount"), - ("MPI_Datatype", "recvtype"), - ("MPI_Comm", "comm"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_Ineighbor_alltoallv", [ - ("const void *", "sendbuf"), - ("const int *", "sendcounts"), - ("const int *", "sdispls"), - ("MPI_Datatype", "senddtype"), - ("void *", "recvbuf"), - ("const int *", "recvcounts"), - ("const int *", "rdispls"), - ("MPI_Datatype", "recvtype"), - ("MPI_Comm", "comm"), - ("MPI_Request *", "request"), - ], None), - - ("int", "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"), - ("MPI_Comm", "comm"), - ("MPI_Request *", "request"), - ], "manual"), - - # 8.1 Implementation Information - - ("int", "MPI_Get_version", [ - ("int *", "version"), - ("int *", "subversion"), - ], None), - - ("int", "MPI_Get_library_version",[ - ("char *", "version"), - ("int *", "resultlen"), - ], "manual"), - - ("int", "MPI_Get_processor_name", [ - ("char *", "name"), - ("int *", "resultlen"), - ], None), - - # 8.2 Memory Allocation - - ("int", "MPI_Alloc_mem", [ - ("MPI_Aint", "size"), - ("MPI_Info", "info"), - ("void *", "baseptr"), - ], None), - - ("int", "MPI_Free_mem", [ - ("void *", "base"), - ], None), - - # 8.3 Error Handling - - ("int", "MPI_Comm_create_errhandler", [ - ("MPI_Comm_errhandler_function *", "comm_errhandler_fn"), - ("MPI_Errhandler *", "errhandler"), - ], None), - - # # remove - # ("int", "MPI_Errhandler_create", [ - # ("MPI_Comm_errhandler_function *", "comm_errhandler_fn"), - # ("MPI_Errhandler *", "errhandler"), - # ], None), - - ("int", "MPI_Comm_set_errhandler", [ - ("MPI_Comm", "comm"), - ("MPI_Errhandler", "errhandler"), - ], None), - - - # # removed - # ("int", "MPI_errhandler_set", [ - # ("MPI_Comm", "comm"), - # ("MPI_Errhandler", "errhandler"), - # ], None), - - ("int", "MPI_Comm_get_errhandler", [ - ("MPI_Comm", "comm"), - ("MPI_Errhandler *", "errhandler"), - ], None), - - # # removed - # ("int", "MPI_Errhandler_get", [ - # ("MPI_Comm", "comm"), - # ("MPI_Errhandler *", "errhandler"), - # ], None), - - ("int", "MPI_Win_create_errhandler", [ - ("MPI_Win_errhandler_function *", "win_errhandler_fn"), - ("MPI_Errhandler *", "errhandler"), - ], None), - - ("int", "MPI_Win_set_errhandler", [ - ("MPI_Win", "win"), - ("MPI_Errhandler", "errhandler"), - ], None), - - ("int", "MPI_Win_get_errhandler", - [("MPI_Win", "win"), - ("MPI_Errhandler *", "errhandler"), - ], None), - - ("int", "MPI_File_create_errhandler", [ - ("MPI_File_errhandler_function *", "file_errhandler_fn"), - ("MPI_Errhandler *", "errhandler"), - ], None), - - ("int", "MPI_File_set_errhandler", [ - ("MPI_File", "file"), - ("MPI_Errhandler", "errhandler"), - ], None), - - ("int", "MPI_File_get_errhandler", [ - ("MPI_File", "file"), - ("MPI_Errhandler *", "errhandler"), - ], None), - - ("int", "MPI_Errhandler_free", [ - ("MPI_Errhandler *", "errhandler"), - ], None), - - ("int", "MPI_Error_string", [ - ("int", "errorcode"), - ("char *", "string"), - ("int *", "resultlen"), - ], None), - - # 8.4 Error Codes and Classes - - ("int", "MPI_Error_class", [ - ("int", "errorcode"), - ("int *", "errorclass"), - ], None), - - # 8.5 Error Classes", "Error Codes", "and Error Handlers - - ("int", "MPI_Add_error_class", [ - ("int *", "errorclass"), - ], None), - - ("int", "MPI_Add_error_code", [ - ("int", "errorclass"), - ("int *", "errorcode"), - ], None), - - ("int", "MPI_Add_error_string", [ - ("int", "errorcode"), - ("const char *", "string"), - ], None), - - ("int", "MPI_Comm_call_errhandler", [ - ("MPI_Comm", "comm"), - ("int", "errorcode"), - ], None), - - ("int", "MPI_Win_call_errhandler", [ - ("MPI_Win", "win"), - ("int", "errorcode"), - ], None), - - ("int", "MPI_File_call_errhandler", [ - ("MPI_File", "file"), - ("int", "errorcode"), - ], None), - - # 8.6 Times and Synchronization - - ("double", "MPI_Wtime", [], None), - - ("double", "MPI_Wtick", [], None), - - # 8.7 Startup - - ("int", "MPI_Init", [ - ("int *", "argc"), - ("char ***", "argv"), - ], None), - - ("int", "MPI_Finalize", [], None), - - ("int", "MPI_Initialized", [ - ("int *", "flag"), - ], None), - - ("int", "MPI_Abort", [ - ("MPI_Comm", "comm"), - ("int", "errorcode"), - ], None), - - ("int", "MPI_Finalized", [ - ("int *", "flag"), - ], None), - - # 9 The Info Object - - ("int", "MPI_Info_create", [ - ("MPI_Info *", "info"), - ], None), - - ("int", "MPI_Info_set", [ - ("MPI_Info", "info"), - ("const char *", "key"), - ("const char *", "value"), - ], None), - - ("int", "MPI_Info_delete", [ - ("MPI_Info", "info"), - ("const char *", "key"), - ], None), - - ("int", "MPI_Info_get", [ - ("MPI_Info", "info"), - ("const char *", "key"), - ("int", "valuelen"), - ("char *", "value"), - ("int *", "flag"), - ], None), - - ("int", "MPI_Info_get_valuelen", [ - ("MPI_Info", "info"), - ("const char *", "key"), - ("int *", "valuelen"), - ("int *", "flag"), - ], None), - - ("int", "MPI_Info_get_nkeys", [ - ("MPI_Info", "info"), - ("int *", "nkeys"), - ], None), - - ("int", "MPI_Info_get_nthkey", [ - ("MPI_Info", "info"), - ("int", "n"), - ("char *", "key"), - ], None), - - ("int", "MPI_Info_dup", [ - ("MPI_Info", "info"), - ("MPI_Info *", "newinfo"), - ], None), - - ("int", "MPI_Info_free", [ - ("MPI_Info *", "info"), - ], None), - - # 10.3 Process Manager Interface - - ("int", "MPI_Comm_spawn", [ - ("const char *", "command"), - ("char **", "argv"), - ("int", "maxprocs"), - ("MPI_Info", "info"), - ("int", "root"), - ("MPI_Comm", "comm"), - ("MPI_Comm *", "intercomm"), - ("int *", "array_off_errcodes"), - ], None), - - ("int", "MPI_Comm_get_parent", [ - ("MPI_Comm *", "parent"), - ], None), - - ("int", "MPI_Comm_spawn_multiple", [ - ("int", "count"), - ("char **", "array_of_commands"), - ("char ***", "array_of_argv"), - ("const int *", "array_of_maxprocs"), - ("const MPI_Info *", "array_of_info"), - ("int", "root"), - ("MPI_Comm", "comm"), - ("MPI_Comm *", "intercomm"), - ("int *", "array_of_errcodes"), - ], "manual"), - - # 10.4 Establishing Communication - - ("int", "MPI_Open_port", [ - ("MPI_Info", "info"), - ("char *", "port_name"), - ], None), - - ("int", "MPI_Close_port", [ - ("const char *", "port_name"), - ], None), - - ("int", "MPI_Comm_accept", [ - ("const char *", "port_name"), - ("MPI_Info", "info"), - ("int", "root"), - ("MPI_Comm", "comm"), - ("MPI_Comm *", "newcomm"), - ], None), - - ("int", "MPI_Comm_connect", [ - ("const char *", "port_name"), - ("MPI_Info", "info"), - ("int", "root"), - ("MPI_Comm", "comm"), - ("MPI_Comm *", "newcomm"), - ], None), - - ("int", "MPI_Publish_name", [ - ("const char *", "service_name"), - ("MPI_Info", "info"), - ("const char *", "port_name"), - ], None), - - ("int", "MPI_Unpublish_name", [ - ("const char *", "service_name"), - ("MPI_Info", "info"), - ("const char *", "port_name"), - ], None), - - ("int", "MPI_Lookup_name", [ - ("const char *", "service_name"), - ("MPI_Info", "info"), - ("char *", "port_name"), - ], None), - - # 10.5 Other Functionality - - ("int", "MPI_Comm_disconnect", [ - ("MPI_Comm *", "comm"), - ], None), - - ("int", "MPI_Comm_join", [ - ("int", "fd"), - ("MPI_Comm *", "intercomm"), - ], None), - - # 11.2 Initialization - - ("int", "MPI_Win_create", [ - ("void *", "base"), - ("MPI_Aint", "size"), - ("int", "disp_unit"), - ("MPI_Info", "info"), - ("MPI_Comm", "comm"), - ("MPI_Win *", "win"), - ], None), - - ("int", "MPI_Win_allocate", [ - ("MPI_Aint", "size"), - ("int", "disp_unit"), - ("MPI_Info", "info"), - ("MPI_Comm", "comm"), - ("void *", "baseptr"), - ("MPI_Win *", "win"), - ], None), - - ("int", "MPI_Win_allocate_shared", [ - ("MPI_Aint", "size"), - ("int", "disp_unit"), - ("MPI_Info", "info"), - ("MPI_Comm", "comm"), - ("void *", "baseptr"), - ("MPI_Win *", "win"), - ], None), - - ("int", "MPI_Win_shared_query", [ - ("MPI_Win", "win"), - ("int", "rank"), - ("MPI_Aint *", "size"), - ("int *", "disp_unit"), - ("void *", "baseptr"), - ], None), - - ("int", "MPI_Win_create_dynamic", [ - ("MPI_Info", "info"), - ("MPI_Comm", "comm"), - ("MPI_Win *", "win"), - ], None), - - ("int", "MPI_Win_attach", [ - ("MPI_Win", "win"), - ("void *", "base"), - ("MPI_Aint", "size"), - ], None), - - ("int", "MPI_Win_detach", [ - ("MPI_Win", "win"), - ("const void *", "base"), - ], None), - - ("int", "MPI_Win_free", [ - ("MPI_Win *", "win"), - ], None), - - ("int", "MPI_Win_get_group", [ - ("MPI_Win", "win"), - ("MPI_Group *", "group"), - ], None), - - ("int", "MPI_Win_set_info", [ - ("MPI_Win", "win"), - ("MPI_Info", "info"), - ], None), - - ("int", "MPI_Win_get_info", [ - ("MPI_Win", "win"), - ("MPI_Info *", "info_used"), - ], None), - - # 11.3 Communication Calls - - ("int", "MPI_Put", [ - ("const void *", "origin_addr"), - ("int", "origin_count"), - ("MPI_Datatype", "origin_datatype"), - ("int", "target_rank"), - ("MPI_Aint", "target_disp"), - ("int", "target_count"), - ("MPI_Datatype", "target_datatype"), - ("MPI_Win", "win"), - ], None), - - ("int", "MPI_Get", [ - ("void *", "origin_addr"), - ("int", "origin_count"), - ("MPI_Datatype", "origin_datatype"), - ("int", "target_rank"), - ("MPI_Aint", "target_disp"), - ("int", "target_count"), - ("MPI_Datatype", "target_datatype"), - ("MPI_Win", "win"), - ], None), - - ("int", "MPI_Accumulate", [ - ("const void *", "origin_addr"), - ("int", "origin_count"), - ("MPI_Datatype", "origin_datatype"), - ("int", "target_rank"), - ("MPI_Aint", "target_disp"), - ("int", "target_count"), - ("MPI_Datatype", "target_datatype"), - ("MPI_Op", "op"), - ("MPI_Win", "win"), - ], None), - - ("int", "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"), - ("MPI_Win", "win"), - ], None), - - ("int", "MPI_Fetch_and_op", [ - ("const void *", "origin_addr"), - ("void *", "result_addr"), - ("MPI_Datatype", "datatype"), - ("int", "target_rank"), - ("MPI_Aint", "target_disp"), - ("MPI_Op", "op"), - ("MPI_Win", "win"), - ], None), - - ("int", "MPI_Compare_and_swap", [ - ("const void *", "origin_addr"), - ("const void *", "compare_addr"), - ("void *", "result_addr"), - ("MPI_Datatype", "datatype"), - ("int", "target_rank"), - ("MPI_Aint", "target_disp"), - ("MPI_Win", "win"), - ], None), - - ("int", "MPI_Rput", [ - ("const void *", "origin_addr"), - ("int", "origin_count"), - ("MPI_Datatype", "origin_datatype"), - ("int", "target_rank"), - ("MPI_Aint", "target_disp"), - ("int", "target_count"), - ("MPI_Datatype", "target_datatype"), - ("MPI_Win", "win"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_Rget", [ - ("void *", "origin_addr"), - ("int", "origin_count"), - ("MPI_Datatype", "origin_datatype"), - ("int", "target_rank"), - ("MPI_Aint", "target_disp"), - ("int", "target_count"), - ("MPI_Datatype", "target_datatype"), - ("MPI_Win", "win"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_Raccumulate", [ - ("const void *", "origin_addr"), - ("int", "origin_count"), - ("MPI_Datatype", "origin_datatype"), - ("int", "target_rank"), - ("MPI_Aint", "target_disp"), - ("int", "target_count"), - ("MPI_Datatype", "target_datatype"), - ("MPI_Op", "op"), - ("MPI_Win", "win"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_Rget_accumulate", [ - ("const void *", "origin_addr"), - ("int", "origin_count"), - ("MPI_Datatype", "origin_datatype"), - ("void *", "result_addr"), - ("int", "result_count"), - ("MPI_Datatype", "result_datatype"), - ("int", "target_rank"), - ("MPI_Aint", "target_disp"), - ("int", "target_count"), - ("MPI_Datatype", "target_datatype"), - ("MPI_Op", "op"), - ("MPI_Win", "win"), - ("MPI_Request *", "request"), - ], None), - - # 11.5 Synchronization Calls - - ("int", "MPI_Win_fence", [ - ("int", "assert"), - ("MPI_Win", "win"), - ], None), - - ("int", "MPI_Win_start", [ - ("MPI_Group", "group"), - ("int", "assert"), - ("MPI_Win", "win"), - ], None), - - ("int", "MPI_Win_complete", [ - ("MPI_Win", "win"), - ], None), - - ("int", "MPI_Win_post", [ - ("MPI_Group", "group"), - ("int", "assert"), - ("MPI_Win", "win"), - ], None), - - ("int", "MPI_Win_wait", [ - ("MPI_Win", "win"), - ], None), - - ("int", "MPI_Win_test", [ - ("MPI_Win", "win"), - ("int *", "flag"), - ], None), - - ("int", "MPI_Win_lock", [ - ("int", "lock_type"), - ("int", "rank"), - ("int", "assert"), - ("MPI_Win", "win"), - ], None), - - ("int", "MPI_Win_lock_all", [ - ("int", "assert"), - ("MPI_Win", "win"), - ], None), - - ("int", "MPI_Win_unlock", [ - ("int", "rank"), - ("MPI_Win", "win"), - ], None), - - ("int", "MPI_Win_unlock_all", [ - ("MPI_Win", "win"), - ], None), - - ("int", "MPI_Win_flush", [ - ("int", "rank"), - ("MPI_Win", "win"), - ], None), - - ("int", "MPI_Win_flush_all", [ - ("MPI_Win", "win"), - ], None), - - ("int", "MPI_Win_flush_local", [ - ("int", "rank"), - ("MPI_Win", "win"), - ], None), - - ("int", "MPI_Win_flush_local_all", [ - ("MPI_Win", "win"), - ], None), - - ("int", "MPI_Win_sync", [ - ("MPI_Win", "win"), - ], None), - - # 12.2 Generalized Requests - - ("int", "MPI_Grequest_start", [ - ("MPI_Grequest_query_function *", "query_fn"), - ("MPI_Grequest_free_function *", "free_fn"), - ("MPI_Grequest_cancel_function *", "cancel_fn"), - ("void *", "extra_state"), - ("MPI_Request *", "request"), - ], "manual"), - - ("int", "MPI_Grequest_complete", [ - ("MPI_Request", "request"), - ], None), - - # 12.3 Associating Information with Status - - ("int", "MPI_Status_set_elements", [ - ("MPI_Status *", "status"), - ("MPI_Datatype", "datatype"), - ("int", "count"), - ], None), - - ("int", "MPI_Status_set_elements_x", [ - ("MPI_Status *", "status"), - ("MPI_Datatype", "datatype"), - ("MPI_Count", "count"), - ], None), - - ("int", "MPI_Status_set_cancelled", [ - ("MPI_Status *", "status"), - ("int", "flag"), - ], None), - - # 12.4 MPI and Threads - - ("int", "MPI_Init_thread", [ - ("int *", "argc"), - ("char * * *", "argv"), - ("int", "required"), - ("int *", "provided"), - ], None), - - ("int", "MPI_Query_thread", [ - ("int *", "provided"), - ], None), - - ("int", "MPI_Is_thread_main", [ - ("int *", "flag"), - ], None), - - # 13.2 File Manipulation - - ("int", "MPI_File_open", [ - ("MPI_Comm", "comm"), - ("const char *", "filename"), - ("int", "amode"), - ("MPI_Info", "info"), - ("MPI_File *", "fh"), - ], None), - - ("int", "MPI_File_close", [ - ("MPI_File *", "fh"), - ], None), - - ("int", "MPI_File_delete", [ - ("const char *", "filename"), - ("MPI_Info", "info"), - ], None), - - ("int", "MPI_File_set_size", [ - ("MPI_File", "fh"), - ("MPI_Offset", "size"), - ], None), - - ("int", "MPI_File_preallocate", [ - ("MPI_File", "fh"), - ("MPI_Offset", "size"), - ], None), - - ("int", "MPI_File_get_size", [ - ("MPI_File", "fh"), - ("MPI_Offset *", "size"), - ], None), - - ("int", "MPI_File_get_group", [ - ("MPI_File", "fh"), - ("MPI_Group *", "group"), - ], None), - - ("int", "MPI_File_get_amode", [ - ("MPI_File", "fh"), - ("int *", "amode"), - ], None), - - ("int", "MPI_File_set_info", [ - ("MPI_File", "fh"), - ("MPI_Info", "info"), - ], None), - - ("int", "MPI_File_get_info", [ - ("MPI_File", "fh"), - ("MPI_Info *", "info_used"), - ], None), - - # 13.3 File View - - ("int", "MPI_File_set_view", [ - ("MPI_File", "fh"), - ("MPI_Offset", "disp"), - ("MPI_Datatype", "etype"), - ("MPI_Datatype", "filetype"), - ("const char *", "datarep"), - ("MPI_Info", "info"), - ], None), - - ("int", "MPI_File_get_view", [ - ("MPI_File", "fh"), - ("MPI_Offset *", "disp"), - ("MPI_Datatype *", "etype"), - ("MPI_Datatype *", "filetype"), - ("char *", "datarep"), - ], None), - - # 13.4 Data Access - - ("int", "MPI_File_read_at", [ - ("MPI_File", "fh"), - ("MPI_Offset", "offset"), - ("void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("MPI_Status *", "status"), - ], None), - - ("int", "MPI_File_read_at_all", [ - ("MPI_File", "fh"), - ("MPI_Offset", "offset"), - ("void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("MPI_Status *", "status"), - ], None), - - ("int", "MPI_File_write_at", [ - ("MPI_File", "fh"), - ("MPI_Offset", "offset"), - ("const void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("MPI_Status *", "status"), - ], None), - - ("int", "MPI_File_write_at_all", [ - ("MPI_File", "fh"), - ("MPI_Offset", "offset"), - ("const void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("MPI_Status *", "status"), - ], None), - - ("int", "MPI_File_iread_at", [ - ("MPI_File", "fh"), - ("MPI_Offset", "offset"), - ("void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_File_iread_at_all", [ - ("MPI_File", "fh"), - ("MPI_Offset", "offset"), - ("void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_File_iwrite_at", [ - ("MPI_File", "fh"), - ("MPI_Offset", "offset"), - ("const void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_File_iwrite_at_all", [ - ("MPI_File", "fh"), - ("MPI_Offset", "offset"), - ("const void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_File_read", [ - ("MPI_File", "fh"), - ("void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("MPI_Status *", "status"), - ], None), - - ("int", "MPI_File_read_all", [ - ("MPI_File", "fh"), - ("void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("MPI_Status *", "status"), - ], None), - - ("int", "MPI_File_write", [ - ("MPI_File", "fh"), - ("const void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("MPI_Status *", "status"), - ], None), - - ("int", "MPI_File_write_all", [ - ("MPI_File", "fh"), - ("const void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("MPI_Status *", "status"), - ], None), - - ("int", "MPI_File_iread", [ - ("MPI_File", "fh"), - ("void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_File_iread_all", [ - ("MPI_File", "fh"), - ("void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_File_iwrite", [ - ("MPI_File", "fh"), - ("const void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_File_iwrite_all", [ - ("MPI_File", "fh"), - ("const void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_File_seek", [ - ("MPI_File", "fh"), - ("MPI_Offset", "offset"), - ("int", "whence"), - ], None), - - ("int", "MPI_File_get_position", [ - ("MPI_File", "fh"), - ("MPI_Offset *", "offset"), - ], None), - - ("int", "MPI_File_get_byte_offset", [ - ("MPI_File", "fh"), - ("MPI_Offset", "offset"), - ("MPI_Offset *", "disp"), - ], None), - - ("int", "MPI_File_read_shared", [ - ("MPI_File", "fh"), - ("void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("MPI_Status *", "status"), - ], None), - - ("int", "MPI_File_write_shared", [ - ("MPI_File", "fh"), - ("const void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("MPI_Status *", "status"), - ], None), - - ("int", "MPI_File_iread_shared", [ - ("MPI_File", "fh"), - ("void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_File_iwrite_shared", [ - ("MPI_File", "fh"), - ("const void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("MPI_Request *", "request"), - ], None), - - ("int", "MPI_File_read_ordered", [ - ("MPI_File", "fh"), - ("void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("MPI_Status *", "status"), - ], None), - - ("int", "MPI_File_write_ordered", [ - ("MPI_File", "fh"), - ("const void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ("MPI_Status *", "status"), - ], None), - - ("int", "MPI_File_seek_shared", [ - ("MPI_File", "fh"), - ("MPI_Offset", "offset"), - ("int", "whence"), - ], None), - - ("int", "MPI_File_get_position_shared", [ - ("MPI_File", "fh"), - ("MPI_Offset *", "offset"), - ], None), - - ("int", "MPI_File_read_at_all_begin", [ - ("MPI_File", "fh"), - ("MPI_Offset", "offset"), - ("void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ], None), - - ("int", "MPI_File_read_at_all_end", [ - ("MPI_File", "fh"), - ("void *", "buf"), - ("MPI_Status *", "status"), - ], None), - - ("int", "MPI_File_write_at_all_begin", [ - ("MPI_File", "fh"), - ("MPI_Offset", "offset"), - ("const void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ], None), - - ("int", "MPI_File_write_at_all_end", [ - ("MPI_File", "fh"), - ("const void *", "buf"), - ("MPI_Status *", "status"), - ], None), - - ("int", "MPI_File_read_all_begin", [ - ("MPI_File", "fh"), - ("void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ], None), - - ("int", "MPI_File_read_all_end", [ - ("MPI_File", "fh"), - ("void *", "buf"), - ("MPI_Status *", "status"), - ], None), - - ("int", "MPI_File_write_all_begin", [ - ("MPI_File", "fh"), - ("const void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ], None), - - ("int", "MPI_File_write_all_end", [ - ("MPI_File", "fh"), - ("const void *", "buf"), - ("MPI_Status *", "status"), - ], None), - - ("int", "MPI_File_read_ordered_begin", [ - ("MPI_File", "fh"), - ("void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ], None), - - ("int", "MPI_File_read_ordered_end", [ - ("MPI_File", "fh"), - ("void *", "buf"), - ("MPI_Status *", "status"), - ], None), - - ("int", "MPI_File_write_ordered_begin", [ - ("MPI_File", "fh"), - ("const void *", "buf"), - ("int", "count"), - ("MPI_Datatype", "datatype"), - ], None), - - ("int", "MPI_File_write_ordered_end", [ - ("MPI_File", "fh"), - ("const void *", "buf"), - ("MPI_Status *", "status"), - ], None), - - # 13.5 File Interoperability - - ("int", "MPI_File_get_type_extent", [ - ("MPI_File", "fh"), - ("MPI_Datatype", "datatype"), - ("MPI_Aint *", "extent"), - ], None), - - ("int", "MPI_Register_datarep", [ - ("const char *", "datarep"), - ("MPI_Datarep_conversion_function *", "read_conversion_fn"), - ("MPI_Datarep_conversion_function *", "write_conversion_fn"), - ("MPI_Datarep_extent_function *", "dtype_file_extent_fn"), - ("void *", "extra_state"), - ], "manual"), - - # 13.6 Consistency and Semantics - - ("int", "MPI_File_set_atomicity", [ - ("MPI_File", "fh"), - ("int", "flag"), - ], None), - - ("int", "MPI_File_get_atomicity", [ - ("MPI_File", "fh"), - ("int *", "flag"), - ], None), - - ("int", "MPI_File_sync", [ - ("MPI_File", "fh"), - ], None), - - # 17.1 Additional Support for Fortran Numeric Intrinsic Types - - # Fortran 90-related functions. These routines are available only when - # Fortran 90 support is enabled. - - ("int", "MPI_Type_create_f90_real", [ - ("int", "precision"), - ("int", "range"), - ("MPI_Datatype *", "newtype"), - ], None), - - ("int", "MPI_Type_create_f90_complex", [ - ("int", "precision"), - ("int", "range"), - ("MPI_Datatype *", "newtype"), - ], None), - - ("int", "MPI_Type_create_f90_integer", [ - ("int", "range"), - ("MPI_Datatype *", "newtype"), - ], None), - - ("int", "MPI_Type_match_size", [ - ("int", "typeclass"), - ("int", "size"), - ("MPI_Datatype *", "datatype"), - ], None), - - # 17.2 Language Interoperability - - ("MPI_Comm", "MPI_Comm_f2c", [ - ("MPI_Fint", "comm"), - ], None), - - ("MPI_Fint", "MPI_Comm_c2f", [ - ("MPI_Comm", "comm"), - ], None), - - ("MPI_Datatype", "MPI_Type_f2c", [ - ("MPI_Fint", "datatype"), - ], None), - - ("MPI_Fint", "MPI_Type_c2f", [ - ("MPI_Datatype", "datatype"), - ], None), - - ("MPI_Group", "MPI_Group_f2c", [ - ("MPI_Fint", "group"), - ], None), - - ("MPI_Fint", "MPI_Group_c2f", [ - ("MPI_Group", "group"), - ], None), - - ("MPI_Request", "MPI_Request_f2c", [ - ("MPI_Fint", "request"), - ], None), - - ("MPI_Fint", "MPI_Request_c2f", [ - ("MPI_Request", "request"), - ], None), - - ("MPI_File", "MPI_File_f2c", [ - ("MPI_Fint", "file"), - ], None), - - ("MPI_Fint", "MPI_File_c2f", [ - ("MPI_File", "file"), - ], None), - - ("MPI_Win", "MPI_Win_f2c", [ - ("MPI_Fint", "win"), - ], None), - - ("MPI_Fint", "MPI_Win_c2f", [ - ("MPI_Win", "win"), - ], None), - - ("MPI_Op", "MPI_Op_f2c", [ - ("MPI_Fint", "op"), - ], None), - - ("MPI_Fint", "MPI_Op_c2f", [ - ("MPI_Op", "op"), - ], None), - - ("MPI_Info", "MPI_Info_f2c", [ - ("MPI_Fint", "info"), - ], None), - - ("MPI_Fint", "MPI_Info_c2f", [ - ("MPI_Info", "info"), - ], None), - - ("MPI_Errhandler", "MPI_Errhandler_f2c", [ - ("MPI_Fint", "info"), - ], None), - - ("MPI_Fint", "MPI_Errhandler_c2f", [ - ("MPI_Errhandler", "info"), - ], None), - - ("MPI_Message", "MPI_Message_f2c", [ - ("MPI_Fint", "message"), - ], None), - - ("MPI_Fint", "MPI_Message_c2f", [ - ("MPI_Message", "message"), - ], None), - - ("int", "MPI_Status_f2c", [ - ("const MPI_Fint *", "f_status"), - ("MPI_Status *", "c_status"), - ], None), - - ("int", "MPI_Status_c2f", [ - ("const MPI_Status *", "c_status"), - ("MPI_Fint *", "f_status"), - ], None), - - # MPIX - - ("int", "MPIX_Query_cuda_support", [ - ], "manual"), - - ("int", "MPIX_Query_hip_support", [ - ], "manual"), - - ("int", "MPIX_Query_ze_support", [ - ], "manual"), - - # TODO - # - # ("int", "MPI_Status_f082c"), [ - # ("const MPI_F08_Status *", "f08_status"), - # ("MPI_Status *", "c_status"), - # ], None), - # - # ("int", "MPI_Status_c2f08"), [ - # ("const MPI_Status *", "c_status"), - # ("MPI_F08_Status *", "f08_status"), - # ], None), - # - # ("int", "MPI_Status_f2f08", [ - # ("MPI_Fint *", "f_status"), - # ("MPI_F08_Status *", "f08_status"), - # ], None), - # - # ("int", "MPI_Status_f082f"), [ - # ("const MPI_F08_Status *", "f08_status"), - # ("MPI_Fint *", "f_status"), - # ], None), - - # ("int", "MPI_Pcontrol", [ - # ("int", "level"), - # ("...", ""), - # ], "manual"), - -] diff --git a/mpiabi/mpi_functions_fortran.py b/mpiabi/mpi_functions_fortran.py deleted file mode 100755 index 4695791e..00000000 --- a/mpiabi/mpi_functions_fortran.py +++ /dev/null @@ -1,3081 +0,0 @@ -# The section names follow the MPI 3.1 standard. - -functions_fortran = [ - - # 3.2 Blocking Send and Receive Operations - - ("void", "MPI_Send", [ - ("const void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("const MPI_Fint *", "dest"), - ("const MPI_Fint *", "tag"), - ("const MPI_Comm *", "comm"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Recv", [ - ("const void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("const MPI_Fint *", "source"), - ("const MPI_Fint *", "tag"), - ("const MPI_Comm *", "comm"), - ("MPI_Status *", "status"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Get_count", [ - ("const MPI_Status *", "status"), - ("const MPI_Datatype *", "datatype"), - ("MPI_Fint *", "count"), - ("MPI_Fint *", "ierror"), - ]), - - # 3.4 Communication Modes - - ("void", "MPI_Bsend", [ - ("const void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("const MPI_Fint *", "dest"), - ("const MPI_Fint *", "tag"), - ("const MPI_Comm *", "comm"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Ssend", [ - ("const void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("const MPI_Fint *", "dest"), - ("const MPI_Fint *", "tag"), - ("const MPI_Comm *", "comm"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Rsend", [ - ("const void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("const MPI_Fint *", "dest"), - ("const MPI_Fint *", "tag"), - ("const MPI_Comm *", "comm"), - ("MPI_Fint *", "ierror"), - ]), - - # 3.6 Buffer Allocation and Usage - - ("void", "MPI_Buffer_attach", [ - ("void *", "buffer"), - ("const MPI_Fint *", "size"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Buffer_detach", [ - ("void *", "buffer_addr"), - ("MPI_Fint *", "size"), - ("MPI_Fint *", "ierror"), - ]), - - # 3.7 Nonblocking Communication - - ("void", "MPI_Isend", [ - ("const void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("const MPI_Fint *", "dest"), - ("const MPI_Fint *", "tag"), - ("const MPI_Comm *", "comm"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Ibsend", [ - ("const void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("const MPI_Fint *", "dest"), - ("const MPI_Fint *", "tag"), - ("const MPI_Comm *", "comm"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Issend", [ - ("const void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("const MPI_Fint *", "dest"), - ("const MPI_Fint *", "tag"), - ("const MPI_Comm *", "comm"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Irsend", [ - ("const void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("const MPI_Fint *", "dest"), - ("const MPI_Fint *", "tag"), - ("const MPI_Comm *", "comm"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Irecv", [ - ("void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("const MPI_Fint *", "source"), - ("const MPI_Fint *", "tag"), - ("const MPI_Comm *", "comm"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Wait", [ - ("MPI_Request *", "request"), - ("MPI_Status *", "status"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Test", [ - ("MPI_Request *", "request"), - ("int *", "flag"), - ("MPI_Status *", "status"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Request_free", [ - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Waitany", [ - ("const MPI_Fint *", "count"), - ("MPI_Request *", "array_of_requests"), - ("int *", "index"), - ("MPI_Status *", "status"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Testany", [ - ("const MPI_Fint *", "count"), - ("MPI_Request *", "array_of_requests"), - ("int *", "index"), - ("int *", "flag"), - ("MPI_Status *", "status"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Waitall", [ - ("const MPI_Fint *", "count"), - ("MPI_Request *", "array_of_requests"), - ("MPI_Status *", "array_of_statuses"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Testall", [ - ("const MPI_Fint *", "count"), - ("MPI_Request *", "array_of_requests"), - ("int *", "flag"), - ("MPI_Status *", "array_of_statuses"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Waitsome", [ - ("const MPI_Fint *", "incount"), - ("MPI_Request *", "array_of_requests"), - ("int *", "outcount"), - ("int *", "array_of_indices"), - ("MPI_Status *", "array_of_statuses"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Testsome", [ - ("const MPI_Fint *", "incount"), - ("MPI_Request *", "array_of_requests"), - ("int *", "outcount"), - ("int *", "array_of_indices"), - ("MPI_Status *", "array_of_statuses"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Request_get_status", [ - ("const MPI_Request *", "request"), - ("int *", "flag"), - ("MPI_Status *", "status"), - ("MPI_Fint *", "ierror"), - ]), - - # 3.8 Probe and Cancel - - ("void", "MPI_Iprobe", [ - ("const MPI_Fint *", "source"), - ("const MPI_Fint *", "tag"), - ("const MPI_Comm *", "comm"), - ("int *", "flag"), - ("MPI_Status *", "status"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Probe", [ - ("const MPI_Fint *", "source"), - ("const MPI_Fint *", "tag"), - ("const MPI_Comm *", "comm"), - ("MPI_Status *", "status"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Improbe", [ - ("const MPI_Fint *", "source"), - ("const MPI_Fint *", "tag"), - ("const MPI_Comm *", "comm"), - ("int *", "flag"), - ("MPI_Message *", "message"), - ("MPI_Status *", "status"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Mprobe", [ - ("const MPI_Fint *", "source"), - ("const MPI_Fint *", "tag"), - ("const MPI_Comm *", "comm"), - ("MPI_Message *", "message"), - ("MPI_Status *", "status"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Mrecv", [ - ("void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("MPI_Message *", "message"), - ("MPI_Status *", "status"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Imrecv", [ - ("void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("MPI_Message *", "message"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Cancel", [ - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Test_cancelled", [ - ("const MPI_Status *", "status"), - ("int *", "flag"), - ("MPI_Fint *", "ierror"), - ]), - - # 3.9 Persistent Communication Requests - - ("void", "MPI_Send_init", [ - ("const void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("const MPI_Fint *", "dest"), - ("const MPI_Fint *", "tag"), - ("const MPI_Comm *", "comm"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Bsend_init", [ - ("const void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("const MPI_Fint *", "dest"), - ("const MPI_Fint *", "tag"), - ("const MPI_Comm *", "comm"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Ssend_init", [ - ("const void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("const MPI_Fint *", "dest"), - ("const MPI_Fint *", "tag"), - ("const MPI_Comm *", "comm"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Rsend_init", [ - ("const void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("const MPI_Fint *", "dest"), - ("const MPI_Fint *", "tag"), - ("const MPI_Comm *", "comm"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Recv_init", [ - ("void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("const MPI_Fint *", "source"), - ("const MPI_Fint *", "tag"), - ("const MPI_Comm *", "comm"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Start", [ - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Startall", [ - ("const MPI_Fint *", "count"), - ("MPI_Request *", "array_of_requests"), - ("MPI_Fint *", "ierror"), - ]), - - # 3.10 Send-Receive - - ("void", "MPI_Sendrecv", [ - ("const void *", "sendbuf"), - ("const MPI_Fint *", "sendcount"), - ("const MPI_Datatype *", "sendtype"), - ("const MPI_Fint *", "dest"), - ("const MPI_Fint *", "sendtag"), - ("void *", "recvbuf"), - ("const MPI_Fint *", "recvcount"), - ("const MPI_Datatype *", "recvtype"), - ("const MPI_Fint *", "source"), - ("const MPI_Fint *", "recvtag"), - ("const MPI_Comm *", "comm"), - ("MPI_Status *", "status"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Sendrecv_replace", [ - ("void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("const MPI_Fint *", "dest"), - ("const MPI_Fint *", "sendtag"), - ("const MPI_Fint *", "source"), - ("const MPI_Fint *", "recvtag"), - ("const MPI_Comm *", "comm"), - ("MPI_Status *", "status"), - ("MPI_Fint *", "ierror"), - ]), - -################################################################################ - - # 4.1 Derived Datatypes - - ("void", "MPI_Type_contiguous", [ - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "oldtype"), - ("MPI_Datatype *", "newtype"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Type_vector", [ - ("const MPI_Fint *", "count"), - ("const MPI_Fint *", "blocklength"), - ("const MPI_Fint *", "stride"), - ("const MPI_Datatype *", "oldtype"), - ("MPI_Datatype *", "newtype"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Type_create_hvector", [ - ("const MPI_Fint *", "count"), - ("const MPI_Fint *", "blocklength"), - ("const MPI_Aint *", "stride"), - ("const MPI_Datatype *", "oldtype"), - ("MPI_Datatype *", "newtype"), - ("MPI_Fint *", "ierror"), - ]), - - # removed - ("void", "MPI_Type_hvector", [ - ("const MPI_Fint *", "count"), - ("const MPI_Fint *", "blocklength"), - ("const MPI_Aint *", "stride"), - ("const MPI_Datatype *", "oldtype"), - ("MPI_Datatype *", "newtype"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Type_indexed", [ - ("const MPI_Fint *", "count"), - ("const int *", "array_of_blocklengths"), - ("const int *", "array_of_displacements"), - ("const MPI_Datatype *", "oldtype"), - ("MPI_Datatype *", "newtype"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Type_create_hindexed", [ - ("const MPI_Fint *", "count"), - ("const int *", "array_of_blocklengths"), - ("const MPI_Aint *", "array_of_displacements"), - ("const MPI_Datatype *", "oldtype"), - ("MPI_Datatype *", "newtype"), - ("MPI_Fint *", "ierror"), - ]), - - # removed - ("void", "MPI_Type_hindexed", [ - ("const MPI_Fint *", "count"), - ("const int *", "array_of_blocklengths"), - ("const MPI_Aint *", "array_of_displacements"), - ("const MPI_Datatype *", "oldtype"), - ("MPI_Datatype *", "newtype"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Type_create_indexed_block", [ - ("const MPI_Fint *", "count"), - ("const MPI_Fint *", "blocklength"), - ("const int *", "array_of_displacements"), - ("const MPI_Datatype *", "oldtype"), - ("MPI_Datatype *", "newtype"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Type_create_hindexed_block", [ - ("const MPI_Fint *", "count"), - ("const MPI_Fint *", "blocklength"), - ("const MPI_Aint *", "array_of_displacements"), - ("const MPI_Datatype *", "oldtype"), - ("MPI_Datatype *", "newtype"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Type_create_struct", [ - ("const MPI_Fint *", "count"), - ("const MPI_Fint *", "array_of_blocklengths"), - ("const MPI_Aint *", "array_of_displacements"), - ("const MPI_Datatype *", "array_of_types"), - ("MPI_Datatype *", "newtype"), - ("MPI_Fint *", "ierror"), - ]), - - # removed - ("void", "MPI_Type_struct", [ - ("const MPI_Fint *", "count"), - ("const MPI_Fint *", "array_of_blocklengths"), - ("const MPI_Fint *", "array_of_displacements"), - ("const MPI_Datatype *", "array_of_types"), - ("MPI_Datatype *", "newtype"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Type_create_subarray", [ - ("const MPI_Fint *", "ndims"), - ("const int *", "array_of_sizes"), - ("const int *", "array_of_subsizes"), - ("const int *", "array_of_starts"), - ("const MPI_Fint *", "ordder"), - ("const MPI_Datatype *", "oldtype"), - ("MPI_Datatype *", "newtype"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Type_create_darray", [ - ("const MPI_Fint *", "size"), - ("const MPI_Fint *", "rank"), - ("const MPI_Fint *", "ndims"), - ("const int *", "array_of_gsizes"), - ("const int *", "array_of_distribs"), - ("const int *", "array_of_dargs"), - ("const int *", "array_of_psizes"), - ("const MPI_Fint *", "order"), - ("const MPI_Datatype *", "oldtype"), - ("MPI_Datatype *", "newtype"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Get_address", [ - ("const void *", "location"), - ("MPI_Aint *", "address"), - ("MPI_Fint *", "ierror"), - ]), - - # removed - ("void", "MPI_address", [ - ("const void *", "location"), - ("MPI_Fint *", "address"), - ("MPI_Fint *", "ierror"), - ]), - - ("MPI_Aint", "MPI_Aint_add", [ - ("const MPI_Aint *", "base"), - ("const MPI_Aint *", "disp"), - ("MPI_Fint *", "ierror"), - ]), - - ("MPI_Aint", "MPI_Aint_diff", [ - ("const MPI_Aint *", "addr1"), - ("const MPI_Aint *", "addr2"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Type_size", [ - ("const MPI_Datatype *", "datatype"), - ("int *", "size"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Type_size_x", [ - ("const MPI_Datatype *", "datatype"), - ("MPI_Count *", "size"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Type_get_extent", [ - ("const MPI_Datatype *", "datatype"), - ("MPI_Aint *", "lb"), - ("MPI_Aint *", "extent"), - ("MPI_Fint *", "ierror"), - ]), - - # removed - ("void", "MPI_Type_extent", [ - ("const MPI_Datatype *", "datatype"), - ("MPI_Aint *", "extent"), - ("MPI_Fint *", "ierror"), - ]), - - # removed - ("void", "MPI_Type_lb", [ - ("const MPI_Datatype *", "datatype"), - ("MPI_Aint *", "displacement"), - ("MPI_Fint *", "ierror"), - ]), - - # removed - ("void", "MPI_Type_ub", [ - ("const MPI_Datatype *", "datatype"), - ("MPI_Aint *", "displacement"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Type_get_extent_x", [ - ("const MPI_Datatype *", "datatype"), - ("MPI_Count *", "lb"), - ("MPI_Count *", "extent"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Type_create_resized", [ - ("const MPI_Datatype *", "oldtype"), - ("const MPI_Aint *", "lb"), - ("const MPI_Aint *", "extent"), - ("MPI_Datatype *", "newtype"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Type_get_true_extent", [ - ("const MPI_Datatype *", "datatype"), - ("MPI_Aint *", "true_lb"), - ("MPI_Aint *", "true_extent"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Type_get_true_extent_x", [ - ("const MPI_Datatype *", "datatype"), - ("MPI_Count *", "true_lb"), - ("MPI_Count *", "true_extent"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Type_commit", [ - ("MPI_Datatype *", "datatype"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Type_free", [ - ("MPI_Datatype *", "datatype"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Type_dup", [ - ("const MPI_Datatype *", "oldtype"), - ("MPI_Datatype *", "newtype"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Get_elements", [ - ("const MPI_Status *", "status"), - ("const MPI_Datatype *", "datatype"), - ("int *", "count"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Get_elements_x", [ - ("const MPI_Status *", "status"), - ("const MPI_Datatype *", "datatype"), - ("MPI_Count *", "count"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Type_get_envelope", [ - ("const MPI_Datatype *", "datatype"), - ("int *", "num_integers"), - ("int *", "num_addresses"), - ("int *", "num_datatypes"), - ("int *", "combiner"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Type_get_contents", [ - ("const MPI_Datatype *", "datatype"), - ("const MPI_Fint *", "max_integers"), - ("const MPI_Fint *", "max_addresses"), - ("const MPI_Fint *", "max_datatypes"), - ("int *", "array_of_integers"), - ("MPI_Aint *", "array_of_addresses"), - ("MPI_Datatype *", "array_of_datatypes"), - ("MPI_Fint *", "ierror"), - ]), - - # 4.2 Pack and Unpack - - ("void", "MPI_Pack", [ - ("const void *", "inbuf"), - ("const MPI_Fint *", "incount"), - ("const MPI_Datatype *", "datatype"), - ("void *", "outbuf"), - ("const MPI_Fint *", "outsize"), - ("int *", "position"), - ("const MPI_Comm *", "comm"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Unpack", [ - ("const void *", "inbuf"), - ("const MPI_Fint *", "insize"), - ("int *", "position"), - ("void *", "outbuf"), - ("const MPI_Fint *", "outcount"), - ("const MPI_Datatype *", "datatype"), - ("const MPI_Comm *", "comm"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Pack_size", [ - ("const MPI_Fint *", "incount"), - ("const MPI_Datatype *", "datatype"), - ("const MPI_Comm *", "comm"), - ("int *", "size"), - ("MPI_Fint *", "ierror"), - ]), - - # 4.3 Canonical MPI_PACK and MPI_UNPACK - - ("void", "MPI_Pack_external", [ - ("const char *", "datarep"), - ("const void *", "inbuf"), - ("const MPI_Fint *", "incount"), - ("const MPI_Datatype *", "datatype"), - ("void *", "outbuf"), - ("const MPI_Aint *", "outsize"), - ("MPI_Aint *", "position"), - ("MPI_Fint *", "ierror"), - ("size_t", "datarep_len"), - ]), - - ("void", "MPI_Unpack_external", [ - ("const char *", "datarep"), - ("const void *", "inbuf"), - ("const MPI_Aint *", "insize"), - ("MPI_Aint *", "position"), - ("void *", "outbuf"), - ("const MPI_Fint *", "outcount"), - ("const MPI_Datatype *", "datatype"), - ("MPI_Fint *", "ierror"), - ("size_t", "datarep_len"), - ]), - - ("void", "MPI_Pack_external_size", [ - ("const char *", "datarep"), - ("const MPI_Fint *", "incount"), - ("const MPI_Datatype *", "datatype"), - ("MPI_Aint *", "size"), - ("MPI_Fint *", "ierror"), - ("size_t", "datarep_len"), - ]), - - # 5.3 Barrier Synchronization - - ("void", "MPI_Barrier", [ - ("const MPI_Comm *", "comm"), - ("MPI_Fint *", "ierror"), - ]), - - # 5.4 Broadcast - - ("void", "MPI_Bcast", [ - ("void *", "buffer"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("const MPI_Fint *", "root"), - ("const MPI_Comm *", "comm"), - ("MPI_Fint *", "ierror"), - ]), - - # 5.5 Gather - - ("void", "MPI_Gather", [ - ("const void *", "sendbuf"), - ("const MPI_Fint *", "sendcount"), - ("const MPI_Datatype *", "sendtype"), - ("void *", "recvbuf"), - ("const MPI_Fint *", "recvcount"), - ("const MPI_Datatype *", "recvtype"), - ("const MPI_Fint *", "root"), - ("const MPI_Comm *", "comm"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Gatherv", [ - ("const void *", "sendbuf"), - ("const MPI_Fint *", "sendcount"), - ("const MPI_Datatype *", "sendtype"), - ("void *", "recvbuf"), - ("const int *", "recvcounts"), - ("const int *", "displs"), - ("const MPI_Datatype *", "recvtype"), - ("const MPI_Fint *", "root"), - ("const MPI_Comm *", "comm"), - ("MPI_Fint *", "ierror"), - ]), - - # 5.6 Scatter - - ("void", "MPI_Scatter", [ - ("const void *", "sendbuf"), - ("const MPI_Fint *", "sendcount"), - ("const MPI_Datatype *", "sendtype"), - ("void *", "recvbuf"), - ("const MPI_Fint *", "recvcount"), - ("const MPI_Datatype *", "recvtype"), - ("const MPI_Fint *", "root"), - ("const MPI_Comm *", "comm"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Scatterv", [ - ("const void *", "sendbuf"), - ("const int *", "sendcounts"), - ("const int *", "displs"), - ("const MPI_Datatype *", "sendtype"), - ("void *", "recvbuf"), - ("const MPI_Fint *", "recvcount"), - ("const MPI_Datatype *", "recvtype"), - ("const MPI_Fint *", "root"), - ("const MPI_Comm *", "comm"), - ("MPI_Fint *", "ierror"), - ]), - - # 5.7 Gather-to-all - - ("void", "MPI_Allgather", [ - ("const void *", "sendbuf"), - ("const MPI_Fint *", "sendcount"), - ("const MPI_Datatype *", "sendtype"), - ("void *", "recvbuf"), - ("const MPI_Fint *", "recvcount"), - ("const MPI_Datatype *", "recvtype"), - ("const MPI_Comm *", "comm"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Allgatherv", [ - ("const void *", "sendbuf"), - ("const MPI_Fint *", "sendcount"), - ("const MPI_Datatype *", "sendtype"), - ("void *", "recvbuf"), - ("const int *", "recvcounts"), - ("const int *", "displs"), - ("const MPI_Datatype *", "recvtype"), - ("const MPI_Comm *", "comm"), - ("MPI_Fint *", "ierror"), - ]), - - # 5.8 All-to-All Scatter/Gather - - ("void", "MPI_Alltoall", [ - ("const void *", "sendbuf"), - ("const MPI_Fint *", "sendcount"), - ("const MPI_Datatype *", "sendtype"), - ("void *", "recvbuf"), - ("const MPI_Fint *", "recvcount"), - ("const MPI_Datatype *", "recvtype"), - ("const MPI_Comm *", "comm"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Alltoallv", [ - ("const void *", "sendbuf"), - ("const int *", "sendcounts"), - ("const int *", "sdispls"), - ("const MPI_Datatype *", "sendtype"), - ("void *", "recvbuf"), - ("const int *", "recvcounts"), - ("const int *", "rdispls"), - ("const MPI_Datatype *", "recvtype"), - ("const MPI_Comm *", "comm"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "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"), - ("const MPI_Comm *", "comm"), - ("MPI_Fint *", "ierror"), - ]), - - # 5.9 Global Reduction Operations - - ("void", "MPI_Reduce", [ - ("const void *", "sendbuf"), - ("void *", "recvbuf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("const MPI_Op *", "op"), - ("const MPI_Fint *", "root"), - ("const MPI_Comm *", "comm"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Op_create", [ - ("MPI_User_function *", "user_fn"), - ("const MPI_Fint *", "commute"), - ("MPI_Op *", "op"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Op_free", [ - ("MPI_Op *", "op"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Allreduce", [ - ("const void *", "sendbuf"), - ("void *", "recvbuf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("const MPI_Op *", "op"), - ("const MPI_Comm *", "comm"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Op_commutative", [ - ("const MPI_Op *", "op"), - ("int *", "commute"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Reduce_local", [ - ("const void *", "inbuf"), - ("void *", "inoutbuf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("const MPI_Op *", "op"), - ("MPI_Fint *", "ierror"), - ]), - - # 5.10 Reduce-Scatter - - ("void", "MPI_Reduce_scatter_block", [ - ("const void *", "sendbuf"), - ("void *", "recvbuf"), - ("const MPI_Fint *", "recvcount"), - ("const MPI_Datatype *", "datatype"), - ("const MPI_Op *", "op"), - ("const MPI_Comm *", "comm"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Reduce_scatter", [ - ("const void *", "sendbuf"), - ("void *", "recvbuf"), - ("const int *", "recvcounts"), - ("const MPI_Datatype *", "datatype"), - ("const MPI_Op *", "op"), - ("const MPI_Comm *", "comm"), - ("MPI_Fint *", "ierror"), - ]), - - # 5.11 Scan - - ("void", "MPI_Scan", [ - ("const void *", "sendbuf"), - ("void *", "recvbuf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("const MPI_Op *", "op"), - ("const MPI_Comm *", "comm"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Exscan", [ - ("const void *", "sendbuf"), - ("void *", "recvbuf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("const MPI_Op *", "op"), - ("const MPI_Comm *", "comm"), - ("MPI_Fint *", "ierror"), - ]), - - # 5.12 Nonblocking Collective Operations - - ("void", "MPI_Ibarrier", [ - ("const MPI_Comm *", "comm"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Ibcast", [ - ("void *", "buffer"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("const MPI_Fint *", "root"), - ("const MPI_Comm *", "comm"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Igather", [ - ("const void *", "sendbuf"), - ("const MPI_Fint *", "sendcount"), - ("const MPI_Datatype *", "sendtype"), - ("void *", "recvbuf"), - ("const MPI_Fint *", "recvcount"), - ("const MPI_Datatype *", "recvtype"), - ("const MPI_Fint *", "root"), - ("const MPI_Comm *", "comm"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Igatherv", [ - ("const void *", "sendbuf"), - ("const MPI_Fint *", "sendcount"), - ("const MPI_Datatype *", "sendtype"), - ("void *", "recvbuf"), - ("const int *", "recvcounts"), - ("const int *", "displs"), - ("const MPI_Datatype *", "recvtype"), - ("const MPI_Fint *", "root"), - ("const MPI_Comm *", "comm"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Iscatter", [ - ("const void *", "sendbuf"), - ("const MPI_Fint *", "sendcount"), - ("const MPI_Datatype *", "sendtype"), - ("void *", "recvbuf"), - ("const MPI_Fint *", "recvcount"), - ("const MPI_Datatype *", "recvtype"), - ("const MPI_Fint *", "root"), - ("const MPI_Comm *", "comm"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Iscatterv", [ - ("const void *", "sendbuf"), - ("const int *", "sendcounts"), - ("const int *", "displs"), - ("const MPI_Datatype *", "sendtype"), - ("void *", "recvbuf"), - ("const MPI_Fint *", "recvcount"), - ("const MPI_Datatype *", "recvtype"), - ("const MPI_Fint *", "root"), - ("const MPI_Comm *", "comm"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Iallgather", [ - ("const void *", "sendbuf"), - ("const MPI_Fint *", "sendcount"), - ("const MPI_Datatype *", "sendtype"), - ("void *", "recvbuf"), - ("const MPI_Fint *", "recvcount"), - ("const MPI_Datatype *", "recvtype"), - ("const MPI_Comm *", "comm"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Iallgatherv", [ - ("const void *", "sendbuf"), - ("const MPI_Fint *", "sendcount"), - ("const MPI_Datatype *", "sendtype"), - ("void *", "recvbuf"), - ("const int *", "recvcounts"), - ("const int *", "displs"), - ("const MPI_Datatype *", "recvtype"), - ("const MPI_Comm *", "comm"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Ialltoall", [ - ("const void *", "sendbuf"), - ("const MPI_Fint *", "sendcount"), - ("const MPI_Datatype *", "sendtype"), - ("void *", "recvbuf"), - ("const MPI_Fint *", "recvcount"), - ("const MPI_Datatype *", "recvtype"), - ("const MPI_Comm *", "comm"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Ialltoallv", [ - ("const void *", "sendbuf"), - ("const int *", "sendcounts"), - ("const int *", "sdispls"), - ("const MPI_Datatype *", "sendtype"), - ("void *", "recvbuf"), - ("const int *", "recvcounts"), - ("const int *", "rdispls"), - ("const MPI_Datatype *", "recvtype"), - ("const MPI_Comm *", "comm"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "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"), - ("const MPI_Comm *", "comm"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Ireduce", [ - ("const void *", "sendbuf"), - ("void *", "recvbuf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("const MPI_Op *", "op"), - ("const MPI_Fint *", "root"), - ("const MPI_Comm *", "comm"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Iallreduce", [ - ("const void *", "sendbuf"), - ("void *", "recvbuf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("const MPI_Op *", "op"), - ("const MPI_Comm *", "comm"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Ireduce_scatter_block", [ - ("const void *", "sendbuf"), - ("void *", "recvbuf"), - ("const MPI_Fint *", "recvcount"), - ("const MPI_Datatype *", "datatype"), - ("const MPI_Op *", "op"), - ("const MPI_Comm *", "comm"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Ireduce_scatter", [ - ("const void *", "sendbuf"), - ("void *", "recvbuf"), - ("const int *", "recvcounts"), - ("const MPI_Datatype *", "datatype"), - ("const MPI_Op *", "op"), - ("const MPI_Comm *", "comm"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Iscan", [ - ("const void *", "sendbuf"), - ("void *", "recvbuf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("const MPI_Op *", "op"), - ("const MPI_Comm *", "comm"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Iexscan", [ - ("const void *", "sendbuf"), - ("void *", "recvbuf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("const MPI_Op *", "op"), - ("const MPI_Comm *", "comm"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - # 6.3 Group Management - - ("void", "MPI_Group_size", [ - ("const MPI_Group *", "group"), - ("int *", "size"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Group_rank", [ - ("const MPI_Group *", "group"), - ("int *", "rank"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Group_translate_ranks", [ - ("const MPI_Group *", "group1"), - ("const MPI_Fint *", "n"), - ("const int *", "ranks1"), - ("const MPI_Group *", "group2"), - ("int *", "ranks2"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Group_compare", [ - ("const MPI_Group *", "group1"), - ("const MPI_Group *", "group2"), - ("int *", "result"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Comm_group", [ - ("const MPI_Comm *", "comm"), - ("MPI_Group *", "group"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Group_union", [ - ("const MPI_Group *", "group1"), - ("const MPI_Group *", "group2"), - ("MPI_Group *", "newgroup"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Group_intersection", [ - ("const MPI_Group *", "group1"), - ("const MPI_Group *", "group2"), - ("MPI_Group *", "newgroup"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Group_difference", [ - ("const MPI_Group *", "group1"), - ("const MPI_Group *", "group2"), - ("MPI_Group *", "newgroup"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Group_incl", [ - ("const MPI_Group *", "group"), - ("const MPI_Fint *", "n"), - ("const int *", "ranks"), - ("MPI_Group *", "newgroup"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Group_excl", [ - ("const MPI_Group *", "group"), - ("const MPI_Fint *", "n"), - ("const int *", "ranks"), - ("MPI_Group *", "newgroup"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Group_range_incl", [ - ("const MPI_Group *", "group"), - ("const MPI_Fint *", "n"), - ("MPI_Fint *", "ranges"), # int[3] - ("MPI_Group *", "newgroup"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Group_range_excl", [ - ("const MPI_Group *", "group"), - ("const MPI_Fint *", "n"), - ("MPI_Fint *", "ranges"), # int[3] - ("MPI_Group *", "newgroup"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Group_free", [ - ("MPI_Group *", "group"), - ("MPI_Fint *", "ierror"), - ]), - - # 6.4 Communicator Management - - ("void", "MPI_Comm_size", [ - ("const MPI_Comm *", "comm"), - ("int *", "size"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Comm_rank", [ - ("const MPI_Comm *", "comm"), - ("int *", "rank"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Comm_compare", [ - ("const MPI_Comm *", "comm1"), - ("const MPI_Comm *", "comm2"), - ("int *", "result"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Comm_dup", [ - ("const MPI_Comm *", "comm"), - ("MPI_Comm *", "newcomm"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Comm_dup_with_info", [ - ("const MPI_Comm *", "comm"), - ("const MPI_Info *", "info"), - ("MPI_Comm *", "newcomm"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Comm_idup", [ - ("const MPI_Comm *", "comm"), - ("MPI_Comm *", "newcomm"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Comm_create", [ - ("const MPI_Comm *", "comm"), - ("const MPI_Group *", "group"), - ("MPI_Comm *", "newcomm"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Comm_create_group", [ - ("const MPI_Comm *", "comm"), - ("const MPI_Group *", "group"), - ("const MPI_Fint *", "tag"), - ("MPI_Comm *", "newcomm"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Comm_split", [ - ("const MPI_Comm *", "comm"), - ("const MPI_Fint *", "color"), - ("const MPI_Fint *", "key"), - ("MPI_Comm *", "newcomm"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Comm_split_type", [ - ("const MPI_Comm *", "comm"), - ("const MPI_Fint *", "split_type"), - ("const MPI_Fint *", "key"), - ("const MPI_Info *", "info"), - ("MPI_Comm *", "newcomm"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Comm_free", [ - ("MPI_Comm *", "comm"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Comm_set_info", [ - ("const MPI_Comm *", "comm"), - ("const MPI_Info *", "info"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Comm_get_info", [ - ("const MPI_Comm *", "comm"), - ("MPI_Info *", "info"), - ("MPI_Fint *", "ierror"), - ]), - - # 6.6 Inter-Communication - - ("void", "MPI_Comm_test_inter", [ - ("const MPI_Comm *", "comm"), - ("int *", "flag"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Comm_remote_size", [ - ("const MPI_Comm *", "comm"), - ("int *", "size"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Comm_remote_group", [ - ("const MPI_Comm *", "comm"), - ("MPI_Group *", "group"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Intercomm_create", [ - ("const MPI_Comm *", "local_comm"), - ("const MPI_Fint *", "local_leader"), - ("const MPI_Comm *", "peer_comm"), - ("const MPI_Fint *", "remote_leader"), - ("const MPI_Fint *", "tag"), - ("MPI_Comm *", "newintercomm"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Intercomm_merge", [ - ("const MPI_Comm *", "intercomm"), - ("const MPI_Fint *", "high"), - ("MPI_Comm *", "newintracomm"), - ("MPI_Fint *", "ierror"), - ]), - - # 6.7 Communicators - - ("void", "MPI_Comm_create_keyval", [ - ("MPI_Comm_copy_attr_function *", "comm_copy_attr_fn"), - ("MPI_Comm_delete_attr_function *", "comm_delete_attr_fn"), - ("int *", "comm_keyval"), - ("void *", "extra_state"), - ("MPI_Fint *", "ierror"), - ]), - - # removed - ("void", "MPI_Keyval_create", [ - ("MPI_Comm_copy_attr_function *", "comm_copy_attr_fn"), - ("MPI_Comm_delete_attr_function *", "comm_delete_attr_fn"), - ("int *", "comm_keyval"), - ("void *", "extra_state"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Comm_free_keyval", [ - ("int *", "comm_keyval"), - ("MPI_Fint *", "ierror"), - ]), - - # removed - ("void", "MPI_Keyval_free", [ - ("int *", "comm_keyval"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Comm_set_attr", [ - ("const MPI_Comm *", "comm"), - ("const MPI_Fint *", "comm_keyval"), - ("void *", "attribute_val"), - ("MPI_Fint *", "ierror"), - ]), - - # removed - ("void", "MPI_Attr_put", [ - ("const MPI_Comm *", "comm"), - ("const MPI_Fint *", "comm_keyval"), - ("void *", "attribute_val"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Comm_get_attr", [ - ("const MPI_Comm *", "comm"), - ("const MPI_Fint *", "comm_keyval"), - ("void *", "attribute_val"), - ("int *", "flag"), - ("MPI_Fint *", "ierror"), - ]), - - # removed - ("void", "MPI_Attr_get", [ - ("const MPI_Comm *", "comm"), - ("const MPI_Fint *", "comm_keyval"), - ("void *", "attribute_val"), - ("int *", "flag"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Comm_delete_attr", [ - ("const MPI_Comm *", "comm"), - ("const MPI_Fint *", "comm_keyval"), - ("MPI_Fint *", "ierror"), - ]), - - # removed - ("void", "MPI_Attr_delete", [ - ("const MPI_Comm *", "comm"), - ("const MPI_Fint *", "comm_keyval"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Win_create_keyval", [ - ("MPI_Win_copy_attr_function *", "win_copy_attr_fn"), - ("MPI_Win_delete_attr_function *", "win_delete_attr_fn"), - ("int *", "win_keyval"), - ("void *", "extra_state"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Win_free_keyval", [ - ("int *", "win_keyval"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Win_set_attr", [ - ("const MPI_Win *", "win"), - ("const MPI_Fint *", "win_keyval"), - ("void *", "attribute_val"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Win_get_attr", [ - ("const MPI_Win *", "win"), - ("const MPI_Fint *", "win_keyval"), - ("void *", "attribute_val"), - ("int *", "flag"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Win_delete_attr", [ - ("const MPI_Win *", "win"), - ("const MPI_Fint *", "win_keyval"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Type_create_keyval", [ - ("MPI_Type_copy_attr_function *", "type_copy_attr_fn"), - ("MPI_Type_delete_attr_function *", "type_delete_attr_fn"), - ("int *", "type_keyval"), - ("void *", "extra_state"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Type_free_keyval", [ - ("int *", "type_keyval"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Type_set_attr", [ - ("const MPI_Datatype *", "type"), - ("const MPI_Fint *", "type_keyval"), - ("void *", "attribute_val"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Type_get_attr", [ - ("const MPI_Datatype *", "type"), - ("const MPI_Fint *", "type_keyval"), - ("void *", "attribute_val"), - ("int *", "flag"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Type_delete_attr", [ - ("const MPI_Datatype *", "type"), - ("const MPI_Fint *", "type_keyval"), - ("MPI_Fint *", "ierror"), - ]), - - # 6.8 Naming Objects - - ("void", "MPI_Comm_set_name", [ - ("const MPI_Comm *", "comm"), - ("const char *", "comm_name"), - ("MPI_Fint *", "ierror"), - ("size_t", "comm_name_len"), - ]), - - ("void", "MPI_Comm_get_name", [ - ("const MPI_Comm *", "comm"), - ("char *", "comm_name"), - ("int *", "resultlen"), - ("MPI_Fint *", "ierror"), - ("size_t", "comm_name_len"), - ]), - - ("void", "MPI_Type_set_name", [ - ("const MPI_Datatype *", "type"), - ("const char *", "type_name"), - ("MPI_Fint *", "ierror"), - ("size_t", "type_name_len"), - ]), - - ("void", "MPI_Type_get_name", [ - ("const MPI_Datatype *", "type"), - ("char *", "type_name"), - ("int *", "resultlen"), - ("MPI_Fint *", "ierror"), - ("size_t", "type_name_len"), - ]), - - ("void", "MPI_Win_set_name", [ - ("const MPI_Win *", "win"), - ("const char *", "win_name"), - ("MPI_Fint *", "ierror"), - ("size_t", "win_name_len"), - ]), - - ("void", "MPI_Win_get_name", [ - ("const MPI_Win *", "win"), - ("char *", "win_name"), - ("int *", "resultlen"), - ("MPI_Fint *", "ierror"), - ("size_t", "win_name_len"), - ]), - - # 7.5 Topology Constructors - - ("void", "MPI_Cart_create", [ - ("const MPI_Comm *", "comm_old"), - ("const MPI_Fint *", "ndims"), - ("const int *", "dims"), - ("const int *", "periods"), - ("const MPI_Fint *", "reorder"), - ("MPI_Comm *", "comm_cart"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Dims_create", [ - ("const MPI_Fint *", "nnodes"), - ("const MPI_Fint *", "ndims"), - ("int *", "dims"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Graph_create", [ - ("const MPI_Comm *", "comm_old"), - ("const MPI_Fint *", "nnodes"), - ("const int *", "index"), - ("const int *", "edges"), - ("const MPI_Fint *", "reorder"), - ("MPI_Comm *", "comm_graph"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Dist_graph_create_adjacent", [ - ("const MPI_Comm *", "comm_old"), - ("const MPI_Fint *", "indegree"), - ("const int *", "sources"), - ("const int *", "sourceweights"), - ("const MPI_Fint *", "outdegree"), - ("const int *", "destinations"), - ("const int *", "destweights"), - ("const MPI_Info *", "info"), - ("const MPI_Fint *", "reorder"), - ("MPI_Comm *", "comm_dist_graph"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Dist_graph_create", [ - ("const MPI_Comm *", "comm_old"), - ("const MPI_Fint *", "n"), - ("const int *", "sources"), - ("const int *", "degrees"), - ("const int *", "destinations"), - ("const int *", "weights"), - ("const MPI_Info *", "info"), - ("const MPI_Fint *", "reorder"), - ("MPI_Comm *", "comm_dist_graph"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Topo_test", [ - ("const MPI_Comm *", "comm"), - ("int *", "status"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Graphdims_get", [ - ("const MPI_Comm *", "comm"), - ("int *", "nnodes"), - ("int *", "nedges"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Graph_get", [ - ("const MPI_Comm *", "comm"), - ("const MPI_Fint *", "maxindex"), - ("const MPI_Fint *", "maxedges"), - ("int *", "index"), - ("int *", "edges"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Cartdim_get", [ - ("const MPI_Comm *", "comm"), - ("int *", "ndims"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Cart_get", [ - ("const MPI_Comm *", "comm"), - ("const MPI_Fint *", "maxdims"), - ("int *", "dims"), - ("int *", "periods"), - ("int *", "coords"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Cart_rank", [ - ("const MPI_Comm *", "comm"), - ("const int *", "coords"), - ("int *", "rank"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Cart_coords", [ - ("const MPI_Comm *", "comm"), - ("const MPI_Fint *", "rank"), - ("const MPI_Fint *", "maxdims"), - ("int *", "coords"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Graph_neighbors_count", [ - ("const MPI_Comm *", "comm"), - ("const MPI_Fint *", "rank"), - ("int *", "nneighbors"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Graph_neighbors", [ - ("const MPI_Comm *", "comm"), - ("const MPI_Fint *", "rank"), - ("const MPI_Fint *", "maxneighbors"), - ("int *", "neighbors"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Dist_graph_neighbors_count", [ - ("const MPI_Comm *", "comm"), - ("int *", "indegree"), - ("int *", "outdegree"), - ("int *", "weighted"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Dist_graph_neighbors", [ - ("const MPI_Comm *", "comm"), - ("const MPI_Fint *", "maxindeegree"), - ("int *", "sources"), - ("int *", "wourceweights"), - ("const MPI_Fint *", "maxoutdegree"), - ("int *", "destinations"), - ("int *", "destweights"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Cart_shift", [ - ("const MPI_Comm *", "comm"), - ("const MPI_Fint *", "direction"), - ("const MPI_Fint *", "disp"), - ("int *", "rank_source"), - ("int *", "rank_dest"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Cart_sub", [ - ("const MPI_Comm *", "comm"), - ("const int *", "remain_dims"), - ("MPI_Comm *", "newcomm"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Cart_map", [ - ("const MPI_Comm *", "comm"), - ("const MPI_Fint *", "ndims"), - ("const int *", "dims"), - ("const int *", "periods"), - ("int *", "newrank"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Graph_map", [ - ("const MPI_Comm *", "comm"), - ("const MPI_Fint *", "nnodes"), - ("const int *", "index"), - ("const int *", "edges"), - ("int *", "newrank"), - ("MPI_Fint *", "ierror"), - ]), - - # 7.6 Neighborhood Collective Communication on Procerss Topologies - - ("void", "MPI_Neighbor_allgather", [ - ("const void *", "sendbuf"), - ("const MPI_Fint *", "sendcount"), - ("const MPI_Datatype *", "sendtype"), - ("void *", "recvbuf"), - ("const MPI_Fint *", "recvcount"), - ("const MPI_Datatype *", "recvtype"), - ("const MPI_Comm *", "comm"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Neighbor_allgatherv", [ - ("const void *", "sendbuf"), - ("const MPI_Fint *", "sendcount"), - ("const MPI_Datatype *", "sendtype"), - ("void *", "recvbuf"), - ("const int *", "recvcounts"), - ("const int *", "displs"), - ("const MPI_Datatype *", "recvtype"), - ("const MPI_Comm *", "comm"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Neighbor_alltoall", [ - ("const void *", "sendbuf"), - ("const MPI_Fint *", "sendcount"), - ("const MPI_Datatype *", "senddtype"), - ("void *", "recvbuf"), - ("const MPI_Fint *", "recvcount"), - ("const MPI_Datatype *", "recvtype"), - ("const MPI_Comm *", "comm"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Neighbor_alltoallv", [ - ("const void *", "sendbuf"), - ("const int *", "sendcounts"), - ("const int *", "sdispls"), - ("const MPI_Datatype *", "senddtype"), - ("void *", "recvbuf"), - ("const int *", "recvcounts"), - ("const int *", "rdispls"), - ("const MPI_Datatype *", "recvtype"), - ("const MPI_Comm *", "comm"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "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"), - ("const MPI_Comm *", "comm"), - ("MPI_Fint *", "ierror"), - ]), - - # 7.7 Nonblocking Neighborhood Communication on Process Topologies - - ("void", "MPI_Ineighbor_allgather", [ - ("const void *", "sendbuf"), - ("const MPI_Fint *", "sendcount"), - ("const MPI_Datatype *", "sendtype"), - ("void *", "recvbuf"), - ("const MPI_Fint *", "recvcount"), - ("const MPI_Datatype *", "recvtype"), - ("const MPI_Comm *", "comm"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Ineighbor_allgatherv", [ - ("const void *", "sendbuf"), - ("const MPI_Fint *", "sendcount"), - ("const MPI_Datatype *", "sendtype"), - ("void *", "recvbuf"), - ("const int *", "recvcounts"), - ("const int *", "displs"), - ("const MPI_Datatype *", "recvtype"), - ("const MPI_Comm *", "comm"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Ineighbor_alltoall", [ - ("const void *", "sendbuf"), - ("const MPI_Fint *", "sendcount"), - ("const MPI_Datatype *", "senddtype"), - ("void *", "recvbuf"), - ("const MPI_Fint *", "recvcount"), - ("const MPI_Datatype *", "recvtype"), - ("const MPI_Comm *", "comm"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Ineighbor_alltoallv", [ - ("const void *", "sendbuf"), - ("const int *", "sendcounts"), - ("const int *", "sdispls"), - ("const MPI_Datatype *", "senddtype"), - ("void *", "recvbuf"), - ("const int *", "recvcounts"), - ("const int *", "rdispls"), - ("const MPI_Datatype *", "recvtype"), - ("const MPI_Comm *", "comm"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "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"), - ("const MPI_Comm *", "comm"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - # 8.1 Implementation Information - - ("void", "MPI_Get_version", [ - ("int *", "version"), - ("int *", "subversion"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Get_library_version",[ - ("char *", "version"), - ("int *", "resultlen"), - ("MPI_Fint *", "ierror"), - ("size_t", "version_len"), - ]), - - ("void", "MPI_Get_processor_name", [ - ("char *", "name"), - ("int *", "resultlen"), - ("MPI_Fint *", "ierror"), - ("size_t", "name_len"), - ]), - - # 8.2 Memory Allocation - - ("void", "MPI_Alloc_mem", [ - ("const MPI_Aint *", "size"), - ("const MPI_Info *", "info"), - ("void *", "baseptr"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Free_mem", [ - ("void *", "base"), - ("MPI_Fint *", "ierror"), - ]), - - # 8.3 Error Handling - - ("void", "MPI_Comm_create_errhandler", [ - ("MPI_Comm_errhandler_function *", "comm_errhandler_fn"), - ("MPI_Errhandler *", "errhandler"), - ("MPI_Fint *", "ierror"), - ]), - - # removed - ("void", "MPI_Errhandler_create", [ - ("MPI_Comm_errhandler_function *", "comm_errhandler_fn"), - ("MPI_Errhandler *", "errhandler"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Comm_set_errhandler", [ - ("const MPI_Comm *", "comm"), - ("const MPI_Errhandler *", "errhandler"), - ("MPI_Fint *", "ierror"), - ]), - - # removed - ("void", "MPI_Errhandler_set", [ - ("const MPI_Comm *", "comm"), - ("const MPI_Errhandler *", "errhandler"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Comm_get_errhandler", [ - ("const MPI_Comm *", "comm"), - ("MPI_Errhandler *", "errhandler"), - ("MPI_Fint *", "ierror"), - ]), - - # removed - ("void", "MPI_Errhandler_get", [ - ("const MPI_Comm *", "comm"), - ("MPI_Errhandler *", "errhandler"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Win_create_errhandler", [ - ("MPI_Win_errhandler_function *", "win_errhandler_fn"), - ("MPI_Errhandler *", "errhandler"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Win_set_errhandler", [ - ("const MPI_Win *", "win"), - ("const MPI_Errhandler *", "errhandler"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Win_get_errhandler", - [("const MPI_Win *", "win"), - ("MPI_Errhandler *", "errhandler"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_create_errhandler", [ - ("MPI_File_errhandler_function *", "file_errhandler_fn"), - ("MPI_Errhandler *", "errhandler"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_set_errhandler", [ - ("const MPI_File *", "file"), - ("const MPI_Errhandler *", "errhandler"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_get_errhandler", [ - ("const MPI_File *", "file"), - ("MPI_Errhandler *", "errhandler"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Errhandler_free", [ - ("MPI_Errhandler *", "errhandler"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Error_string", [ - ("const MPI_Fint *", "errorcode"), - ("char *", "string"), - ("int *", "resultlen"), - ("MPI_Fint *", "ierror"), - ("size_t", "string_len"), - ]), - - # 8.4 Error Codes and Classes - - ("void", "MPI_Error_class", [ - ("const MPI_Fint *", "errorcode"), - ("int *", "errorclass"), - ("MPI_Fint *", "ierror"), - ]), - - # 8.5 Error Classes", "Error Codes", "and Error Handlers - - ("void", "MPI_Add_error_class", [ - ("int *", "errorclass"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Add_error_code", [ - ("const MPI_Fint *", "errorclass"), - ("int *", "errorcode"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Add_error_string", [ - ("const MPI_Fint *", "errorcode"), - ("const char *", "string"), - ("MPI_Fint *", "ierror"), - ("size_t", "string_len"), - ]), - - ("void", "MPI_Comm_call_errhandler", [ - ("const MPI_Comm *", "comm"), - ("const MPI_Fint *", "errorcode"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Win_call_errhandler", [ - ("const MPI_Win *", "win"), - ("const MPI_Fint *", "errorcode"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_call_errhandler", [ - ("const MPI_File *", "file"), - ("const MPI_Fint *", "errorcode"), - ("MPI_Fint *", "ierror"), - ]), - - # 8.6 Times and Synchronization - - ("double", "MPI_Wtime", [ - ]), - - ("double", "MPI_Wtick", [ - ]), - - # 8.7 Startup - - ("void", "MPI_Init", [ - # ("int *", "argc"), - # ("char ***", "argv"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Finalize", []), - - ("void", "MPI_Initialized", [ - ("int *", "flag"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Abort", [ - ("const MPI_Comm *", "comm"), - ("const MPI_Fint *", "errorcode"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Finalized", [ - ("int *", "flag"), - ("MPI_Fint *", "ierror"), - ]), - - # 9 The Info Object - - ("void", "MPI_Info_create", [ - ("MPI_Info *", "info"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Info_set", [ - ("const MPI_Info *", "info"), - ("const char *", "key"), - ("const char *", "value"), - ("MPI_Fint *", "ierror"), - ("size_t", "key_len"), - ("size_t", "value_len"), - ]), - - ("void", "MPI_Info_delete", [ - ("const MPI_Info *", "info"), - ("const char *", "key"), - ("MPI_Fint *", "ierror"), - ("size_t", "key_len"), - ]), - - ("void", "MPI_Info_get", [ - ("const MPI_Info *", "info"), - ("const char *", "key"), - ("const MPI_Fint *", "valuelen"), - ("char *", "value"), - ("int *", "flag"), - ("MPI_Fint *", "ierror"), - ("size_t", "key_len"), - ("size_t", "value_len"), - ]), - - ("void", "MPI_Info_get_valuelen", [ - ("const MPI_Info *", "info"), - ("const char *", "key"), - ("int *", "valuelen"), - ("int *", "flag"), - ("MPI_Fint *", "ierror"), - ("size_t", "key_len"), - ]), - - ("void", "MPI_Info_get_nkeys", [ - ("const MPI_Info *", "info"), - ("int *", "nkeys"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Info_get_nthkey", [ - ("const MPI_Info *", "info"), - ("const MPI_Fint *", "n"), - ("char *", "key"), - ("MPI_Fint *", "ierror"), - ("size_t", "key_len"), - ]), - - ("void", "MPI_Info_dup", [ - ("const MPI_Info *", "info"), - ("MPI_Info *", "newinfo"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Info_free", [ - ("MPI_Info *", "info"), - ("MPI_Fint *", "ierror"), - ]), - - # 10.3 Process Manager Interface - - ("void", "MPI_Comm_spawn", [ - ("const char *", "command"), - ("char **", "argv"), - ("const MPI_Fint *", "maxprocs"), - ("const MPI_Info *", "info"), - ("const MPI_Fint *", "root"), - ("const MPI_Comm *", "comm"), - ("MPI_Comm *", "intercomm"), - ("int *", "array_off_errcodes"), - ("MPI_Fint *", "ierror"), - ("size_t", "command_len"), - ("size_t", "argv_len"), - ]), - - ("void", "MPI_Comm_get_parent", [ - ("MPI_Comm *", "parent"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Comm_spawn_multiple", [ - ("const MPI_Fint *", "count"), - ("char **", "array_of_commands"), - ("char ***", "array_of_argv"), - ("const int *", "array_of_maxprocs"), - ("const MPI_Info *", "array_of_info"), - ("const MPI_Fint *", "root"), - ("const MPI_Comm *", "comm"), - ("MPI_Comm *", "intercomm"), - ("int *", "array_of_errcodes"), - ("MPI_Fint *", "ierror"), - ("size_t", "arrray_of_commands_len"), - ("size_t", "arrray_of_argv_len"), - ]), - - # 10.4 Establishing Communication - - ("void", "MPI_Open_port", [ - ("const MPI_Info *", "info"), - ("char *", "port_name"), - ("MPI_Fint *", "ierror"), - ("size_t", "port_name_len"), - ]), - - ("void", "MPI_Close_port", [ - ("const char *", "port_name"), - ("MPI_Fint *", "ierror"), - ("size_t", "port_name_len"), - ]), - - ("void", "MPI_Comm_accept", [ - ("const char *", "port_name"), - ("const MPI_Info *", "info"), - ("const MPI_Fint *", "root"), - ("const MPI_Comm *", "comm"), - ("MPI_Comm *", "newcomm"), - ("MPI_Fint *", "ierror"), - ("size_t", "port_name_len"), - ]), - - ("void", "MPI_Comm_connect", [ - ("const char *", "port_name"), - ("const MPI_Info *", "info"), - ("const MPI_Fint *", "root"), - ("const MPI_Comm *", "comm"), - ("MPI_Comm *", "newcomm"), - ("MPI_Fint *", "ierror"), - ("size_t", "port_name_len"), - ]), - - ("void", "MPI_Publish_name", [ - ("const char *", "service_name"), - ("const MPI_Info *", "info"), - ("const char *", "port_name"), - ("MPI_Fint *", "ierror"), - ("size_t", "service_name_len"), - ("size_t", "port_name_len"), - ]), - - ("void", "MPI_Unpublish_name", [ - ("const char *", "service_name"), - ("const MPI_Info *", "info"), - ("const char *", "port_name"), - ("MPI_Fint *", "ierror"), - ("size_t", "service_name_len"), - ("size_t", "port_name_len"), - ]), - - ("void", "MPI_Lookup_name", [ - ("const char *", "service_name"), - ("const MPI_Info *", "info"), - ("char *", "port_name"), - ("MPI_Fint *", "ierror"), - ("size_t", "service_name_len"), - ("size_t", "port_name_len"), - ]), - - # 10.5 Other Functionality - - ("void", "MPI_Comm_disconnect", [ - ("MPI_Comm *", "comm"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Comm_join", [ - ("const MPI_Fint *", "fd"), - ("MPI_Comm *", "intercomm"), - ("MPI_Fint *", "ierror"), - ]), - - # 11.2 Initialization - - ("void", "MPI_Win_create", [ - ("void *", "base"), - ("const MPI_Aint *", "size"), - ("const MPI_Fint *", "disp_unit"), - ("const MPI_Info *", "info"), - ("const MPI_Comm *", "comm"), - ("MPI_Win *", "win"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Win_allocate", [ - ("const MPI_Aint *", "size"), - ("const MPI_Fint *", "disp_unit"), - ("const MPI_Info *", "info"), - ("const MPI_Comm *", "comm"), - ("void *", "baseptr"), - ("MPI_Win *", "win"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Win_allocate_shared", [ - ("const MPI_Aint *", "size"), - ("const MPI_Fint *", "disp_unit"), - ("const MPI_Info *", "info"), - ("const MPI_Comm *", "comm"), - ("void *", "baseptr"), - ("MPI_Win *", "win"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Win_shared_query", [ - ("const MPI_Win *", "win"), - ("const MPI_Fint *", "rank"), - ("MPI_Aint *", "size"), - ("int *", "disp_unit"), - ("void *", "baseptr"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Win_create_dynamic", [ - ("const MPI_Info *", "info"), - ("const MPI_Comm *", "comm"), - ("MPI_Win *", "win"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Win_attach", [ - ("const MPI_Win *", "win"), - ("void *", "base"), - ("const MPI_Aint *", "size"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Win_detach", [ - ("const MPI_Win *", "win"), - ("const void *", "base"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Win_free", [ - ("MPI_Win *", "win"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Win_get_group", [ - ("const MPI_Win *", "win"), - ("MPI_Group *", "group"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Win_set_info", [ - ("const MPI_Win *", "win"), - ("const MPI_Info *", "info"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Win_get_info", [ - ("const MPI_Win *", "win"), - ("MPI_Info *", "info_used"), - ("MPI_Fint *", "ierror"), - ]), - - # 11.3 Communication Calls - - ("void", "MPI_Put", [ - ("const void *", "origin_addr"), - ("const MPI_Fint *", "origin_count"), - ("const MPI_Datatype *", "origin_datatype"), - ("const MPI_Fint *", "target_rank"), - ("const MPI_Aint *", "target_disp"), - ("const MPI_Fint *", "target_count"), - ("const MPI_Datatype *", "target_datatype"), - ("const MPI_Win *", "win"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Get", [ - ("void *", "origin_addr"), - ("const MPI_Fint *", "origin_count"), - ("const MPI_Datatype *", "origin_datatype"), - ("const MPI_Fint *", "target_rank"), - ("const MPI_Aint *", "target_disp"), - ("const MPI_Fint *", "target_count"), - ("const MPI_Datatype *", "target_datatype"), - ("const MPI_Win *", "win"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Accumulate", [ - ("const void *", "origin_addr"), - ("const MPI_Fint *", "origin_count"), - ("const MPI_Datatype *", "origin_datatype"), - ("const MPI_Fint *", "target_rank"), - ("const MPI_Aint *", "target_disp"), - ("const MPI_Fint *", "target_count"), - ("const MPI_Datatype *", "target_datatype"), - ("const MPI_Op *", "op"), - ("const MPI_Win *", "win"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Get_accumulate", [ - ("const void *", "origin_addr"), - ("const MPI_Fint *", "origin_count"), - ("const MPI_Datatype *", "origin_datatype"), - ("void *", "result_addr"), - ("const MPI_Fint *", "result_count"), - ("const MPI_Datatype *", "result_datatype"), - ("const MPI_Fint *", "target_rank"), - ("const MPI_Aint *", "target_disp"), - ("const MPI_Fint *", "target_count"), - ("const MPI_Datatype *", "target_datatype"), - ("const MPI_Op *", "op"), - ("const MPI_Win *", "win"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Fetch_and_op", [ - ("const void *", "origin_addr"), - ("void *", "result_addr"), - ("const MPI_Datatype *", "datatype"), - ("const MPI_Fint *", "target_rank"), - ("const MPI_Aint *", "target_disp"), - ("const MPI_Op *", "op"), - ("const MPI_Win *", "win"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Compare_and_swap", [ - ("const void *", "origin_addr"), - ("const void *", "compare_addr"), - ("void *", "result_addr"), - ("const MPI_Datatype *", "datatype"), - ("const MPI_Fint *", "target_rank"), - ("const MPI_Aint *", "target_disp"), - ("const MPI_Win *", "win"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Rput", [ - ("const void *", "origin_addr"), - ("const MPI_Fint *", "origin_count"), - ("const MPI_Datatype *", "origin_datatype"), - ("const MPI_Fint *", "target_rank"), - ("const MPI_Aint *", "target_disp"), - ("const MPI_Fint *", "target_count"), - ("const MPI_Datatype *", "target_datatype"), - ("const MPI_Win *", "win"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Rget", [ - ("void *", "origin_addr"), - ("const MPI_Fint *", "origin_count"), - ("const MPI_Datatype *", "origin_datatype"), - ("const MPI_Fint *", "target_rank"), - ("const MPI_Aint *", "target_disp"), - ("const MPI_Fint *", "target_count"), - ("const MPI_Datatype *", "target_datatype"), - ("const MPI_Win *", "win"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Raccumulate", [ - ("const void *", "origin_addr"), - ("const MPI_Fint *", "origin_count"), - ("const MPI_Datatype *", "origin_datatype"), - ("const MPI_Fint *", "target_rank"), - ("const MPI_Aint *", "target_disp"), - ("const MPI_Fint *", "target_count"), - ("const MPI_Datatype *", "target_datatype"), - ("const MPI_Op *", "op"), - ("const MPI_Win *", "win"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Rget_accumulate", [ - ("const void *", "origin_addr"), - ("const MPI_Fint *", "origin_count"), - ("const MPI_Datatype *", "origin_datatype"), - ("void *", "result_addr"), - ("const MPI_Fint *", "result_count"), - ("const MPI_Datatype *", "result_datatype"), - ("const MPI_Fint *", "target_rank"), - ("const MPI_Aint *", "target_disp"), - ("const MPI_Fint *", "target_count"), - ("const MPI_Datatype *", "target_datatype"), - ("const MPI_Op *", "op"), - ("const MPI_Win *", "win"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - # 11.5 Synchronization Calls - - ("void", "MPI_Win_fence", [ - ("const MPI_Fint *", "assert"), - ("const MPI_Win *", "win"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Win_start", [ - ("const MPI_Group *", "group"), - ("const MPI_Fint *", "assert"), - ("const MPI_Win *", "win"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Win_complete", [ - ("const MPI_Win *", "win"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Win_post", [ - ("const MPI_Group *", "group"), - ("const MPI_Fint *", "assert"), - ("const MPI_Win *", "win"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Win_wait", [ - ("const MPI_Win *", "win"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Win_test", [ - ("const MPI_Win *", "win"), - ("int *", "flag"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Win_lock", [ - ("const MPI_Fint *", "lock_type"), - ("const MPI_Fint *", "rank"), - ("const MPI_Fint *", "assert"), - ("const MPI_Win *", "win"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Win_lock_all", [ - ("const MPI_Fint *", "assert"), - ("const MPI_Win *", "win"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Win_unlock", [ - ("const MPI_Fint *", "rank"), - ("const MPI_Win *", "win"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Win_unlock_all", [ - ("const MPI_Win *", "win"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Win_flush", [ - ("const MPI_Fint *", "rank"), - ("const MPI_Win *", "win"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Win_flush_all", [ - ("const MPI_Win *", "win"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Win_flush_local", [ - ("const MPI_Fint *", "rank"), - ("const MPI_Win *", "win"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Win_flush_local_all", [ - ("const MPI_Win *", "win"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Win_sync", [ - ("const MPI_Win *", "win"), - ("MPI_Fint *", "ierror"), - ]), - - # 12.2 Generalized Requests - - # TODO: Handle status correctly - # ("void", "MPI_Grequest_start", [ - # ("MPI_Grequest_query_function *", "query_fn"), - # ("MPI_Grequest_free_function *", "free_fn"), - # ("MPI_Grequest_cancel_function *", "cancel_fn"), - # ("void *", "extra_state"), - # ("MPI_Request *", "request"), - # ("MPI_Fint *", "ierror"), - # ]), - - ("void", "MPI_Grequest_complete", [ - ("const MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - # 12.3 Associating Information with Status - - ("void", "MPI_Status_set_elements", [ - ("MPI_Status *", "status"), - ("const MPI_Datatype *", "datatype"), - ("const MPI_Fint *", "count"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Status_set_elements_x", [ - ("MPI_Status *", "status"), - ("const MPI_Datatype *", "datatype"), - ("const MPI_Count *", "count"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Status_set_cancelled", [ - ("MPI_Status *", "status"), - ("const MPI_Fint *", "flag"), - ("MPI_Fint *", "ierror"), - ]), - - # 12.4 MPI and Threads - - ("void", "MPI_Init_thread", [ - # ("int *", "argc"), - # ("char ***", "argv"), - ("const MPI_Fint *", "required"), - ("int *", "provided"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Query_thread", [ - ("int *", "provided"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_Is_thread_main", [ - ("int *", "flag"), - ("MPI_Fint *", "ierror"), - ]), - - # 13.2 File Manipulation - - ("void", "MPI_File_open", [ - ("const MPI_Comm *", "comm"), - ("const char *", "filename"), - ("const MPI_Fint *", "amode"), - ("const MPI_Info *", "info"), - ("MPI_File *", "fh"), - ("MPI_Fint *", "ierror"), - ("size_t", "filename_len"), - ]), - - ("void", "MPI_File_close", [ - ("MPI_File *", "fh"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_delete", [ - ("const char *", "filename"), - ("const MPI_Info *", "info"), - ("MPI_Fint *", "ierror"), - ("size_t", "filename_len"), - ]), - - ("void", "MPI_File_set_size", [ - ("const MPI_File *", "fh"), - ("const MPI_Offset *", "size"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_preallocate", [ - ("const MPI_File *", "fh"), - ("const MPI_Offset *", "size"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_get_size", [ - ("const MPI_File *", "fh"), - ("MPI_Offset *", "size"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_get_group", [ - ("const MPI_File *", "fh"), - ("MPI_Group *", "group"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_get_amode", [ - ("const MPI_File *", "fh"), - ("int *", "amode"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_set_info", [ - ("const MPI_File *", "fh"), - ("const MPI_Info *", "info"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_get_info", [ - ("const MPI_File *", "fh"), - ("MPI_Info *", "info_used"), - ("MPI_Fint *", "ierror"), - ]), - - # 13.3 File View - - ("void", "MPI_File_set_view", [ - ("const MPI_File *", "fh"), - ("const MPI_Offset *", "disp"), - ("const MPI_Datatype *", "etype"), - ("const MPI_Datatype *", "filetype"), - ("const char *", "datarep"), - ("const MPI_Info *", "info"), - ("MPI_Fint *", "ierror"), - ("size_t", "datarep_len"), - ]), - - ("void", "MPI_File_get_view", [ - ("const MPI_File *", "fh"), - ("MPI_Offset *", "disp"), - ("MPI_Datatype *", "etype"), - ("MPI_Datatype *", "filetype"), - ("char *", "datarep"), - ("MPI_Fint *", "ierror"), - ("size_t", "datarep_len"), - ]), - - # 13.4 Data Access - - ("void", "MPI_File_read_at", [ - ("const MPI_File *", "fh"), - ("const MPI_Offset *", "offset"), - ("void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("MPI_Status *", "status"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_read_at_all", [ - ("const MPI_File *", "fh"), - ("const MPI_Offset *", "offset"), - ("void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("MPI_Status *", "status"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_write_at", [ - ("const MPI_File *", "fh"), - ("const MPI_Offset *", "offset"), - ("const void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("MPI_Status *", "status"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_write_at_all", [ - ("const MPI_File *", "fh"), - ("const MPI_Offset *", "offset"), - ("const void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("MPI_Status *", "status"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_iread_at", [ - ("const MPI_File *", "fh"), - ("const MPI_Offset *", "offset"), - ("void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_iread_at_all", [ - ("const MPI_File *", "fh"), - ("const MPI_Offset *", "offset"), - ("void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_iwrite_at", [ - ("const MPI_File *", "fh"), - ("const MPI_Offset *", "offset"), - ("const void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_iwrite_at_all", [ - ("const MPI_File *", "fh"), - ("const MPI_Offset *", "offset"), - ("const void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_read", [ - ("const MPI_File *", "fh"), - ("void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("MPI_Status *", "status"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_read_all", [ - ("const MPI_File *", "fh"), - ("void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("MPI_Status *", "status"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_write", [ - ("const MPI_File *", "fh"), - ("const void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("MPI_Status *", "status"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_write_all", [ - ("const MPI_File *", "fh"), - ("const void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("MPI_Status *", "status"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_iread", [ - ("const MPI_File *", "fh"), - ("void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_iread_all", [ - ("const MPI_File *", "fh"), - ("void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_iwrite", [ - ("const MPI_File *", "fh"), - ("const void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_iwrite_all", [ - ("const MPI_File *", "fh"), - ("const void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_seek", [ - ("const MPI_File *", "fh"), - ("const MPI_Offset *", "offset"), - ("const MPI_Fint *", "whence"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_get_position", [ - ("const MPI_File *", "fh"), - ("MPI_Offset *", "offset"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_get_byte_offset", [ - ("const MPI_File *", "fh"), - ("const MPI_Offset *", "offset"), - ("MPI_Offset *", "disp"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_read_shared", [ - ("const MPI_File *", "fh"), - ("void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("MPI_Status *", "status"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_write_shared", [ - ("const MPI_File *", "fh"), - ("const void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("MPI_Status *", "status"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_iread_shared", [ - ("const MPI_File *", "fh"), - ("void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_iwrite_shared", [ - ("const MPI_File *", "fh"), - ("const void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("MPI_Request *", "request"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_read_ordered", [ - ("const MPI_File *", "fh"), - ("void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("MPI_Status *", "status"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_write_ordered", [ - ("const MPI_File *", "fh"), - ("const void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("MPI_Status *", "status"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_seek_shared", [ - ("const MPI_File *", "fh"), - ("const MPI_Offset *", "offset"), - ("const MPI_Fint *", "whence"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_get_position_shared", [ - ("const MPI_File *", "fh"), - ("MPI_Offset *", "offset"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_read_at_all_begin", [ - ("const MPI_File *", "fh"), - ("const MPI_Offset *", "offset"), - ("void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_read_at_all_end", [ - ("const MPI_File *", "fh"), - ("void *", "buf"), - ("MPI_Status *", "status"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_write_at_all_begin", [ - ("const MPI_File *", "fh"), - ("const MPI_Offset *", "offset"), - ("const void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_write_at_all_end", [ - ("const MPI_File *", "fh"), - ("const void *", "buf"), - ("MPI_Status *", "status"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_read_all_begin", [ - ("const MPI_File *", "fh"), - ("void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_read_all_end", [ - ("const MPI_File *", "fh"), - ("void *", "buf"), - ("MPI_Status *", "status"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_write_all_begin", [ - ("const MPI_File *", "fh"), - ("const void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_write_all_end", [ - ("const MPI_File *", "fh"), - ("const void *", "buf"), - ("MPI_Status *", "status"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_read_ordered_begin", [ - ("const MPI_File *", "fh"), - ("void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_read_ordered_end", [ - ("const MPI_File *", "fh"), - ("void *", "buf"), - ("MPI_Status *", "status"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_write_ordered_begin", [ - ("const MPI_File *", "fh"), - ("const void *", "buf"), - ("const MPI_Fint *", "count"), - ("const MPI_Datatype *", "datatype"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_write_ordered_end", [ - ("const MPI_File *", "fh"), - ("const void *", "buf"), - ("MPI_Status *", "status"), - ("MPI_Fint *", "ierror"), - ]), - - # 13.5 File Interoperability - - ("void", "MPI_File_get_type_extent", [ - ("const MPI_File *", "fh"), - ("const MPI_Datatype *", "datatype"), - ("MPI_Aint *", "extent"), - ("MPI_Fint *", "ierror"), - ]), - - # TODO: Handle conversions - # ("void", "MPI_Register_datarep", [ - # ("const char *", "datarep"), - # ("MPI_Datarep_conversion_function *", "read_conversion_fn"), - # ("MPI_Datarep_conversion_function *", "write_conversion_fn"), - # ("MPI_Datarep_extent_function *", "dtype_file_extent_fn"), - # ("void *", "extra_state"), - # ("MPI_Fint *", "ierror"), - # ]), - - # 13.6 Consistency and Semantics - - ("void", "MPI_File_set_atomicity", [ - ("const MPI_File *", "fh"), - ("const MPI_Fint *", "flag"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_get_atomicity", [ - ("const MPI_File *", "fh"), - ("int *", "flag"), - ("MPI_Fint *", "ierror"), - ]), - - ("void", "MPI_File_sync", [ - ("const MPI_File *", "fh"), - ("MPI_Fint *", "ierror"), - ]), - -] diff --git a/mpiabi/mpiabi.h b/mpiabi/mpiabi.h index 33c7bc99..296cae88 100644 --- a/mpiabi/mpiabi.h +++ b/mpiabi/mpiabi.h @@ -1,168 +1,13 @@ #ifndef MPIABI_H #define MPIABI_H -#include -#include -#include - -#if defined __cplusplus && __cplusplus >= 201103L -#include -#endif - -// Work around a bug in GCC 8.1.0 -#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L -#ifndef static_assert -#define static_assert _Static_assert -#endif -#endif - -// MPI ABI version (we use SemVer) - -#define MPIABI_VERSION_MAJOR 2 -#define MPIABI_VERSION_MINOR 9 -#define MPIABI_VERSION_PATCH 0 - -// Compile-time constants - -#define MPIABI_MPI_VERSION 3 -#define MPIABI_MPI_SUBVERSION 1 - -// These limits must be no smaller than any MPI implementations' limit -#define MPIABI_MAX_DATAREP_STRING 128 // MPICH: 128, OpenMPI: 128 -#define MPIABI_MAX_ERROR_STRING 1024 // MPICH: 1024, OpenMPI: 256 -#define MPIABI_MAX_INFO_KEY 256 // MPICH: 256, OpenMPI: 36 -#define MPIABI_MAX_INFO_VAL 1024 // MPICH: 1024, OpenMPI: 256 -#define MPIABI_MAX_LIBRARY_VERSION_STRING 8192 // MPICH: 8192, OpenMPI: 256 -#define MPIABI_MAX_OBJECT_NAME 128 // MPICH: 128, OpenMPI: 64 -#define MPIABI_MAX_PORT_NAME 1024 // MPICH: 256, OpenMPI: 1024 -#define MPIABI_MAX_PROCESSOR_NAME 256 // MPICH: 128, OpenMPI: 256 - -// Simple types - -typedef intptr_t MPIABI_Aint; -typedef int64_t MPIABI_Count; -typedef int MPIABI_Fint; -typedef int64_t MPIABI_Offset; - -// Handles - -typedef uintptr_t MPIABI_Comm; -typedef uintptr_t MPIABI_Datatype; -typedef uintptr_t MPIABI_Errhandler; -typedef uintptr_t MPIABI_File; -typedef uintptr_t MPIABI_Group; -typedef uintptr_t MPIABI_Info; -typedef uintptr_t MPIABI_Message; -typedef uintptr_t MPIABI_Op; -typedef uintptr_t MPIABI_Request; -typedef uintptr_t MPIABI_Win; - -// TODO: Don't define these publicly -typedef MPIABI_Comm *MPIABI_CommPtr; -typedef MPIABI_Datatype *MPIABI_DatatypePtr; -typedef MPIABI_Errhandler *MPIABI_ErrhandlerPtr; -typedef MPIABI_File *MPIABI_FilePtr; -typedef MPIABI_Group *MPIABI_GroupPtr; -typedef MPIABI_Info *MPIABI_InfoPtr; -typedef MPIABI_Message *MPIABI_MessagePtr; -typedef MPIABI_Op *MPIABI_OpPtr; -typedef MPIABI_Request *MPIABI_RequestPtr; -typedef MPIABI_Win *MPIABI_WinPtr; - -// MPI_Status -// This is a difficult type for an ABI since it has user-accessible fields. - -#ifdef __LP64__ -#define MPIABI_STATUS_SIZE 10 -#else -#define MPIABI_STATUS_SIZE 8 -#endif - -// We put the MPI_Status struct in the beginning. This way, we can -// cast from MPI_Status* to MPIABI_Status* when the status is -// undefined, or when it is `MPI_STATUS_IGNORE`. -typedef struct { - union { - struct { - int f0; - int f1; - int f2; - int f3; - size_t f4; - } status_OpenMPI; // also IBM Spectrum MPI - struct { - int f0; - int f1; - int f2; - int f3; - int f4; - } status_MPICH; // also Intel MPI - } mpi_status; - int MPI_SOURCE; - int MPI_TAG; - int MPI_ERROR; -} MPIABI_Status; - -// TODO: Don't define these publicly -typedef MPIABI_Status *MPIABI_StatusPtr; -typedef const MPIABI_Status *MPIABI_const_StatusPtr; - -#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L -static_assert(MPIABI_STATUS_SIZE * sizeof(MPIABI_Fint) == sizeof(MPIABI_Status), - ""); -#endif -#if defined __cplusplus && __cplusplus >= 201103L -static_assert(MPIABI_STATUS_SIZE * sizeof(MPIABI_Fint) == sizeof(MPIABI_Status), - ""); -static_assert(std::is_pod::value, ""); -#endif - -// Helper types -// TODO: Don't define this publicly -typedef int MPIABI_array_int_3[3]; - -// Callback function types - -typedef void MPIABI_Comm_copy_attr_function(); -typedef void MPIABI_Comm_delete_attr_function(); -typedef void MPIABI_Comm_errhandler_function(); -typedef MPIABI_Comm_errhandler_function MPIABI_Comm_errhandler_fn; -typedef MPIABI_Comm_copy_attr_function MPIABI_Copy_function; -typedef int MPIABI_Datarep_conversion_function(void *userbuf, - MPIABI_Datatype datatype, - int count, void *filebuf, - MPIABI_Offset position, - void *extra_state); -typedef int MPIABI_Datarep_extent_function(MPIABI_Datatype datatype, - MPIABI_Aint *extent, - void *extra_state); -typedef void MPIABI_Delete_function(); -typedef void MPIABI_File_errhandler_function(); -typedef void MPIABI_File_errhandler_fn(); -typedef int MPIABI_Grequest_cancel_function(void *extra_state, int complete); -typedef int MPIABI_Grequest_free_function(void *extra_state); -typedef int MPIABI_Grequest_query_function(void *extra_state, - MPIABI_Status *status); -typedef void MPIABI_Type_copy_attr_function(); -typedef void MPIABI_Type_delete_attr_function(); -typedef void MPIABI_User_function(); -typedef void MPIABI_Win_copy_attr_function(); -typedef void MPIABI_Win_delete_attr_function(); -typedef void MPIABI_Win_errhandler_function(); -typedef MPIABI_Win_errhandler_function MPIABI_Win_errhandler_fn; - -// Constants - -#ifdef __cplusplus -extern "C" { -#endif - -extern const int mpiabi_version_major; -extern const int mpiabi_version_minor; -extern const int mpiabi_version_patch; - -#ifdef __cplusplus -} -#endif +#include "mpiabi_constants.h" +#include "mpiabi_functions.h" +#include "mpiabi_types.h" +#include "mpiabi_version.h" +#define MPIABI_H_INCLUDED #endif // #ifndef MPIABI_H +#ifndef MPIABI_H_INCLUDED +#error +#endif diff --git a/mpiabi/mpiabi_constants.h b/mpiabi/mpiabi_constants.h new file mode 100644 index 00000000..0147b64f --- /dev/null +++ b/mpiabi/mpiabi_constants.h @@ -0,0 +1,603 @@ +#ifndef MPIABI_CONSTANTS_H +#define MPIABI_CONSTANTS_H + +#include "mpiabi_types.h" + +// Define MPIABI constants + +// A.1.1 Defined Constants + +// Error classes + +enum { + MPIABI_SUCCESS = 0, // arXiv:2308.11214 + MPIABI_ERR_BUFFER = 1, // arXiv:2308.11214 + MPIABI_ERR_COUNT = 2, // arXiv:2308.11214 + MPIABI_ERR_TYPE = 3, // arXiv:2308.11214 + MPIABI_ERR_TAG = 4, // arXiv:2308.11214 + MPIABI_ERR_COMM = 5, // arXiv:2308.11214 + MPIABI_ERR_RANK = 6, // arXiv:2308.11214 + MPIABI_ERR_REQUEST = 7, // arXiv:2308.11214 + MPIABI_ERR_ROOT = 8, // arXiv:2308.11214 + MPIABI_ERR_GROUP = 9, // arXiv:2308.11214 + MPIABI_ERR_OP = 10, // arXiv:2308.11214 + MPIABI_ERR_TOPOLOGY = 11, // arXiv:2308.11214 + MPIABI_ERR_DIMS = 12, // arXiv:2308.11214 + MPIABI_ERR_ARG = 13, // arXiv:2308.11214 + MPIABI_ERR_UNKNOWN = 14, // arXiv:2308.11214 + MPIABI_ERR_TRUNCATE = 15, // arXiv:2308.11214 + MPIABI_ERR_OTHER = 16, // arXiv:2308.11214 + MPIABI_ERR_INTERN = 17, // arXiv:2308.11214 + MPIABI_ERR_PENDING = 18, // arXiv:2308.11214 + MPIABI_ERR_IN_STATUS = 19, // arXiv:2308.11214 + MPIABI_ERR_ACCESS = 20, // arXiv:2308.11214 + MPIABI_ERR_AMODE = 21, // arXiv:2308.11214 + MPIABI_ERR_ASSERT = 22, // arXiv:2308.11214 + MPIABI_ERR_BAD_FILE = 23, // arXiv:2308.11214 + MPIABI_ERR_BASE = 24, // arXiv:2308.11214 + MPIABI_ERR_CONVERSION = 25, // arXiv:2308.11214 + MPIABI_ERR_DISP = 26, // arXiv:2308.11214 + MPIABI_ERR_DUP_DATAREP = 27, // arXiv:2308.11214 + MPIABI_ERR_FILE_EXISTS = 28, // arXiv:2308.11214 + MPIABI_ERR_FILE_IN_USE = 29, // arXiv:2308.11214 + MPIABI_ERR_FILE = 30, // arXiv:2308.11214 + MPIABI_ERR_INFO_KEY = 31, // arXiv:2308.11214 + MPIABI_ERR_INFO_NOKEY = 32, // arXiv:2308.11214 + MPIABI_ERR_INFO_VALUE = 33, // arXiv:2308.11214 + MPIABI_ERR_INFO = 34, // arXiv:2308.11214 + MPIABI_ERR_IO = 35, // arXiv:2308.11214 + MPIABI_ERR_KEYVAL = 36, // arXiv:2308.11214 + MPIABI_ERR_LOCKTYPE = 37, // arXiv:2308.11214 + MPIABI_ERR_NAME = 38, // arXiv:2308.11214 + MPIABI_ERR_NO_MEM = 39, // arXiv:2308.11214 + MPIABI_ERR_NOT_SAME = 40, // arXiv:2308.11214 + MPIABI_ERR_NO_SPACE = 41, // arXiv:2308.11214 + MPIABI_ERR_NO_SUCH_FILE = 42, // arXiv:2308.11214 + MPIABI_ERR_PORT = 43, // arXiv:2308.11214 + MPIABI_ERR_PROC_ABORTED = 44, // arXiv:2308.11214 + MPIABI_ERR_QUOTA = 45, // arXiv:2308.11214 + MPIABI_ERR_READ_ONLY = 46, // arXiv:2308.11214 + MPIABI_ERR_RMA_ATTACH = 47, // arXiv:2308.11214 + MPIABI_ERR_RMA_CONFLICT = 48, // arXiv:2308.11214 + MPIABI_ERR_RMA_RANGE = 49, // arXiv:2308.11214 + MPIABI_ERR_RMA_SHARED = 50, // arXiv:2308.11214 + MPIABI_ERR_RMA_SYNC = 51, // arXiv:2308.11214 + MPIABI_ERR_RMA_FLAVOR = 52, // arXiv:2308.11214 + MPIABI_ERR_SERVICE = 53, // arXiv:2308.11214 + MPIABI_ERR_SESSION = 54, // arXiv:2308.11214 + MPIABI_ERR_SIZE = 55, // arXiv:2308.11214 + MPIABI_ERR_SPAWN = 56, // arXiv:2308.11214 + MPIABI_ERR_UNSUPPORTED_DATAREP = 57, // arXiv:2308.11214 + MPIABI_ERR_UNSUPPORTED_OPERATION = 58, // arXiv:2308.11214 + MPIABI_ERR_VALUE_TOO_LARGE = 59, // arXiv:2308.11214 + MPIABI_ERR_WIN = 60, // arXiv:2308.11214 + MPIABI_ERR_ERRHANDLER = 61, // arXiv:2308.11214 + MPIABI_T_ERR_CANNOT_INIT = 1000, // arXiv:2308.11214 + MPIABI_T_ERR_NOT_ACCESSIBLE = 1001, // arXiv:2308.11214 + MPIABI_T_ERR_NOT_INITIALIZED = 1002, // arXiv:2308.11214 + MPIABI_T_ERR_NOT_SUPPORTED = 1003, // arXiv:2308.11214 + MPIABI_T_ERR_MEMORY = 1004, // arXiv:2308.11214 + MPIABI_T_ERR_INVALID = 1005, // arXiv:2308.11214 + MPIABI_T_ERR_INVALID_INDEX = 1006, // arXiv:2308.11214 + MPIABI_T_ERR_INVALID_ITEM = 1007, // arXiv:2308.11214 + MPIABI_T_ERR_INVALID_SESSION = 1008, // arXiv:2308.11214 + MPIABI_T_ERR_INVALID_HANDLE = 1009, // arXiv:2308.11214 + MPIABI_T_ERR_INVALID_NAME = 1010, // arXiv:2308.11214 + MPIABI_T_ERR_OUT_OF_HANDLES = 1011, // arXiv:2308.11214 + MPIABI_T_ERR_OUT_OF_SESSIONS = 1012, // arXiv:2308.11214 + MPIABI_T_ERR_CVAR_SET_NOT_NOW = 1013, // arXiv:2308.11214 + MPIABI_T_ERR_CVAR_SET_NEVER = 1014, // arXiv:2308.11214 + MPIABI_T_ERR_PVAR_NO_WRITE = 1015, // arXiv:2308.11214 + MPIABI_T_ERR_PVAR_NO_STARTSTOP = 1016, // arXiv:2308.11214 + MPIABI_T_ERR_PVAR_NO_ATOMIC = 1017, // arXiv:2308.11214 + MPIABI_ERR_LASTCODE = 0x3fff, // arXiv:2308.11214 +}; + +// Buffer Address Constants + +#define MPIABI_BOTTOM ((void *)0) // arXiv:2308.11214 +#define MPIABI_BUFFER_AUTOMATIC ((void *)2) // [nonstandard] +#define MPIABI_IN_PLACE ((void *)1) // arXiv:2308.11214 + +// Assorted Constants + +enum { + MPIABI_PROC_NULL = -2, // arXiv:2308.11214 + MPIABI_ANY_SOURCE = -1, // arXiv:2308.11214 + MPIABI_ANY_TAG = -101, // arXiv:2308.11214 + MPIABI_UNDEFINED = -601, // arXiv:2308.11214 + MPIABI_BSEND_OVERHEAD = 512, // arXiv:2308.11214 + MPIABI_KEYVAL_INVALID = -401, // arXiv:2308.11214 + MPIABI_LOCK_EXCLUSIVE = -901, // arXiv:2308.11214 + MPIABI_LOCK_SHARED = -902, // arXiv:2308.11214 + MPIABI_ROOT = -3, // arXiv:2308.11214 +}; + +// No Process Message Handle + +#define MPIABI_MESSAGE_NO_PROC \ + ((MPIABI_Message)0b000100010101) // arXiv:2308.11214 + +// Fortran Support Method Specific Constants + +// Status array size and reserved index values + +// Fortran status array size and reserved index values + +enum { + MPIABI_F_STATUS_SIZE = 8, // arXiv:2308.11214 + MPIABI_F_SOURCE = 0, // arXiv:2308.11214 + MPIABI_F_TAG = 1, // arXiv:2308.11214 + MPIABI_F_ERROR = 2, // arXiv:2308.11214 +}; + +// Variable Address Size + +// Error-handling specifiers + +#define MPIABI_ERRORS_ARE_FATAL \ + ((MPIABI_Errhandler)0b000100011001) // arXiv:2308.11214 +#define MPIABI_ERRORS_ABORT \ + ((MPIABI_Errhandler)0b000100011011) // arXiv:2308.11214 +#define MPIABI_ERRORS_RETURN \ + ((MPIABI_Errhandler)0b000100011010) // arXiv:2308.11214 + +// Maximum Sizes for Strings + +enum { + MPIABI_MAX_DATAREP_STRING = 128, + MPIABI_MAX_ERROR_STRING = 512, + MPIABI_MAX_INFO_KEY = 255, + MPIABI_MAX_INFO_VAL = 1024, + MPIABI_MAX_LIBRARY_VERSION_STRING = 8192, + MPIABI_MAX_OBJECT_NAME = 128, + MPIABI_MAX_PORT_NAME = 1024, + MPIABI_MAX_PROCESSOR_NAME = 256, + MPIABI_MAX_PSET_NAME_LEN = 256, + MPIABI_MAX_STRINGTAG_LEN = 256, +}; + +// Named Predefined Datatypes + +// [C types] + +#define MPIABI_CHAR ((MPIABI_Datatype)0b001001000011) // arXiv:2308.11214 +#define MPIABI_SHORT ((MPIABI_Datatype)0b001000001000) // arXiv:2308.11214 +#define MPIABI_INT ((MPIABI_Datatype)0b001000001001) // arXiv:2308.11214 +#define MPIABI_LONG ((MPIABI_Datatype)0b001000001010) // arXiv:2308.11214 +#define MPIABI_LONG_LONG_INT \ + ((MPIABI_Datatype)0b001000001011) // arXiv:2308.11214 +#define MPIABI_LONG_LONG MPIABI_LONG_LONG_INT // arXiv:2308.11214 +#define MPIABI_SIGNED_CHAR ((MPIABI_Datatype)0b001001000100) // arXiv:2308.11214 +#define MPIABI_UNSIGNED_CHAR \ + ((MPIABI_Datatype)0b001001000101) // arXiv:2308.11214 +#define MPIABI_UNSIGNED_SHORT \ + ((MPIABI_Datatype)0b001000001100) // arXiv:2308.11214 +#define MPIABI_UNSIGNED ((MPIABI_Datatype)0b001000001101) // arXiv:2308.11214 +#define MPIABI_UNSIGNED_LONG \ + ((MPIABI_Datatype)0b001000001110) // arXiv:2308.11214 +#define MPIABI_UNSIGNED_LONG_LONG \ + ((MPIABI_Datatype)0b001000001111) // arXiv:2308.11214 +#define MPIABI_FLOAT ((MPIABI_Datatype)0b001001010010) // arXiv:2308.11214 +#define MPIABI_DOUBLE ((MPIABI_Datatype)0b001001011010) // arXiv:2308.11214 +#define MPIABI_LONG_DOUBLE ((MPIABI_Datatype)0b001000100000) // arXiv:2308.11214 +#define MPIABI_WCHAR ((MPIABI_Datatype)0b001000111100) // arXiv:2308.11214 +#define MPIABI_C_BOOL ((MPIABI_Datatype)0b001000111000) // arXiv:2308.11214 +#define MPIABI_INT8_T ((MPIABI_Datatype)0b001001000000) // arXiv:2308.11214 +#define MPIABI_INT16_T ((MPIABI_Datatype)0b001001001000) // arXiv:2308.11214 +#define MPIABI_INT32_T ((MPIABI_Datatype)0b001001010000) // arXiv:2308.11214 +#define MPIABI_INT64_T ((MPIABI_Datatype)0b001001011000) // arXiv:2308.11214 +#define MPIABI_UINT8_T ((MPIABI_Datatype)0b001001000001) // arXiv:2308.11214 +#define MPIABI_UINT16_T ((MPIABI_Datatype)0b001001001001) // arXiv:2308.11214 +#define MPIABI_UINT32_T ((MPIABI_Datatype)0b001001010001) // arXiv:2308.11214 +#define MPIABI_UINT64_T ((MPIABI_Datatype)0b001001011001) // arXiv:2308.11214 +#define MPIABI_AINT ((MPIABI_Datatype)0b001000000001) // arXiv:2308.11214 +#define MPIABI_COUNT ((MPIABI_Datatype)0b001000000010) // arXiv:2308.11214 +#define MPIABI_OFFSET ((MPIABI_Datatype)0b001000000011) // arXiv:2308.11214 +#define MPIABI_C_COMPLEX ((MPIABI_Datatype)0b001001011011) // arXiv:2308.11214 +#define MPIABI_C_FLOAT_COMPLEX MPIABI_C_COMPLEX // arXiv:2308.11214 +#define MPIABI_C_DOUBLE_COMPLEX \ + ((MPIABI_Datatype)0b001000010110) // arXiv:2308.11214 +#define MPIABI_C_LONG_DOUBLE_COMPLEX \ + ((MPIABI_Datatype)0b001000100100) // arXiv:2308.11214 +#define MPIABI_BYTE ((MPIABI_Datatype)0b001001000111) // arXiv:2308.11214 +#define MPIABI_PACKED ((MPIABI_Datatype)0b001000000111) // arXiv:2308.11214 + +// [Fortran types] + +#define MPIABI_INTEGER ((MPIABI_Datatype)0b001000011000) // arXiv:2308.11214 +#define MPIABI_REAL ((MPIABI_Datatype)0b001000011010) // arXiv:2308.11214 +#define MPIABI_DOUBLE_PRECISION \ + ((MPIABI_Datatype)0b001000011100) // arXiv:2308.11214 +#define MPIABI_COMPLEX ((MPIABI_Datatype)0b001000011011) // arXiv:2308.11214 +#define MPIABI_LOGICAL ((MPIABI_Datatype)0b001000011001) // arXiv:2308.11214 +#define MPIABI_CHARACTER ((MPIABI_Datatype)0b001011000011) // arXiv:2308.11214 + +// [C++ types] + +#define MPIABI_CXX_BOOL ((MPIABI_Datatype)0b001000111001) // arXiv:2308.11214 +#define MPIABI_CXX_FLOAT_COMPLEX \ + ((MPIABI_Datatype)0b001000010011) // arXiv:2308.11214 +#define MPIABI_CXX_DOUBLE_COMPLEX \ + ((MPIABI_Datatype)0b001000010111) // arXiv:2308.11214 +#define MPIABI_CXX_LONG_DOUBLE_COMPLEX \ + ((MPIABI_Datatype)0b001000100101) // arXiv:2308.11214 + +// [Optional datatypes (Fortran)] + +#define MPIABI_DOUBLE_COMPLEX \ + ((MPIABI_Datatype)0b001000011101) // arXiv:2308.11214 +#define MPIABI_INTEGER1 ((MPIABI_Datatype)0b001011000000) // arXiv:2308.11214 +#define MPIABI_INTEGER2 ((MPIABI_Datatype)0b001011001000) // arXiv:2308.11214 +#define MPIABI_INTEGER4 ((MPIABI_Datatype)0b001011010000) // arXiv:2308.11214 +#define MPIABI_INTEGER8 ((MPIABI_Datatype)0b001011011000) // arXiv:2308.11214 +#define MPIABI_INTEGER16 ((MPIABI_Datatype)0b001011100000) // arXiv:2308.11214 +#define MPIABI_REAL2 ((MPIABI_Datatype)0b001011001010) // arXiv:2308.11214 +#define MPIABI_REAL4 ((MPIABI_Datatype)0b001011010010) // arXiv:2308.11214 +#define MPIABI_REAL8 ((MPIABI_Datatype)0b001011011010) // arXiv:2308.11214 +#define MPIABI_REAL16 ((MPIABI_Datatype)0b001000100010) // arXiv:2308.11214 +#define MPIABI_COMPLEX4 ((MPIABI_Datatype)0b001011010011) // arXiv:2308.11214 +#define MPIABI_COMPLEX8 ((MPIABI_Datatype)0b001011011011) // arXiv:2308.11214 +#define MPIABI_COMPLEX16 ((MPIABI_Datatype)0b001011100011) // arXiv:2308.11214 +#define MPIABI_COMPLEX32 ((MPIABI_Datatype)0b001011101011) // arXiv:2308.11214 + +// [Extensions] + +#define MPIABI_REAL1 ((MPIABI_Datatype)0b001011000010) // arXiv:2308.11214 +#define MPIABI_COMPLEX2 ((MPIABI_Datatype)0b001011001011) // arXiv:2308.11214 +#define MPIABI_LOGICAL1 ((MPIABI_Datatype)0b001011000001) // arXiv:2308.11214 +#define MPIABI_LOGICAL2 ((MPIABI_Datatype)0b001011001001) // arXiv:2308.11214 +#define MPIABI_LOGICAL4 ((MPIABI_Datatype)0b001011010001) // arXiv:2308.11214 +#define MPIABI_LOGICAL8 ((MPIABI_Datatype)0b001011011001) // arXiv:2308.11214 +#define MPIABI_LOGICAL16 ((MPIABI_Datatype)0b001011100001) // arXiv:2308.11214 + +// [Datatypes for reduction functions (C)] + +#define MPIABI_FLOAT_INT ((MPIABI_Datatype)0b001000101000) // arXiv:2308.11214 +#define MPIABI_DOUBLE_INT ((MPIABI_Datatype)0b001000101001) // arXiv:2308.11214 +#define MPIABI_LONG_INT ((MPIABI_Datatype)0b001000101010) // arXiv:2308.11214 +#define MPIABI_2INT ((MPIABI_Datatype)0b001000101011) // arXiv:2308.11214 +#define MPIABI_SHORT_INT ((MPIABI_Datatype)0b001000101100) // arXiv:2308.11214 +#define MPIABI_LONG_DOUBLE_INT \ + ((MPIABI_Datatype)0b001000101101) // arXiv:2308.11214 + +// [Datatypes for reduction functions (Fortran)] + +#define MPIABI_2REAL ((MPIABI_Datatype)0b001000110000) // arXiv:2308.11214 +#define MPIABI_2DOUBLE_PRECISION \ + ((MPIABI_Datatype)0b001000110001) // arXiv:2308.11214 +#define MPIABI_2INTEGER ((MPIABI_Datatype)0b001000110010) // arXiv:2308.11214 + +// [Removed constructs] + +#define MPIABI_LB ((MPIABI_Datatype)0b001000000100) // [nonstandard] +#define MPIABI_UB ((MPIABI_Datatype)0b001000000101) // [nonstandard] + +// Reserved communicators + +#define MPIABI_COMM_WORLD ((MPIABI_Comm)0b000100000001) // arXiv:2308.11214 +#define MPIABI_COMM_SELF ((MPIABI_Comm)0b000100000010) // arXiv:2308.11214 + +// Communicator split type constants +enum { + MPIABI_COMM_TYPE_SHARED = -1001, // arXiv:2308.11214 + MPIABI_COMM_TYPE_HW_UNGUIDED = -1002, // arXiv:2308.11214 + MPIABI_COMM_TYPE_HW_GUIDED = -1003, // arXiv:2308.11214 + MPIABI_COMM_TYPE_RESOURCE_GUIDED = -1004, // [nonstandard] +}; + +// Results of communicator and group comparisons + +enum { + MPIABI_IDENT = -701, // arXiv:2308.11214 + MPIABI_CONGRUENT = -702, // arXiv:2308.11214 + MPIABI_SIMILAR = -703, // arXiv:2308.11214 + MPIABI_UNEQUAL = -704, // arXiv:2308.11214 +}; + +// Environmental inquiry info key + +#define MPIABI_INFO_ENV ((MPIABI_Info)0b000100110001) // [nonstandard] + +// Environmental inquiry keys + +enum { + MPIABI_TAG_UB = -201, // arXiv:2308.11214 + MPIABI_IO = -202, // arXiv:2308.11214 + MPIABI_HOST = -203, // arXiv:2308.11214 [deprecated] + MPIABI_WTIME_IS_GLOBAL = -204, // arXiv:2308.11214 +}; + +// Collective Operations + +#define MPIABI_MAX ((MPIABI_Op)0b000000100011) // arXiv:2308.11214 +#define MPIABI_MIN ((MPIABI_Op)0b000000100010) // arXiv:2308.11214 +#define MPIABI_SUM ((MPIABI_Op)0b000000100001) // arXiv:2308.11214 +#define MPIABI_PROD ((MPIABI_Op)0b000000100100) // arXiv:2308.11214 +#define MPIABI_MAXLOC ((MPIABI_Op)0b000000111001) // arXiv:2308.11214 +#define MPIABI_MINLOC ((MPIABI_Op)0b000000111000) // arXiv:2308.11214 +#define MPIABI_BAND ((MPIABI_Op)0b000000101000) // arXiv:2308.11214 +#define MPIABI_BOR ((MPIABI_Op)0b000000101001) // arXiv:2308.11214 +#define MPIABI_BXOR ((MPIABI_Op)0b000000101010) // arXiv:2308.11214 +#define MPIABI_LAND ((MPIABI_Op)0b000000110000) // arXiv:2308.11214 +#define MPIABI_LOR ((MPIABI_Op)0b000000110001) // arXiv:2308.11214 +#define MPIABI_LXOR ((MPIABI_Op)0b000000110010) // arXiv:2308.11214 +#define MPIABI_REPLACE ((MPIABI_Op)0b000000111100) // arXiv:2308.11214 +#define MPIABI_NO_OP ((MPIABI_Op)0b000000111101) // arXiv:2308.11214 + +// Null Handles + +#define MPIABI_GROUP_NULL ((MPIABI_Group)0b000100000100) // arXiv:2308.11214 +#define MPIABI_COMM_NULL ((MPIABI_Comm)0b000100000000) // arXiv:2308.11214 +#define MPIABI_DATATYPE_NULL \ + ((MPIABI_Datatype)0b001000000000) // arXiv:2308.11214 +#define MPIABI_REQUEST_NULL ((MPIABI_Request)0b000100100000) // arXiv:2308.11214 +#define MPIABI_OP_NULL ((MPIABI_Op)0b000000100000) // arXiv:2308.11214 +#define MPIABI_ERRHANDLER_NULL \ + ((MPIABI_Errhandler)0b000100011000) // arXiv:2308.11214 +#define MPIABI_FILE_NULL ((MPIABI_File)0b000100001100) // arXiv:2308.11214 +#define MPIABI_INFO_NULL ((MPIABI_Info)0b000100110000) // arXiv:2308.11214 +#define MPIABI_SESSION_NULL ((MPIABI_Session)0b000100010000) // arXiv:2308.11214 +#define MPIABI_WIN_NULL ((MPIABI_Win)0b000100001000) // arXiv:2308.11214 +#define MPIABI_MESSAGE_NULL ((MPIABI_Message)0b000100010100) // arXiv:2308.11214 + +// Empty group + +#define MPIABI_GROUP_EMPTY ((MPIABI_Group)0b000100000101) // arXiv:2308.11214 + +// Topologies + +enum { + MPIABI_GRAPH = -1801, // arXiv:2308.11214 + MPIABI_CART = -1803, // arXiv:2308.11214 + MPIABI_DIST_GRAPH = -1802, // arXiv:2308.11214 +}; + +// Predefined functions + +#define MPIABI_COMM_NULL_COPY_FN \ + ((MPIABI_Comm_copy_attr_function)0) // arXiv:2308.11214 +#define MPIABI_COMM_DUP_FN \ + ((MPIABI_Comm_copy_attr_function)1) // arXiv:2308.11214 +#define MPIABI_COMM_NULL_DELETE_FN \ + ((MPIABI_Comm_delete_attr_function)0) // arXiv:2308.11214 + +#define MPIABI_WIN_NULL_COPY_FN \ + ((MPIABI_Win_copy_attr_function)0) // arXiv:2308.11214 +#define MPIABI_WIN_DUP_FN ((MPIABI_Win_copy_attr_function)1) // arXiv:2308.11214 +#define MPIABI_WIN_NULL_DELETE_FN \ + ((MPIABI_Win_delete_attr_function)0) // arXiv:2308.11214 + +#define MPIABI_TYPE_NULL_COPY_FN \ + ((MPIABI_Type_copy_attr_function)0) // arXiv:2308.11214 +#define MPIABI_TYPE_DUP_FN \ + ((MPIABI_Type_copy_attr_function)1) // arXiv:2308.11214 +#define MPIABI_TYPE_NULL_DELETE_FN \ + ((MPIABI_Type_delete_attr_function)0) // arXiv:2308.11214 + +#define MPIABI_CONVERSION_FN_NULL \ + ((MPIABI_Datarep_conversion_function)0) // arXiv:2308.11214 +#define MPIABI_CONVERSION_FN_NULL_C \ + ((MPIABI_Datarep_conversion_function_c)0) // arXiv:2308.11214 + +// Deprecated predefined functions + +#define MPIABI_NULL_COPY_FN ((MPIABI_Copy_function)0) +#define MPIABI_DUP_FN ((MPIABI_Copy_function)1) +#define MPIABI_NULL_DELETE_FN ((MPIABI_Delete_function)0) + +// Predefined Attribute Keys + +enum { + MPIABI_APPNUM = -205, // arXiv:2308.11214 + MPIABI_LASTUSEDCODE = -206, // arXiv:2308.11214 + MPIABI_UNIVERSE_SIZE = -207, // arXiv:2308.11214 + MPIABI_WIN_BASE = -301, // arXiv:2308.11214 + MPIABI_WIN_DISP_UNIT = -302, // arXiv:2308.11214 + MPIABI_WIN_SIZE = -303, // arXiv:2308.11214 + MPIABI_WIN_CREATE_FLAVOR = -304, // arXiv:2308.11214 + MPIABI_WIN_MODEL = -305, // arXiv:2308.11214 +}; + +// MPI Window Create Flavors + +enum { + MPIABI_WIN_FLAVOR_CREATE = -1102, // arXiv:2308.11214 + MPIABI_WIN_FLAVOR_ALLOCATE = -1101, // arXiv:2308.11214 + MPIABI_WIN_FLAVOR_DYNAMIC = -1103, // arXiv:2308.11214 + MPIABI_WIN_FLAVOR_SHARED = -1104, // arXiv:2308.11214 +}; + +// MPI Window Models + +enum { + MPIABI_WIN_SEPARATE = -1201, // arXiv:2308.11214 + MPIABI_WIN_UNIFIED = -1202, // arXiv:2308.11214 +}; + +// Mode Constants + +enum { + MPIABI_MODE_APPEND = 1, // arXiv:2308.11214 + MPIABI_MODE_CREATE = 2, // arXiv:2308.11214 + MPIABI_MODE_DELETE_ON_CLOSE = 4, // arXiv:2308.11214 + MPIABI_MODE_EXCL = 8, // arXiv:2308.11214 + MPIABI_MODE_NOCHECK = 1024, // arXiv:2308.11214 + MPIABI_MODE_NOPRECEDE = 2048, // arXiv:2308.11214 + MPIABI_MODE_NOPUT = 4096, // arXiv:2308.11214 + MPIABI_MODE_NOSTORE = 8192, // arXiv:2308.11214 + MPIABI_MODE_NOSUCCEED = 16384, // arXiv:2308.11214 + MPIABI_MODE_RDONLY = 16, // arXiv:2308.11214 + MPIABI_MODE_RDWR = 32, // arXiv:2308.11214 + MPIABI_MODE_SEQUENTIAL = 64, // arXiv:2308.11214 + MPIABI_MODE_UNIQUE_OPEN = 128, // arXiv:2308.11214 + MPIABI_MODE_WRONLY = 256, // arXiv:2308.11214 +}; + +// Datatype Decoding Constants + +enum { + MPIABI_COMBINER_CONTIGUOUS = -1303, // arXiv:2308.11214 + MPIABI_COMBINER_DARRAY = -1312, // arXiv:2308.11214 + MPIABI_COMBINER_DUP = -1302, // arXiv:2308.11214 + MPIABI_COMBINER_F90_COMPLEX = -1314, // arXiv:2308.11214 + MPIABI_COMBINER_F90_INTEGER = -1315, // arXiv:2308.11214 + MPIABI_COMBINER_F90_REAL = -1313, // arXiv:2308.11214 + MPIABI_COMBINER_HINDEXED = -1307, // arXiv:2308.11214 + MPIABI_COMBINER_HVECTOR = -1305, // arXiv:2308.11214 + MPIABI_COMBINER_INDEXED_BLOCK = -1308, // arXiv:2308.11214 + MPIABI_COMBINER_HINDEXED_BLOCK = -1309, // arXiv:2308.11214 + MPIABI_COMBINER_INDEXED = -1306, // arXiv:2308.11214 + MPIABI_COMBINER_NAMED = -1301, // arXiv:2308.11214 + MPIABI_COMBINER_RESIZED = -1316, // arXiv:2308.11214 + MPIABI_COMBINER_STRUCT = -1310, // arXiv:2308.11214 + MPIABI_COMBINER_SUBARRAY = -1311, // arXiv:2308.11214 + MPIABI_COMBINER_VECTOR = -1304, // arXiv:2308.11214 +}; + +// Threads Constants + +enum { + MPIABI_THREAD_FUNNELED = -803, // arXiv:2308.11214 + MPIABI_THREAD_MULTIPLE = -801, // arXiv:2308.11214 + MPIABI_THREAD_SERIALIZED = -802, // arXiv:2308.11214 + MPIABI_THREAD_SINGLE = -804, // arXiv:2308.11214 +}; + +// File Operation Constants, Part 1 + +#define MPIABI_DISPLACEMENT_CURRENT ((MPIABI_Offset)-501) // arXiv:2308.11214 + +// File Operation Constants, Part 2 + +enum { + MPIABI_DISTRIBUTE_BLOCK = -1401, // arXiv:2308.11214 + MPIABI_DISTRIBUTE_CYCLIC = -1402, // arXiv:2308.11214 + MPIABI_DISTRIBUTE_DFLT_DARG = -1403, // arXiv:2308.11214 + MPIABI_DISTRIBUTE_NONE = -1404, // arXiv:2308.11214 + MPIABI_ORDER_C = -1501, // arXiv:2308.11214 + MPIABI_ORDER_FORTRAN = -1502, // arXiv:2308.11214 + MPIABI_SEEK_CUR = -1601, // arXiv:2308.11214 + MPIABI_SEEK_END = -1602, // arXiv:2308.11214 + MPIABI_SEEK_SET = -1603, // arXiv:2308.11214 +}; + +// F90 Datatype Matching Constants + +enum { + MPIABI_TYPECLASS_COMPLEX = -1702, // arXiv:2308.11214 + MPIABI_TYPECLASS_INTEGER = -1703, // arXiv:2308.11214 + MPIABI_TYPECLASS_REAL = -1701, // arXiv:2308.11214 +}; + +// Constants Specifying Empty or Ignored Input + +#define MPIABI_ARGVS_NULL ((char ***)0) // arXiv:2308.11214 +#define MPIABI_ARGV_NULL ((char **)0) // arXiv:2308.11214 +#define MPIABI_ERRCODES_IGNORE ((int *)0) // arXiv:2308.11214 +#define MPIABI_STATUSES_IGNORE ((MPIABI_Status *)0) // arXiv:2308.11214 +#define MPIABI_STATUS_IGNORE ((MPIABI_Status *)0) // arXiv:2308.11214 +#define MPIABI_UNWEIGHTED ((int *)2) // arXiv:2308.11214 +#define MPIABI_WEIGHTS_EMPTY ((int *)3) // arXiv:2308.11214 + +// C Constants Specifying Ignored Input (no Fortran) + +#define MPIABI_F_STATUSES_IGNORE ((MPIABI_Fint *)) +#define MPIABI_F_STATUS_IGNORE ((MPIABI_Fint *)) + +#define MPIABI_F08_STATUSES_IGNORE ((MPIABI_F08_status *)) +#define MPIABI_F08_STATUS_IGNORE ((MPIABI_F08_status *)) + +// C preprocessor Constants and Fortran Parameters + +#define MPIABI_SUBVERSION 1 +#define MPIABI_VERSION 4 + +// Null handles used in the MPI tool information interface + +#define MPIABI_T_ENUM_NULL ((MPIABI_T_enum)) +#define MPIABI_T_CVAR_HANDLE_NULL ((MPIABI_T_cvar_handle)) +#define MPIABI_T_PVAR_HANDLE_NULL ((MPIABI_T_pvar_handle)) +#define MPIABI_T_PVAR_SESSION_NULL ((MPIABI_T_pvar_session)) + +// Verbosity Levels in the MPI tool information interface + +enum { + MPIABI_T_VERBOSITY_USER_BASIC, // [nonstandard] + MPIABI_T_VERBOSITY_USER_DETAIL, + MPIABI_T_VERBOSITY_USER_ALL, + MPIABI_T_VERBOSITY_TUNER_BASIC, + MPIABI_T_VERBOSITY_TUNER_DETAIL, + MPIABI_T_VERBOSITY_TUNER_ALL, + MPIABI_T_VERBOSITY_MPIDEV_BASIC, + MPIABI_T_VERBOSITY_MPIDEV_DETAIL, + MPIABI_T_VERBOSITY_MPIDEV_ALL, +}; + +// Constants to identify associations of variables in the MPI tool information +// interface + +enum { + MPIABI_T_BIND_NO_OBJECT, // [nonstandard] + MPIABI_T_BIND_MPI_COMM, + MPIABI_T_BIND_MPI_DATATYPE, + MPIABI_T_BIND_MPI_ERRHANDLER, + MPIABI_T_BIND_MPI_FILE, + MPIABI_T_BIND_MPI_GROUP, + MPIABI_T_BIND_MPI_OP, + MPIABI_T_BIND_MPI_REQUEST, + MPIABI_T_BIND_MPI_WIN, + MPIABI_T_BIND_MPI_MESSAGE, + MPIABI_T_BIND_MPI_INFO, + MPIABI_T_BIND_MPI_SESSION, +}; + +// Constants describing the scope of a control variable in the MPI tool +// information interface + +enum { + MPIABI_T_SCOPE_CONSTANT, // [nonstandard] + MPIABI_T_SCOPE_READONLY, + MPIABI_T_SCOPE_LOCAL, + MPIABI_T_SCOPE_GROUP, + MPIABI_T_SCOPE_GROUP_EQ, + MPIABI_T_SCOPE_ALL, + MPIABI_T_SCOPE_ALL_EQ, +}; + +// Additional constants used + +#define MPIABI_T_PVAR_ALL_HANDLES ((MPIABI_T_pvar_handle)) + +// Performance variables classes used by the MPI tool information interface + +enum { + MPIABI_T_PVAR_CLASS_STATE, // [nonstandard] + MPIABI_T_PVAR_CLASS_LEVEL, + MPIABI_T_PVAR_CLASS_SIZE, + MPIABI_T_PVAR_CLASS_PERCENTAGE, + MPIABI_T_PVAR_CLASS_HIGHWATERMARK, + MPIABI_T_PVAR_CLASS_LOWWATERMARK, + MPIABI_T_PVAR_CLASS_COUNTER, + MPIABI_T_PVAR_CLASS_AGGREGATE, + MPIABI_T_PVAR_CLASS_TIMER, + MPIABI_T_PVAR_CLASS_GENERIC, +}; + +// Source event ordering guarantees in the MPI tool information interface + +#define MPIABI_T_SOURCE_ORDERED ((MPIABI_T_source_order)) +#define MPIABI_T_SOURCE_UNORDERED ((MPIABI_T_source_order)) + +// Callback safety requirement levels used in the MPI tool information interface + +#define MPIABI_T_CB_REQUIRE_NONE ((MPIABI_T_cb_safety)) +#define MPIABI_T_CB_REQUIRE_MPI_RESTRICTED ((MPIABI_T_cb_safety)) +#define MPIABI_T_CB_REQUIRE_THREAD_SAFE ((MPIABI_T_cb_safety)) +#define MPIABI_T_CB_REQUIRE_ASYNC_SIGNAL_SAFE ((MPIABI_T_cb_safety)) + +#define MPIABI_CONSTANTS_H_INCLUDED +#endif // #ifndef MPIABI_CONSTANTS_H +#ifndef MPIABI_CONSTANTS_H_INCLUDED +#error +#endif diff --git a/mpiabi/mpiabi_f08_constants.f90 b/mpiabi/mpiabi_f08_constants.f90 new file mode 100644 index 00000000..d4021b00 --- /dev/null +++ b/mpiabi/mpiabi_f08_constants.f90 @@ -0,0 +1,10 @@ +module mpiabi_f08_constants + use mpiabi_f08_types + implicit none + public + save + + integer, private :: dummy + + integer, parameter :: MPIABI_COUNT_KIND = kind(loc(dummy)) +end module mpiabi_f08_constants diff --git a/mpiabi/mpiabi_f08_functions.f90 b/mpiabi/mpiabi_f08_functions.f90 new file mode 100644 index 00000000..cfe692d1 --- /dev/null +++ b/mpiabi/mpiabi_f08_functions.f90 @@ -0,0 +1,1735 @@ +! Declare MPIABI functions + +! A.4 Fortran 2008 Bindings + +module mpiabi_f08_functions + implicit none + public + save + + ! A.4.1 Point-to-Point Communication Fortran 2008 Bindings + + interface + subroutine MPIABI_Bsend(buf, count, datatype, dest, tag, comm, ierror) + use mpiabi_f08_types + implicit none + type(*), dimension(..), intent(in) :: buf + integer, intent(in) :: count, dest, tag + type(MPIABI_Datatype), intent(in) :: datatype + type(MPIABI_Comm), intent(in) :: comm + integer, optional, intent(out) :: ierror + end subroutine MPIABI_Bsend + subroutine MPIABI_Bsend(buf, count, datatype, dest, tag, comm, ierror) + use mpiabi_f08_types + implicit none + type(*), dimension(..), intent(in) :: buf + integer(kind=MPIABI_COUNT_KIND), intent(in) :: count + type(MPIABI_Datatype), intent(in) :: datatype + integer, intent(in) :: dest, tag + type(MPIABI_Comm), intent(in) :: comm + integer, optional, intent(out) :: ierror + end subroutine MPIABI_Bsend + end interface + +end module mpiabi_f08_functions + +! int MPIABI_Bsend(const void *buf, int count, MPIABI_Datatype datatype, int dest, int tag, MPIABI_Comm comm); +! int MPIABI_Bsend_c(const void *buf, MPIABI_Count count, MPIABI_Datatype datatype, int dest, int tag, MPIABI_Comm comm); +! int MPIABI_Bsend_init(const void *buf, int count, MPIABI_Datatype datatype, int dest, int tag, MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Bsend_init_c(const void *buf, MPIABI_Count count, MPIABI_Datatype datatype, int dest, int tag, MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Buffer_attach(void *buffer, int size); +! int MPIABI_Buffer_attach_c(void *buffer, MPIABI_Count size); +! int MPIABI_Buffer_detach(void *buffer_addr, int *size); +! int MPIABI_Buffer_detach_c(void *buffer_addr, MPIABI_Count *size); +! int MPIABI_Buffer_flush(void); +! int MPIABI_Buffer_iflush(MPIABI_Request *request); +! int MPIABI_Cancel(MPIABI_Request *request); +! int MPIABI_Comm_attach_buffer(MPIABI_Comm comm, void *buffer, int size); +! int MPIABI_Comm_attach_buffer_c(MPIABI_Comm comm, void *buffer, +! MPIABI_Count size); +! int MPIABI_Comm_detach_buffer(MPIABI_Comm comm, void *buffer_addr, int *size); +! int MPIABI_Comm_detach_buffer_c(MPIABI_Comm comm, void *buffer_addr, +! MPIABI_Count *size); +! int MPIABI_Comm_flush_buffer(MPIABI_Comm comm); +! int MPIABI_Comm_iflush_buffer(MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Get_count(const MPIABI_Status *status, MPIABI_Datatype datatype, +! int *count); +! int MPIABI_Get_count_c(const MPIABI_Status *status, MPIABI_Datatype datatype, +! MPIABI_Count *count); +! int MPIABI_Ibsend(const void *buf, int count, MPIABI_Datatype datatype, +! int dest, int tag, MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Ibsend_c(const void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, int dest, int tag, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Improbe(int source, int tag, MPIABI_Comm comm, int *flag, +! MPIABI_Message *message, MPIABI_Status *status); +! int MPIABI_Imrecv(void *buf, int count, MPIABI_Datatype datatype, +! MPIABI_Message *message, MPIABI_Request *request); +! int MPIABI_Imrecv_c(void *buf, MPIABI_Count count, MPIABI_Datatype datatype, +! MPIABI_Message *message, MPIABI_Request *request); +! int MPIABI_Iprobe(int source, int tag, MPIABI_Comm comm, int *flag, +! MPIABI_Status *status); +! int MPIABI_Irecv(void *buf, int count, MPIABI_Datatype datatype, int source, +! int tag, MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Irecv_c(void *buf, MPIABI_Count count, MPIABI_Datatype datatype, +! int source, int tag, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Irsend(const void *buf, int count, MPIABI_Datatype datatype, +! int dest, int tag, MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Irsend_c(const void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, int dest, int tag, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Isend(const void *buf, int count, MPIABI_Datatype datatype, int dest, +! int tag, MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Isend_c(const void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, int dest, int tag, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Isendrecv(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, int dest, int sendtag, +! void *recvbuf, int recvcount, MPIABI_Datatype recvtype, +! int source, int recvtag, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Isendrecv_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, int dest, int sendtag, +! void *recvbuf, MPIABI_Count recvcount, +! MPIABI_Datatype recvtype, int source, int recvtag, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Isendrecv_replace(void *buf, int count, MPIABI_Datatype datatype, +! int dest, int sendtag, int source, int recvtag, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Isendrecv_replace_c(void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, int dest, int sendtag, +! int source, int recvtag, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Issend(const void *buf, int count, MPIABI_Datatype datatype, +! int dest, int tag, MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Issend_c(const void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, int dest, int tag, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Mprobe(int source, int tag, MPIABI_Comm comm, +! MPIABI_Message *message, MPIABI_Status *status); +! int MPIABI_Mrecv(void *buf, int count, MPIABI_Datatype datatype, +! MPIABI_Message *message, MPIABI_Status *status); +! int MPIABI_Mrecv_c(void *buf, MPIABI_Count count, MPIABI_Datatype datatype, +! MPIABI_Message *message, MPIABI_Status *status); +! int MPIABI_Probe(int source, int tag, MPIABI_Comm comm, MPIABI_Status *status); +! int MPIABI_Recv(void *buf, int count, MPIABI_Datatype datatype, int source, +! int tag, MPIABI_Comm comm, MPIABI_Status *status); +! int MPIABI_Recv_c(void *buf, MPIABI_Count count, MPIABI_Datatype datatype, +! int source, int tag, MPIABI_Comm comm, MPIABI_Status *status); +! int MPIABI_Recv_init(void *buf, int count, MPIABI_Datatype datatype, int source, +! int tag, MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Recv_init_c(void *buf, MPIABI_Count count, MPIABI_Datatype datatype, +! int source, int tag, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Request_free(MPIABI_Request *request); +! int MPIABI_Request_get_status(MPIABI_Request request, int *flag, +! MPIABI_Status *status); +! int MPIABI_Request_get_status_all(int count, +! const MPIABI_Request array_of_requests[], +! int *flag, MPIABI_Status array_of_statuses[]); +! int MPIABI_Request_get_status_any(int count, +! const MPIABI_Request array_of_requests[], +! int *index, int *flag, MPIABI_Status *status); +! int MPIABI_Request_get_status_some(int incount, +! const MPIABI_Request array_of_requests[], +! int *outcount, int array_of_indices[], +! MPIABI_Status array_of_statuses[]); +! int MPIABI_Rsend(const void *buf, int count, MPIABI_Datatype datatype, int dest, +! int tag, MPIABI_Comm comm); +! int MPIABI_Rsend_c(const void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, int dest, int tag, +! MPIABI_Comm comm); +! int MPIABI_Rsend_init(const void *buf, int count, MPIABI_Datatype datatype, +! int dest, int tag, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Rsend_init_c(const void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, int dest, int tag, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Send(const void *buf, int count, MPIABI_Datatype datatype, int dest, +! int tag, MPIABI_Comm comm); +! int MPIABI_Send_c(const void *buf, MPIABI_Count count, MPIABI_Datatype datatype, +! int dest, int tag, MPIABI_Comm comm); +! int MPIABI_Send_init(const void *buf, int count, MPIABI_Datatype datatype, +! int dest, int tag, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Send_init_c(const void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, int dest, int tag, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Sendrecv(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, int dest, int sendtag, +! void *recvbuf, int recvcount, MPIABI_Datatype recvtype, +! int source, int recvtag, MPIABI_Comm comm, +! MPIABI_Status *status); +! int MPIABI_Sendrecv_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, int dest, int sendtag, +! void *recvbuf, MPIABI_Count recvcount, +! MPIABI_Datatype recvtype, int source, int recvtag, +! MPIABI_Comm comm, MPIABI_Status *status); +! int MPIABI_Sendrecv_replace(void *buf, int count, MPIABI_Datatype datatype, +! int dest, int sendtag, int source, int recvtag, +! MPIABI_Comm comm, MPIABI_Status *status); +! int MPIABI_Sendrecv_replace_c(void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, int dest, int sendtag, +! int source, int recvtag, MPIABI_Comm comm, +! MPIABI_Status *status); +! int MPIABI_Session_attach_buffer(MPIABI_Session session, void *buffer, +! int size); +! int MPIABI_Session_attach_buffer_c(MPIABI_Session session, void *buffer, +! MPIABI_Count size); +! int MPIABI_Session_detach_buffer(MPIABI_Session session, void *buffer_addr, +! int *size); +! int MPIABI_Session_detach_buffer_c(MPIABI_Session session, void *buffer_addr, +! MPIABI_Count *size); +! int MPIABI_Session_flush_buffer(MPIABI_Session session); +! int MPIABI_Session_iflush_buffer(MPIABI_Session session, +! MPIABI_Request *request); +! int MPIABI_Ssend(const void *buf, int count, MPIABI_Datatype datatype, int dest, +! int tag, MPIABI_Comm comm); +! int MPIABI_Ssend_c(const void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, int dest, int tag, +! MPIABI_Comm comm); +! int MPIABI_Ssend_init(const void *buf, int count, MPIABI_Datatype datatype, +! int dest, int tag, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Ssend_init_c(const void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, int dest, int tag, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Start(MPIABI_Request *request); +! int MPIABI_Startall(int count, MPIABI_Request array_of_requests[]); +! int MPIABI_Status_get_error(MPIABI_Status *status, int *err); +! int MPIABI_Status_get_source(MPIABI_Status *status, int *source); +! int MPIABI_Status_get_tag(MPIABI_Status *status, int *tag); +! int MPIABI_Test(MPIABI_Request *request, int *flag, MPIABI_Status *status); +! int MPIABI_Test_cancelled(const MPIABI_Status *status, int *flag); +! int MPIABI_Testall(int count, MPIABI_Request array_of_requests[], int *flag, +! MPIABI_Status array_of_statuses[]); +! int MPIABI_Testany(int count, MPIABI_Request array_of_requests[], int *index, +! int *flag, MPIABI_Status *status); +! int MPIABI_Testsome(int incount, MPIABI_Request array_of_requests[], +! int *outcount, int array_of_indices[], +! MPIABI_Status array_of_statuses[]); +! int MPIABI_Wait(MPIABI_Request *request, MPIABI_Status *status); +! int MPIABI_Waitall(int count, MPIABI_Request array_of_requests[], +! MPIABI_Status array_of_statuses[]); +! int MPIABI_Waitany(int count, MPIABI_Request array_of_requests[], int *index, +! MPIABI_Status *status); +! int MPIABI_Waitsome(int incount, MPIABI_Request array_of_requests[], +! int *outcount, int array_of_indices[], +! MPIABI_Status array_of_statuses[]); +! +! // A.3.2 Partitioned Communication C Bindings +! +! int MPIABI_Parrived(MPIABI_Request request, int partition, int *flag); +! int MPIABI_Pready(int partition, MPIABI_Request request); +! int MPIABI_Pready_list(int length, const int array_of_partitions[], +! MPIABI_Request request); +! int MPIABI_Pready_range(int partition_low, int partition_high, +! MPIABI_Request request); +! int MPIABI_Precv_init(void *buf, int partitions, MPIABI_Count count, +! MPIABI_Datatype datatype, int source, int tag, +! MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Psend_init(const void *buf, int partitions, MPIABI_Count count, +! MPIABI_Datatype datatype, int dest, int tag, +! MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! +! // A.3.3 Datatypes C Bindings +! +! MPIABI_Aint MPIABI_Aint_add(MPIABI_Aint base, MPIABI_Aint disp); +! MPIABI_Aint MPIABI_Aint_diff(MPIABI_Aint addr1, MPIABI_Aint addr2); +! int MPIABI_Get_address(const void *location, MPIABI_Aint *address); +! int MPIABI_Get_elements(const MPIABI_Status *status, MPIABI_Datatype datatype, +! int *count); +! int MPIABI_Get_elements_c(const MPIABI_Status *status, MPIABI_Datatype datatype, +! MPIABI_Count *count); +! int MPIABI_Pack(const void *inbuf, int incount, MPIABI_Datatype datatype, +! void *outbuf, int outsize, int *position, MPIABI_Comm comm); +! int MPIABI_Pack_c(const void *inbuf, MPIABI_Count incount, +! MPIABI_Datatype datatype, void *outbuf, MPIABI_Count outsize, +! MPIABI_Count *position, MPIABI_Comm comm); +! int MPIABI_Pack_external(const char datarep[], const void *inbuf, int incount, +! MPIABI_Datatype datatype, void *outbuf, +! MPIABI_Aint outsize, MPIABI_Aint *position); +! int MPIABI_Pack_external_c(const char datarep[], const void *inbuf, +! MPIABI_Count incount, MPIABI_Datatype datatype, +! void *outbuf, MPIABI_Count outsize, +! MPIABI_Count *position); +! int MPIABI_Pack_external_size(const char datarep[], MPIABI_Count incount, +! MPIABI_Datatype datatype, MPIABI_Aint *size); +! int MPIABI_Pack_external_size_c(const char datarep[], MPIABI_Count incount, +! MPIABI_Datatype datatype, MPIABI_Count *size); +! int MPIABI_Pack_size_c(MPIABI_Count incount, MPIABI_Datatype datatype, +! MPIABI_Comm comm, MPIABI_Count *size); +! int MPIABI_Type_commit(MPIABI_Datatype *datatype); +! int MPIABI_Type_contiguous(int count, MPIABI_Datatype oldtype, +! MPIABI_Datatype *newtype); +! int MPIABI_Type_contiguous_c(MPIABI_Count count, MPIABI_Datatype oldtype, +! MPIABI_Datatype *newtype); +! int MPIABI_Type_create_darray(int size, int rank, int ndims, +! const int array_of_gsizes[], +! const int array_of_distribs[], +! const int array_of_dargs[], +! const int array_of_psizes[], int order, +! MPIABI_Datatype oldtype, +! MPIABI_Datatype *newtype); +! int MPIABI_Type_create_darray_c(int size, int rank, int ndims, +! const MPIABI_Count array_of_gsizes[], +! const int array_of_distribs[], +! const int array_of_dargs[], +! const int array_of_psizes[], int order, +! MPIABI_Datatype oldtype, +! MPIABI_Datatype *newtype); +! int MPIABI_Type_create_hindexed(int count, const int array_of_blocklengths[], +! const MPIABI_Aint array_of_displacements[], +! MPIABI_Datatype oldtype, +! MPIABI_Datatype *newtype); +! int MPIABI_Type_create_hindexed_block( +! int count, int blocklength, const MPIABI_Aint array_of_displacements[], +! MPIABI_Datatype oldtype, MPIABI_Datatype *newtype); +! int MPIABI_Type_create_hindexed_block_c( +! MPIABI_Count count, MPIABI_Count blocklength, +! const MPIABI_Count array_of_displacements[], MPIABI_Datatype oldtype, +! MPIABI_Datatype *newtype); +! int MPIABI_Type_create_hindexed_c(MPIABI_Count count, +! const MPIABI_Count array_of_blocklengths[], +! const MPIABI_Count array_of_displacements[], +! MPIABI_Datatype oldtype, +! MPIABI_Datatype *newtype); +! int MPIABI_Type_create_hvector(int count, int blocklength, MPIABI_Aint stride, +! MPIABI_Datatype oldtype, +! MPIABI_Datatype *newtype); +! int MPIABI_Type_create_hvector_c(MPIABI_Count count, MPIABI_Count blocklength, +! MPIABI_Count stride, MPIABI_Datatype oldtype, +! MPIABI_Datatype *newtype); +! int MPIABI_Type_create_indexed_block(int count, int blocklength, +! const int array_of_displacements[], +! MPIABI_Datatype oldtype, +! MPIABI_Datatype *newtype); +! int MPIABI_Type_create_indexed_block_c( +! MPIABI_Count count, MPIABI_Count blocklength, +! const MPIABI_Count array_of_displacements[], MPIABI_Datatype oldtype, +! MPIABI_Datatype *newtype); +! int MPIABI_Type_create_resized(MPIABI_Datatype oldtype, MPIABI_Aint lb, +! MPIABI_Aint extent, MPIABI_Datatype *newtype); +! int MPIABI_Type_create_resized_c(MPIABI_Datatype oldtype, MPIABI_Count lb, +! MPIABI_Count extent, MPIABI_Datatype *newtype); +! int MPIABI_Type_create_struct(int count, const int array_of_blocklengths[], +! const MPIABI_Aint array_of_displacements[], +! const MPIABI_Datatype array_of_types[], +! MPIABI_Datatype *newtype); +! int MPIABI_Type_create_struct_c(MPIABI_Count count, +! const MPIABI_Count array_of_blocklengths[], +! const MPIABI_Count array_of_displacements[], +! const MPIABI_Datatype array_of_types[], +! MPIABI_Datatype *newtype); +! int MPIABI_Type_create_subarray(int ndims, const int array_of_sizes[], +! const int array_of_subsizes[], +! const int array_of_starts[], int order, +! MPIABI_Datatype oldtype, +! MPIABI_Datatype *newtype); +! int MPIABI_Type_create_subarray_c(int ndims, +! const MPIABI_Count array_of_sizes[], +! const MPIABI_Count array_of_subsizes[], +! const MPIABI_Count array_of_starts[], +! int order, MPIABI_Datatype oldtype, +! MPIABI_Datatype *newtype); +! int MPIABI_Type_dup(MPIABI_Datatype oldtype, MPIABI_Datatype *newtype); +! int MPIABI_Type_free(MPIABI_Datatype *datatype); +! int MPIABI_Type_get_contents(MPIABI_Datatype datatype, int max_integers, +! int max_addresses, int max_datatypes, +! int array_of_integers[], +! MPIABI_Aint array_of_addresses[], +! MPIABI_Datatype array_of_datatypes[]); +! int MPIABI_Type_get_contents_c( +! MPIABI_Datatype datatype, MPIABI_Count max_integers, +! MPIABI_Count max_addresses, MPIABI_Count max_large_counts, +! MPIABI_Count max_datatypes, int array_of_integers[], +! MPIABI_Aint array_of_addresses[], MPIABI_Count array_of_large_counts[], +! MPIABI_Datatype array_of_datatypes[]); +! int MPIABI_Type_get_envelope(MPIABI_Datatype datatype, int *num_integers, +! int *num_addresses, int *num_datatypes, +! int *combiner); +! int MPIABI_Type_get_envelope_c(MPIABI_Datatype datatype, +! MPIABI_Count *num_integers, +! MPIABI_Count *num_addresses, +! MPIABI_Count *num_large_counts, +! MPIABI_Count *num_datatypes, int *combiner); +! int MPIABI_Type_get_extent(MPIABI_Datatype datatype, MPIABI_Aint *lb, +! MPIABI_Aint *extent); +! int MPIABI_Type_get_extent_c(MPIABI_Datatype datatype, MPIABI_Count *lb, +! MPIABI_Count *extent); +! int MPIABI_Type_get_true_extent(MPIABI_Datatype datatype, MPIABI_Aint *true_lb, +! MPIABI_Aint *true_extent); +! int MPIABI_Type_get_true_extent_c(MPIABI_Datatype datatype, +! MPIABI_Count *true_lb, +! MPIABI_Count *true_extent); +! int MPIABI_Type_indexed(int count, const int array_of_blocklengths[], +! const int array_of_displacements[], +! MPIABI_Datatype oldtype, MPIABI_Datatype *newtype); +! int MPIABI_Type_indexed_c(MPIABI_Count count, +! const MPIABI_Count array_of_blocklengths[], +! const MPIABI_Count array_of_displacements[], +! MPIABI_Datatype oldtype, MPIABI_Datatype *newtype); +! int MPIABI_Type_size(MPIABI_Datatype datatype, int *size); +! int MPIABI_Type_size_c(MPIABI_Datatype datatype, MPIABI_Count *size); +! int MPIABI_Type_vector(int count, int blocklength, int stride, +! MPIABI_Datatype oldtype, MPIABI_Datatype *newtype); +! int MPIABI_Type_vector_c(MPIABI_Count count, MPIABI_Count blocklength, +! MPIABI_Count stride, MPIABI_Datatype oldtype, +! MPIABI_Datatype *newtype); +! int MPIABI_Unpack(const void *inbuf, int insize, int *position, void *outbuf, +! int outcount, MPIABI_Datatype datatype, MPIABI_Comm comm); +! int MPIABI_Unpack_c(const void *inbuf, MPIABI_Count insize, +! MPIABI_Count *position, void *outbuf, MPIABI_Count outcount, +! MPIABI_Datatype datatype, MPIABI_Comm comm); +! int MPIABI_Unpack_external(const char datarep[], const void *inbuf, +! MPIABI_Aint insize, MPIABI_Aint *position, +! void *outbuf, int outcount, +! MPIABI_Datatype datatype); +! int MPIABI_Unpack_external_c(const char datarep[], const void *inbuf, +! MPIABI_Count insize, MPIABI_Count *position, +! void *outbuf, MPIABI_Count outcount, +! MPIABI_Datatype datatype); +! +! // A.3.4 Collective Communication C Bindings +! +! int MPIABI_Allgather(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, int recvcount, +! MPIABI_Datatype recvtype, MPIABI_Comm comm); +! int MPIABI_Allgather_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! MPIABI_Count recvcount, MPIABI_Datatype recvtype, +! MPIABI_Comm comm); +! int MPIABI_Allgather_init(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! int recvcount, MPIABI_Datatype recvtype, +! MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Allgather_init_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! MPIABI_Count recvcount, MPIABI_Datatype recvtype, +! MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Allgatherv(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! const int recvcounts[], const int displs[], +! MPIABI_Datatype recvtype, MPIABI_Comm comm); +! int MPIABI_Allgatherv_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! const MPIABI_Count recvcounts[], +! const MPIABI_Aint displs[], MPIABI_Datatype recvtype, +! MPIABI_Comm comm); +! int MPIABI_Allgatherv_init(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! const int recvcounts[], const int displs[], +! MPIABI_Datatype recvtype, MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Allgatherv_init_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! const MPIABI_Count recvcounts[], +! const MPIABI_Aint displs[], +! MPIABI_Datatype recvtype, MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Allreduce(const void *sendbuf, void *recvbuf, int count, +! MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm); +! int MPIABI_Allreduce_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Op op, +! MPIABI_Comm comm); +! int MPIABI_Allreduce_init(const void *sendbuf, void *recvbuf, int count, +! MPIABI_Datatype datatype, MPIABI_Op op, +! MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Allreduce_init_c(const void *sendbuf, void *recvbuf, +! MPIABI_Count count, MPIABI_Datatype datatype, +! MPIABI_Op op, MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Alltoall(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, int recvcount, +! MPIABI_Datatype recvtype, MPIABI_Comm comm); +! int MPIABI_Alltoall_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! MPIABI_Count recvcount, MPIABI_Datatype recvtype, +! MPIABI_Comm comm); +! int MPIABI_Alltoall_init(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, int recvcount, +! MPIABI_Datatype recvtype, MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Alltoall_init_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! MPIABI_Count recvcount, MPIABI_Datatype recvtype, +! MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Alltoallv(const void *sendbuf, const int sendcounts[], +! const int sdispls[], MPIABI_Datatype sendtype, +! void *recvbuf, const int recvcounts[], const int rdispls[], +! MPIABI_Datatype recvtype, MPIABI_Comm comm); +! int MPIABI_Alltoallv_c(const void *sendbuf, const MPIABI_Count sendcounts[], +! const MPIABI_Aint sdispls[], MPIABI_Datatype sendtype, +! void *recvbuf, const MPIABI_Count recvcounts[], +! const MPIABI_Aint rdispls[], MPIABI_Datatype recvtype, +! MPIABI_Comm comm); +! int MPIABI_Alltoallv_init(const void *sendbuf, const int sendcounts[], +! const int sdispls[], MPIABI_Datatype sendtype, +! void *recvbuf, const int recvcounts[], +! const int rdispls[], MPIABI_Datatype recvtype, +! MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Alltoallv_init_c(const void *sendbuf, +! const MPIABI_Count sendcounts[], +! const MPIABI_Aint sdispls[], +! MPIABI_Datatype sendtype, void *recvbuf, +! const MPIABI_Count recvcounts[], +! const MPIABI_Aint rdispls[], +! MPIABI_Datatype recvtype, MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Alltoallw(const void *sendbuf, const int sendcounts[], +! const int sdispls[], const MPIABI_Datatype sendtypes[], +! void *recvbuf, const int recvcounts[], const int rdispls[], +! const MPIABI_Datatype recvtypes[], MPIABI_Comm comm); +! int MPIABI_Alltoallw_c(const void *sendbuf, const MPIABI_Count sendcounts[], +! const MPIABI_Aint sdispls[], +! const MPIABI_Datatype sendtypes[], void *recvbuf, +! const MPIABI_Count recvcounts[], +! const MPIABI_Aint rdispls[], +! const MPIABI_Datatype recvtypes[], MPIABI_Comm comm); +! int MPIABI_Alltoallw_init(const void *sendbuf, const int sendcounts[], +! const int sdispls[], +! const MPIABI_Datatype sendtypes[], void *recvbuf, +! const int recvcounts[], const int rdispls[], +! const MPIABI_Datatype recvtypes[], MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Alltoallw_init_c(const void *sendbuf, +! const MPIABI_Count sendcounts[], +! const MPIABI_Aint sdispls[], +! const MPIABI_Datatype sendtypes[], void *recvbuf, +! const MPIABI_Count recvcounts[], +! const MPIABI_Aint rdispls[], +! const MPIABI_Datatype recvtypes[], MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Barrier(MPIABI_Comm comm); +! int MPIABI_Barrier_init(MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Bcast(void *buffer, int count, MPIABI_Datatype datatype, int root, +! MPIABI_Comm comm); +! int MPIABI_Bcast_c(void *buffer, MPIABI_Count count, MPIABI_Datatype datatype, +! int root, MPIABI_Comm comm); +! int MPIABI_Bcast_init(void *buffer, int count, MPIABI_Datatype datatype, +! int root, MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Bcast_init_c(void *buffer, MPIABI_Count count, +! MPIABI_Datatype datatype, int root, MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Exscan(const void *sendbuf, void *recvbuf, int count, +! MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm); +! int MPIABI_Exscan_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm); +! int MPIABI_Exscan_init(const void *sendbuf, void *recvbuf, int count, +! MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Exscan_init_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Op op, +! MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Gather(const void *sendbuf, int sendcount, MPIABI_Datatype sendtype, +! void *recvbuf, int recvcount, MPIABI_Datatype recvtype, +! int root, MPIABI_Comm comm); +! int MPIABI_Gather_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! MPIABI_Count recvcount, MPIABI_Datatype recvtype, int root, +! MPIABI_Comm comm); +! int MPIABI_Gather_init(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, int recvcount, +! MPIABI_Datatype recvtype, int root, MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Gather_init_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! MPIABI_Count recvcount, MPIABI_Datatype recvtype, +! int root, MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Gatherv(const void *sendbuf, int sendcount, MPIABI_Datatype sendtype, +! void *recvbuf, const int recvcounts[], const int displs[], +! MPIABI_Datatype recvtype, int root, MPIABI_Comm comm); +! int MPIABI_Gatherv_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! const MPIABI_Count recvcounts[], +! const MPIABI_Aint displs[], MPIABI_Datatype recvtype, +! int root, MPIABI_Comm comm); +! int MPIABI_Gatherv_init(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! const int recvcounts[], const int displs[], +! MPIABI_Datatype recvtype, int root, MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Gatherv_init_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! const MPIABI_Count recvcounts[], +! const MPIABI_Aint displs[], MPIABI_Datatype recvtype, +! int root, MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Iallgather(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, int recvcount, +! MPIABI_Datatype recvtype, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Iallgather_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! MPIABI_Count recvcount, MPIABI_Datatype recvtype, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Iallgatherv(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! const int recvcounts[], const int displs[], +! MPIABI_Datatype recvtype, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Iallgatherv_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! const MPIABI_Count recvcounts[], +! const MPIABI_Aint displs[], MPIABI_Datatype recvtype, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Iallreduce(const void *sendbuf, void *recvbuf, int count, +! MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Iallreduce_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Op op, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Ialltoall(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, int recvcount, +! MPIABI_Datatype recvtype, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Ialltoall_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! MPIABI_Count recvcount, MPIABI_Datatype recvtype, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Ialltoallv(const void *sendbuf, const int sendcounts[], +! const int sdispls[], MPIABI_Datatype sendtype, +! void *recvbuf, const int recvcounts[], +! const int rdispls[], MPIABI_Datatype recvtype, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Ialltoallv_c(const void *sendbuf, const MPIABI_Count sendcounts[], +! const MPIABI_Aint sdispls[], MPIABI_Datatype sendtype, +! void *recvbuf, const MPIABI_Count recvcounts[], +! const MPIABI_Aint rdispls[], MPIABI_Datatype recvtype, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Ialltoallw(const void *sendbuf, const int sendcounts[], +! const int sdispls[], const MPIABI_Datatype sendtypes[], +! void *recvbuf, const int recvcounts[], +! const int rdispls[], const MPIABI_Datatype recvtypes[], +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Ialltoallw_c(const void *sendbuf, const MPIABI_Count sendcounts[], +! const MPIABI_Aint sdispls[], +! const MPIABI_Datatype sendtypes[], void *recvbuf, +! const MPIABI_Count recvcounts[], +! const MPIABI_Aint rdispls[], +! const MPIABI_Datatype recvtypes[], MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Ibarrier(MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Ibcast(void *buffer, int count, MPIABI_Datatype datatype, int root, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Ibcast_c(void *buffer, MPIABI_Count count, MPIABI_Datatype datatype, +! int root, MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Iexscan(const void *sendbuf, void *recvbuf, int count, +! MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Iexscan_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Igather(const void *sendbuf, int sendcount, MPIABI_Datatype sendtype, +! void *recvbuf, int recvcount, MPIABI_Datatype recvtype, +! int root, MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Igather_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! MPIABI_Count recvcount, MPIABI_Datatype recvtype, int root, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Igatherv(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! const int recvcounts[], const int displs[], +! MPIABI_Datatype recvtype, int root, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Igatherv_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! const MPIABI_Count recvcounts[], +! const MPIABI_Aint displs[], MPIABI_Datatype recvtype, +! int root, MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Ireduce(const void *sendbuf, void *recvbuf, int count, +! MPIABI_Datatype datatype, MPIABI_Op op, int root, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Ireduce_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Op op, int root, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Ireduce_scatter(const void *sendbuf, void *recvbuf, +! const int recvcounts[], MPIABI_Datatype datatype, +! MPIABI_Op op, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Ireduce_scatter_block(const void *sendbuf, void *recvbuf, +! int recvcount, MPIABI_Datatype datatype, +! MPIABI_Op op, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Ireduce_scatter_block_c(const void *sendbuf, void *recvbuf, +! MPIABI_Count recvcount, +! MPIABI_Datatype datatype, MPIABI_Op op, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Ireduce_scatter_c(const void *sendbuf, void *recvbuf, +! const MPIABI_Count recvcounts[], +! MPIABI_Datatype datatype, MPIABI_Op op, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Iscan(const void *sendbuf, void *recvbuf, int count, +! MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Iscan_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Iscatter(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, int recvcount, +! MPIABI_Datatype recvtype, int root, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Iscatter_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! MPIABI_Count recvcount, MPIABI_Datatype recvtype, +! int root, MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Iscatterv(const void *sendbuf, const int sendcounts[], +! const int displs[], MPIABI_Datatype sendtype, +! void *recvbuf, int recvcount, MPIABI_Datatype recvtype, +! int root, MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Iscatterv_c(const void *sendbuf, const MPIABI_Count sendcounts[], +! const MPIABI_Aint displs[], MPIABI_Datatype sendtype, +! void *recvbuf, MPIABI_Count recvcount, +! MPIABI_Datatype recvtype, int root, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Op_commutative(MPIABI_Op op, int *commute); +! int MPIABI_Op_create(MPIABI_User_function *user_fn, int commute, MPIABI_Op *op); +! int MPIABI_Op_create_c(MPIABI_User_function_c *user_fn, int commute, +! MPIABI_Op *op); +! int MPIABI_Op_free(MPIABI_Op *op); +! int MPIABI_Reduce(const void *sendbuf, void *recvbuf, int count, +! MPIABI_Datatype datatype, MPIABI_Op op, int root, +! MPIABI_Comm comm); +! int MPIABI_Reduce_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Op op, int root, +! MPIABI_Comm comm); +! int MPIABI_Reduce_init(const void *sendbuf, void *recvbuf, int count, +! MPIABI_Datatype datatype, MPIABI_Op op, int root, +! MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Reduce_init_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Op op, int root, +! MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Reduce_local(const void *inbuf, void *inoutbuf, int count, +! MPIABI_Datatype datatype, MPIABI_Op op); +! int MPIABI_Reduce_local_c(const void *inbuf, void *inoutbuf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Op op); +! int MPIABI_Reduce_scatter(const void *sendbuf, void *recvbuf, +! const int recvcounts[], MPIABI_Datatype datatype, +! MPIABI_Op op, MPIABI_Comm comm); +! int MPIABI_Reduce_scatter_block(const void *sendbuf, void *recvbuf, +! int recvcount, MPIABI_Datatype datatype, +! MPIABI_Op op, MPIABI_Comm comm); +! int MPIABI_Reduce_scatter_block_c(const void *sendbuf, void *recvbuf, +! MPIABI_Count recvcount, +! MPIABI_Datatype datatype, MPIABI_Op op, +! MPIABI_Comm comm); +! int MPIABI_Reduce_scatter_block_init(const void *sendbuf, void *recvbuf, +! int recvcount, MPIABI_Datatype datatype, +! MPIABI_Op op, MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Reduce_scatter_block_init_c(const void *sendbuf, void *recvbuf, +! MPIABI_Count recvcount, +! MPIABI_Datatype datatype, MPIABI_Op op, +! MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Reduce_scatter_c(const void *sendbuf, void *recvbuf, +! const MPIABI_Count recvcounts[], +! MPIABI_Datatype datatype, MPIABI_Op op, +! MPIABI_Comm comm); +! int MPIABI_Reduce_scatter_init(const void *sendbuf, void *recvbuf, +! const int recvcounts[], MPIABI_Datatype datatype, +! MPIABI_Op op, MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Reduce_scatter_init_c(const void *sendbuf, void *recvbuf, +! const MPIABI_Count recvcounts[], +! MPIABI_Datatype datatype, MPIABI_Op op, +! MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Scan(const void *sendbuf, void *recvbuf, int count, +! MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm); +! int MPIABI_Scan_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm); +! int MPIABI_Scan_init(const void *sendbuf, void *recvbuf, int count, +! MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Scan_init_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Scatter(const void *sendbuf, int sendcount, MPIABI_Datatype sendtype, +! void *recvbuf, int recvcount, MPIABI_Datatype recvtype, +! int root, MPIABI_Comm comm); +! int MPIABI_Scatter_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! MPIABI_Count recvcount, MPIABI_Datatype recvtype, int root, +! MPIABI_Comm comm); +! int MPIABI_Scatter_init(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, int recvcount, +! MPIABI_Datatype recvtype, int root, MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Scatter_init_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! MPIABI_Count recvcount, MPIABI_Datatype recvtype, +! int root, MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Scatterv(const void *sendbuf, const int sendcounts[], +! const int displs[], MPIABI_Datatype sendtype, void *recvbuf, +! int recvcount, MPIABI_Datatype recvtype, int root, +! MPIABI_Comm comm); +! int MPIABI_Scatterv_c(const void *sendbuf, const MPIABI_Count sendcounts[], +! const MPIABI_Aint displs[], MPIABI_Datatype sendtype, +! void *recvbuf, MPIABI_Count recvcount, +! MPIABI_Datatype recvtype, int root, MPIABI_Comm comm); +! int MPIABI_Scatterv_init(const void *sendbuf, const int sendcounts[], +! const int displs[], MPIABI_Datatype sendtype, +! void *recvbuf, int recvcount, MPIABI_Datatype recvtype, +! int root, MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Scatterv_init_c(const void *sendbuf, const MPIABI_Count sendcounts[], +! const MPIABI_Aint displs[], MPIABI_Datatype sendtype, +! void *recvbuf, MPIABI_Count recvcount, +! MPIABI_Datatype recvtype, int root, MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Type_get_value_index(MPIABI_Datatype value_type, +! MPIABI_Datatype index_type, +! MPIABI_Datatype *pair_type); +! +! // A.3.5 Groups, Contexts, Communicators, and Caching C Bindings +! +! int MPIABI_Comm_compare(MPIABI_Comm comm1, MPIABI_Comm comm2, int *result); +! int MPIABI_Comm_create(MPIABI_Comm comm, MPIABI_Group group, +! MPIABI_Comm *newcomm); +! int MPIABI_Comm_create_from_group(MPIABI_Group group, const char *stringtag, +! MPIABI_Info info, +! MPIABI_Errhandler errhandler, +! MPIABI_Comm *newcomm); +! int MPIABI_Comm_create_group(MPIABI_Comm comm, MPIABI_Group group, int tag, +! MPIABI_Comm *newcomm); +! int MPIABI_Comm_create_keyval( +! MPIABI_Comm_copy_attr_function *comm_copy_attr_fn, +! MPIABI_Comm_delete_attr_function *comm_delete_attr_fn, int *comm_keyval, +! void *extra_state); +! int MPIABI_Comm_delete_attr(MPIABI_Comm comm, int comm_keyval); +! int MPIABI_Comm_dup(MPIABI_Comm comm, MPIABI_Comm *newcomm); +! int MPIABI_Comm_dup_with_info(MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Comm *newcomm); +! int MPIABI_Comm_free(MPIABI_Comm *comm); +! int MPIABI_Comm_get_name(MPIABI_Comm comm, char *comm_name, int *resultlen); +! int MPIABI_Comm_free_keyval(int *comm_keyval); +! int MPIABI_Comm_get_attr(MPIABI_Comm comm, int comm_keyval, void *attribute_val, +! int *flag); +! int MPIABI_Comm_get_info(MPIABI_Comm comm, MPIABI_Info *info_used); +! int MPIABI_Comm_group(MPIABI_Comm comm, MPIABI_Group *group); +! int MPIABI_Comm_idup(MPIABI_Comm comm, MPIABI_Comm *newcomm, +! MPIABI_Request *request); +! int MPIABI_Comm_idup_with_info(MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Comm *newcomm, MPIABI_Request *request); +! int MPIABI_Comm_rank(MPIABI_Comm comm, int *rank); +! int MPIABI_Comm_remote_group(MPIABI_Comm comm, MPIABI_Group *group); +! int MPIABI_Comm_remote_size(MPIABI_Comm comm, int *size); +! int MPIABI_Comm_set_attr(MPIABI_Comm comm, int comm_keyval, +! void *attribute_val); +! int MPIABI_Comm_set_info(MPIABI_Comm comm, MPIABI_Info info); +! int MPIABI_Comm_set_name(MPIABI_Comm comm, const char *comm_name); +! int MPIABI_Comm_size(MPIABI_Comm comm, int *size); +! int MPIABI_Comm_split(MPIABI_Comm comm, int color, int key, +! MPIABI_Comm *newcomm); +! int MPIABI_Group_free(MPIABI_Group *group); +! int MPIABI_Comm_split_type(MPIABI_Comm comm, int split_type, int key, +! MPIABI_Info info, MPIABI_Comm *newcomm); +! int MPIABI_Comm_test_inter(MPIABI_Comm comm, int *flag); +! int MPIABI_Group_compare(MPIABI_Group group1, MPIABI_Group group2, int *result); +! int MPIABI_Group_difference(MPIABI_Group group1, MPIABI_Group group2, +! MPIABI_Group *newgroup); +! int MPIABI_Group_excl(MPIABI_Group group, int n, const int ranks[], +! MPIABI_Group *newgroup); +! int MPIABI_Group_from_session_pset(MPIABI_Session session, +! const char *pset_name, +! MPIABI_Group *newgroup); +! int MPIABI_Group_incl(MPIABI_Group group, int n, const int ranks[], +! MPIABI_Group *newgroup); +! int MPIABI_Group_intersection(MPIABI_Group group1, MPIABI_Group group2, +! MPIABI_Group *newgroup); +! int MPIABI_Group_range_excl(MPIABI_Group group, int n, int ranges[][3], +! MPIABI_Group *newgroup); +! int MPIABI_Group_range_incl(MPIABI_Group group, int n, int ranges[][3], +! MPIABI_Group *newgroup); +! int MPIABI_Group_rank(MPIABI_Group group, int *rank); +! int MPIABI_Group_size(MPIABI_Group group, int *size); +! int MPIABI_Group_translate_ranks(MPIABI_Group group1, int n, const int ranks1[], +! MPIABI_Group group2, int ranks2[]); +! int MPIABI_Group_union(MPIABI_Group group1, MPIABI_Group group2, +! MPIABI_Group *newgroup); +! int MPIABI_Intercomm_create(MPIABI_Comm local_comm, int local_leader, +! MPIABI_Comm peer_comm, int remote_leader, int tag, +! MPIABI_Comm *newintercomm); +! int MPIABI_Intercomm_create_from_groups( +! MPIABI_Group local_group, int local_leader, MPIABI_Group remote_group, +! int remote_leader, const char *stringtag, MPIABI_Info info, +! MPIABI_Errhandler errhandler, MPIABI_Comm *newintercomm); +! int MPIABI_Intercomm_merge(MPIABI_Comm intercomm, int high, +! MPIABI_Comm *newintracomm); +! int MPIABI_Type_create_keyval( +! MPIABI_Type_copy_attr_function *type_copy_attr_fn, +! MPIABI_Type_delete_attr_function *type_delete_attr_fn, int *type_keyval, +! void *extra_state); +! int MPIABI_Type_delete_attr(MPIABI_Datatype datatype, int type_keyval); +! int MPIABI_Type_free_keyval(int *type_keyval); +! int MPIABI_Type_get_attr(MPIABI_Datatype datatype, int type_keyval, +! void *attribute_val, int *flag); +! int MPIABI_Type_get_name(MPIABI_Datatype datatype, char *type_name, +! int *resultlen); +! int MPIABI_Type_set_attr(MPIABI_Datatype datatype, int type_keyval, +! void *attribute_val); +! int MPIABI_Type_set_name(MPIABI_Datatype datatype, const char *type_name); +! int MPIABI_Win_create_keyval( +! MPIABI_Win_copy_attr_function *win_copy_attr_fn, +! MPIABI_Win_delete_attr_function *win_delete_attr_fn, int *win_keyval, +! void *extra_state); +! int MPIABI_Win_delete_attr(MPIABI_Win win, int win_keyval); +! int MPIABI_Win_free_keyval(int *win_keyval); +! int MPIABI_Win_get_attr(MPIABI_Win win, int win_keyval, void *attribute_val, +! int *flag); +! int MPIABI_Win_get_name(MPIABI_Win win, char *win_name, int *resultlen); +! int MPIABI_Win_set_attr(MPIABI_Win win, int win_keyval, void *attribute_val); +! int MPIABI_Win_set_name(MPIABI_Win win, const char *win_name); +! +! // A.3.6 Virtual Topologies for MPI Processes C Bindings +! +! int MPIABI_Cart_coords(MPIABI_Comm comm, int rank, int maxdims, int coords[]); +! int MPIABI_Cart_create(MPIABI_Comm comm_old, int ndims, const int dims[], +! const int periods[], int reorder, +! MPIABI_Comm *comm_cart); +! int MPIABI_Cart_get(MPIABI_Comm comm, int maxdims, int dims[], int periods[], +! int coords[]); +! int MPIABI_Cart_map(MPIABI_Comm comm, int ndims, const int dims[], +! const int periods[], int *newrank); +! int MPIABI_Cart_rank(MPIABI_Comm comm, const int coords[], int *rank); +! int MPIABI_Cart_shift(MPIABI_Comm comm, int direction, int disp, +! int *rank_source, int *rank_dest); +! int MPIABI_Cart_sub(MPIABI_Comm comm, const int remain_dims[], +! MPIABI_Comm *newcomm); +! int MPIABI_Cartdim_get(MPIABI_Comm comm, int *ndims); +! int MPIABI_Dims_create(int nnodes, int ndims, int dims[]); +! int MPIABI_Dist_graph_create(MPIABI_Comm comm_old, int n, const int sources[], +! const int degrees[], const int destinations[], +! const int weights[], MPIABI_Info info, int reorder, +! MPIABI_Comm *comm_dist_graph); +! int MPIABI_Dist_graph_create_adjacent(MPIABI_Comm comm_old, int indegree, +! const int sources[], +! const int sourceweights[], int outdegree, +! const int destinations[], +! const int destweights[], MPIABI_Info info, +! int reorder, +! MPIABI_Comm *comm_dist_graph); +! int MPIABI_Dist_graph_neighbors(MPIABI_Comm comm, int maxindegree, +! int sources[], int sourceweights[], +! int maxoutdegree, int destinations[], +! int destweights[]); +! int MPIABI_Dist_graph_neighbors_count(MPIABI_Comm comm, int *indegree, +! int *outdegree, int *weighted); +! int MPIABI_Graph_create(MPIABI_Comm comm_old, int nnodes, const int index[], +! const int edges[], int reorder, +! MPIABI_Comm *comm_graph); +! int MPIABI_Graph_get(MPIABI_Comm comm, int maxindex, int maxedges, int index[], +! int edges[]); +! int MPIABI_Graph_map(MPIABI_Comm comm, int nnodes, const int index[], +! const int edges[], int *newrank); +! int MPIABI_Graph_neighbors(MPIABI_Comm comm, int rank, int maxneighbors, +! int neighbors[]); +! int MPIABI_Graph_neighbors_count(MPIABI_Comm comm, int rank, int *nneighbors); +! int MPIABI_Graphdims_get(MPIABI_Comm comm, int *nnodes, int *nedges); +! int MPIABI_Ineighbor_allgather(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! int recvcount, MPIABI_Datatype recvtype, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Ineighbor_allgather_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! MPIABI_Count recvcount, +! MPIABI_Datatype recvtype, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Ineighbor_allgatherv(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! const int recvcounts[], const int displs[], +! MPIABI_Datatype recvtype, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Ineighbor_allgatherv_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! const MPIABI_Count recvcounts[], +! const MPIABI_Aint displs[], +! MPIABI_Datatype recvtype, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Ineighbor_alltoall(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! int recvcount, MPIABI_Datatype recvtype, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Ineighbor_alltoall_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! MPIABI_Count recvcount, +! MPIABI_Datatype recvtype, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Ineighbor_alltoallv(const void *sendbuf, const int sendcounts[], +! const int sdispls[], MPIABI_Datatype sendtype, +! void *recvbuf, const int recvcounts[], +! const int rdispls[], MPIABI_Datatype recvtype, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Ineighbor_alltoallv_c( +! const void *sendbuf, const MPIABI_Count sendcounts[], +! const MPIABI_Aint sdispls[], MPIABI_Datatype sendtype, void *recvbuf, +! const MPIABI_Count recvcounts[], const MPIABI_Aint rdispls[], +! MPIABI_Datatype recvtype, MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Ineighbor_alltoallw(const void *sendbuf, const int sendcounts[], +! const MPIABI_Aint sdispls[], +! const MPIABI_Datatype sendtypes[], void *recvbuf, +! const int recvcounts[], +! const MPIABI_Aint rdispls[], +! const MPIABI_Datatype recvtypes[], +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Ineighbor_alltoallw_c(const void *sendbuf, +! const MPIABI_Count sendcounts[], +! const MPIABI_Aint sdispls[], +! const MPIABI_Datatype sendtypes[], +! void *recvbuf, const MPIABI_Count recvcounts[], +! const MPIABI_Aint rdispls[], +! const MPIABI_Datatype recvtypes[], +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Neighbor_allgather(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! int recvcount, MPIABI_Datatype recvtype, +! MPIABI_Comm comm); +! int MPIABI_Neighbor_allgather_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! MPIABI_Count recvcount, +! MPIABI_Datatype recvtype, MPIABI_Comm comm); +! int MPIABI_Neighbor_allgather_init(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! int recvcount, MPIABI_Datatype recvtype, +! MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Neighbor_allgather_init_c(const void *sendbuf, +! MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! MPIABI_Count recvcount, +! MPIABI_Datatype recvtype, MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Neighbor_allgatherv(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! const int recvcounts[], const int displs[], +! MPIABI_Datatype recvtype, MPIABI_Comm comm); +! int MPIABI_Neighbor_allgatherv_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! const MPIABI_Count recvcounts[], +! const MPIABI_Aint displs[], +! MPIABI_Datatype recvtype, MPIABI_Comm comm); +! int MPIABI_Neighbor_allgatherv_init(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! const int recvcounts[], const int displs[], +! MPIABI_Datatype recvtype, MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Neighbor_allgatherv_init_c( +! const void *sendbuf, MPIABI_Count sendcount, MPIABI_Datatype sendtype, +! void *recvbuf, const MPIABI_Count recvcounts[], const MPIABI_Aint displs[], +! MPIABI_Datatype recvtype, MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Neighbor_alltoall(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! int recvcount, MPIABI_Datatype recvtype, +! MPIABI_Comm comm); +! int MPIABI_Neighbor_alltoall_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! MPIABI_Count recvcount, MPIABI_Datatype recvtype, +! MPIABI_Comm comm); +! int MPIABI_Neighbor_alltoall_init(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! int recvcount, MPIABI_Datatype recvtype, +! MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Neighbor_alltoall_init_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! MPIABI_Count recvcount, +! MPIABI_Datatype recvtype, MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Neighbor_alltoallv(const void *sendbuf, const int sendcounts[], +! const int sdispls[], MPIABI_Datatype sendtype, +! void *recvbuf, const int recvcounts[], +! const int rdispls[], MPIABI_Datatype recvtype, +! MPIABI_Comm comm); +! int MPIABI_Neighbor_alltoallv_c(const void *sendbuf, +! const MPIABI_Count sendcounts[], +! const MPIABI_Aint sdispls[], +! MPIABI_Datatype sendtype, void *recvbuf, +! const MPIABI_Count recvcounts[], +! const MPIABI_Aint rdispls[], +! MPIABI_Datatype recvtype, MPIABI_Comm comm); +! int MPIABI_Neighbor_alltoallv_init(const void *sendbuf, const int sendcounts[], +! const int sdispls[], +! MPIABI_Datatype sendtype, void *recvbuf, +! const int recvcounts[], const int rdispls[], +! MPIABI_Datatype recvtype, MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Neighbor_alltoallv_init_c(const void *sendbuf, +! const MPIABI_Count sendcounts[], +! const MPIABI_Aint sdispls[], +! MPIABI_Datatype sendtype, void *recvbuf, +! const MPIABI_Count recvcounts[], +! const MPIABI_Aint rdispls[], +! MPIABI_Datatype recvtype, MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Neighbor_alltoallw(const void *sendbuf, const int sendcounts[], +! const MPIABI_Aint sdispls[], +! const MPIABI_Datatype sendtypes[], void *recvbuf, +! const int recvcounts[], +! const MPIABI_Aint rdispls[], +! const MPIABI_Datatype recvtypes[], +! MPIABI_Comm comm); +! int MPIABI_Neighbor_alltoallw_c( +! const void *sendbuf, const MPIABI_Count sendcounts[], +! const MPIABI_Aint sdispls[], const MPIABI_Datatype sendtypes[], +! void *recvbuf, const MPIABI_Count recvcounts[], const MPIABI_Aint rdispls[], +! const MPIABI_Datatype recvtypes[], MPIABI_Comm comm); +! int MPIABI_Neighbor_alltoallw_init( +! const void *sendbuf, const int sendcounts[], const MPIABI_Aint sdispls[], +! const MPIABI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], +! const MPIABI_Aint rdispls[], const MPIABI_Datatype recvtypes[], +! MPIABI_Comm comm, MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Neighbor_alltoallw_init_c( +! const void *sendbuf, const MPIABI_Count sendcounts[], +! const MPIABI_Aint sdispls[], const MPIABI_Datatype sendtypes[], +! void *recvbuf, const MPIABI_Count recvcounts[], const MPIABI_Aint rdispls[], +! const MPIABI_Datatype recvtypes[], MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Topo_test(MPIABI_Comm comm, int *status); +! +! // A.3.7 MPI Environmental Management C Bindings +! +! int MPIABI_Add_error_class(int *errorclass); +! int MPIABI_Add_error_code(int errorclass, int *errorcode); +! int MPIABI_Add_error_string(int errorcode, const char *string); +! int MPIABI_Alloc_mem(MPIABI_Aint size, MPIABI_Info info, void *baseptr); +! int MPIABI_Comm_call_errhandler(MPIABI_Comm comm, int errorcode); +! int MPIABI_Comm_create_errhandler( +! MPIABI_Comm_errhandler_function *comm_errhandler_fn, +! MPIABI_Errhandler *errhandler); +! int MPIABI_Comm_get_errhandler(MPIABI_Comm comm, MPIABI_Errhandler *errhandler); +! int MPIABI_Comm_set_errhandler(MPIABI_Comm comm, MPIABI_Errhandler errhandler); +! int MPIABI_Errhandler_free(MPIABI_Errhandler *errhandler); +! int MPIABI_Error_class(int errorcode, int *errorclass); +! int MPIABI_Error_string(int errorcode, char *string, int *resultlen); +! int MPIABI_File_call_errhandler(MPIABI_File fh, int errorcode); +! int MPIABI_File_create_errhandler( +! MPIABI_File_errhandler_function *file_errhandler_fn, +! MPIABI_Errhandler *errhandler); +! int MPIABI_File_get_errhandler(MPIABI_File file, MPIABI_Errhandler *errhandler); +! int MPIABI_File_set_errhandler(MPIABI_File file, MPIABI_Errhandler errhandler); +! int MPIABI_Free_mem(void *base); +! int MPIABI_Get_hw_resource_info(MPIABI_Info *hw_info); +! int MPIABI_Get_library_version(char *version, int *resultlen); +! int MPIABI_Get_processor_name(char *name, int *resultlen); +! int MPIABI_Get_version(int *version, int *subversion); +! int MPIABI_Remove_error_class(int errorclass); +! int MPIABI_Remove_error_code(int errorcode); +! int MPIABI_Remove_error_string(int errorcode); +! int MPIABI_Session_call_errhandler(MPIABI_Session session, int errorcode); +! int MPIABI_Session_create_errhandler( +! MPIABI_Session_errhandler_function *session_errhandler_fn, +! MPIABI_Errhandler *errhandler); +! int MPIABI_Session_get_errhandler(MPIABI_Session session, +! MPIABI_Errhandler *errhandler); +! int MPIABI_Session_set_errhandler(MPIABI_Session session, +! MPIABI_Errhandler errhandler); +! int MPIABI_Win_call_errhandler(MPIABI_Win win, int errorcode); +! int MPIABI_Win_create_errhandler( +! MPIABI_Win_errhandler_function *win_errhandler_fn, +! MPIABI_Errhandler *errhandler); +! int MPIABI_Win_get_errhandler(MPIABI_Win win, MPIABI_Errhandler *errhandler); +! int MPIABI_Win_set_errhandler(MPIABI_Win win, MPIABI_Errhandler errhandler); +! double MPIABI_Wtick(void); +! double MPIABI_Wtime(void); +! +! // A.3.8 The Info Object C Bindings +! +! int MPIABI_Info_create(MPIABI_Info *info); +! int MPIABI_Info_create_env(int argc, char *argv[], MPIABI_Info *info); +! int MPIABI_Info_delete(MPIABI_Info info, const char *key); +! int MPIABI_Info_dup(MPIABI_Info info, MPIABI_Info *newinfo); +! int MPIABI_Info_free(MPIABI_Info *info); +! int MPIABI_Info_get_nkeys(MPIABI_Info info, int *nkeys); +! int MPIABI_Info_get_nthkey(MPIABI_Info info, int n, char *key); +! int MPIABI_Info_get_string(MPIABI_Info info, const char *key, int *buflen, +! char *value, int *flag); +! int MPIABI_Info_set(MPIABI_Info info, const char *key, const char *value); +! +! // A.3.9 Process Creation and Management C Bindings +! +! int MPIABI_Abort(MPIABI_Comm comm, int errorcode); +! int MPIABI_Close_port(const char *port_name); +! int MPIABI_Comm_accept(const char *port_name, MPIABI_Info info, int root, +! MPIABI_Comm comm, MPIABI_Comm *newcomm); +! int MPIABI_Comm_connect(const char *port_name, MPIABI_Info info, int root, +! MPIABI_Comm comm, MPIABI_Comm *newcomm); +! int MPIABI_Comm_disconnect(MPIABI_Comm *comm); +! int MPIABI_Comm_get_parent(MPIABI_Comm *parent); +! int MPIABI_Comm_join(int fd, MPIABI_Comm *intercomm); +! int MPIABI_Comm_spawn(const char *command, char *argv[], int maxprocs, +! MPIABI_Info info, int root, MPIABI_Comm comm, +! MPIABI_Comm *intercomm, int array_of_errcodes[]); +! int MPIABI_Comm_spawn_multiple(int count, char *array_of_commands[], +! char **array_of_argv[], +! const int array_of_maxprocs[], +! const MPIABI_Info array_of_info[], int root, +! MPIABI_Comm comm, MPIABI_Comm *intercomm, +! int array_of_errcodes[]); +! int MPIABI_Finalize(void); +! int MPIABI_Finalized(int *flag); +! int MPIABI_Init(int *argc, char ***argv); +! int MPIABI_Init_thread(int *argc, char ***argv, int required, int *provided); +! int MPIABI_Initialized(int *flag); +! int MPIABI_Is_thread_main(int *flag); +! int MPIABI_Lookup_name(const char *service_name, MPIABI_Info info, +! char *port_name); +! int MPIABI_Open_port(MPIABI_Info info, char *port_name); +! int MPIABI_Publish_name(const char *service_name, MPIABI_Info info, +! const char *port_name); +! int MPIABI_Query_thread(int *provided); +! int MPIABI_Session_finalize(MPIABI_Session *session); +! int MPIABI_Session_get_info(MPIABI_Session session, MPIABI_Info *info_used); +! int MPIABI_Session_get_nth_pset(MPIABI_Session session, MPIABI_Info info, int n, +! int *pset_len, char *pset_name); +! int MPIABI_Session_get_num_psets(MPIABI_Session session, MPIABI_Info info, +! int *npset_names); +! int MPIABI_Session_get_pset_info(MPIABI_Session session, const char *pset_name, +! MPIABI_Info *info); +! int MPIABI_Session_init(MPIABI_Info info, MPIABI_Errhandler errhandler, +! MPIABI_Session *session); +! int MPIABI_Unpublish_name(const char *service_name, MPIABI_Info info, +! const char *port_name); +! +! // A.3.10 One-Sided Communications C Bindings +! +! int MPIABI_Accumulate(const void *origin_addr, int origin_count, +! MPIABI_Datatype origin_datatype, int target_rank, +! MPIABI_Aint target_disp, int target_count, +! MPIABI_Datatype target_datatype, MPIABI_Op op, +! MPIABI_Win win); +! int MPIABI_Accumulate_c(const void *origin_addr, MPIABI_Count origin_count, +! MPIABI_Datatype origin_datatype, int target_rank, +! MPIABI_Aint target_disp, MPIABI_Count target_count, +! MPIABI_Datatype target_datatype, MPIABI_Op op, +! MPIABI_Win win); +! int MPIABI_Compare_and_swap(const void *origin_addr, const void *compare_addr, +! void *result_addr, MPIABI_Datatype datatype, +! int target_rank, MPIABI_Aint target_disp, +! MPIABI_Win win); +! int MPIABI_Fetch_and_op(const void *origin_addr, void *result_addr, +! MPIABI_Datatype datatype, int target_rank, +! MPIABI_Aint target_disp, MPIABI_Op op, MPIABI_Win win); +! int MPIABI_Get(void *origin_addr, int origin_count, +! MPIABI_Datatype origin_datatype, int target_rank, +! MPIABI_Aint target_disp, int target_count, +! MPIABI_Datatype target_datatype, MPIABI_Win win); +! int MPIABI_Get_accumulate(const void *origin_addr, int origin_count, +! MPIABI_Datatype origin_datatype, void *result_addr, +! int result_count, MPIABI_Datatype result_datatype, +! int target_rank, MPIABI_Aint target_disp, +! int target_count, MPIABI_Datatype target_datatype, +! MPIABI_Op op, MPIABI_Win win); +! int MPIABI_Get_accumulate_c(const void *origin_addr, MPIABI_Count origin_count, +! MPIABI_Datatype origin_datatype, void *result_addr, +! MPIABI_Count result_count, +! MPIABI_Datatype result_datatype, int target_rank, +! MPIABI_Aint target_disp, MPIABI_Count target_count, +! MPIABI_Datatype target_datatype, MPIABI_Op op, +! MPIABI_Win win); +! int MPIABI_Get_c(void *origin_addr, MPIABI_Count origin_count, +! MPIABI_Datatype origin_datatype, int target_rank, +! MPIABI_Aint target_disp, MPIABI_Count target_count, +! MPIABI_Datatype target_datatype, MPIABI_Win win); +! int MPIABI_Put(const void *origin_addr, int origin_count, +! MPIABI_Datatype origin_datatype, int target_rank, +! MPIABI_Aint target_disp, int target_count, +! MPIABI_Datatype target_datatype, MPIABI_Win win); +! int MPIABI_Put_c(const void *origin_addr, MPIABI_Count origin_count, +! MPIABI_Datatype origin_datatype, int target_rank, +! MPIABI_Aint target_disp, MPIABI_Count target_count, +! MPIABI_Datatype target_datatype, MPIABI_Win win); +! int MPIABI_Raccumulate(const void *origin_addr, int origin_count, +! MPIABI_Datatype origin_datatype, int target_rank, +! MPIABI_Aint target_disp, int target_count, +! MPIABI_Datatype target_datatype, MPIABI_Op op, +! MPIABI_Win win, MPIABI_Request *request); +! int MPIABI_Raccumulate_c(const void *origin_addr, MPIABI_Count origin_count, +! MPIABI_Datatype origin_datatype, int target_rank, +! MPIABI_Aint target_disp, MPIABI_Count target_count, +! MPIABI_Datatype target_datatype, MPIABI_Op op, +! MPIABI_Win win, MPIABI_Request *request); +! int MPIABI_Rget(void *origin_addr, int origin_count, +! MPIABI_Datatype origin_datatype, int target_rank, +! MPIABI_Aint target_disp, int target_count, +! MPIABI_Datatype target_datatype, MPIABI_Win win, +! MPIABI_Request *request); +! int MPIABI_Rget_accumulate(const void *origin_addr, int origin_count, +! MPIABI_Datatype origin_datatype, void *result_addr, +! int result_count, MPIABI_Datatype result_datatype, +! int target_rank, MPIABI_Aint target_disp, +! int target_count, MPIABI_Datatype target_datatype, +! MPIABI_Op op, MPIABI_Win win, +! MPIABI_Request *request); +! int MPIABI_Rget_accumulate_c(const void *origin_addr, MPIABI_Count origin_count, +! MPIABI_Datatype origin_datatype, void *result_addr, +! MPIABI_Count result_count, +! MPIABI_Datatype result_datatype, int target_rank, +! MPIABI_Aint target_disp, MPIABI_Count target_count, +! MPIABI_Datatype target_datatype, MPIABI_Op op, +! MPIABI_Win win, MPIABI_Request *request); +! int MPIABI_Rget_c(void *origin_addr, MPIABI_Count origin_count, +! MPIABI_Datatype origin_datatype, int target_rank, +! MPIABI_Aint target_disp, MPIABI_Count target_count, +! MPIABI_Datatype target_datatype, MPIABI_Win win, +! MPIABI_Request *request); +! int MPIABI_Rput(const void *origin_addr, int origin_count, +! MPIABI_Datatype origin_datatype, int target_rank, +! MPIABI_Aint target_disp, int target_count, +! MPIABI_Datatype target_datatype, MPIABI_Win win, +! MPIABI_Request *request); +! int MPIABI_Rput_c(const void *origin_addr, MPIABI_Count origin_count, +! MPIABI_Datatype origin_datatype, int target_rank, +! MPIABI_Aint target_disp, MPIABI_Count target_count, +! MPIABI_Datatype target_datatype, MPIABI_Win win, +! MPIABI_Request *request); +! int MPIABI_Win_allocate(MPIABI_Aint size, int disp_unit, MPIABI_Info info, +! MPIABI_Comm comm, void *baseptr, MPIABI_Win *win); +! int MPIABI_Win_allocate_c(MPIABI_Aint size, MPIABI_Aint disp_unit, +! MPIABI_Info info, MPIABI_Comm comm, void *baseptr, +! MPIABI_Win *win); +! int MPIABI_Win_allocate_shared(MPIABI_Aint size, int disp_unit, +! MPIABI_Info info, MPIABI_Comm comm, +! void *baseptr, MPIABI_Win *win); +! int MPIABI_Win_allocate_shared_c(MPIABI_Aint size, MPIABI_Aint disp_unit, +! MPIABI_Info info, MPIABI_Comm comm, +! void *baseptr, MPIABI_Win *win); +! int MPIABI_Win_attach(MPIABI_Win win, void *base, MPIABI_Aint size); +! int MPIABI_Win_complete(MPIABI_Win win); +! int MPIABI_Win_create(void *base, MPIABI_Aint size, int disp_unit, +! MPIABI_Info info, MPIABI_Comm comm, MPIABI_Win *win); +! int MPIABI_Win_create_c(void *base, MPIABI_Aint size, MPIABI_Aint disp_unit, +! MPIABI_Info info, MPIABI_Comm comm, MPIABI_Win *win); +! int MPIABI_Win_create_dynamic(MPIABI_Info info, MPIABI_Comm comm, +! MPIABI_Win *win); +! int MPIABI_Win_detach(MPIABI_Win win, const void *base); +! int MPIABI_Win_fence(int assert, MPIABI_Win win); +! int MPIABI_Win_flush(int rank, MPIABI_Win win); +! int MPIABI_Win_flush_all(MPIABI_Win win); +! int MPIABI_Win_flush_local(int rank, MPIABI_Win win); +! int MPIABI_Win_flush_local_all(MPIABI_Win win); +! int MPIABI_Win_free(MPIABI_Win *win); +! int MPIABI_Win_get_group(MPIABI_Win win, MPIABI_Group *group); +! int MPIABI_Win_get_info(MPIABI_Win win, MPIABI_Info *info_used); +! int MPIABI_Win_lock(int lock_type, int rank, int assert, MPIABI_Win win); +! int MPIABI_Win_lock_all(int assert, MPIABI_Win win); +! int MPIABI_Win_post(MPIABI_Group group, int assert, MPIABI_Win win); +! int MPIABI_Win_set_info(MPIABI_Win win, MPIABI_Info info); +! int MPIABI_Win_shared_query(MPIABI_Win win, int rank, MPIABI_Aint *size, +! int *disp_unit, void *baseptr); +! int MPIABI_Win_shared_query_c(MPIABI_Win win, int rank, MPIABI_Aint *size, +! MPIABI_Aint *disp_unit, void *baseptr); +! int MPIABI_Win_start(MPIABI_Group group, int assert, MPIABI_Win win); +! int MPIABI_Win_sync(MPIABI_Win win); +! int MPIABI_Win_test(MPIABI_Win win, int *flag); +! int MPIABI_Win_unlock(int rank, MPIABI_Win win); +! int MPIABI_Win_unlock_all(MPIABI_Win win); +! int MPIABI_Win_wait(MPIABI_Win win); +! +! // A.3.11 External Interfaces C Bindings +! +! int MPIABI_Grequest_complete(MPIABI_Request request); +! int MPIABI_Grequest_start(MPIABI_Grequest_query_function *query_fn, +! MPIABI_Grequest_free_function *free_fn, +! MPIABI_Grequest_cancel_function *cancel_fn, +! void *extra_state, MPIABI_Request *request); +! int MPIABI_Status_set_cancelled(MPIABI_Status *status, int flag); +! int MPIABI_Status_set_elements(MPIABI_Status *status, MPIABI_Datatype datatype, +! int count); +! int MPIABI_Status_set_elements_c(MPIABI_Status *status, +! MPIABI_Datatype datatype, MPIABI_Count count); +! int MPIABI_Status_set_error(MPIABI_Status *status, int err); +! int MPIABI_Status_set_source(MPIABI_Status *status, int source); +! int MPIABI_Status_set_tag(MPIABI_Status *status, int tag); +! +! // A.3.12 I/O C Bindings +! +! int MPIABI_File_close(MPIABI_File *fh); +! int MPIABI_File_delete(const char *filename, MPIABI_Info info); +! int MPIABI_File_get_amode(MPIABI_File fh, int *amode); +! int MPIABI_File_get_atomicity(MPIABI_File fh, int *flag); +! int MPIABI_File_get_byte_offset(MPIABI_File fh, MPIABI_Offset offset, +! MPIABI_Offset *disp); +! int MPIABI_File_get_group(MPIABI_File fh, MPIABI_Group *group); +! int MPIABI_File_get_info(MPIABI_File fh, MPIABI_Info *info_used); +! int MPIABI_File_get_position(MPIABI_File fh, MPIABI_Offset *offset); +! int MPIABI_File_get_position_shared(MPIABI_File fh, MPIABI_Offset *offset); +! int MPIABI_File_get_size(MPIABI_File fh, MPIABI_Offset *size); +! int MPIABI_File_get_type_extent(MPIABI_File fh, MPIABI_Datatype datatype, +! MPIABI_Aint *extent); +! int MPIABI_File_get_type_extent_c(MPIABI_File fh, MPIABI_Datatype datatype, +! MPIABI_Count *extent); +! int MPIABI_File_get_view(MPIABI_File fh, MPIABI_Offset *disp, +! MPIABI_Datatype *etype, MPIABI_Datatype *filetype, +! char *datarep); +! int MPIABI_File_iread(MPIABI_File fh, void *buf, int count, +! MPIABI_Datatype datatype, MPIABI_Request *request); +! int MPIABI_File_iread_all(MPIABI_File fh, void *buf, int count, +! MPIABI_Datatype datatype, MPIABI_Request *request); +! int MPIABI_File_iread_all_c(MPIABI_File fh, void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Request *request); +! int MPIABI_File_iread_at(MPIABI_File fh, MPIABI_Offset offset, void *buf, +! int count, MPIABI_Datatype datatype, +! MPIABI_Request *request); +! int MPIABI_File_iread_at_all(MPIABI_File fh, MPIABI_Offset offset, void *buf, +! int count, MPIABI_Datatype datatype, +! MPIABI_Request *request); +! int MPIABI_File_iread_at_all_c(MPIABI_File fh, MPIABI_Offset offset, void *buf, +! MPIABI_Count count, MPIABI_Datatype datatype, +! MPIABI_Request *request); +! int MPIABI_File_iread_at_c(MPIABI_File fh, MPIABI_Offset offset, void *buf, +! MPIABI_Count count, MPIABI_Datatype datatype, +! MPIABI_Request *request); +! int MPIABI_File_iread_c(MPIABI_File fh, void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Request *request); +! int MPIABI_File_iread_shared(MPIABI_File fh, void *buf, int count, +! MPIABI_Datatype datatype, MPIABI_Request *request); +! int MPIABI_File_iread_shared_c(MPIABI_File fh, void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, +! MPIABI_Request *request); +! int MPIABI_File_iwrite(MPIABI_File fh, const void *buf, int count, +! MPIABI_Datatype datatype, MPIABI_Request *request); +! int MPIABI_File_iwrite_all(MPIABI_File fh, const void *buf, int count, +! MPIABI_Datatype datatype, MPIABI_Request *request); +! int MPIABI_File_iwrite_all_c(MPIABI_File fh, const void *buf, +! MPIABI_Count count, MPIABI_Datatype datatype, +! MPIABI_Request *request); +! int MPIABI_File_iwrite_at(MPIABI_File fh, MPIABI_Offset offset, const void *buf, +! int count, MPIABI_Datatype datatype, +! MPIABI_Request *request); +! int MPIABI_File_iwrite_at_all(MPIABI_File fh, MPIABI_Offset offset, +! const void *buf, int count, +! MPIABI_Datatype datatype, +! MPIABI_Request *request); +! int MPIABI_File_iwrite_at_all_c(MPIABI_File fh, MPIABI_Offset offset, +! const void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, +! MPIABI_Request *request); +! int MPIABI_File_iwrite_at_c(MPIABI_File fh, MPIABI_Offset offset, +! const void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Request *request); +! int MPIABI_File_iwrite_c(MPIABI_File fh, const void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Request *request); +! int MPIABI_File_iwrite_shared(MPIABI_File fh, const void *buf, int count, +! MPIABI_Datatype datatype, +! MPIABI_Request *request); +! int MPIABI_File_iwrite_shared_c(MPIABI_File fh, const void *buf, +! MPIABI_Count count, MPIABI_Datatype datatype, +! MPIABI_Request *request); +! int MPIABI_File_open(MPIABI_Comm comm, const char *filename, int amode, +! MPIABI_Info info, MPIABI_File *fh); +! int MPIABI_File_preallocate(MPIABI_File fh, MPIABI_Offset size); +! int MPIABI_File_read(MPIABI_File fh, void *buf, int count, +! MPIABI_Datatype datatype, MPIABI_Status *status); +! int MPIABI_File_read_all(MPIABI_File fh, void *buf, int count, +! MPIABI_Datatype datatype, MPIABI_Status *status); +! int MPIABI_File_read_all_begin(MPIABI_File fh, void *buf, int count, +! MPIABI_Datatype datatype); +! int MPIABI_File_read_all_begin_c(MPIABI_File fh, void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype); +! int MPIABI_File_read_all_c(MPIABI_File fh, void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Status *status); +! int MPIABI_File_read_all_end(MPIABI_File fh, void *buf, MPIABI_Status *status); +! int MPIABI_File_read_at(MPIABI_File fh, MPIABI_Offset offset, void *buf, +! int count, MPIABI_Datatype datatype, +! MPIABI_Status *status); +! int MPIABI_File_read_at_all(MPIABI_File fh, MPIABI_Offset offset, void *buf, +! int count, MPIABI_Datatype datatype, +! MPIABI_Status *status); +! int MPIABI_File_read_at_all_begin(MPIABI_File fh, MPIABI_Offset offset, +! void *buf, int count, +! MPIABI_Datatype datatype); +! int MPIABI_File_read_at_all_begin_c(MPIABI_File fh, MPIABI_Offset offset, +! void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype); +! int MPIABI_File_read_at_all_c(MPIABI_File fh, MPIABI_Offset offset, void *buf, +! MPIABI_Count count, MPIABI_Datatype datatype, +! MPIABI_Status *status); +! int MPIABI_File_read_at_all_end(MPIABI_File fh, void *buf, +! MPIABI_Status *status); +! int MPIABI_File_read_at_c(MPIABI_File fh, MPIABI_Offset offset, void *buf, +! MPIABI_Count count, MPIABI_Datatype datatype, +! MPIABI_Status *status); +! int MPIABI_File_read_c(MPIABI_File fh, void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Status *status); +! int MPIABI_File_read_ordered(MPIABI_File fh, void *buf, int count, +! MPIABI_Datatype datatype, MPIABI_Status *status); +! int MPIABI_File_read_ordered_begin(MPIABI_File fh, void *buf, int count, +! MPIABI_Datatype datatype); +! int MPIABI_File_read_ordered_begin_c(MPIABI_File fh, void *buf, +! MPIABI_Count count, +! MPIABI_Datatype datatype); +! int MPIABI_File_read_ordered_c(MPIABI_File fh, void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Status *status); +! int MPIABI_File_read_ordered_end(MPIABI_File fh, void *buf, +! MPIABI_Status *status); +! int MPIABI_File_read_shared(MPIABI_File fh, void *buf, int count, +! MPIABI_Datatype datatype, MPIABI_Status *status); +! int MPIABI_File_read_shared_c(MPIABI_File fh, void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Status *status); +! int MPIABI_File_seek(MPIABI_File fh, MPIABI_Offset offset, int whence); +! int MPIABI_File_seek_shared(MPIABI_File fh, MPIABI_Offset offset, int whence); +! int MPIABI_File_set_atomicity(MPIABI_File fh, int flag); +! int MPIABI_File_set_info(MPIABI_File fh, MPIABI_Info info); +! int MPIABI_File_set_size(MPIABI_File fh, MPIABI_Offset size); +! int MPIABI_File_set_view(MPIABI_File fh, MPIABI_Offset disp, +! MPIABI_Datatype etype, MPIABI_Datatype filetype, +! const char *datarep, MPIABI_Info info); +! int MPIABI_File_sync(MPIABI_File fh); +! int MPIABI_File_write(MPIABI_File fh, const void *buf, int count, +! MPIABI_Datatype datatype, MPIABI_Status *status); +! int MPIABI_File_write_all(MPIABI_File fh, const void *buf, int count, +! MPIABI_Datatype datatype, MPIABI_Status *status); +! int MPIABI_File_write_all_begin(MPIABI_File fh, const void *buf, int count, +! MPIABI_Datatype datatype); +! int MPIABI_File_write_all_begin_c(MPIABI_File fh, const void *buf, +! MPIABI_Count count, MPIABI_Datatype datatype); +! int MPIABI_File_write_all_c(MPIABI_File fh, const void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Status *status); +! int MPIABI_File_write_all_end(MPIABI_File fh, const void *buf, +! MPIABI_Status *status); +! int MPIABI_File_write_at(MPIABI_File fh, MPIABI_Offset offset, const void *buf, +! int count, MPIABI_Datatype datatype, +! MPIABI_Status *status); +! int MPIABI_File_write_at_all(MPIABI_File fh, MPIABI_Offset offset, +! const void *buf, int count, +! MPIABI_Datatype datatype, MPIABI_Status *status); +! int MPIABI_File_write_at_all_begin(MPIABI_File fh, MPIABI_Offset offset, +! const void *buf, int count, +! MPIABI_Datatype datatype); +! int MPIABI_File_write_at_all_begin_c(MPIABI_File fh, MPIABI_Offset offset, +! const void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype); +! int MPIABI_File_write_at_all_c(MPIABI_File fh, MPIABI_Offset offset, +! const void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Status *status); +! int MPIABI_File_write_at_all_end(MPIABI_File fh, const void *buf, +! MPIABI_Status *status); +! int MPIABI_File_write_at_c(MPIABI_File fh, MPIABI_Offset offset, +! const void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Status *status); +! int MPIABI_File_write_c(MPIABI_File fh, const void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Status *status); +! int MPIABI_File_write_ordered(MPIABI_File fh, const void *buf, int count, +! MPIABI_Datatype datatype, MPIABI_Status *status); +! int MPIABI_File_write_ordered_begin(MPIABI_File fh, const void *buf, int count, +! MPIABI_Datatype datatype); +! int MPIABI_File_write_ordered_begin_c(MPIABI_File fh, const void *buf, +! MPIABI_Count count, +! MPIABI_Datatype datatype); +! int MPIABI_File_write_ordered_c(MPIABI_File fh, const void *buf, +! MPIABI_Count count, MPIABI_Datatype datatype, +! MPIABI_Status *status); +! int MPIABI_File_write_ordered_end(MPIABI_File fh, const void *buf, +! MPIABI_Status *status); +! int MPIABI_File_write_shared(MPIABI_File fh, const void *buf, int count, +! MPIABI_Datatype datatype, MPIABI_Status *status); +! int MPIABI_File_write_shared_c(MPIABI_File fh, const void *buf, +! MPIABI_Count count, MPIABI_Datatype datatype, +! MPIABI_Status *status); +! int MPIABI_Register_datarep( +! const char *datarep, MPIABI_Datarep_conversion_function *read_conversion_fn, +! MPIABI_Datarep_conversion_function *write_conversion_fn, +! MPIABI_Datarep_extent_function *dtype_file_extent_fn, void *extra_state); +! int MPIABI_Register_datarep_c( +! const char *datarep, +! MPIABI_Datarep_conversion_function_c *read_conversion_fn, +! MPIABI_Datarep_conversion_function_c *write_conversion_fn, +! MPIABI_Datarep_extent_function *dtype_file_extent_fn, void *extra_state); +! +! // A.3.13 Language Bindings C Bindings +! +! MPIABI_Fint MPIABI_Comm_c2f(MPIABI_Comm comm); +! MPIABI_Comm MPIABI_Comm_f2c(MPIABI_Fint comm); +! MPIABI_Fint MPIABI_Errhandler_c2f(MPIABI_Errhandler errhandler); +! MPIABI_Errhandler MPIABI_Errhandler_f2c(MPIABI_Fint errhandler); +! MPIABI_Fint MPIABI_File_c2f(MPIABI_File file); +! MPIABI_File MPIABI_File_f2c(MPIABI_Fint file); +! MPIABI_Fint MPIABI_Group_c2f(MPIABI_Group group); +! MPIABI_Group MPIABI_Group_f2c(MPIABI_Fint group); +! MPIABI_Fint MPIABI_Info_c2f(MPIABI_Info info); +! MPIABI_Info MPIABI_Info_f2c(MPIABI_Fint info); +! MPIABI_Fint MPIABI_Message_c2f(MPIABI_Message message); +! MPIABI_Message MPIABI_Message_f2c(MPIABI_Fint message); +! MPIABI_Fint MPIABI_Op_c2f(MPIABI_Op op); +! MPIABI_Op MPIABI_Op_f2c(MPIABI_Fint op); +! MPIABI_Fint MPIABI_Request_c2f(MPIABI_Request request); +! MPIABI_Request MPIABI_Request_f2c(MPIABI_Fint request); +! MPIABI_Fint MPIABI_Session_c2f(MPIABI_Session session); +! MPIABI_Session MPIABI_Session_f2c(MPIABI_Fint session); +! int MPIABI_Status_f082f(const MPIABI_F08_status *f08_status, +! MPIABI_Fint *f_status); +! int MPIABI_Status_c2f(const MPIABI_Status *c_status, MPIABI_Fint *f_status); +! int MPIABI_Status_c2f08(const MPIABI_Status *c_status, +! MPIABI_F08_status *f08_status); +! int MPIABI_Status_f082c(const MPIABI_F08_status *f08_status, +! MPIABI_Status *c_status); +! int MPIABI_Status_f2c(const MPIABI_Fint *f_status, MPIABI_Status *c_status); +! int MPIABI_Status_f2f08(const MPIABI_Fint *f_status, +! MPIABI_F08_status *f08_status); +! MPIABI_Fint MPIABI_Type_c2f(MPIABI_Datatype datatype); +! int MPIABI_Type_create_f90_complex(int p, int r, MPIABI_Datatype *newtype); +! int MPIABI_Type_create_f90_integer(int r, MPIABI_Datatype *newtype); +! int MPIABI_Type_create_f90_real(int p, int r, MPIABI_Datatype *newtype); +! MPIABI_Datatype MPIABI_Type_f2c(MPIABI_Fint datatype); +! int MPIABI_Type_match_size(int typeclass, int size, MPIABI_Datatype *datatype); +! MPIABI_Fint MPIABI_Win_c2f(MPIABI_Win win); +! MPIABI_Win MPIABI_Win_f2c(MPIABI_Fint win); +! +! // A.3.14 Tools / Profiling Interface C Bindings +! +! int MPIABI_Pcontrol(const int level, ...); +! +! // A.3.15 Tools / MPI Tool Information Interface C Bindings +! +! int MPIABI_T_category_changed(int *update_number); +! int MPIABI_T_category_get_categories(int cat_index, int len, int indices[]); +! int MPIABI_T_category_get_cvars(int cat_index, int len, int indices[]); +! int MPIABI_T_category_get_events(int cat_index, int len, int indices[]); +! int MPIABI_T_category_get_index(const char *name, int *cat_index); +! int MPIABI_T_category_get_info(int cat_index, char *name, int *name_len, +! char *desc, int *desc_len, int *num_cvars, +! int *num_pvars, int *num_categories); +! int MPIABI_T_category_get_num(int *num_cat); +! int MPIABI_T_category_get_num_events(int cat_index, int *num_events); +! int MPIABI_T_category_get_pvars(int cat_index, int len, int indices[]); +! int MPIABI_T_cvar_get_index(const char *name, int *cvar_index); +! int MPIABI_T_cvar_get_info(int cvar_index, char *name, int *name_len, +! int *verbosity, MPIABI_Datatype *datatype, +! MPIABI_T_enum *enumtype, char *desc, int *desc_len, +! int *bind, int *scope); +! int MPIABI_T_cvar_get_num(int *num_cvar); +! int MPIABI_T_cvar_handle_alloc(int cvar_index, void *obj_handle, +! MPIABI_T_cvar_handle *handle, int *count); +! int MPIABI_T_cvar_handle_free(MPIABI_T_cvar_handle *handle); +! int MPIABI_T_cvar_read(MPIABI_T_cvar_handle handle, void *buf); +! int MPIABI_T_cvar_write(MPIABI_T_cvar_handle handle, const void *buf); +! int MPIABI_T_enum_get_info(MPIABI_T_enum enumtype, int *num, char *name, +! int *name_len); +! int MPIABI_T_enum_get_item(MPIABI_T_enum enumtype, int index, int *value, +! char *name, int *name_len); +! int MPIABI_T_event_callback_get_info( +! MPIABI_T_event_registration event_registration, +! MPIABI_T_cb_safety cb_safety, MPIABI_Info *info_used); +! int MPIABI_T_event_callback_set_info( +! MPIABI_T_event_registration event_registration, +! MPIABI_T_cb_safety cb_safety, MPIABI_Info info); +! int MPIABI_T_event_copy(MPIABI_T_event_instance event_instance, void *buffer); +! int MPIABI_T_event_get_index(const char *name, int *event_index); +! int MPIABI_T_event_get_info(int event_index, char *name, int *name_len, +! int *verbosity, +! MPIABI_Datatype array_of_datatypes[], +! MPIABI_Aint array_of_displacements[], +! int *num_elements, MPIABI_T_enum *enumtype, +! MPIABI_Info *info, char *desc, int *desc_len, +! int *bind); +! int MPIABI_T_event_get_num(int *num_events); +! int MPIABI_T_event_get_source(MPIABI_T_event_instance event_instance, +! int *source_index); +! int MPIABI_T_event_get_timestamp(MPIABI_T_event_instance event_instance, +! MPIABI_Count *event_timestamp); +! int MPIABI_T_event_handle_alloc( +! int event_index, void *obj_handle, MPIABI_Info info, +! MPIABI_T_event_registration *event_registration); +! int MPIABI_T_event_handle_free( +! MPIABI_T_event_registration event_registration, void *user_data, +! MPIABI_T_event_free_cb_function free_cb_function); +! int MPIABI_T_event_handle_get_info( +! MPIABI_T_event_registration event_registration, MPIABI_Info *info_used); +! int MPIABI_T_event_handle_set_info( +! MPIABI_T_event_registration event_registration, MPIABI_Info info); +! int MPIABI_T_event_read(MPIABI_T_event_instance event_instance, +! int element_index, void *buffer); +! int MPIABI_T_event_register_callback( +! MPIABI_T_event_registration event_registration, +! MPIABI_T_cb_safety cb_safety, MPIABI_Info info, void *user_data, +! MPIABI_T_event_cb_function event_cb_function); +! int MPIABI_T_event_set_dropped_handler( +! MPIABI_T_event_registration event_registration, +! MPIABI_T_event_dropped_cb_function dropped_cb_function); +! int MPIABI_T_finalize(void); +! int MPIABI_T_init_thread(int required, int *provided); +! int MPIABI_T_pvar_get_index(const char *name, int var_class, int *pvar_index); +! int MPIABI_T_pvar_get_info(int pvar_index, char *name, int *name_len, +! int *verbosity, int *var_class, +! MPIABI_Datatype *datatype, MPIABI_T_enum *enumtype, +! char *desc, int *desc_len, int *bind, int *readonly, +! int *continuous, int *atomic); +! int MPIABI_T_pvar_get_num(int *num_pvar); +! int MPIABI_T_pvar_handle_alloc(MPIABI_T_pvar_session pe_session, int pvar_index, +! void *obj_handle, MPIABI_T_pvar_handle *handle, +! int *count); +! int MPIABI_T_pvar_handle_free(MPIABI_T_pvar_session pe_session, +! MPIABI_T_pvar_handle *handle); +! int MPIABI_T_pvar_read(MPIABI_T_pvar_session pe_session, +! MPIABI_T_pvar_handle handle, void *buf); +! int MPIABI_T_pvar_readreset(MPIABI_T_pvar_session pe_session, +! MPIABI_T_pvar_handle handle, void *buf); +! int MPIABI_T_pvar_reset(MPIABI_T_pvar_session pe_session, +! MPIABI_T_pvar_handle handle); +! int MPIABI_T_pvar_session_create(MPIABI_T_pvar_session *pe_session); +! int MPIABI_T_pvar_session_free(MPIABI_T_pvar_session *pe_session); +! int MPIABI_T_pvar_start(MPIABI_T_pvar_session pe_session, +! MPIABI_T_pvar_handle handle); +! int MPIABI_T_pvar_stop(MPIABI_T_pvar_session pe_session, +! MPIABI_T_pvar_handle handle); +! int MPIABI_T_pvar_write(MPIABI_T_pvar_session pe_session, +! MPIABI_T_pvar_handle handle, const void *buf); +! int MPIABI_T_source_get_info(int source_index, char *name, int *name_len, +! char *desc, int *desc_len, +! MPIABI_T_source_order *ordering, +! MPIABI_Count *ticks_per_second, +! MPIABI_Count *max_ticks, MPIABI_Info *info); +! int MPIABI_T_source_get_num(int *num_sources); +! int MPIABI_T_source_get_timestamp(int source_index, MPIABI_Count *timestamp); +! +! // A.3.16 Deprecated C Bindings +! +! int MPIABI_Attr_delete(MPIABI_Comm comm, int keyval); +! int MPIABI_Attr_get(MPIABI_Comm comm, int keyval, void *attribute_val, +! int *flag); +! int MPIABI_Attr_put(MPIABI_Comm comm, int keyval, void *attribute_val); +! int MPIABI_Get_elements_x(const MPIABI_Status *status, MPIABI_Datatype datatype, +! MPIABI_Count *count); +! int MPIABI_Info_get(MPIABI_Info info, const char *key, int valuelen, +! char *value, int *flag); +! int MPIABI_Info_get_valuelen(MPIABI_Info info, const char *key, int *valuelen, +! int *flag); +! int MPIABI_Keyval_create(MPIABI_Copy_function *copy_fn, +! MPIABI_Delete_function *delete_fn, int *keyval, +! void *extra_state); +! int MPIABI_Keyval_free(int *keyval); +! int MPIABI_Status_set_elements_x(MPIABI_Status *status, +! MPIABI_Datatype datatype, MPIABI_Count count); +! int MPIABI_Type_get_extent_x(MPIABI_Datatype datatype, MPIABI_Count *lb, +! MPIABI_Count *extent); +! int MPIABI_Type_get_true_extent_x(MPIABI_Datatype datatype, +! MPIABI_Count *true_lb, +! MPIABI_Count *true_extent); +! int MPIABI_Type_size_x(MPIABI_Datatype datatype, MPIABI_Count *size); +! +! // MPIX +! +! int MPIXABI_Query_cuda_support(void); +! +! int MPIXABI_Query_hip_support(void); +! +! int MPIXABI_Query_rocm_support(void); +! +! int MPIXABI_Query_ze_support(void); diff --git a/mpiabi/mpiabi_f08_types.f90 b/mpiabi/mpiabi_f08_types.f90 new file mode 100644 index 00000000..98a3c1cd --- /dev/null +++ b/mpiabi/mpiabi_f08_types.f90 @@ -0,0 +1,14 @@ +module mpiabi_f08_types + implicit none + public + save + + type MPIABI_Datatype + integer datatype + end type MPIABI_Datatype + + type MPIABI_Comm + integer comm + end type MPIABI_Comm + +end module mpiabi_f08_types diff --git a/mpiabi/mpiabi_functions.h b/mpiabi/mpiabi_functions.h new file mode 100644 index 00000000..9c82fbc3 --- /dev/null +++ b/mpiabi/mpiabi_functions.h @@ -0,0 +1,1747 @@ +#ifndef MPIABI_FUNCTIONS_H +#define MPIABI_FUNCTIONS_H + +#include "mpiabi_types.h" + +// Declare MPIABI functions + +#ifdef __cplusplus +extern "C" { +#endif + +// A.3 C Bindings + +// A.3.1 Point-to-Point Communication C Bindings + +int MPIABI_Bsend(const void *buf, int count, MPIABI_Datatype datatype, int dest, + int tag, MPIABI_Comm comm); +int MPIABI_Bsend_c(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm); +int MPIABI_Bsend_init(const void *buf, int count, MPIABI_Datatype datatype, + int dest, int tag, MPIABI_Comm comm, + MPIABI_Request *request); +int MPIABI_Bsend_init_c(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Buffer_attach(void *buffer, int size); +int MPIABI_Buffer_attach_c(void *buffer, MPIABI_Count size); +int MPIABI_Buffer_detach(void *buffer_addr, int *size); +int MPIABI_Buffer_detach_c(void *buffer_addr, MPIABI_Count *size); +int MPIABI_Buffer_flush(void); +int MPIABI_Buffer_iflush(MPIABI_Request *request); +int MPIABI_Cancel(MPIABI_Request *request); +int MPIABI_Comm_attach_buffer(MPIABI_Comm comm, void *buffer, int size); +int MPIABI_Comm_attach_buffer_c(MPIABI_Comm comm, void *buffer, + MPIABI_Count size); +int MPIABI_Comm_detach_buffer(MPIABI_Comm comm, void *buffer_addr, int *size); +int MPIABI_Comm_detach_buffer_c(MPIABI_Comm comm, void *buffer_addr, + MPIABI_Count *size); +int MPIABI_Comm_flush_buffer(MPIABI_Comm comm); +int MPIABI_Comm_iflush_buffer(MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Get_count(const MPIABI_Status *status, MPIABI_Datatype datatype, + int *count); +int MPIABI_Get_count_c(const MPIABI_Status *status, MPIABI_Datatype datatype, + MPIABI_Count *count); +int MPIABI_Ibsend(const void *buf, int count, MPIABI_Datatype datatype, + int dest, int tag, MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Ibsend_c(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Improbe(int source, int tag, MPIABI_Comm comm, int *flag, + MPIABI_Message *message, MPIABI_Status *status); +int MPIABI_Imrecv(void *buf, int count, MPIABI_Datatype datatype, + MPIABI_Message *message, MPIABI_Request *request); +int MPIABI_Imrecv_c(void *buf, MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Message *message, MPIABI_Request *request); +int MPIABI_Iprobe(int source, int tag, MPIABI_Comm comm, int *flag, + MPIABI_Status *status); +int MPIABI_Irecv(void *buf, int count, MPIABI_Datatype datatype, int source, + int tag, MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Irecv_c(void *buf, MPIABI_Count count, MPIABI_Datatype datatype, + int source, int tag, MPIABI_Comm comm, + MPIABI_Request *request); +int MPIABI_Irsend(const void *buf, int count, MPIABI_Datatype datatype, + int dest, int tag, MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Irsend_c(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Isend(const void *buf, int count, MPIABI_Datatype datatype, int dest, + int tag, MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Isend_c(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Isendrecv(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, int dest, int sendtag, + void *recvbuf, int recvcount, MPIABI_Datatype recvtype, + int source, int recvtag, MPIABI_Comm comm, + MPIABI_Request *request); +int MPIABI_Isendrecv_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, int dest, int sendtag, + void *recvbuf, MPIABI_Count recvcount, + MPIABI_Datatype recvtype, int source, int recvtag, + MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Isendrecv_replace(void *buf, int count, MPIABI_Datatype datatype, + int dest, int sendtag, int source, int recvtag, + MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Isendrecv_replace_c(void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int sendtag, + int source, int recvtag, MPIABI_Comm comm, + MPIABI_Request *request); +int MPIABI_Issend(const void *buf, int count, MPIABI_Datatype datatype, + int dest, int tag, MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Issend_c(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Mprobe(int source, int tag, MPIABI_Comm comm, + MPIABI_Message *message, MPIABI_Status *status); +int MPIABI_Mrecv(void *buf, int count, MPIABI_Datatype datatype, + MPIABI_Message *message, MPIABI_Status *status); +int MPIABI_Mrecv_c(void *buf, MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Message *message, MPIABI_Status *status); +int MPIABI_Probe(int source, int tag, MPIABI_Comm comm, MPIABI_Status *status); +int MPIABI_Recv(void *buf, int count, MPIABI_Datatype datatype, int source, + int tag, MPIABI_Comm comm, MPIABI_Status *status); +int MPIABI_Recv_c(void *buf, MPIABI_Count count, MPIABI_Datatype datatype, + int source, int tag, MPIABI_Comm comm, MPIABI_Status *status); +int MPIABI_Recv_init(void *buf, int count, MPIABI_Datatype datatype, int source, + int tag, MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Recv_init_c(void *buf, MPIABI_Count count, MPIABI_Datatype datatype, + int source, int tag, MPIABI_Comm comm, + MPIABI_Request *request); +int MPIABI_Request_free(MPIABI_Request *request); +int MPIABI_Request_get_status(MPIABI_Request request, int *flag, + MPIABI_Status *status); +int MPIABI_Request_get_status_all(int count, + const MPIABI_Request array_of_requests[], + int *flag, MPIABI_Status array_of_statuses[]); +int MPIABI_Request_get_status_any(int count, + const MPIABI_Request array_of_requests[], + int *index, int *flag, MPIABI_Status *status); +int MPIABI_Request_get_status_some(int incount, + const MPIABI_Request array_of_requests[], + int *outcount, int array_of_indices[], + MPIABI_Status array_of_statuses[]); +int MPIABI_Rsend(const void *buf, int count, MPIABI_Datatype datatype, int dest, + int tag, MPIABI_Comm comm); +int MPIABI_Rsend_c(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm); +int MPIABI_Rsend_init(const void *buf, int count, MPIABI_Datatype datatype, + int dest, int tag, MPIABI_Comm comm, + MPIABI_Request *request); +int MPIABI_Rsend_init_c(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Send(const void *buf, int count, MPIABI_Datatype datatype, int dest, + int tag, MPIABI_Comm comm); +int MPIABI_Send_c(const void *buf, MPIABI_Count count, MPIABI_Datatype datatype, + int dest, int tag, MPIABI_Comm comm); +int MPIABI_Send_init(const void *buf, int count, MPIABI_Datatype datatype, + int dest, int tag, MPIABI_Comm comm, + MPIABI_Request *request); +int MPIABI_Send_init_c(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Sendrecv(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, int dest, int sendtag, + void *recvbuf, int recvcount, MPIABI_Datatype recvtype, + int source, int recvtag, MPIABI_Comm comm, + MPIABI_Status *status); +int MPIABI_Sendrecv_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, int dest, int sendtag, + void *recvbuf, MPIABI_Count recvcount, + MPIABI_Datatype recvtype, int source, int recvtag, + MPIABI_Comm comm, MPIABI_Status *status); +int MPIABI_Sendrecv_replace(void *buf, int count, MPIABI_Datatype datatype, + int dest, int sendtag, int source, int recvtag, + MPIABI_Comm comm, MPIABI_Status *status); +int MPIABI_Sendrecv_replace_c(void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int sendtag, + int source, int recvtag, MPIABI_Comm comm, + MPIABI_Status *status); +int MPIABI_Session_attach_buffer(MPIABI_Session session, void *buffer, + int size); +int MPIABI_Session_attach_buffer_c(MPIABI_Session session, void *buffer, + MPIABI_Count size); +int MPIABI_Session_detach_buffer(MPIABI_Session session, void *buffer_addr, + int *size); +int MPIABI_Session_detach_buffer_c(MPIABI_Session session, void *buffer_addr, + MPIABI_Count *size); +int MPIABI_Session_flush_buffer(MPIABI_Session session); +int MPIABI_Session_iflush_buffer(MPIABI_Session session, + MPIABI_Request *request); +int MPIABI_Ssend(const void *buf, int count, MPIABI_Datatype datatype, int dest, + int tag, MPIABI_Comm comm); +int MPIABI_Ssend_c(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm); +int MPIABI_Ssend_init(const void *buf, int count, MPIABI_Datatype datatype, + int dest, int tag, MPIABI_Comm comm, + MPIABI_Request *request); +int MPIABI_Ssend_init_c(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Start(MPIABI_Request *request); +int MPIABI_Startall(int count, MPIABI_Request array_of_requests[]); +int MPIABI_Status_get_error(MPIABI_Status *status, int *err); +int MPIABI_Status_get_source(MPIABI_Status *status, int *source); +int MPIABI_Status_get_tag(MPIABI_Status *status, int *tag); +int MPIABI_Test(MPIABI_Request *request, int *flag, MPIABI_Status *status); +int MPIABI_Test_cancelled(const MPIABI_Status *status, int *flag); +int MPIABI_Testall(int count, MPIABI_Request array_of_requests[], int *flag, + MPIABI_Status array_of_statuses[]); +int MPIABI_Testany(int count, MPIABI_Request array_of_requests[], int *index, + int *flag, MPIABI_Status *status); +int MPIABI_Testsome(int incount, MPIABI_Request array_of_requests[], + int *outcount, int array_of_indices[], + MPIABI_Status array_of_statuses[]); +int MPIABI_Wait(MPIABI_Request *request, MPIABI_Status *status); +int MPIABI_Waitall(int count, MPIABI_Request array_of_requests[], + MPIABI_Status array_of_statuses[]); +int MPIABI_Waitany(int count, MPIABI_Request array_of_requests[], int *index, + MPIABI_Status *status); +int MPIABI_Waitsome(int incount, MPIABI_Request array_of_requests[], + int *outcount, int array_of_indices[], + MPIABI_Status array_of_statuses[]); + +// A.3.2 Partitioned Communication C Bindings + +int MPIABI_Parrived(MPIABI_Request request, int partition, int *flag); +int MPIABI_Pready(int partition, MPIABI_Request request); +int MPIABI_Pready_list(int length, const int array_of_partitions[], + MPIABI_Request request); +int MPIABI_Pready_range(int partition_low, int partition_high, + MPIABI_Request request); +int MPIABI_Precv_init(void *buf, int partitions, MPIABI_Count count, + MPIABI_Datatype datatype, int source, int tag, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int MPIABI_Psend_init(const void *buf, int partitions, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); + +// A.3.3 Datatypes C Bindings + +MPIABI_Aint MPIABI_Aint_add(MPIABI_Aint base, MPIABI_Aint disp); +MPIABI_Aint MPIABI_Aint_diff(MPIABI_Aint addr1, MPIABI_Aint addr2); +int MPIABI_Get_address(const void *location, MPIABI_Aint *address); +int MPIABI_Get_elements(const MPIABI_Status *status, MPIABI_Datatype datatype, + int *count); +int MPIABI_Get_elements_c(const MPIABI_Status *status, MPIABI_Datatype datatype, + MPIABI_Count *count); +int MPIABI_Pack(const void *inbuf, int incount, MPIABI_Datatype datatype, + void *outbuf, int outsize, int *position, MPIABI_Comm comm); +int MPIABI_Pack_c(const void *inbuf, MPIABI_Count incount, + MPIABI_Datatype datatype, void *outbuf, MPIABI_Count outsize, + MPIABI_Count *position, MPIABI_Comm comm); +int MPIABI_Pack_external(const char datarep[], const void *inbuf, int incount, + MPIABI_Datatype datatype, void *outbuf, + MPIABI_Aint outsize, MPIABI_Aint *position); +int MPIABI_Pack_external_c(const char datarep[], const void *inbuf, + MPIABI_Count incount, MPIABI_Datatype datatype, + void *outbuf, MPIABI_Count outsize, + MPIABI_Count *position); +int MPIABI_Pack_external_size(const char datarep[], MPIABI_Count incount, + MPIABI_Datatype datatype, MPIABI_Aint *size); +int MPIABI_Pack_external_size_c(const char datarep[], MPIABI_Count incount, + MPIABI_Datatype datatype, MPIABI_Count *size); +int MPIABI_Pack_size(int incount, MPIABI_Datatype datatype, MPIABI_Comm comm, + int *size); +int MPIABI_Pack_size_c(MPIABI_Count incount, MPIABI_Datatype datatype, + MPIABI_Comm comm, MPIABI_Count *size); +int MPIABI_Type_commit(MPIABI_Datatype *datatype); +int MPIABI_Type_contiguous(int count, MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +int MPIABI_Type_contiguous_c(MPIABI_Count count, MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +int MPIABI_Type_create_darray(int size, int rank, int ndims, + const int array_of_gsizes[], + const int array_of_distribs[], + const int array_of_dargs[], + const int array_of_psizes[], int order, + MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +int MPIABI_Type_create_darray_c(int size, int rank, int ndims, + const MPIABI_Count array_of_gsizes[], + const int array_of_distribs[], + const int array_of_dargs[], + const int array_of_psizes[], int order, + MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +int MPIABI_Type_create_hindexed(int count, const int array_of_blocklengths[], + const MPIABI_Aint array_of_displacements[], + MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +int MPIABI_Type_create_hindexed_block( + int count, int blocklength, const MPIABI_Aint array_of_displacements[], + MPIABI_Datatype oldtype, MPIABI_Datatype *newtype); +int MPIABI_Type_create_hindexed_block_c( + MPIABI_Count count, MPIABI_Count blocklength, + const MPIABI_Count array_of_displacements[], MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +int MPIABI_Type_create_hindexed_c(MPIABI_Count count, + const MPIABI_Count array_of_blocklengths[], + const MPIABI_Count array_of_displacements[], + MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +int MPIABI_Type_create_hvector(int count, int blocklength, MPIABI_Aint stride, + MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +int MPIABI_Type_create_hvector_c(MPIABI_Count count, MPIABI_Count blocklength, + MPIABI_Count stride, MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +int MPIABI_Type_create_indexed_block(int count, int blocklength, + const int array_of_displacements[], + MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +int MPIABI_Type_create_indexed_block_c( + MPIABI_Count count, MPIABI_Count blocklength, + const MPIABI_Count array_of_displacements[], MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +int MPIABI_Type_create_resized(MPIABI_Datatype oldtype, MPIABI_Aint lb, + MPIABI_Aint extent, MPIABI_Datatype *newtype); +int MPIABI_Type_create_resized_c(MPIABI_Datatype oldtype, MPIABI_Count lb, + MPIABI_Count extent, MPIABI_Datatype *newtype); +int MPIABI_Type_create_struct(int count, const int array_of_blocklengths[], + const MPIABI_Aint array_of_displacements[], + const MPIABI_Datatype array_of_types[], + MPIABI_Datatype *newtype); +int MPIABI_Type_create_struct_c(MPIABI_Count count, + const MPIABI_Count array_of_blocklengths[], + const MPIABI_Count array_of_displacements[], + const MPIABI_Datatype array_of_types[], + MPIABI_Datatype *newtype); +int MPIABI_Type_create_subarray(int ndims, const int array_of_sizes[], + const int array_of_subsizes[], + const int array_of_starts[], int order, + MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +int MPIABI_Type_create_subarray_c(int ndims, + const MPIABI_Count array_of_sizes[], + const MPIABI_Count array_of_subsizes[], + const MPIABI_Count array_of_starts[], + int order, MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +int MPIABI_Type_dup(MPIABI_Datatype oldtype, MPIABI_Datatype *newtype); +int MPIABI_Type_free(MPIABI_Datatype *datatype); +int MPIABI_Type_get_contents(MPIABI_Datatype datatype, int max_integers, + int max_addresses, int max_datatypes, + int array_of_integers[], + MPIABI_Aint array_of_addresses[], + MPIABI_Datatype array_of_datatypes[]); +int MPIABI_Type_get_contents_c( + MPIABI_Datatype datatype, MPIABI_Count max_integers, + MPIABI_Count max_addresses, MPIABI_Count max_large_counts, + MPIABI_Count max_datatypes, int array_of_integers[], + MPIABI_Aint array_of_addresses[], MPIABI_Count array_of_large_counts[], + MPIABI_Datatype array_of_datatypes[]); +int MPIABI_Type_get_envelope(MPIABI_Datatype datatype, int *num_integers, + int *num_addresses, int *num_datatypes, + int *combiner); +int MPIABI_Type_get_envelope_c(MPIABI_Datatype datatype, + MPIABI_Count *num_integers, + MPIABI_Count *num_addresses, + MPIABI_Count *num_large_counts, + MPIABI_Count *num_datatypes, int *combiner); +int MPIABI_Type_get_extent(MPIABI_Datatype datatype, MPIABI_Aint *lb, + MPIABI_Aint *extent); +int MPIABI_Type_get_extent_c(MPIABI_Datatype datatype, MPIABI_Count *lb, + MPIABI_Count *extent); +int MPIABI_Type_get_true_extent(MPIABI_Datatype datatype, MPIABI_Aint *true_lb, + MPIABI_Aint *true_extent); +int MPIABI_Type_get_true_extent_c(MPIABI_Datatype datatype, + MPIABI_Count *true_lb, + MPIABI_Count *true_extent); +int MPIABI_Type_indexed(int count, const int array_of_blocklengths[], + const int array_of_displacements[], + MPIABI_Datatype oldtype, MPIABI_Datatype *newtype); +int MPIABI_Type_indexed_c(MPIABI_Count count, + const MPIABI_Count array_of_blocklengths[], + const MPIABI_Count array_of_displacements[], + MPIABI_Datatype oldtype, MPIABI_Datatype *newtype); +int MPIABI_Type_size(MPIABI_Datatype datatype, int *size); +int MPIABI_Type_size_c(MPIABI_Datatype datatype, MPIABI_Count *size); +int MPIABI_Type_vector(int count, int blocklength, int stride, + MPIABI_Datatype oldtype, MPIABI_Datatype *newtype); +int MPIABI_Type_vector_c(MPIABI_Count count, MPIABI_Count blocklength, + MPIABI_Count stride, MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +int MPIABI_Unpack(const void *inbuf, int insize, int *position, void *outbuf, + int outcount, MPIABI_Datatype datatype, MPIABI_Comm comm); +int MPIABI_Unpack_c(const void *inbuf, MPIABI_Count insize, + MPIABI_Count *position, void *outbuf, MPIABI_Count outcount, + MPIABI_Datatype datatype, MPIABI_Comm comm); +int MPIABI_Unpack_external(const char datarep[], const void *inbuf, + MPIABI_Aint insize, MPIABI_Aint *position, + void *outbuf, int outcount, + MPIABI_Datatype datatype); +int MPIABI_Unpack_external_c(const char datarep[], const void *inbuf, + MPIABI_Count insize, MPIABI_Count *position, + void *outbuf, MPIABI_Count outcount, + MPIABI_Datatype datatype); + +// A.3.4 Collective Communication C Bindings + +int MPIABI_Allgather(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, int recvcount, + MPIABI_Datatype recvtype, MPIABI_Comm comm); +int MPIABI_Allgather_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm); +int MPIABI_Allgather_init(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int MPIABI_Allgather_init_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int MPIABI_Allgatherv(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPIABI_Datatype recvtype, MPIABI_Comm comm); +int MPIABI_Allgatherv_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], + const MPIABI_Aint displs[], MPIABI_Datatype recvtype, + MPIABI_Comm comm); +int MPIABI_Allgatherv_init(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *request); +int MPIABI_Allgatherv_init_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], + const MPIABI_Aint displs[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *request); +int MPIABI_Allreduce(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm); +int MPIABI_Allreduce_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm); +int MPIABI_Allreduce_init(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int MPIABI_Allreduce_init_c(const void *sendbuf, void *recvbuf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int MPIABI_Alltoall(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, int recvcount, + MPIABI_Datatype recvtype, MPIABI_Comm comm); +int MPIABI_Alltoall_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm); +int MPIABI_Alltoall_init(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, int recvcount, + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *request); +int MPIABI_Alltoall_init_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int MPIABI_Alltoallv(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPIABI_Datatype sendtype, + void *recvbuf, const int recvcounts[], const int rdispls[], + MPIABI_Datatype recvtype, MPIABI_Comm comm); +int MPIABI_Alltoallv_c(const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], MPIABI_Datatype sendtype, + void *recvbuf, const MPIABI_Count recvcounts[], + const MPIABI_Aint rdispls[], MPIABI_Datatype recvtype, + MPIABI_Comm comm); +int MPIABI_Alltoallv_init(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPIABI_Datatype sendtype, + void *recvbuf, const int recvcounts[], + const int rdispls[], MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int MPIABI_Alltoallv_init_c(const void *sendbuf, + const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], + MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], + const MPIABI_Aint rdispls[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *request); +int MPIABI_Alltoallw(const void *sendbuf, const int sendcounts[], + const int sdispls[], const MPIABI_Datatype sendtypes[], + void *recvbuf, const int recvcounts[], const int rdispls[], + const MPIABI_Datatype recvtypes[], MPIABI_Comm comm); +int MPIABI_Alltoallw_c(const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], + const MPIABI_Datatype sendtypes[], void *recvbuf, + const MPIABI_Count recvcounts[], + const MPIABI_Aint rdispls[], + const MPIABI_Datatype recvtypes[], MPIABI_Comm comm); +int MPIABI_Alltoallw_init(const void *sendbuf, const int sendcounts[], + const int sdispls[], + const MPIABI_Datatype sendtypes[], void *recvbuf, + const int recvcounts[], const int rdispls[], + const MPIABI_Datatype recvtypes[], MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *request); +int MPIABI_Alltoallw_init_c(const void *sendbuf, + const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], + const MPIABI_Datatype sendtypes[], void *recvbuf, + const MPIABI_Count recvcounts[], + const MPIABI_Aint rdispls[], + const MPIABI_Datatype recvtypes[], MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *request); +int MPIABI_Barrier(MPIABI_Comm comm); +int MPIABI_Barrier_init(MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int MPIABI_Bcast(void *buffer, int count, MPIABI_Datatype datatype, int root, + MPIABI_Comm comm); +int MPIABI_Bcast_c(void *buffer, MPIABI_Count count, MPIABI_Datatype datatype, + int root, MPIABI_Comm comm); +int MPIABI_Bcast_init(void *buffer, int count, MPIABI_Datatype datatype, + int root, MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int MPIABI_Bcast_init_c(void *buffer, MPIABI_Count count, + MPIABI_Datatype datatype, int root, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *request); +int MPIABI_Exscan(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm); +int MPIABI_Exscan_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm); +int MPIABI_Exscan_init(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *request); +int MPIABI_Exscan_init_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int MPIABI_Gather(const void *sendbuf, int sendcount, MPIABI_Datatype sendtype, + void *recvbuf, int recvcount, MPIABI_Datatype recvtype, + int root, MPIABI_Comm comm); +int MPIABI_Gather_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, MPIABI_Datatype recvtype, int root, + MPIABI_Comm comm); +int MPIABI_Gather_init(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, int recvcount, + MPIABI_Datatype recvtype, int root, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *request); +int MPIABI_Gather_init_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, MPIABI_Datatype recvtype, + int root, MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int MPIABI_Gatherv(const void *sendbuf, int sendcount, MPIABI_Datatype sendtype, + void *recvbuf, const int recvcounts[], const int displs[], + MPIABI_Datatype recvtype, int root, MPIABI_Comm comm); +int MPIABI_Gatherv_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], + const MPIABI_Aint displs[], MPIABI_Datatype recvtype, + int root, MPIABI_Comm comm); +int MPIABI_Gatherv_init(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPIABI_Datatype recvtype, int root, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *request); +int MPIABI_Gatherv_init_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], + const MPIABI_Aint displs[], MPIABI_Datatype recvtype, + int root, MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int MPIABI_Iallgather(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, int recvcount, + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Request *request); +int MPIABI_Iallgather_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Iallgatherv(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Request *request); +int MPIABI_Iallgatherv_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], + const MPIABI_Aint displs[], MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Iallreduce(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Request *request); +int MPIABI_Iallreduce_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Ialltoall(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, int recvcount, + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Request *request); +int MPIABI_Ialltoall_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Ialltoallv(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPIABI_Datatype sendtype, + void *recvbuf, const int recvcounts[], + const int rdispls[], MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Ialltoallv_c(const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], MPIABI_Datatype sendtype, + void *recvbuf, const MPIABI_Count recvcounts[], + const MPIABI_Aint rdispls[], MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Ialltoallw(const void *sendbuf, const int sendcounts[], + const int sdispls[], const MPIABI_Datatype sendtypes[], + void *recvbuf, const int recvcounts[], + const int rdispls[], const MPIABI_Datatype recvtypes[], + MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Ialltoallw_c(const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], + const MPIABI_Datatype sendtypes[], void *recvbuf, + const MPIABI_Count recvcounts[], + const MPIABI_Aint rdispls[], + const MPIABI_Datatype recvtypes[], MPIABI_Comm comm, + MPIABI_Request *request); +int MPIABI_Ibarrier(MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Ibcast(void *buffer, int count, MPIABI_Datatype datatype, int root, + MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Ibcast_c(void *buffer, MPIABI_Count count, MPIABI_Datatype datatype, + int root, MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Iexscan(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Request *request); +int MPIABI_Iexscan_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Request *request); +int MPIABI_Igather(const void *sendbuf, int sendcount, MPIABI_Datatype sendtype, + void *recvbuf, int recvcount, MPIABI_Datatype recvtype, + int root, MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Igather_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, MPIABI_Datatype recvtype, int root, + MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Igatherv(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPIABI_Datatype recvtype, int root, MPIABI_Comm comm, + MPIABI_Request *request); +int MPIABI_Igatherv_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], + const MPIABI_Aint displs[], MPIABI_Datatype recvtype, + int root, MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Ireduce(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, int root, + MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Ireduce_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Op op, int root, + MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Ireduce_scatter(const void *sendbuf, void *recvbuf, + const int recvcounts[], MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Request *request); +int MPIABI_Ireduce_scatter_block(const void *sendbuf, void *recvbuf, + int recvcount, MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Request *request); +int MPIABI_Ireduce_scatter_block_c(const void *sendbuf, void *recvbuf, + MPIABI_Count recvcount, + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Ireduce_scatter_c(const void *sendbuf, void *recvbuf, + const MPIABI_Count recvcounts[], + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Iscan(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Request *request); +int MPIABI_Iscan_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Request *request); +int MPIABI_Iscatter(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, int recvcount, + MPIABI_Datatype recvtype, int root, MPIABI_Comm comm, + MPIABI_Request *request); +int MPIABI_Iscatter_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, MPIABI_Datatype recvtype, + int root, MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Iscatterv(const void *sendbuf, const int sendcounts[], + const int displs[], MPIABI_Datatype sendtype, + void *recvbuf, int recvcount, MPIABI_Datatype recvtype, + int root, MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Iscatterv_c(const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint displs[], MPIABI_Datatype sendtype, + void *recvbuf, MPIABI_Count recvcount, + MPIABI_Datatype recvtype, int root, MPIABI_Comm comm, + MPIABI_Request *request); +int MPIABI_Op_commutative(MPIABI_Op op, int *commute); +int MPIABI_Op_create(MPIABI_User_function *user_fn, int commute, MPIABI_Op *op); +int MPIABI_Op_create_c(MPIABI_User_function_c *user_fn, int commute, + MPIABI_Op *op); +int MPIABI_Op_free(MPIABI_Op *op); +int MPIABI_Reduce(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, int root, + MPIABI_Comm comm); +int MPIABI_Reduce_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Op op, int root, + MPIABI_Comm comm); +int MPIABI_Reduce_init(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, int root, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int MPIABI_Reduce_init_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Op op, int root, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int MPIABI_Reduce_local(const void *inbuf, void *inoutbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op); +int MPIABI_Reduce_local_c(const void *inbuf, void *inoutbuf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Op op); +int MPIABI_Reduce_scatter(const void *sendbuf, void *recvbuf, + const int recvcounts[], MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm); +int MPIABI_Reduce_scatter_block(const void *sendbuf, void *recvbuf, + int recvcount, MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm); +int MPIABI_Reduce_scatter_block_c(const void *sendbuf, void *recvbuf, + MPIABI_Count recvcount, + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm); +int MPIABI_Reduce_scatter_block_init(const void *sendbuf, void *recvbuf, + int recvcount, MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *request); +int MPIABI_Reduce_scatter_block_init_c(const void *sendbuf, void *recvbuf, + MPIABI_Count recvcount, + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int MPIABI_Reduce_scatter_c(const void *sendbuf, void *recvbuf, + const MPIABI_Count recvcounts[], + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm); +int MPIABI_Reduce_scatter_init(const void *sendbuf, void *recvbuf, + const int recvcounts[], MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int MPIABI_Reduce_scatter_init_c(const void *sendbuf, void *recvbuf, + const MPIABI_Count recvcounts[], + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int MPIABI_Scan(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm); +int MPIABI_Scan_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm); +int MPIABI_Scan_init(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *request); +int MPIABI_Scan_init_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *request); +int MPIABI_Scatter(const void *sendbuf, int sendcount, MPIABI_Datatype sendtype, + void *recvbuf, int recvcount, MPIABI_Datatype recvtype, + int root, MPIABI_Comm comm); +int MPIABI_Scatter_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, MPIABI_Datatype recvtype, int root, + MPIABI_Comm comm); +int MPIABI_Scatter_init(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, int recvcount, + MPIABI_Datatype recvtype, int root, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *request); +int MPIABI_Scatter_init_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, MPIABI_Datatype recvtype, + int root, MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int MPIABI_Scatterv(const void *sendbuf, const int sendcounts[], + const int displs[], MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, int root, + MPIABI_Comm comm); +int MPIABI_Scatterv_c(const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint displs[], MPIABI_Datatype sendtype, + void *recvbuf, MPIABI_Count recvcount, + MPIABI_Datatype recvtype, int root, MPIABI_Comm comm); +int MPIABI_Scatterv_init(const void *sendbuf, const int sendcounts[], + const int displs[], MPIABI_Datatype sendtype, + void *recvbuf, int recvcount, MPIABI_Datatype recvtype, + int root, MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int MPIABI_Scatterv_init_c(const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint displs[], MPIABI_Datatype sendtype, + void *recvbuf, MPIABI_Count recvcount, + MPIABI_Datatype recvtype, int root, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *request); +int MPIABI_Type_get_value_index(MPIABI_Datatype value_type, + MPIABI_Datatype index_type, + MPIABI_Datatype *pair_type); + +// A.3.5 Groups, Contexts, Communicators, and Caching C Bindings + +int MPIABI_Comm_compare(MPIABI_Comm comm1, MPIABI_Comm comm2, int *result); +int MPIABI_Comm_create(MPIABI_Comm comm, MPIABI_Group group, + MPIABI_Comm *newcomm); +int MPIABI_Comm_create_from_group(MPIABI_Group group, const char *stringtag, + MPIABI_Info info, + MPIABI_Errhandler errhandler, + MPIABI_Comm *newcomm); +int MPIABI_Comm_create_group(MPIABI_Comm comm, MPIABI_Group group, int tag, + MPIABI_Comm *newcomm); +int MPIABI_Comm_create_keyval( + MPIABI_Comm_copy_attr_function *comm_copy_attr_fn, + MPIABI_Comm_delete_attr_function *comm_delete_attr_fn, int *comm_keyval, + void *extra_state); +int MPIABI_Comm_delete_attr(MPIABI_Comm comm, int comm_keyval); +int MPIABI_Comm_dup(MPIABI_Comm comm, MPIABI_Comm *newcomm); +int MPIABI_Comm_dup_with_info(MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Comm *newcomm); +int MPIABI_Comm_free(MPIABI_Comm *comm); +int MPIABI_Comm_get_name(MPIABI_Comm comm, char *comm_name, int *resultlen); +int MPIABI_Comm_free_keyval(int *comm_keyval); +int MPIABI_Comm_get_attr(MPIABI_Comm comm, int comm_keyval, void *attribute_val, + int *flag); +int MPIABI_Comm_get_info(MPIABI_Comm comm, MPIABI_Info *info_used); +int MPIABI_Comm_group(MPIABI_Comm comm, MPIABI_Group *group); +int MPIABI_Comm_idup(MPIABI_Comm comm, MPIABI_Comm *newcomm, + MPIABI_Request *request); +int MPIABI_Comm_idup_with_info(MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Comm *newcomm, MPIABI_Request *request); +int MPIABI_Comm_rank(MPIABI_Comm comm, int *rank); +int MPIABI_Comm_remote_group(MPIABI_Comm comm, MPIABI_Group *group); +int MPIABI_Comm_remote_size(MPIABI_Comm comm, int *size); +int MPIABI_Comm_set_attr(MPIABI_Comm comm, int comm_keyval, + void *attribute_val); +int MPIABI_Comm_set_info(MPIABI_Comm comm, MPIABI_Info info); +int MPIABI_Comm_set_name(MPIABI_Comm comm, const char *comm_name); +int MPIABI_Comm_size(MPIABI_Comm comm, int *size); +int MPIABI_Comm_split(MPIABI_Comm comm, int color, int key, + MPIABI_Comm *newcomm); +int MPIABI_Group_free(MPIABI_Group *group); +int MPIABI_Comm_split_type(MPIABI_Comm comm, int split_type, int key, + MPIABI_Info info, MPIABI_Comm *newcomm); +int MPIABI_Comm_test_inter(MPIABI_Comm comm, int *flag); +int MPIABI_Group_compare(MPIABI_Group group1, MPIABI_Group group2, int *result); +int MPIABI_Group_difference(MPIABI_Group group1, MPIABI_Group group2, + MPIABI_Group *newgroup); +int MPIABI_Group_excl(MPIABI_Group group, int n, const int ranks[], + MPIABI_Group *newgroup); +int MPIABI_Group_from_session_pset(MPIABI_Session session, + const char *pset_name, + MPIABI_Group *newgroup); +int MPIABI_Group_incl(MPIABI_Group group, int n, const int ranks[], + MPIABI_Group *newgroup); +int MPIABI_Group_intersection(MPIABI_Group group1, MPIABI_Group group2, + MPIABI_Group *newgroup); +int MPIABI_Group_range_excl(MPIABI_Group group, int n, int ranges[][3], + MPIABI_Group *newgroup); +int MPIABI_Group_range_incl(MPIABI_Group group, int n, int ranges[][3], + MPIABI_Group *newgroup); +int MPIABI_Group_rank(MPIABI_Group group, int *rank); +int MPIABI_Group_size(MPIABI_Group group, int *size); +int MPIABI_Group_translate_ranks(MPIABI_Group group1, int n, const int ranks1[], + MPIABI_Group group2, int ranks2[]); +int MPIABI_Group_union(MPIABI_Group group1, MPIABI_Group group2, + MPIABI_Group *newgroup); +int MPIABI_Intercomm_create(MPIABI_Comm local_comm, int local_leader, + MPIABI_Comm peer_comm, int remote_leader, int tag, + MPIABI_Comm *newintercomm); +int MPIABI_Intercomm_create_from_groups( + MPIABI_Group local_group, int local_leader, MPIABI_Group remote_group, + int remote_leader, const char *stringtag, MPIABI_Info info, + MPIABI_Errhandler errhandler, MPIABI_Comm *newintercomm); +int MPIABI_Intercomm_merge(MPIABI_Comm intercomm, int high, + MPIABI_Comm *newintracomm); +int MPIABI_Type_create_keyval( + MPIABI_Type_copy_attr_function *type_copy_attr_fn, + MPIABI_Type_delete_attr_function *type_delete_attr_fn, int *type_keyval, + void *extra_state); +int MPIABI_Type_delete_attr(MPIABI_Datatype datatype, int type_keyval); +int MPIABI_Type_free_keyval(int *type_keyval); +int MPIABI_Type_get_attr(MPIABI_Datatype datatype, int type_keyval, + void *attribute_val, int *flag); +int MPIABI_Type_get_name(MPIABI_Datatype datatype, char *type_name, + int *resultlen); +int MPIABI_Type_set_attr(MPIABI_Datatype datatype, int type_keyval, + void *attribute_val); +int MPIABI_Type_set_name(MPIABI_Datatype datatype, const char *type_name); +int MPIABI_Win_create_keyval( + MPIABI_Win_copy_attr_function *win_copy_attr_fn, + MPIABI_Win_delete_attr_function *win_delete_attr_fn, int *win_keyval, + void *extra_state); +int MPIABI_Win_delete_attr(MPIABI_Win win, int win_keyval); +int MPIABI_Win_free_keyval(int *win_keyval); +int MPIABI_Win_get_attr(MPIABI_Win win, int win_keyval, void *attribute_val, + int *flag); +int MPIABI_Win_get_name(MPIABI_Win win, char *win_name, int *resultlen); +int MPIABI_Win_set_attr(MPIABI_Win win, int win_keyval, void *attribute_val); +int MPIABI_Win_set_name(MPIABI_Win win, const char *win_name); + +// A.3.6 Virtual Topologies for MPI Processes C Bindings + +int MPIABI_Cart_coords(MPIABI_Comm comm, int rank, int maxdims, int coords[]); +int MPIABI_Cart_create(MPIABI_Comm comm_old, int ndims, const int dims[], + const int periods[], int reorder, + MPIABI_Comm *comm_cart); +int MPIABI_Cart_get(MPIABI_Comm comm, int maxdims, int dims[], int periods[], + int coords[]); +int MPIABI_Cart_map(MPIABI_Comm comm, int ndims, const int dims[], + const int periods[], int *newrank); +int MPIABI_Cart_rank(MPIABI_Comm comm, const int coords[], int *rank); +int MPIABI_Cart_shift(MPIABI_Comm comm, int direction, int disp, + int *rank_source, int *rank_dest); +int MPIABI_Cart_sub(MPIABI_Comm comm, const int remain_dims[], + MPIABI_Comm *newcomm); +int MPIABI_Cartdim_get(MPIABI_Comm comm, int *ndims); +int MPIABI_Dims_create(int nnodes, int ndims, int dims[]); +int MPIABI_Dist_graph_create(MPIABI_Comm comm_old, int n, const int sources[], + const int degrees[], const int destinations[], + const int weights[], MPIABI_Info info, int reorder, + MPIABI_Comm *comm_dist_graph); +int MPIABI_Dist_graph_create_adjacent(MPIABI_Comm comm_old, int indegree, + const int sources[], + const int sourceweights[], int outdegree, + const int destinations[], + const int destweights[], MPIABI_Info info, + int reorder, + MPIABI_Comm *comm_dist_graph); +int MPIABI_Dist_graph_neighbors(MPIABI_Comm comm, int maxindegree, + int sources[], int sourceweights[], + int maxoutdegree, int destinations[], + int destweights[]); +int MPIABI_Dist_graph_neighbors_count(MPIABI_Comm comm, int *indegree, + int *outdegree, int *weighted); +int MPIABI_Graph_create(MPIABI_Comm comm_old, int nnodes, const int index[], + const int edges[], int reorder, + MPIABI_Comm *comm_graph); +int MPIABI_Graph_get(MPIABI_Comm comm, int maxindex, int maxedges, int index[], + int edges[]); +int MPIABI_Graph_map(MPIABI_Comm comm, int nnodes, const int index[], + const int edges[], int *newrank); +int MPIABI_Graph_neighbors(MPIABI_Comm comm, int rank, int maxneighbors, + int neighbors[]); +int MPIABI_Graph_neighbors_count(MPIABI_Comm comm, int rank, int *nneighbors); +int MPIABI_Graphdims_get(MPIABI_Comm comm, int *nnodes, int *nedges); +int MPIABI_Ineighbor_allgather(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Ineighbor_allgather_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Request *request); +int MPIABI_Ineighbor_allgatherv(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Request *request); +int MPIABI_Ineighbor_allgatherv_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], + const MPIABI_Aint displs[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Request *request); +int MPIABI_Ineighbor_alltoall(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Ineighbor_alltoall_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Request *request); +int MPIABI_Ineighbor_alltoallv(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPIABI_Datatype sendtype, + void *recvbuf, const int recvcounts[], + const int rdispls[], MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Ineighbor_alltoallv_c( + const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], const MPIABI_Aint rdispls[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Ineighbor_alltoallw(const void *sendbuf, const int sendcounts[], + const MPIABI_Aint sdispls[], + const MPIABI_Datatype sendtypes[], void *recvbuf, + const int recvcounts[], + const MPIABI_Aint rdispls[], + const MPIABI_Datatype recvtypes[], + MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Ineighbor_alltoallw_c(const void *sendbuf, + const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], + const MPIABI_Datatype sendtypes[], + void *recvbuf, const MPIABI_Count recvcounts[], + const MPIABI_Aint rdispls[], + const MPIABI_Datatype recvtypes[], + MPIABI_Comm comm, MPIABI_Request *request); +int MPIABI_Neighbor_allgather(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm); +int MPIABI_Neighbor_allgather_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, + MPIABI_Datatype recvtype, MPIABI_Comm comm); +int MPIABI_Neighbor_allgather_init(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int MPIABI_Neighbor_allgather_init_c(const void *sendbuf, + MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *request); +int MPIABI_Neighbor_allgatherv(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPIABI_Datatype recvtype, MPIABI_Comm comm); +int MPIABI_Neighbor_allgatherv_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], + const MPIABI_Aint displs[], + MPIABI_Datatype recvtype, MPIABI_Comm comm); +int MPIABI_Neighbor_allgatherv_init(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *request); +int MPIABI_Neighbor_allgatherv_init_c( + const void *sendbuf, MPIABI_Count sendcount, MPIABI_Datatype sendtype, + void *recvbuf, const MPIABI_Count recvcounts[], const MPIABI_Aint displs[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int MPIABI_Neighbor_alltoall(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm); +int MPIABI_Neighbor_alltoall_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm); +int MPIABI_Neighbor_alltoall_init(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int MPIABI_Neighbor_alltoall_init_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *request); +int MPIABI_Neighbor_alltoallv(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPIABI_Datatype sendtype, + void *recvbuf, const int recvcounts[], + const int rdispls[], MPIABI_Datatype recvtype, + MPIABI_Comm comm); +int MPIABI_Neighbor_alltoallv_c(const void *sendbuf, + const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], + MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], + const MPIABI_Aint rdispls[], + MPIABI_Datatype recvtype, MPIABI_Comm comm); +int MPIABI_Neighbor_alltoallv_init(const void *sendbuf, const int sendcounts[], + const int sdispls[], + MPIABI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int rdispls[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *request); +int MPIABI_Neighbor_alltoallv_init_c(const void *sendbuf, + const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], + MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], + const MPIABI_Aint rdispls[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *request); +int MPIABI_Neighbor_alltoallw(const void *sendbuf, const int sendcounts[], + const MPIABI_Aint sdispls[], + const MPIABI_Datatype sendtypes[], void *recvbuf, + const int recvcounts[], + const MPIABI_Aint rdispls[], + const MPIABI_Datatype recvtypes[], + MPIABI_Comm comm); +int MPIABI_Neighbor_alltoallw_c( + const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], const MPIABI_Datatype sendtypes[], + void *recvbuf, const MPIABI_Count recvcounts[], const MPIABI_Aint rdispls[], + const MPIABI_Datatype recvtypes[], MPIABI_Comm comm); +int MPIABI_Neighbor_alltoallw_init( + const void *sendbuf, const int sendcounts[], const MPIABI_Aint sdispls[], + const MPIABI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], + const MPIABI_Aint rdispls[], const MPIABI_Datatype recvtypes[], + MPIABI_Comm comm, MPIABI_Info info, MPIABI_Request *request); +int MPIABI_Neighbor_alltoallw_init_c( + const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], const MPIABI_Datatype sendtypes[], + void *recvbuf, const MPIABI_Count recvcounts[], const MPIABI_Aint rdispls[], + const MPIABI_Datatype recvtypes[], MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int MPIABI_Topo_test(MPIABI_Comm comm, int *status); + +// A.3.7 MPI Environmental Management C Bindings + +int MPIABI_Add_error_class(int *errorclass); +int MPIABI_Add_error_code(int errorclass, int *errorcode); +int MPIABI_Add_error_string(int errorcode, const char *string); +int MPIABI_Alloc_mem(MPIABI_Aint size, MPIABI_Info info, void *baseptr); +int MPIABI_Comm_call_errhandler(MPIABI_Comm comm, int errorcode); +int MPIABI_Comm_create_errhandler( + MPIABI_Comm_errhandler_function *comm_errhandler_fn, + MPIABI_Errhandler *errhandler); +int MPIABI_Comm_get_errhandler(MPIABI_Comm comm, MPIABI_Errhandler *errhandler); +int MPIABI_Comm_set_errhandler(MPIABI_Comm comm, MPIABI_Errhandler errhandler); +int MPIABI_Errhandler_free(MPIABI_Errhandler *errhandler); +int MPIABI_Error_class(int errorcode, int *errorclass); +int MPIABI_Error_string(int errorcode, char *string, int *resultlen); +int MPIABI_File_call_errhandler(MPIABI_File fh, int errorcode); +int MPIABI_File_create_errhandler( + MPIABI_File_errhandler_function *file_errhandler_fn, + MPIABI_Errhandler *errhandler); +int MPIABI_File_get_errhandler(MPIABI_File file, MPIABI_Errhandler *errhandler); +int MPIABI_File_set_errhandler(MPIABI_File file, MPIABI_Errhandler errhandler); +int MPIABI_Free_mem(void *base); +int MPIABI_Get_hw_resource_info(MPIABI_Info *hw_info); +int MPIABI_Get_library_version(char *version, int *resultlen); +int MPIABI_Get_processor_name(char *name, int *resultlen); +int MPIABI_Get_version(int *version, int *subversion); +int MPIABI_Remove_error_class(int errorclass); +int MPIABI_Remove_error_code(int errorcode); +int MPIABI_Remove_error_string(int errorcode); +int MPIABI_Session_call_errhandler(MPIABI_Session session, int errorcode); +int MPIABI_Session_create_errhandler( + MPIABI_Session_errhandler_function *session_errhandler_fn, + MPIABI_Errhandler *errhandler); +int MPIABI_Session_get_errhandler(MPIABI_Session session, + MPIABI_Errhandler *errhandler); +int MPIABI_Session_set_errhandler(MPIABI_Session session, + MPIABI_Errhandler errhandler); +int MPIABI_Win_call_errhandler(MPIABI_Win win, int errorcode); +int MPIABI_Win_create_errhandler( + MPIABI_Win_errhandler_function *win_errhandler_fn, + MPIABI_Errhandler *errhandler); +int MPIABI_Win_get_errhandler(MPIABI_Win win, MPIABI_Errhandler *errhandler); +int MPIABI_Win_set_errhandler(MPIABI_Win win, MPIABI_Errhandler errhandler); +double MPIABI_Wtick(void); +double MPIABI_Wtime(void); + +// A.3.8 The Info Object C Bindings + +int MPIABI_Info_create(MPIABI_Info *info); +int MPIABI_Info_create_env(int argc, char *argv[], MPIABI_Info *info); +int MPIABI_Info_delete(MPIABI_Info info, const char *key); +int MPIABI_Info_dup(MPIABI_Info info, MPIABI_Info *newinfo); +int MPIABI_Info_free(MPIABI_Info *info); +int MPIABI_Info_get_nkeys(MPIABI_Info info, int *nkeys); +int MPIABI_Info_get_nthkey(MPIABI_Info info, int n, char *key); +int MPIABI_Info_get_string(MPIABI_Info info, const char *key, int *buflen, + char *value, int *flag); +int MPIABI_Info_set(MPIABI_Info info, const char *key, const char *value); + +// A.3.9 Process Creation and Management C Bindings + +int MPIABI_Abort(MPIABI_Comm comm, int errorcode); +int MPIABI_Close_port(const char *port_name); +int MPIABI_Comm_accept(const char *port_name, MPIABI_Info info, int root, + MPIABI_Comm comm, MPIABI_Comm *newcomm); +int MPIABI_Comm_connect(const char *port_name, MPIABI_Info info, int root, + MPIABI_Comm comm, MPIABI_Comm *newcomm); +int MPIABI_Comm_disconnect(MPIABI_Comm *comm); +int MPIABI_Comm_get_parent(MPIABI_Comm *parent); +int MPIABI_Comm_join(int fd, MPIABI_Comm *intercomm); +int MPIABI_Comm_spawn(const char *command, char *argv[], int maxprocs, + MPIABI_Info info, int root, MPIABI_Comm comm, + MPIABI_Comm *intercomm, int array_of_errcodes[]); +int MPIABI_Comm_spawn_multiple(int count, char *array_of_commands[], + char **array_of_argv[], + const int array_of_maxprocs[], + const MPIABI_Info array_of_info[], int root, + MPIABI_Comm comm, MPIABI_Comm *intercomm, + int array_of_errcodes[]); +int MPIABI_Finalize(void); +int MPIABI_Finalized(int *flag); +int MPIABI_Init(int *argc, char ***argv); +int MPIABI_Init_thread(int *argc, char ***argv, int required, int *provided); +int MPIABI_Initialized(int *flag); +int MPIABI_Is_thread_main(int *flag); +int MPIABI_Lookup_name(const char *service_name, MPIABI_Info info, + char *port_name); +int MPIABI_Open_port(MPIABI_Info info, char *port_name); +int MPIABI_Publish_name(const char *service_name, MPIABI_Info info, + const char *port_name); +int MPIABI_Query_thread(int *provided); +int MPIABI_Session_finalize(MPIABI_Session *session); +int MPIABI_Session_get_info(MPIABI_Session session, MPIABI_Info *info_used); +int MPIABI_Session_get_nth_pset(MPIABI_Session session, MPIABI_Info info, int n, + int *pset_len, char *pset_name); +int MPIABI_Session_get_num_psets(MPIABI_Session session, MPIABI_Info info, + int *npset_names); +int MPIABI_Session_get_pset_info(MPIABI_Session session, const char *pset_name, + MPIABI_Info *info); +int MPIABI_Session_init(MPIABI_Info info, MPIABI_Errhandler errhandler, + MPIABI_Session *session); +int MPIABI_Unpublish_name(const char *service_name, MPIABI_Info info, + const char *port_name); + +// A.3.10 One-Sided Communications C Bindings + +int MPIABI_Accumulate(const void *origin_addr, int origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, int target_count, + MPIABI_Datatype target_datatype, MPIABI_Op op, + MPIABI_Win win); +int MPIABI_Accumulate_c(const void *origin_addr, MPIABI_Count origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, MPIABI_Count target_count, + MPIABI_Datatype target_datatype, MPIABI_Op op, + MPIABI_Win win); +int MPIABI_Compare_and_swap(const void *origin_addr, const void *compare_addr, + void *result_addr, MPIABI_Datatype datatype, + int target_rank, MPIABI_Aint target_disp, + MPIABI_Win win); +int MPIABI_Fetch_and_op(const void *origin_addr, void *result_addr, + MPIABI_Datatype datatype, int target_rank, + MPIABI_Aint target_disp, MPIABI_Op op, MPIABI_Win win); +int MPIABI_Get(void *origin_addr, int origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, int target_count, + MPIABI_Datatype target_datatype, MPIABI_Win win); +int MPIABI_Get_accumulate(const void *origin_addr, int origin_count, + MPIABI_Datatype origin_datatype, void *result_addr, + int result_count, MPIABI_Datatype result_datatype, + int target_rank, MPIABI_Aint target_disp, + int target_count, MPIABI_Datatype target_datatype, + MPIABI_Op op, MPIABI_Win win); +int MPIABI_Get_accumulate_c(const void *origin_addr, MPIABI_Count origin_count, + MPIABI_Datatype origin_datatype, void *result_addr, + MPIABI_Count result_count, + MPIABI_Datatype result_datatype, int target_rank, + MPIABI_Aint target_disp, MPIABI_Count target_count, + MPIABI_Datatype target_datatype, MPIABI_Op op, + MPIABI_Win win); +int MPIABI_Get_c(void *origin_addr, MPIABI_Count origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, MPIABI_Count target_count, + MPIABI_Datatype target_datatype, MPIABI_Win win); +int MPIABI_Put(const void *origin_addr, int origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, int target_count, + MPIABI_Datatype target_datatype, MPIABI_Win win); +int MPIABI_Put_c(const void *origin_addr, MPIABI_Count origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, MPIABI_Count target_count, + MPIABI_Datatype target_datatype, MPIABI_Win win); +int MPIABI_Raccumulate(const void *origin_addr, int origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, int target_count, + MPIABI_Datatype target_datatype, MPIABI_Op op, + MPIABI_Win win, MPIABI_Request *request); +int MPIABI_Raccumulate_c(const void *origin_addr, MPIABI_Count origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, MPIABI_Count target_count, + MPIABI_Datatype target_datatype, MPIABI_Op op, + MPIABI_Win win, MPIABI_Request *request); +int MPIABI_Rget(void *origin_addr, int origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, int target_count, + MPIABI_Datatype target_datatype, MPIABI_Win win, + MPIABI_Request *request); +int MPIABI_Rget_accumulate(const void *origin_addr, int origin_count, + MPIABI_Datatype origin_datatype, void *result_addr, + int result_count, MPIABI_Datatype result_datatype, + int target_rank, MPIABI_Aint target_disp, + int target_count, MPIABI_Datatype target_datatype, + MPIABI_Op op, MPIABI_Win win, + MPIABI_Request *request); +int MPIABI_Rget_accumulate_c(const void *origin_addr, MPIABI_Count origin_count, + MPIABI_Datatype origin_datatype, void *result_addr, + MPIABI_Count result_count, + MPIABI_Datatype result_datatype, int target_rank, + MPIABI_Aint target_disp, MPIABI_Count target_count, + MPIABI_Datatype target_datatype, MPIABI_Op op, + MPIABI_Win win, MPIABI_Request *request); +int MPIABI_Rget_c(void *origin_addr, MPIABI_Count origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, MPIABI_Count target_count, + MPIABI_Datatype target_datatype, MPIABI_Win win, + MPIABI_Request *request); +int MPIABI_Rput(const void *origin_addr, int origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, int target_count, + MPIABI_Datatype target_datatype, MPIABI_Win win, + MPIABI_Request *request); +int MPIABI_Rput_c(const void *origin_addr, MPIABI_Count origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, MPIABI_Count target_count, + MPIABI_Datatype target_datatype, MPIABI_Win win, + MPIABI_Request *request); +int MPIABI_Win_allocate(MPIABI_Aint size, int disp_unit, MPIABI_Info info, + MPIABI_Comm comm, void *baseptr, MPIABI_Win *win); +int MPIABI_Win_allocate_c(MPIABI_Aint size, MPIABI_Aint disp_unit, + MPIABI_Info info, MPIABI_Comm comm, void *baseptr, + MPIABI_Win *win); +int MPIABI_Win_allocate_shared(MPIABI_Aint size, int disp_unit, + MPIABI_Info info, MPIABI_Comm comm, + void *baseptr, MPIABI_Win *win); +int MPIABI_Win_allocate_shared_c(MPIABI_Aint size, MPIABI_Aint disp_unit, + MPIABI_Info info, MPIABI_Comm comm, + void *baseptr, MPIABI_Win *win); +int MPIABI_Win_attach(MPIABI_Win win, void *base, MPIABI_Aint size); +int MPIABI_Win_complete(MPIABI_Win win); +int MPIABI_Win_create(void *base, MPIABI_Aint size, int disp_unit, + MPIABI_Info info, MPIABI_Comm comm, MPIABI_Win *win); +int MPIABI_Win_create_c(void *base, MPIABI_Aint size, MPIABI_Aint disp_unit, + MPIABI_Info info, MPIABI_Comm comm, MPIABI_Win *win); +int MPIABI_Win_create_dynamic(MPIABI_Info info, MPIABI_Comm comm, + MPIABI_Win *win); +int MPIABI_Win_detach(MPIABI_Win win, const void *base); +int MPIABI_Win_fence(int assert, MPIABI_Win win); +int MPIABI_Win_flush(int rank, MPIABI_Win win); +int MPIABI_Win_flush_all(MPIABI_Win win); +int MPIABI_Win_flush_local(int rank, MPIABI_Win win); +int MPIABI_Win_flush_local_all(MPIABI_Win win); +int MPIABI_Win_free(MPIABI_Win *win); +int MPIABI_Win_get_group(MPIABI_Win win, MPIABI_Group *group); +int MPIABI_Win_get_info(MPIABI_Win win, MPIABI_Info *info_used); +int MPIABI_Win_lock(int lock_type, int rank, int assert, MPIABI_Win win); +int MPIABI_Win_lock_all(int assert, MPIABI_Win win); +int MPIABI_Win_post(MPIABI_Group group, int assert, MPIABI_Win win); +int MPIABI_Win_set_info(MPIABI_Win win, MPIABI_Info info); +int MPIABI_Win_shared_query(MPIABI_Win win, int rank, MPIABI_Aint *size, + int *disp_unit, void *baseptr); +int MPIABI_Win_shared_query_c(MPIABI_Win win, int rank, MPIABI_Aint *size, + MPIABI_Aint *disp_unit, void *baseptr); +int MPIABI_Win_start(MPIABI_Group group, int assert, MPIABI_Win win); +int MPIABI_Win_sync(MPIABI_Win win); +int MPIABI_Win_test(MPIABI_Win win, int *flag); +int MPIABI_Win_unlock(int rank, MPIABI_Win win); +int MPIABI_Win_unlock_all(MPIABI_Win win); +int MPIABI_Win_wait(MPIABI_Win win); + +// A.3.11 External Interfaces C Bindings + +int MPIABI_Grequest_complete(MPIABI_Request request); +int MPIABI_Grequest_start(MPIABI_Grequest_query_function *query_fn, + MPIABI_Grequest_free_function *free_fn, + MPIABI_Grequest_cancel_function *cancel_fn, + void *extra_state, MPIABI_Request *request); +int MPIABI_Status_set_cancelled(MPIABI_Status *status, int flag); +int MPIABI_Status_set_elements(MPIABI_Status *status, MPIABI_Datatype datatype, + int count); +int MPIABI_Status_set_elements_c(MPIABI_Status *status, + MPIABI_Datatype datatype, MPIABI_Count count); +int MPIABI_Status_set_error(MPIABI_Status *status, int err); +int MPIABI_Status_set_source(MPIABI_Status *status, int source); +int MPIABI_Status_set_tag(MPIABI_Status *status, int tag); + +// A.3.12 I/O C Bindings + +int MPIABI_File_close(MPIABI_File *fh); +int MPIABI_File_delete(const char *filename, MPIABI_Info info); +int MPIABI_File_get_amode(MPIABI_File fh, int *amode); +int MPIABI_File_get_atomicity(MPIABI_File fh, int *flag); +int MPIABI_File_get_byte_offset(MPIABI_File fh, MPIABI_Offset offset, + MPIABI_Offset *disp); +int MPIABI_File_get_group(MPIABI_File fh, MPIABI_Group *group); +int MPIABI_File_get_info(MPIABI_File fh, MPIABI_Info *info_used); +int MPIABI_File_get_position(MPIABI_File fh, MPIABI_Offset *offset); +int MPIABI_File_get_position_shared(MPIABI_File fh, MPIABI_Offset *offset); +int MPIABI_File_get_size(MPIABI_File fh, MPIABI_Offset *size); +int MPIABI_File_get_type_extent(MPIABI_File fh, MPIABI_Datatype datatype, + MPIABI_Aint *extent); +int MPIABI_File_get_type_extent_c(MPIABI_File fh, MPIABI_Datatype datatype, + MPIABI_Count *extent); +int MPIABI_File_get_view(MPIABI_File fh, MPIABI_Offset *disp, + MPIABI_Datatype *etype, MPIABI_Datatype *filetype, + char *datarep); +int MPIABI_File_iread(MPIABI_File fh, void *buf, int count, + MPIABI_Datatype datatype, MPIABI_Request *request); +int MPIABI_File_iread_all(MPIABI_File fh, void *buf, int count, + MPIABI_Datatype datatype, MPIABI_Request *request); +int MPIABI_File_iread_all_c(MPIABI_File fh, void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Request *request); +int MPIABI_File_iread_at(MPIABI_File fh, MPIABI_Offset offset, void *buf, + int count, MPIABI_Datatype datatype, + MPIABI_Request *request); +int MPIABI_File_iread_at_all(MPIABI_File fh, MPIABI_Offset offset, void *buf, + int count, MPIABI_Datatype datatype, + MPIABI_Request *request); +int MPIABI_File_iread_at_all_c(MPIABI_File fh, MPIABI_Offset offset, void *buf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Request *request); +int MPIABI_File_iread_at_c(MPIABI_File fh, MPIABI_Offset offset, void *buf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Request *request); +int MPIABI_File_iread_c(MPIABI_File fh, void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Request *request); +int MPIABI_File_iread_shared(MPIABI_File fh, void *buf, int count, + MPIABI_Datatype datatype, MPIABI_Request *request); +int MPIABI_File_iread_shared_c(MPIABI_File fh, void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Request *request); +int MPIABI_File_iwrite(MPIABI_File fh, const void *buf, int count, + MPIABI_Datatype datatype, MPIABI_Request *request); +int MPIABI_File_iwrite_all(MPIABI_File fh, const void *buf, int count, + MPIABI_Datatype datatype, MPIABI_Request *request); +int MPIABI_File_iwrite_all_c(MPIABI_File fh, const void *buf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Request *request); +int MPIABI_File_iwrite_at(MPIABI_File fh, MPIABI_Offset offset, const void *buf, + int count, MPIABI_Datatype datatype, + MPIABI_Request *request); +int MPIABI_File_iwrite_at_all(MPIABI_File fh, MPIABI_Offset offset, + const void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Request *request); +int MPIABI_File_iwrite_at_all_c(MPIABI_File fh, MPIABI_Offset offset, + const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Request *request); +int MPIABI_File_iwrite_at_c(MPIABI_File fh, MPIABI_Offset offset, + const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Request *request); +int MPIABI_File_iwrite_c(MPIABI_File fh, const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Request *request); +int MPIABI_File_iwrite_shared(MPIABI_File fh, const void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Request *request); +int MPIABI_File_iwrite_shared_c(MPIABI_File fh, const void *buf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Request *request); +int MPIABI_File_open(MPIABI_Comm comm, const char *filename, int amode, + MPIABI_Info info, MPIABI_File *fh); +int MPIABI_File_preallocate(MPIABI_File fh, MPIABI_Offset size); +int MPIABI_File_read(MPIABI_File fh, void *buf, int count, + MPIABI_Datatype datatype, MPIABI_Status *status); +int MPIABI_File_read_all(MPIABI_File fh, void *buf, int count, + MPIABI_Datatype datatype, MPIABI_Status *status); +int MPIABI_File_read_all_begin(MPIABI_File fh, void *buf, int count, + MPIABI_Datatype datatype); +int MPIABI_File_read_all_begin_c(MPIABI_File fh, void *buf, MPIABI_Count count, + MPIABI_Datatype datatype); +int MPIABI_File_read_all_c(MPIABI_File fh, void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Status *status); +int MPIABI_File_read_all_end(MPIABI_File fh, void *buf, MPIABI_Status *status); +int MPIABI_File_read_at(MPIABI_File fh, MPIABI_Offset offset, void *buf, + int count, MPIABI_Datatype datatype, + MPIABI_Status *status); +int MPIABI_File_read_at_all(MPIABI_File fh, MPIABI_Offset offset, void *buf, + int count, MPIABI_Datatype datatype, + MPIABI_Status *status); +int MPIABI_File_read_at_all_begin(MPIABI_File fh, MPIABI_Offset offset, + void *buf, int count, + MPIABI_Datatype datatype); +int MPIABI_File_read_at_all_begin_c(MPIABI_File fh, MPIABI_Offset offset, + void *buf, MPIABI_Count count, + MPIABI_Datatype datatype); +int MPIABI_File_read_at_all_c(MPIABI_File fh, MPIABI_Offset offset, void *buf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Status *status); +int MPIABI_File_read_at_all_end(MPIABI_File fh, void *buf, + MPIABI_Status *status); +int MPIABI_File_read_at_c(MPIABI_File fh, MPIABI_Offset offset, void *buf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Status *status); +int MPIABI_File_read_c(MPIABI_File fh, void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Status *status); +int MPIABI_File_read_ordered(MPIABI_File fh, void *buf, int count, + MPIABI_Datatype datatype, MPIABI_Status *status); +int MPIABI_File_read_ordered_begin(MPIABI_File fh, void *buf, int count, + MPIABI_Datatype datatype); +int MPIABI_File_read_ordered_begin_c(MPIABI_File fh, void *buf, + MPIABI_Count count, + MPIABI_Datatype datatype); +int MPIABI_File_read_ordered_c(MPIABI_File fh, void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Status *status); +int MPIABI_File_read_ordered_end(MPIABI_File fh, void *buf, + MPIABI_Status *status); +int MPIABI_File_read_shared(MPIABI_File fh, void *buf, int count, + MPIABI_Datatype datatype, MPIABI_Status *status); +int MPIABI_File_read_shared_c(MPIABI_File fh, void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Status *status); +int MPIABI_File_seek(MPIABI_File fh, MPIABI_Offset offset, int whence); +int MPIABI_File_seek_shared(MPIABI_File fh, MPIABI_Offset offset, int whence); +int MPIABI_File_set_atomicity(MPIABI_File fh, int flag); +int MPIABI_File_set_info(MPIABI_File fh, MPIABI_Info info); +int MPIABI_File_set_size(MPIABI_File fh, MPIABI_Offset size); +int MPIABI_File_set_view(MPIABI_File fh, MPIABI_Offset disp, + MPIABI_Datatype etype, MPIABI_Datatype filetype, + const char *datarep, MPIABI_Info info); +int MPIABI_File_sync(MPIABI_File fh); +int MPIABI_File_write(MPIABI_File fh, const void *buf, int count, + MPIABI_Datatype datatype, MPIABI_Status *status); +int MPIABI_File_write_all(MPIABI_File fh, const void *buf, int count, + MPIABI_Datatype datatype, MPIABI_Status *status); +int MPIABI_File_write_all_begin(MPIABI_File fh, const void *buf, int count, + MPIABI_Datatype datatype); +int MPIABI_File_write_all_begin_c(MPIABI_File fh, const void *buf, + MPIABI_Count count, MPIABI_Datatype datatype); +int MPIABI_File_write_all_c(MPIABI_File fh, const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Status *status); +int MPIABI_File_write_all_end(MPIABI_File fh, const void *buf, + MPIABI_Status *status); +int MPIABI_File_write_at(MPIABI_File fh, MPIABI_Offset offset, const void *buf, + int count, MPIABI_Datatype datatype, + MPIABI_Status *status); +int MPIABI_File_write_at_all(MPIABI_File fh, MPIABI_Offset offset, + const void *buf, int count, + MPIABI_Datatype datatype, MPIABI_Status *status); +int MPIABI_File_write_at_all_begin(MPIABI_File fh, MPIABI_Offset offset, + const void *buf, int count, + MPIABI_Datatype datatype); +int MPIABI_File_write_at_all_begin_c(MPIABI_File fh, MPIABI_Offset offset, + const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype); +int MPIABI_File_write_at_all_c(MPIABI_File fh, MPIABI_Offset offset, + const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Status *status); +int MPIABI_File_write_at_all_end(MPIABI_File fh, const void *buf, + MPIABI_Status *status); +int MPIABI_File_write_at_c(MPIABI_File fh, MPIABI_Offset offset, + const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Status *status); +int MPIABI_File_write_c(MPIABI_File fh, const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Status *status); +int MPIABI_File_write_ordered(MPIABI_File fh, const void *buf, int count, + MPIABI_Datatype datatype, MPIABI_Status *status); +int MPIABI_File_write_ordered_begin(MPIABI_File fh, const void *buf, int count, + MPIABI_Datatype datatype); +int MPIABI_File_write_ordered_begin_c(MPIABI_File fh, const void *buf, + MPIABI_Count count, + MPIABI_Datatype datatype); +int MPIABI_File_write_ordered_c(MPIABI_File fh, const void *buf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Status *status); +int MPIABI_File_write_ordered_end(MPIABI_File fh, const void *buf, + MPIABI_Status *status); +int MPIABI_File_write_shared(MPIABI_File fh, const void *buf, int count, + MPIABI_Datatype datatype, MPIABI_Status *status); +int MPIABI_File_write_shared_c(MPIABI_File fh, const void *buf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Status *status); +int MPIABI_Register_datarep( + const char *datarep, MPIABI_Datarep_conversion_function *read_conversion_fn, + MPIABI_Datarep_conversion_function *write_conversion_fn, + MPIABI_Datarep_extent_function *dtype_file_extent_fn, void *extra_state); +int MPIABI_Register_datarep_c( + const char *datarep, + MPIABI_Datarep_conversion_function_c *read_conversion_fn, + MPIABI_Datarep_conversion_function_c *write_conversion_fn, + MPIABI_Datarep_extent_function *dtype_file_extent_fn, void *extra_state); + +// A.3.13 Language Bindings C Bindings + +MPIABI_Fint MPIABI_Comm_c2f(MPIABI_Comm comm); +MPIABI_Comm MPIABI_Comm_f2c(MPIABI_Fint comm); +MPIABI_Fint MPIABI_Errhandler_c2f(MPIABI_Errhandler errhandler); +MPIABI_Errhandler MPIABI_Errhandler_f2c(MPIABI_Fint errhandler); +MPIABI_Fint MPIABI_File_c2f(MPIABI_File file); +MPIABI_File MPIABI_File_f2c(MPIABI_Fint file); +MPIABI_Fint MPIABI_Group_c2f(MPIABI_Group group); +MPIABI_Group MPIABI_Group_f2c(MPIABI_Fint group); +MPIABI_Fint MPIABI_Info_c2f(MPIABI_Info info); +MPIABI_Info MPIABI_Info_f2c(MPIABI_Fint info); +MPIABI_Fint MPIABI_Message_c2f(MPIABI_Message message); +MPIABI_Message MPIABI_Message_f2c(MPIABI_Fint message); +MPIABI_Fint MPIABI_Op_c2f(MPIABI_Op op); +MPIABI_Op MPIABI_Op_f2c(MPIABI_Fint op); +MPIABI_Fint MPIABI_Request_c2f(MPIABI_Request request); +MPIABI_Request MPIABI_Request_f2c(MPIABI_Fint request); +MPIABI_Fint MPIABI_Session_c2f(MPIABI_Session session); +MPIABI_Session MPIABI_Session_f2c(MPIABI_Fint session); +int MPIABI_Status_f082f(const MPIABI_F08_status *f08_status, + MPIABI_Fint *f_status); +int MPIABI_Status_c2f(const MPIABI_Status *c_status, MPIABI_Fint *f_status); +int MPIABI_Status_c2f08(const MPIABI_Status *c_status, + MPIABI_F08_status *f08_status); +int MPIABI_Status_f082c(const MPIABI_F08_status *f08_status, + MPIABI_Status *c_status); +int MPIABI_Status_f2c(const MPIABI_Fint *f_status, MPIABI_Status *c_status); +int MPIABI_Status_f2f08(const MPIABI_Fint *f_status, + MPIABI_F08_status *f08_status); +MPIABI_Fint MPIABI_Type_c2f(MPIABI_Datatype datatype); +int MPIABI_Type_create_f90_complex(int p, int r, MPIABI_Datatype *newtype); +int MPIABI_Type_create_f90_integer(int r, MPIABI_Datatype *newtype); +int MPIABI_Type_create_f90_real(int p, int r, MPIABI_Datatype *newtype); +MPIABI_Datatype MPIABI_Type_f2c(MPIABI_Fint datatype); +int MPIABI_Type_match_size(int typeclass, int size, MPIABI_Datatype *datatype); +MPIABI_Fint MPIABI_Win_c2f(MPIABI_Win win); +MPIABI_Win MPIABI_Win_f2c(MPIABI_Fint win); + +// A.3.14 Tools / Profiling Interface C Bindings + +int MPIABI_Pcontrol(const int level, ...); + +// A.3.15 Tools / MPI Tool Information Interface C Bindings + +int MPIABI_T_category_changed(int *update_number); +int MPIABI_T_category_get_categories(int cat_index, int len, int indices[]); +int MPIABI_T_category_get_cvars(int cat_index, int len, int indices[]); +int MPIABI_T_category_get_events(int cat_index, int len, int indices[]); +int MPIABI_T_category_get_index(const char *name, int *cat_index); +int MPIABI_T_category_get_info(int cat_index, char *name, int *name_len, + char *desc, int *desc_len, int *num_cvars, + int *num_pvars, int *num_categories); +int MPIABI_T_category_get_num(int *num_cat); +int MPIABI_T_category_get_num_events(int cat_index, int *num_events); +int MPIABI_T_category_get_pvars(int cat_index, int len, int indices[]); +int MPIABI_T_cvar_get_index(const char *name, int *cvar_index); +int MPIABI_T_cvar_get_info(int cvar_index, char *name, int *name_len, + int *verbosity, MPIABI_Datatype *datatype, + MPIABI_T_enum *enumtype, char *desc, int *desc_len, + int *bind, int *scope); +int MPIABI_T_cvar_get_num(int *num_cvar); +int MPIABI_T_cvar_handle_alloc(int cvar_index, void *obj_handle, + MPIABI_T_cvar_handle *handle, int *count); +int MPIABI_T_cvar_handle_free(MPIABI_T_cvar_handle *handle); +int MPIABI_T_cvar_read(MPIABI_T_cvar_handle handle, void *buf); +int MPIABI_T_cvar_write(MPIABI_T_cvar_handle handle, const void *buf); +int MPIABI_T_enum_get_info(MPIABI_T_enum enumtype, int *num, char *name, + int *name_len); +int MPIABI_T_enum_get_item(MPIABI_T_enum enumtype, int index, int *value, + char *name, int *name_len); +int MPIABI_T_event_callback_get_info( + MPIABI_T_event_registration event_registration, + MPIABI_T_cb_safety cb_safety, MPIABI_Info *info_used); +int MPIABI_T_event_callback_set_info( + MPIABI_T_event_registration event_registration, + MPIABI_T_cb_safety cb_safety, MPIABI_Info info); +int MPIABI_T_event_copy(MPIABI_T_event_instance event_instance, void *buffer); +int MPIABI_T_event_get_index(const char *name, int *event_index); +int MPIABI_T_event_get_info(int event_index, char *name, int *name_len, + int *verbosity, + MPIABI_Datatype array_of_datatypes[], + MPIABI_Aint array_of_displacements[], + int *num_elements, MPIABI_T_enum *enumtype, + MPIABI_Info *info, char *desc, int *desc_len, + int *bind); +int MPIABI_T_event_get_num(int *num_events); +int MPIABI_T_event_get_source(MPIABI_T_event_instance event_instance, + int *source_index); +int MPIABI_T_event_get_timestamp(MPIABI_T_event_instance event_instance, + MPIABI_Count *event_timestamp); +int MPIABI_T_event_handle_alloc( + int event_index, void *obj_handle, MPIABI_Info info, + MPIABI_T_event_registration *event_registration); +int MPIABI_T_event_handle_free( + MPIABI_T_event_registration event_registration, void *user_data, + MPIABI_T_event_free_cb_function free_cb_function); +int MPIABI_T_event_handle_get_info( + MPIABI_T_event_registration event_registration, MPIABI_Info *info_used); +int MPIABI_T_event_handle_set_info( + MPIABI_T_event_registration event_registration, MPIABI_Info info); +int MPIABI_T_event_read(MPIABI_T_event_instance event_instance, + int element_index, void *buffer); +int MPIABI_T_event_register_callback( + MPIABI_T_event_registration event_registration, + MPIABI_T_cb_safety cb_safety, MPIABI_Info info, void *user_data, + MPIABI_T_event_cb_function event_cb_function); +int MPIABI_T_event_set_dropped_handler( + MPIABI_T_event_registration event_registration, + MPIABI_T_event_dropped_cb_function dropped_cb_function); +int MPIABI_T_finalize(void); +int MPIABI_T_init_thread(int required, int *provided); +int MPIABI_T_pvar_get_index(const char *name, int var_class, int *pvar_index); +int MPIABI_T_pvar_get_info(int pvar_index, char *name, int *name_len, + int *verbosity, int *var_class, + MPIABI_Datatype *datatype, MPIABI_T_enum *enumtype, + char *desc, int *desc_len, int *bind, int *readonly, + int *continuous, int *atomic); +int MPIABI_T_pvar_get_num(int *num_pvar); +int MPIABI_T_pvar_handle_alloc(MPIABI_T_pvar_session pe_session, int pvar_index, + void *obj_handle, MPIABI_T_pvar_handle *handle, + int *count); +int MPIABI_T_pvar_handle_free(MPIABI_T_pvar_session pe_session, + MPIABI_T_pvar_handle *handle); +int MPIABI_T_pvar_read(MPIABI_T_pvar_session pe_session, + MPIABI_T_pvar_handle handle, void *buf); +int MPIABI_T_pvar_readreset(MPIABI_T_pvar_session pe_session, + MPIABI_T_pvar_handle handle, void *buf); +int MPIABI_T_pvar_reset(MPIABI_T_pvar_session pe_session, + MPIABI_T_pvar_handle handle); +int MPIABI_T_pvar_session_create(MPIABI_T_pvar_session *pe_session); +int MPIABI_T_pvar_session_free(MPIABI_T_pvar_session *pe_session); +int MPIABI_T_pvar_start(MPIABI_T_pvar_session pe_session, + MPIABI_T_pvar_handle handle); +int MPIABI_T_pvar_stop(MPIABI_T_pvar_session pe_session, + MPIABI_T_pvar_handle handle); +int MPIABI_T_pvar_write(MPIABI_T_pvar_session pe_session, + MPIABI_T_pvar_handle handle, const void *buf); +int MPIABI_T_source_get_info(int source_index, char *name, int *name_len, + char *desc, int *desc_len, + MPIABI_T_source_order *ordering, + MPIABI_Count *ticks_per_second, + MPIABI_Count *max_ticks, MPIABI_Info *info); +int MPIABI_T_source_get_num(int *num_sources); +int MPIABI_T_source_get_timestamp(int source_index, MPIABI_Count *timestamp); + +// A.3.16 Deprecated C Bindings + +int MPIABI_Attr_delete(MPIABI_Comm comm, int keyval); +int MPIABI_Attr_get(MPIABI_Comm comm, int keyval, void *attribute_val, + int *flag); +int MPIABI_Attr_put(MPIABI_Comm comm, int keyval, void *attribute_val); +int MPIABI_Get_elements_x(const MPIABI_Status *status, MPIABI_Datatype datatype, + MPIABI_Count *count); +int MPIABI_Info_get(MPIABI_Info info, const char *key, int valuelen, + char *value, int *flag); +int MPIABI_Info_get_valuelen(MPIABI_Info info, const char *key, int *valuelen, + int *flag); +int MPIABI_Keyval_create(MPIABI_Copy_function *copy_fn, + MPIABI_Delete_function *delete_fn, int *keyval, + void *extra_state); +int MPIABI_Keyval_free(int *keyval); +int MPIABI_Status_set_elements_x(MPIABI_Status *status, + MPIABI_Datatype datatype, MPIABI_Count count); +int MPIABI_Type_get_extent_x(MPIABI_Datatype datatype, MPIABI_Count *lb, + MPIABI_Count *extent); +int MPIABI_Type_get_true_extent_x(MPIABI_Datatype datatype, + MPIABI_Count *true_lb, + MPIABI_Count *true_extent); +int MPIABI_Type_size_x(MPIABI_Datatype datatype, MPIABI_Count *size); + +// Removed C Bindings + +int MPIABI_Address(void *location, MPIABI_Aint *address); +int MPIABI_Type_hindexed(int count, int *array_of_blocklengths, + MPIABI_Aint *array_of_displacements, + MPIABI_Datatype oldtype, MPIABI_Datatype *newtype); +int MPIABI_Type_hvector(int count, int blocklength, MPIABI_Aint stride, + MPIABI_Datatype oldtype, MPIABI_Datatype *newtype); +int MPIABI_Type_struct(int count, int *array_of_blocklengths, + MPIABI_Aint *array_of_displacements, + MPIABI_Datatype *array_of_types, + MPIABI_Datatype *newtype); +int MPIABI_Type_extent(MPIABI_Datatype datatype, MPIABI_Aint *extent); +int MPIABI_Type_lb(MPIABI_Datatype datatype, MPIABI_Aint *displacement); +int MPIABI_Type_ub(MPIABI_Datatype datatype, MPIABI_Aint *displacement); + +// MPIX + +int MPIXABI_Query_cuda_support(void); +int MPIXABI_Query_hip_support(void); +int MPIXABI_Query_rocm_support(void); +int MPIXABI_Query_ze_support(void); + +#ifdef __cplusplus +} +#endif + +#define MPIABI_FUNCTIONS_H_INCLUDED +#endif // #ifndef MPIABI_FUNCTIONS_H +#ifndef MPIABI_FUNCTIONS_H_INCLUDED +#error +#endif diff --git a/mpiabi/mpiabi_functions_fortran.jl b/mpiabi/mpiabi_functions_fortran.jl new file mode 100644 index 00000000..dd6bf154 --- /dev/null +++ b/mpiabi/mpiabi_functions_fortran.jl @@ -0,0 +1,3938 @@ +@enum Typ begin + # Handles + comm + datatype + errhandler + file + group + info + message + session + op + request + win + # "Typed" integers that need to be converted + errorcode + proc + tag + # Other + address # `integer(MPI_ADDRESS_KIND)` + argv # `character(*), dimension(*)` that may be `MPI_ARGV_NULL` + argvs # `character(*), dimension(:, *)` that may be `MPI_ARGVS_NULL` + buffer # ignore-TKR buffer + buffer_inplace # ignore-TKR buffer that may be `MPI_IN_PLACE` + character # `character(*)` + count # `integer(MPI_COUNT_KIND)` + double_precision # `double precision` + external # `external` + integer # generic integer + logical # generic logical + maybe_undefined # generic integer that may be `MPI_UNDEFINED` + offset # `integer(MPI_OFFSET_KIND)` + status # `integer, dimension(MPI_STATUS_SIZE)` + threadlevel # thread level + void # nothing (return value of a subroutine) + weight # generic integer, but array can also be `MPI_UNWEIGHTED` or `MPI_WEIGHTS_EMPTY` +end + +@enum Intent in_ out inout unclear +function fortran(intent::Intent) + intent === in_ && return "intent(in)" + intent === out && return "intent(out)" + intent === inout && return "intent(inout)" + intent === unclear && return "" + @assert false +end + +struct Arg + name::Symbol + type::Typ + intent::Intent + cond::Union{Nothing,Symbol,AbstractString} + dim::Union{Nothing,Symbol} + useddim::Union{Nothing,Symbol} +end +function Arg(name::Symbol, type::Typ, intent::Intent; cond=nothing, dim=nothing, useddim=nothing) + return Arg(name, type, intent, cond, dim, useddim) +end + +struct Fun + name::Symbol + result::Typ + version::VersionNumber + args::Vector{Arg} +end + +################################################################################ + +const functions = [ + # A.5 Fortran Bindings with `mpif.h` or the `mpi` Module + + # A.5.1 Point-to-Point Communication Fortran Bindings + Fun( + :MPI_Bsend, + void, + v"0", + [ + Arg(:buf, buffer, in_), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:dest, proc, in_), + Arg(:tag, tag, in_), + Arg(:comm, comm, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Bsend_init, + void, + v"0", + [ + Arg(:buf, buffer, in_), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:dest, proc, in_), + Arg(:tag, tag, in_), + Arg(:comm, comm, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun(:MPI_Buffer_attach, void, v"0", [Arg(:buffer, buffer, unclear), Arg(:size, integer, in_), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Buffer_detach, void, v"0", [Arg(:buffer_addr, address, out), Arg(:size, integer, out), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Buffer_flush, void, v"4.1", [Arg(:ierror, errorcode, out)]), + Fun(:MPI_Buffer_iflush, void, v"4.1", [Arg(:request, request, out), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Cancel, void, v"0", [Arg(:request, request, out), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Comm_attach_buffer, + void, + v"4.1", + [Arg(:comm, comm, in_), Arg(:buffer, buffer, in_), Arg(:size, integer, in_), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Comm_detach_buffer, + void, + v"4.1", + [Arg(:comm, comm, in_), Arg(:buffer_addr, address, out), Arg(:size, integer, out), Arg(:ierror, errorcode, out)], + ), + Fun(:MPI_Comm_flush_buffer, void, v"4.1", [Arg(:comm, comm, in_), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Comm_iflush_buffer, void, v"4.1", [Arg(:comm, comm, in_), Arg(:request, request, out), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Get_count, + void, + v"0", + [Arg(:status, status, in_), Arg(:datatype, datatype, in_), Arg(:count, maybe_undefined, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Ibsend, + void, + v"0", + [ + Arg(:buf, buffer, in_), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:dest, proc, in_), + Arg(:tag, tag, in_), + Arg(:comm, comm, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Improbe, + void, + v"0", + [ + Arg(:source, proc, in_), + Arg(:tag, tag, in_), + Arg(:comm, comm, in_), + Arg(:flag, logical, out), + Arg(:message, message, out; cond=:flag), + Arg(:status, status, out; cond=:flag), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Imrecv, + void, + v"0", + [ + Arg(:buf, buffer, out), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:message, message, out), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Iprobe, + void, + v"0", + [ + Arg(:source, proc, in_), + Arg(:tag, tag, in_), + Arg(:comm, comm, in_), + Arg(:flag, logical, out), + Arg(:status, status, out; cond=:flag), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Irecv, + void, + v"0", + [ + Arg(:buf, buffer, out), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:source, proc, in_), + Arg(:tag, tag, in_), + Arg(:comm, comm, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Irsend, + void, + v"0", + [ + Arg(:buf, buffer, in_), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:dest, proc, in_), + Arg(:tag, tag, in_), + Arg(:comm, comm, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Isend, + void, + v"0", + [ + Arg(:buf, buffer, in_), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:dest, proc, in_), + Arg(:tag, tag, in_), + Arg(:comm, comm, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Isendrecv, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcount, integer, in_), + Arg(:sendtype, datatype, in_), + Arg(:dest, proc, in_), + Arg(:sendtag, tag, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcount, integer, in_), + Arg(:recvtype, datatype, in_), + Arg(:source, proc, in_), + Arg(:recvtag, tag, in_), + Arg(:comm, comm, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Isendrecv_replace, + void, + v"0", + [ + Arg(:buf, buffer, inout), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:dest, proc, in_), + Arg(:sendtag, tag, in_), + Arg(:source, proc, in_), + Arg(:recvtag, tag, in_), + Arg(:comm, comm, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Issend, + void, + v"0", + [ + Arg(:buf, buffer, in_), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:dest, proc, in_), + Arg(:tag, tag, in_), + Arg(:comm, comm, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Mprobe, + void, + v"0", + [ + Arg(:source, proc, in_), + Arg(:tag, tag, in_), + Arg(:comm, comm, in_), + Arg(:message, message, out), + Arg(:status, status, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Mrecv, + void, + v"0", + [ + Arg(:buf, buffer, out), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:message, message, out), + Arg(:status, status, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Probe, + void, + v"0", + [ + Arg(:source, proc, in_), + Arg(:tag, tag, in_), + Arg(:comm, comm, in_), + Arg(:status, status, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Recv, + void, + v"0", + [ + Arg(:buf, buffer, out), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:source, proc, in_), + Arg(:tag, tag, in_), + Arg(:comm, comm, in_), + Arg(:status, status, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Recv_init, + void, + v"0", + [ + Arg(:buf, buffer, out), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:source, proc, in_), + Arg(:tag, tag, in_), + Arg(:comm, comm, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun(:MPI_Request_free, void, v"0", [Arg(:request, request, inout), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Request_get_status, + void, + v"0", + [ + Arg(:request, request, in_), + Arg(:flag, logical, out), + Arg(:status, status, out; cond=:flag), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Request_get_status_all, + void, + v"4.1", + [ + Arg(:count, integer, in_), + Arg(:array_of_requests, request, in_; dim=:count), + Arg(:flag, logical, out), + Arg(:array_of_statuses, status, out; cond=:flag, dim=:count), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Request_get_status_any, + void, + v"4.1", + [ + Arg(:count, integer, in_), + Arg(:array_of_requests, request, in_; dim=:count), + Arg(:index, integer, out), + Arg(:flag, logical, out), + Arg(:status, status, out; cond=:flag), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Request_get_status_some, + void, + v"4.1", + [ + Arg(:incount, integer, in_), + Arg(:array_of_requests, request, in_; dim=:incount), + Arg(:outcount, integer, out), + Arg(:array_of_indices, integer, out; dim=:incount, useddim=:outcount), + Arg(:array_of_statuses, status, out; dim=:incount, useddim=:outcount), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Rsend, + void, + v"0", + [ + Arg(:buf, buffer, in_), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:dest, proc, in_), + Arg(:tag, tag, in_), + Arg(:comm, comm, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Rsend_init, + void, + v"0", + [ + Arg(:buf, buffer, in_), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:dest, proc, in_), + Arg(:tag, tag, in_), + Arg(:comm, comm, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Send, + void, + v"0", + [ + Arg(:buf, buffer, in_), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:dest, proc, in_), + Arg(:tag, tag, in_), + Arg(:comm, comm, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Send_init, + void, + v"0", + [ + Arg(:buf, buffer, in_), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:dest, proc, in_), + Arg(:tag, tag, in_), + Arg(:comm, comm, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Sendrecv, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcount, integer, in_), + Arg(:sendtype, datatype, in_), + Arg(:dest, proc, in_), + Arg(:sendtag, tag, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcount, integer, in_), + Arg(:recvtype, datatype, in_), + Arg(:source, proc, in_), + Arg(:recvtag, tag, in_), + Arg(:comm, comm, in_), + Arg(:status, status, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Sendrecv_replace, + void, + v"0", + [ + Arg(:buf, buffer, inout), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:dest, proc, in_), + Arg(:sendtag, tag, in_), + Arg(:source, proc, in_), + Arg(:recvtag, tag, in_), + Arg(:comm, comm, in_), + Arg(:status, status, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Session_attach_buffer, + void, + v"4.1", + [Arg(:session, session, in_), Arg(:buffer, buffer, in_), Arg(:size, integer, in_), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Session_detach_buffer, + void, + v"4.1", + [Arg(:session, session, in_), Arg(:buffer_addr, address, out), Arg(:size, integer, out), Arg(:ierror, errorcode, out)], + ), + Fun(:MPI_Session_flush_buffer, void, v"4.1", [Arg(:session, session, in_), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Session_iflush_buffer, + void, + v"4.1", + [Arg(:session, session, in_), Arg(:request, request, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Ssend, + void, + v"0", + [ + Arg(:buf, buffer, in_), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:dest, proc, in_), + Arg(:tag, tag, in_), + Arg(:comm, comm, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Ssend_init, + void, + v"0", + [ + Arg(:buf, buffer, in_), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:dest, proc, in_), + Arg(:tag, tag, in_), + Arg(:comm, comm, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun(:MPI_Start, void, v"0", [Arg(:request, request, inout), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Startall, + void, + v"0", + [Arg(:count, integer, in_), Arg(:array_of_requests, request, inout; dim=:count), Arg(:ierror, errorcode, out)], + ), + Fun(:MPI_Status_get_error, void, v"4.1", [Arg(:status, status, in_), Arg(:err, errorcode, out), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Status_get_source, void, v"4.1", [Arg(:status, status, in_), Arg(:source, proc, out), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Status_get_tag, void, v"4.1", [Arg(:status, status, in_), Arg(:tag, tag, out), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Test, + void, + v"0", + [ + Arg(:request, request, inout), + Arg(:flag, logical, out), + Arg(:status, status, out; cond=:flag), + Arg(:ierror, errorcode, out), + ], + ), + Fun(:MPI_Test_cancelled, void, v"0", [Arg(:status, status, in_), Arg(:flag, logical, out), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Testall, + void, + v"0", + [ + Arg(:count, integer, in_), + Arg(:array_of_requests, request, inout; cond=:flag, dim=:count), + Arg(:flag, logical, out), + Arg(:array_of_statuses, status, out; cond=:flag, dim=:count), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Testany, + void, + v"0", + [ + Arg(:count, integer, in_), + Arg(:array_of_requests, request, inout; cond="flag .and. i == index", dim=:count), + Arg(:index, integer, out), + Arg(:flag, logical, out), + Arg(:status, status, out; cond=:flag), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Testsome, + void, + v"0", + [ + Arg(:incount, integer, in_), + Arg(:array_of_requests, request, inout; cond="i <= outcount", dim=:incount), + Arg(:outcount, integer, out), + Arg(:array_of_indices, integer, out; dim=:incount, useddim=:outcount), + Arg(:array_of_statuses, status, out; dim=:incount, useddim=:outcount), + Arg(:ierror, errorcode, out), + ], + ), + Fun(:MPI_Wait, void, v"0", [Arg(:request, request, inout), Arg(:status, status, out), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Waitall, + void, + v"0", + [ + Arg(:count, integer, in_), + Arg(:array_of_requests, request, inout; dim=:count), + Arg(:array_of_statuses, status, out; dim=:count), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Waitany, + void, + v"0", + [ + Arg(:count, integer, in_), + Arg(:array_of_requests, request, inout; cond="i == index", dim=:count), + Arg(:index, integer, out), + Arg(:status, status, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Waitsome, + void, + v"0", + [ + Arg(:incount, integer, in_), + Arg(:array_of_requests, request, inout; cond="i <= outcount", dim=:incount), + Arg(:outcount, integer, out), + Arg(:array_of_indices, integer, out; dim=:incount, useddim=:outcount), + Arg(:array_of_statuses, status, out; dim=:incount, useddim=:outcount), + Arg(:ierror, errorcode, out), + ], + ), + + # A.5.2 Partitioned Communication Fortran Bindings + + Fun( + :MPI_Parrived, + void, + v"0", + [Arg(:request, request, in_), Arg(:partition, integer, in_), Arg(:flag, logical, out), Arg(:ierror, errorcode, out)], + ), + Fun(:MPI_Pready, void, v"0", [Arg(:partition, integer, in_), Arg(:request, request, in_), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Pready_list, + void, + v"0", + [ + Arg(:length, integer, in_), + Arg(:array_of_partitions, integer, in_; dim=:length), + Arg(:request, request, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Pready_range, + void, + v"0", + [ + Arg(:partition_low, integer, in_), + Arg(:partition_high, integer, in_), + Arg(:request, request, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Precv_init, + void, + v"0", + [ + Arg(:buf, buffer, out), + Arg(:partitions, integer, in_), + Arg(:count, count, in_), + Arg(:datatype, datatype, in_), + Arg(:source, proc, in_), + Arg(:tag, tag, in_), + Arg(:comm, comm, in_), + Arg(:info, info, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Psend_init, + void, + v"0", + [ + Arg(:buf, buffer, out), + Arg(:partitions, integer, in_), + Arg(:count, count, in_), + Arg(:datatype, datatype, in_), + Arg(:source, proc, in_), + Arg(:tag, tag, in_), + Arg(:comm, comm, in_), + Arg(:info, info, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + + # A.5.3 Datatypes Fortran Bindings + + Fun(:MPI_Aint_add, address, v"0", [Arg(:base, address, in_), Arg(:disp, address, in_)]), + Fun(:MPI_Aint_diff, address, v"0", [Arg(:addr1, address, in_), Arg(:addr2, address, in_)]), + Fun(:MPI_Get_address, void, v"0", [Arg(:location, buffer, in_), Arg(:address, address, out), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Get_elements, + void, + v"0", + [Arg(:status, status, in_), Arg(:datatype, datatype, in_), Arg(:count, integer, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Pack, + void, + v"0", + [ + Arg(:inbuf, buffer, in_), + Arg(:incount, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:outbuf, buffer, out), + Arg(:outsize, integer, in_), + Arg(:position, integer, out), + Arg(:comm, comm, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Pack_external, + void, + v"0", + [ + Arg(:datarep, character, in_), + Arg(:inbuf, buffer, in_), + Arg(:incount, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:outbuf, buffer, out), + Arg(:outsize, address, in_), + Arg(:position, address, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Pack_external_size, + void, + v"0", + [ + Arg(:datarep, character, in_), + Arg(:incount, count, in_), + Arg(:datatype, datatype, in_), + Arg(:size, address, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Pack_size, + void, + v"0", + [ + Arg(:incount, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:comm, comm, in_), + Arg(:size, integer, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun(:MPI_Type_commit, void, v"0", [Arg(:datatype, datatype, out), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Type_contiguous, + void, + v"0", + [Arg(:count, integer, in_), Arg(:oldtype, datatype, in_), Arg(:newtype, datatype, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Type_create_darray, + void, + v"0", + [ + Arg(:size, integer, in_), + Arg(:rank, integer, in_), + Arg(:ndims, integer, in_), + Arg(:array_of_gsizes, integer, in_; dim=:ndims), + Arg(:array_of_distribs, integer, in_; dim=:ndims), + Arg(:array_of_dargs, integer, in_; dim=:ndims), + Arg(:array_of_psizes, integer, in_; dim=:ndims), + Arg(:order, integer, in_), + Arg(:oldtype, datatype, in_), + Arg(:newtype, datatype, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Type_create_hindexed, + void, + v"0", + [ + Arg(:count, integer, in_), + Arg(:array_of_blocklengths, integer, in_; dim=:count), + Arg(:array_of_displacements, address, in_; dim=:count), + Arg(:oldtype, datatype, in_), + Arg(:newtype, datatype, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Type_create_hindexed_block, + void, + v"0", + [ + Arg(:count, integer, in_), + Arg(:blocklength, integer, in_), + Arg(:array_of_displacements, address, in_; dim=:count), + Arg(:oldtype, datatype, in_), + Arg(:newtype, datatype, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Type_create_hvector, + void, + v"0", + [ + Arg(:count, integer, in_), + Arg(:blocklength, integer, in_), + Arg(:stride, address, in_), + Arg(:oldtype, datatype, in_), + Arg(:newtype, datatype, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Type_create_indexed_block, + void, + v"0", + [ + Arg(:count, integer, in_), + Arg(:blocklength, integer, in_), + Arg(:array_of_displacements, integer, in_; dim=:count), + Arg(:oldtype, datatype, in_), + Arg(:newtype, datatype, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Type_create_resized, + void, + v"0", + [ + Arg(:oldtype, datatype, in_), + Arg(:lb, address, in_), + Arg(:extent, address, in_), + Arg(:newtype, datatype, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Type_create_struct, + void, + v"0", + [ + Arg(:count, integer, in_), + Arg(:array_of_blocklengths, integer, in_; dim=:count), + Arg(:array_of_displacements, address, in_; dim=:count), + Arg(:array_of_types, datatype, in_; dim=:count), + Arg(:newtype, datatype, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Type_create_subarray, + void, + v"0", + [ + Arg(:ndims, integer, in_), + Arg(:array_of_sizes, integer, in_; dim=:ndims), + Arg(:array_of_subsizes, integer, in_; dim=:ndims), + Arg(:array_of_starts, integer, in_; dim=:ndims), + Arg(:order, integer, in_), + Arg(:oldtype, datatype, in_), + Arg(:newtype, datatype, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun(:MPI_Type_dup, void, v"0", [Arg(:oldtype, datatype, in_), Arg(:newtype, datatype, out), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Type_free, void, v"0", [Arg(:datatype, datatype, out), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Type_get_contents, + void, + v"0", + [ + Arg(:datatype, datatype, in_), + Arg(:max_integers, integer, in_), + Arg(:max_addresses, integer, in_), + Arg(:max_datatypes, integer, in_), + Arg(:array_of_integers, integer, out), + Arg(:array_of_addresses, address, out), + Arg(:array_of_datatypes, datatype, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Type_get_envelope, + void, + v"0", + [ + Arg(:datatype, datatype, in_), + Arg(:num_integers, integer, out), + Arg(:num_addresses, integer, out), + Arg(:num_datatypes, integer, out), + Arg(:combiner, integer, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Type_get_extent, + void, + v"0", + [Arg(:datatype, datatype, in_), Arg(:lb, address, out), Arg(:extent, address, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Type_get_true_extent, + void, + v"0", + [Arg(:datatype, datatype, in_), Arg(:true_lb, address, out), Arg(:true_extent, address, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Type_indexed, + void, + v"0", + [ + Arg(:count, integer, in_), + Arg(:array_of_blocklengths, integer, in_; dim=:count), + Arg(:array_of_displacements, integer, in_; dim=:count), + Arg(:oldtype, datatype, in_), + Arg(:newtype, datatype, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun(:MPI_Type_size, void, v"0", [Arg(:datatype, datatype, in_), Arg(:size, integer, out), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Type_vector, + void, + v"0", + [ + Arg(:count, integer, in_), + Arg(:blocklength, integer, in_), + Arg(:stride, integer, in_), + Arg(:oldtype, datatype, in_), + Arg(:newtype, datatype, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Unpack, + void, + v"0", + [ + Arg(:inbuf, buffer, in_), + Arg(:insize, integer, in_), + Arg(:position, integer, out), + Arg(:outbuf, buffer, out), + Arg(:outcount, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:comm, comm, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Unpack_external, + void, + v"0", + [ + Arg(:datarep, character, in_), + Arg(:inbuf, buffer, in_), + Arg(:insize, address, in_), + Arg(:position, address, out), + Arg(:outbuf, buffer, out), + Arg(:outcount, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:ierror, errorcode, out), + ], + ), + + # A.5.4 Collective Communication Fortran Bindings + + Fun( + :MPI_Allgather, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcount, integer, in_), + Arg(:sendtype, datatype, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcount, integer, in_), + Arg(:recvtype, datatype, in_), + Arg(:comm, comm, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Allgather_init, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcount, integer, in_), + Arg(:sendtype, datatype, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcount, integer, in_), + Arg(:recvtype, datatype, in_), + Arg(:comm, comm, in_), + Arg(:info, info, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Allgatherv, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcount, integer, in_), + Arg(:sendtype, datatype, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcounts, integer, in_; dim=:comm_size), + Arg(:displs, integer, in_; dim=:comm_size), + Arg(:recvtype, datatype, in_), + Arg(:comm, comm, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Allgatherv_init, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcount, integer, in_), + Arg(:sendtype, datatype, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcounts, integer, in_; dim=:comm_size), + Arg(:displs, integer, in_; dim=:comm_size), + Arg(:recvtype, datatype, in_), + Arg(:comm, comm, in_), + Arg(:info, info, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Allreduce, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:recvbuf, buffer, out), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:op, op, in_), + Arg(:comm, comm, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Allreduce_init, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:recvbuf, buffer, out), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:op, op, in_), + Arg(:comm, comm, in_), + Arg(:info, info, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Alltoall, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcount, integer, in_), + Arg(:sendtype, datatype, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcount, integer, in_), + Arg(:recvtype, datatype, in_), + Arg(:comm, comm, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Alltoall_init, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcount, integer, in_), + Arg(:sendtype, datatype, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcount, integer, in_), + Arg(:recvtype, datatype, in_), + Arg(:comm, comm, in_), + Arg(:info, info, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Alltoallv, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcounts, integer, in_; dim=:comm_size), + Arg(:sdispls, integer, in_; dim=:comm_size), + Arg(:sendtype, datatype, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcounts, integer, in_; dim=:comm_size), + Arg(:rdispls, integer, in_; dim=:comm_size), + Arg(:recvtype, datatype, in_), + Arg(:comm, comm, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Alltoallv_init, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcounts, integer, in_; dim=:comm_size), + Arg(:sdispls, integer, in_; dim=:comm_size), + Arg(:sendtype, datatype, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcounts, integer, in_; dim=:comm_size), + Arg(:rdispls, integer, in_; dim=:comm_size), + Arg(:recvtype, datatype, in_), + Arg(:comm, comm, in_), + Arg(:info, info, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Alltoallw, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcounts, integer, in_; dim=:comm_size), + Arg(:sdispls, integer, in_; dim=:comm_size), + Arg(:sendtypes, datatype, in_; dim=:comm_size), + Arg(:recvbuf, buffer, out), + Arg(:recvcounts, integer, in_; dim=:comm_size), + Arg(:rdispls, integer, in_; dim=:comm_size), + Arg(:recvtypes, datatype, in_; dim=:comm_size), + Arg(:comm, comm, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Alltoallw_init, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcounts, integer, in_; dim=:comm_size), + Arg(:sdispls, integer, in_; dim=:comm_size), + Arg(:sendtypes, datatype, in_; dim=:comm_size), + Arg(:recvbuf, buffer, out), + Arg(:recvcounts, integer, in_; dim=:comm_size), + Arg(:rdispls, integer, in_; dim=:comm_size), + Arg(:recvtypes, datatype, in_; dim=:comm_size), + Arg(:comm, comm, in_), + Arg(:info, info, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun(:MPI_Barrier, void, v"0", [Arg(:comm, comm, in_), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Barrier_init, + void, + v"0", + [Arg(:comm, comm, in_), Arg(:info, info, in_), Arg(:request, request, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Bcast, + void, + v"0", + [ + Arg(:buffer, buffer, out), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:root, integer, in_), + Arg(:comm, comm, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Bcast_init, + void, + v"0", + [ + Arg(:buffer, buffer, out), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:root, integer, in_), + Arg(:comm, comm, in_), + Arg(:info, info, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Exscan, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:recvbuf, buffer, out), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:op, op, in_), + Arg(:comm, comm, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Exscan_init, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:recvbuf, buffer, out), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:op, op, in_), + Arg(:comm, comm, in_), + Arg(:info, info, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Gather, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcount, integer, in_), + Arg(:sendtype, datatype, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcount, integer, in_), + Arg(:recvtype, datatype, in_), + Arg(:root, integer, in_), + Arg(:comm, comm, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Gather_init, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcount, integer, in_), + Arg(:sendtype, datatype, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcount, integer, in_), + Arg(:recvtype, datatype, in_), + Arg(:root, integer, in_), + Arg(:comm, comm, in_), + Arg(:info, info, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Gatherv, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcount, integer, in_), + Arg(:sendtype, datatype, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcounts, integer, in_; dim=:comm_size), + Arg(:displs, integer, in_; dim=:comm_size), + Arg(:recvtype, datatype, in_), + Arg(:root, integer, in_), + Arg(:comm, comm, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Gatherv_init, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcount, integer, in_), + Arg(:sendtype, datatype, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcounts, integer, in_; dim=:comm_size), + Arg(:displs, integer, in_; dim=:comm_size), + Arg(:recvtype, datatype, in_), + Arg(:root, integer, in_), + Arg(:comm, comm, in_), + Arg(:info, info, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Iallgather, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcount, integer, in_), + Arg(:sendtype, datatype, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcount, integer, in_), + Arg(:recvtype, datatype, in_), + Arg(:comm, comm, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Iallgatherv, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcount, integer, in_), + Arg(:sendtype, datatype, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcounts, integer, in_; dim=:comm_size), + Arg(:displs, integer, in_; dim=:comm_size), + Arg(:recvtype, datatype, in_), + Arg(:comm, comm, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Iallreduce, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:recvbuf, buffer, out), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:op, op, in_), + Arg(:comm, comm, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Ialltoall, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcount, integer, in_), + Arg(:sendtype, datatype, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcount, integer, in_), + Arg(:recvtype, datatype, in_), + Arg(:comm, comm, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Ialltoallv, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcounts, integer, in_; dim=:comm_size), + Arg(:sdispls, integer, in_; dim=:comm_size), + Arg(:sendtype, datatype, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcounts, integer, in_; dim=:comm_size), + Arg(:rdispls, integer, in_; dim=:comm_size), + Arg(:recvtype, datatype, in_), + Arg(:comm, comm, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Ialltoallw, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcounts, integer, in_; dim=:comm_size), + Arg(:sdispls, integer, in_; dim=:comm_size), + Arg(:sendtypes, datatype, in_; dim=:comm_size), + Arg(:recvbuf, buffer, out), + Arg(:recvcounts, integer, in_; dim=:comm_size), + Arg(:rdispls, integer, in_; dim=:comm_size), + Arg(:recvtypes, datatype, in_; dim=:comm_size), + Arg(:comm, comm, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun(:MPI_Ibarrier, void, v"0", [Arg(:comm, comm, in_), Arg(:request, request, out), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Ibcast, + void, + v"0", + [ + Arg(:buffer, buffer, out), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:root, integer, in_), + Arg(:comm, comm, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Iexscan, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:recvbuf, buffer, out), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:op, op, in_), + Arg(:comm, comm, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Igather, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcount, integer, in_), + Arg(:sendtype, datatype, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcount, integer, in_), + Arg(:recvtype, datatype, in_), + Arg(:root, integer, in_), + Arg(:comm, comm, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Igatherv, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcount, integer, in_), + Arg(:sendtype, datatype, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcounts, integer, in_; dim=:comm_size), + Arg(:displs, integer, in_; dim=:comm_size), + Arg(:recvtype, datatype, in_), + Arg(:root, integer, in_), + Arg(:comm, comm, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Ireduce, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:recvbuf, buffer, out), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:op, op, in_), + Arg(:root, integer, in_), + Arg(:comm, comm, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Ireduce_scatter, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcounts, integer, in_; dim=:comm_size), + Arg(:datatype, datatype, in_), + Arg(:op, op, in_), + Arg(:comm, comm, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Ireduce_scatter_block, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcount, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:op, op, in_), + Arg(:comm, comm, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Iscan, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:recvbuf, buffer, out), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:op, op, in_), + Arg(:comm, comm, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Iscatter, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcount, integer, in_), + Arg(:sendtype, datatype, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcount, integer, in_), + Arg(:recvtype, datatype, in_), + Arg(:root, integer, in_), + Arg(:comm, comm, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Iscatterv, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcounts, integer, in_; dim=:comm_size), + Arg(:sdispls, integer, in_; dim=:comm_size), + Arg(:sendtype, datatype, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcount, integer, in_), + Arg(:recvtype, datatype, in_), + Arg(:root, integer, in_), + Arg(:comm, comm, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun(:MPI_Op_commutative, void, v"0", [Arg(:op, op, in_), Arg(:commute, logical, out), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Op_create, + void, + v"99999", + [ + Arg(:user_fn, external, in_), # MPI_User_function * + Arg(:commute, logical, in_), + Arg(:op, op, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun(:MPI_Op_free, void, v"0", [Arg(:op, op, out), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Reduce, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:recvbuf, buffer, out), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:op, op, in_), + Arg(:root, integer, in_), + Arg(:comm, comm, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Reduce_init, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:recvbuf, buffer, out), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:op, op, in_), + Arg(:root, integer, in_), + Arg(:comm, comm, in_), + Arg(:info, info, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Reduce_local, + void, + v"0", + [ + Arg(:inbuf, buffer, in_), + Arg(:inoutbuf, buffer, out), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:op, op, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Reduce_scatter, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcounts, integer, in_; dim=:comm_size), + Arg(:datatype, datatype, in_), + Arg(:op, op, in_), + Arg(:comm, comm, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Reduce_scatter_block, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcount, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:op, op, in_), + Arg(:comm, comm, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Reduce_scatter_block_init, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcount, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:op, op, in_), + Arg(:comm, comm, in_), + Arg(:info, info, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Reduce_scatter_init, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcounts, integer, in_; dim=:comm_size), + Arg(:datatype, datatype, in_), + Arg(:op, op, in_), + Arg(:comm, comm, in_), + Arg(:info, info, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Scan, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:recvbuf, buffer, out), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:op, op, in_), + Arg(:comm, comm, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Scan_init, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:recvbuf, buffer, out), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:op, op, in_), + Arg(:comm, comm, in_), + Arg(:info, info, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Scatter, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcount, integer, in_), + Arg(:sendtype, datatype, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcount, integer, in_), + Arg(:recvtype, datatype, in_), + Arg(:root, integer, in_), + Arg(:comm, comm, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Scatter_init, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcount, integer, in_), + Arg(:sendtype, datatype, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcount, integer, in_), + Arg(:recvtype, datatype, in_), + Arg(:root, integer, in_), + Arg(:comm, comm, in_), + Arg(:info, info, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Scatterv, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcounts, integer, in_; dim=:comm_size), + Arg(:displs, integer, in_; dim=:comm_size), + Arg(:sendtype, datatype, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcount, integer, in_), + Arg(:recvtype, datatype, in_), + Arg(:root, integer, in_), + Arg(:comm, comm, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Scatterv_init, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcounts, integer, in_; dim=:comm_size), + Arg(:displs, integer, in_; dim=:comm_size), + Arg(:sendtype, datatype, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcount, integer, in_), + Arg(:recvtype, datatype, in_), + Arg(:root, integer, in_), + Arg(:comm, comm, in_), + Arg(:info, info, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Type_get_value_index, + void, + v"4.1", + [ + Arg(:value_type, datatype, in_), + Arg(:index_type, datatype, in_), + Arg(:pair_type, datatype, out), + Arg(:ierror, errorcode, out), + ], + ), + + # A.5.5 Groups, Contexts, Communicators, and Caching Fortran Bindings + + Fun( + :MPI_Comm_compare, + void, + v"0", + [Arg(:comm1, comm, in_), Arg(:comm2, comm, in_), Arg(:result, integer, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Comm_create, + void, + v"0", + [Arg(:comm, comm, in_), Arg(:group, group, in_), Arg(:newcomm, comm, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Comm_create_from_group, + void, + v"0", + [ + Arg(:group, group, in_), + Arg(:stringtag, character, in_), + Arg(:info, info, in_), + Arg(:errhandler, errhandler, in_), + Arg(:newcomm, comm, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Comm_create_group, + void, + v"0", + [ + Arg(:comm, comm, in_), + Arg(:group, group, in_), + Arg(:tag, integer, in_), + Arg(:newcomm, comm, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Comm_create_keyval, + void, + v"99999", + [ + Arg(:comm_copy_attr_fn, external, in_), # MPI_Comm_copy_attr_function * + Arg(:comm_delete_attr_fn, external, in_), # MPI_Comm_delete_attr_function * + Arg(:comm_keyval, integer, out), + Arg(:extra_state, buffer, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun(:MPI_Comm_delete_attr, void, v"0", [Arg(:comm, comm, in_), Arg(:comm_keyval, integer, in_), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Comm_dup, void, v"0", [Arg(:comm, comm, in_), Arg(:newcomm, comm, out), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Comm_dup_with_info, + void, + v"0", + [Arg(:comm, comm, in_), Arg(:info, info, in_), Arg(:newcomm, comm, out), Arg(:ierror, errorcode, out)], + ), + Fun(:MPI_Comm_free, void, v"0", [Arg(:comm, comm, out), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Comm_get_name, + void, + v"0", + [Arg(:comm, comm, in_), Arg(:comm_name, character, out), Arg(:resultlen, integer, out), Arg(:ierror, errorcode, out)], + ), + Fun(:MPI_Comm_free_keyval, void, v"0", [Arg(:comm_keyval, integer, out), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Comm_get_attr, + void, + v"0", + [ + Arg(:comm, comm, in_), + Arg(:comm_keyval, integer, in_), + Arg(:attribute_val, buffer, out), + Arg(:flag, logical, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun(:MPI_Comm_get_info, void, v"0", [Arg(:comm, comm, in_), Arg(:info_used, info, out), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Comm_group, void, v"0", [Arg(:comm, comm, in_), Arg(:group, group, out), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Comm_idup, + void, + v"0", + [Arg(:comm, comm, in_), Arg(:newcomm, comm, out), Arg(:request, request, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Comm_idup_with_info, + void, + v"0", + [ + Arg(:comm, comm, in_), + Arg(:info, info, in_), + Arg(:newcomm, comm, out), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun(:MPI_Comm_rank, void, v"0", [Arg(:comm, comm, in_), Arg(:rank, integer, out), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Comm_remote_group, void, v"0", [Arg(:comm, comm, in_), Arg(:group, group, out), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Comm_remote_size, void, v"0", [Arg(:comm, comm, in_), Arg(:size, integer, out), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Comm_set_attr, + void, + v"0", + [Arg(:comm, comm, in_), Arg(:comm_keyval, integer, in_), Arg(:attribute_val, buffer, out), Arg(:ierror, errorcode, out)], + ), + Fun(:MPI_Comm_set_info, void, v"0", [Arg(:comm, comm, in_), Arg(:info, info, in_), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Comm_set_name, void, v"0", [Arg(:comm, comm, in_), Arg(:comm_name, character, in_), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Comm_size, void, v"0", [Arg(:comm, comm, in_), Arg(:size, integer, out), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Comm_split, + void, + v"0", + [ + Arg(:comm, comm, in_), + Arg(:color, integer, in_), + Arg(:key, integer, in_), + Arg(:newcomm, comm, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun(:MPI_Group_free, void, v"0", [Arg(:group, group, out), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Comm_split_type, + void, + v"0", + [ + Arg(:comm, comm, in_), + Arg(:split_type, integer, in_), + Arg(:key, integer, in_), + Arg(:info, info, in_), + Arg(:newcomm, comm, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun(:MPI_Comm_test_inter, void, v"0", [Arg(:comm, comm, in_), Arg(:flag, logical, out), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Group_compare, + void, + v"0", + [Arg(:group1, group, in_), Arg(:group2, group, in_), Arg(:result, integer, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Group_difference, + void, + v"0", + [Arg(:group1, group, in_), Arg(:group2, group, in_), Arg(:newgroup, group, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Group_excl, + void, + v"0", + [ + Arg(:group, group, in_), + Arg(:n, integer, in_), + Arg(:ranks, integer, in_; dim=:n), + Arg(:newgroup, group, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Group_from_session_pset, + void, + v"0", + [Arg(:session, session, in_), Arg(:pset_name, character, in_), Arg(:newgroup, group, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Group_incl, + void, + v"0", + [ + Arg(:group, group, in_), + Arg(:n, integer, in_), + Arg(:ranks, integer, in_; dim=:n), + Arg(:newgroup, group, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Group_intersection, + void, + v"0", + [Arg(:group1, group, in_), Arg(:group2, group, in_), Arg(:newgroup, group, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Group_range_excl, + void, + v"0", + [ + Arg(:group, group, in_), + Arg(:n, integer, in_), + Arg(:ranges, integer, in_; dim=:n), + Arg(:newgroup, group, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Group_range_incl, + void, + v"0", + [ + Arg(:group, group, in_), + Arg(:n, integer, in_), + Arg(:ranges, integer, in_; dim=:n), + Arg(:newgroup, group, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun(:MPI_Group_rank, void, v"0", [Arg(:group, group, in_), Arg(:rank, integer, out), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Group_size, void, v"0", [Arg(:group, group, in_), Arg(:size, integer, out), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Group_translate_ranks, + void, + v"0", + [ + Arg(:group1, group, in_), + Arg(:n, integer, in_), + Arg(:ranks1, integer, in_; dim=:n), + Arg(:group2, group, in_), + Arg(:ranks2, integer, in_; dim=:n), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Group_union, + void, + v"0", + [Arg(:group1, group, in_), Arg(:group2, group, in_), Arg(:newgroup, group, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Intercomm_create, + void, + v"0", + [ + Arg(:local_comm, comm, in_), + Arg(:local_leader, integer, in_), + Arg(:peer_comm, comm, in_), + Arg(:remote_leader, integer, in_), + Arg(:tag, integer, in_), + Arg(:newintercomm, comm, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Intercomm_create_from_groups, + void, + v"0", + [ + Arg(:local_group, group, in_), + Arg(:local_leader, integer, in_), + Arg(:remote_group, group, in_), + Arg(:remote_leader, integer, in_), + Arg(:stringtag, character, in_), + Arg(:info, info, in_), + Arg(:errhandler, errhandler, in_), + Arg(:newintercomm, comm, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Intercomm_merge, + void, + v"0", + [Arg(:intercomm, comm, in_), Arg(:high, integer, in_), Arg(:newintracomm, comm, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Type_create_keyval, + void, + v"99999", + [ + Arg(:type_copy_attr_fn, external, in_), # MPI_Type_copy_attr_function * + Arg(:type_delete_attr_fn, external, in_), # MPI_Type_delete_attr_function * + Arg(:type_keyval, integer, out), + Arg(:extra_state, buffer, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Type_delete_attr, + void, + v"0", + [Arg(:datatype, datatype, in_), Arg(:type_keyval, integer, in_), Arg(:ierror, errorcode, out)], + ), + Fun(:MPI_Type_free_keyval, void, v"0", [Arg(:type_keyval, integer, out), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Type_get_attr, + void, + v"0", + [ + Arg(:datatype, datatype, in_), + Arg(:type_keyval, integer, in_), + Arg(:attribute_val, buffer, out), + Arg(:flag, logical, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Type_get_name, + void, + v"0", + [ + Arg(:datatype, datatype, in_), + Arg(:type_name, character, out), + Arg(:resultlen, integer, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Type_set_attr, + void, + v"0", + [ + Arg(:datatype, datatype, in_), + Arg(:type_keyval, integer, in_), + Arg(:attribute_val, buffer, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Type_set_name, + void, + v"0", + [Arg(:datatype, datatype, in_), Arg(:type_name, character, in_), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Win_create_keyval, + void, + v"99999", + [ + Arg(:win_copy_attr_fn, external, in_), # MPI_Win_copy_attr_function * + Arg(:win_delete_attr_fn, external, in_), # MPI_Win_delete_attr_function * + Arg(:win_keyval, integer, out), + Arg(:extra_state, buffer, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun(:MPI_Win_delete_attr, void, v"0", [Arg(:win, win, in_), Arg(:win_keyval, integer, in_), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Win_free_keyval, void, v"0", [Arg(:win_keyval, integer, out), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Win_get_attr, + void, + v"0", + [ + Arg(:win, win, in_), + Arg(:win_keyval, integer, in_), + Arg(:attribute_val, buffer, out), + Arg(:flag, logical, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Win_get_name, + void, + v"0", + [Arg(:win, win, in_), Arg(:win_name, character, out), Arg(:resultlen, integer, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Win_set_attr, + void, + v"0", + [Arg(:win, win, in_), Arg(:win_keyval, integer, in_), Arg(:attribute_val, buffer, out), Arg(:ierror, errorcode, out)], + ), + Fun(:MPI_Win_set_name, void, v"0", [Arg(:win, win, in_), Arg(:win_name, character, in_), Arg(:ierror, errorcode, out)]), + + # A.5.6 Virtual Topologies for MPI Processes Fortran Bindings + + Fun( + :MPI_Cart_coords, + void, + v"0", + [ + Arg(:comm, comm, in_), + Arg(:rank, integer, in_), + Arg(:maxdims, integer, in_), + Arg(:coords, integer, out; dim=:maxdims), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Cart_create, + void, + v"0", + [ + Arg(:comm_old, comm, in_), + Arg(:ndims, integer, in_), + Arg(:dims, integer, in_; dim=:ndims), + Arg(:periods, logical, in_; dim=:ndims), + Arg(:reorder, logical, in_), + Arg(:comm_cart, comm, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Cart_get, + void, + v"0", + [ + Arg(:comm, comm, in_), + Arg(:maxdims, integer, in_), + Arg(:dims, integer, out; dim=:maxdims), + Arg(:periods, integer, out; dim=:maxdims), + Arg(:coords, integer, out; dim=:maxdims), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Cart_map, + void, + v"0", + [ + Arg(:comm, comm, in_), + Arg(:ndims, integer, in_), + Arg(:dims, integer, in_; dim=:ndims), + Arg(:periods, integer, in_; dim=:ndims), + Arg(:newrank, integer, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Cart_rank, + void, + v"0", + [Arg(:comm, comm, in_), Arg(:coords, integer, in_; dim=:*), Arg(:rank, integer, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Cart_shift, + void, + v"0", + [ + Arg(:comm, comm, in_), + Arg(:direction, integer, in_), + Arg(:disp, integer, in_), + Arg(:rank_source, integer, out), + Arg(:rank_dest, integer, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Cart_sub, + void, + v"0", + [Arg(:comm, comm, in_), Arg(:remain_dims, logical, in_; dim=:*), Arg(:newcomm, comm, out), Arg(:ierror, errorcode, out)], + ), + Fun(:MPI_Cartdim_get, void, v"0", [Arg(:comm, comm, in_), Arg(:ndims, integer, out), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Dims_create, + void, + v"0", + [Arg(:nnodes, integer, in_), Arg(:ndims, integer, in_), Arg(:dims, integer, in_; dim=:ndims), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Dist_graph_create, + void, + v"0", + [ + Arg(:comm_old, comm, in_), + Arg(:n, integer, in_), + Arg(:sources, integer, in_; dim=:n), + Arg(:degrees, integer, in_; dim=:n), + Arg(:destinations, integer, in_; dim=:*), + Arg(:weights, weight, in_; dim=:*), + Arg(:info, info, in_), + Arg(:reorder, logical, in_), + Arg(:comm_dist_graph, comm, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Dist_graph_create_adjacent, + void, + v"0", + [ + Arg(:comm_old, comm, in_), + Arg(:indegree, integer, in_), + Arg(:sources, integer, in_; dim=:indegree), + Arg(:sourceweights, weight, in_; dim=:*), + Arg(:outdegree, integer, in_), + Arg(:destinations, integer, in_; dim=:outdegree), + Arg(:destweights, weight, in_; dim=:*), + Arg(:info, info, in_), + Arg(:reorder, integer, in_), + Arg(:comm_dist_graph, comm, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Dist_graph_neighbors, + void, + v"0", + [ + Arg(:comm, comm, in_), + Arg(:maxindegree, integer, in_), + Arg(:sources, integer, out; dim=:maxindegree), + Arg(:sourceweights, weight, out; dim=:*), + Arg(:maxoutdegree, integer, in_), + Arg(:destinations, integer, out; dim=:maxoutdegree), + Arg(:destweights, weight, out; dim=:*), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Dist_graph_neighbors_count, + void, + v"0", + [ + Arg(:comm, comm, in_), + Arg(:indegree, integer, out), + Arg(:outdegree, integer, out), + Arg(:weighted, integer, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Graph_create, + void, + v"0", + [ + Arg(:comm_old, comm, in_), + Arg(:nnodes, integer, in_), + Arg(:index, integer, in_; dim=:nnodes), + Arg(:edges, integer, in_; dim=:nnodes), + Arg(:reorder, integer, in_), + Arg(:comm_graph, comm, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Graph_get, + void, + v"0", + [ + Arg(:comm, comm, in_), + Arg(:maxindex, integer, in_), + Arg(:maxedges, integer, in_), + Arg(:index, integer, out; dim=:maxindex), + Arg(:edges, integer, out; dim=:maxedges), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Graph_map, + void, + v"0", + [ + Arg(:comm, comm, in_), + Arg(:nnodes, integer, in_), + Arg(:index, integer, in_; dim=:nnodes), + Arg(:edges, integer, in_; dim=:nnodes), + Arg(:newrank, integer, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Graph_neighbors, + void, + v"0", + [ + Arg(:comm, comm, in_), + Arg(:rank, integer, in_), + Arg(:maxneighbors, integer, in_), + Arg(:neighbors, integer, out; dim=:maxneighbors), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Graph_neighbors_count, + void, + v"0", + [Arg(:comm, comm, in_), Arg(:rank, integer, in_), Arg(:nneighbors, integer, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Graphdims_get, + void, + v"0", + [Arg(:comm, comm, in_), Arg(:nnodes, integer, out), Arg(:nedges, integer, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Ineighbor_allgather, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcount, integer, in_), + Arg(:sendtype, datatype, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcount, integer, in_), + Arg(:recvtype, datatype, in_), + Arg(:comm, comm, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Ineighbor_allgatherv, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcount, integer, in_), + Arg(:sendtype, datatype, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcounts, integer, in_; dim=:comm_size), + Arg(:displs, integer, in_; dim=:comm_size), + Arg(:recvtype, datatype, in_), + Arg(:comm, comm, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Ineighbor_alltoall, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcount, integer, in_), + Arg(:sendtype, datatype, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcount, integer, in_), + Arg(:recvtype, datatype, in_), + Arg(:comm, comm, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Ineighbor_alltoallv, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcounts, integer, in_; dim=:comm_size), + Arg(:sdispls, integer, in_; dim=:comm_size), + Arg(:sendtype, datatype, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcounts, integer, in_; dim=:comm_size), + Arg(:rdispls, integer, in_; dim=:comm_size), + Arg(:recvtype, datatype, in_), + Arg(:comm, comm, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Ineighbor_alltoallw, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcounts, integer, in_; dim=:comm_size), + Arg(:sdispls, address, in_; dim=:comm_size), + Arg(:sendtypes, datatype, in_; dim=:comm_size), + Arg(:recvbuf, buffer, out), + Arg(:recvcounts, integer, in_; dim=:comm_size), + Arg(:rdispls, address, in_; dim=:comm_size), + Arg(:recvtypes, datatype, in_; dim=:comm_size), + Arg(:comm, comm, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Neighbor_allgather, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcount, integer, in_), + Arg(:sendtype, datatype, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcount, integer, in_), + Arg(:recvtype, datatype, in_), + Arg(:comm, comm, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Neighbor_allgather_init, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcount, integer, in_), + Arg(:sendtype, datatype, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcount, integer, in_), + Arg(:recvtype, datatype, in_), + Arg(:comm, comm, in_), + Arg(:info, info, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Neighbor_allgatherv, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcount, integer, in_), + Arg(:sendtype, datatype, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcounts, integer, in_; dim=:comm_size), + Arg(:displs, address, in_; dim=:comm_size), + Arg(:recvtype, datatype, in_), + Arg(:comm, comm, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Neighbor_allgatherv_init, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcount, integer, in_), + Arg(:sendtype, datatype, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcounts, integer, in_; dim=:comm_size), + Arg(:displs, address, in_; dim=:comm_size), + Arg(:recvtype, datatype, in_), + Arg(:comm, comm, in_), + Arg(:info, info, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Neighbor_alltoall, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcount, integer, in_), + Arg(:sendtype, datatype, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcount, integer, in_), + Arg(:recvtype, datatype, in_), + Arg(:comm, comm, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Neighbor_alltoall_init, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcount, integer, in_), + Arg(:sendtype, datatype, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcount, integer, in_), + Arg(:recvtype, datatype, in_), + Arg(:comm, comm, in_), + Arg(:info, info, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Neighbor_alltoallv, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcounts, integer, in_; dim=:comm_size), + Arg(:sdispls, integer, in_; dim=:comm_size), + Arg(:sendtype, datatype, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcounts, integer, in_; dim=:comm_size), + Arg(:rdispls, integer, in_; dim=:comm_size), + Arg(:recvtype, datatype, in_), + Arg(:comm, comm, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Neighbor_alltoallv_init, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcounts, integer, in_; dim=:comm_size), + Arg(:sdispls, integer, in_; dim=:comm_size), + Arg(:sendtype, datatype, in_), + Arg(:recvbuf, buffer, out), + Arg(:recvcounts, integer, in_; dim=:comm_size), + Arg(:rdispls, integer, in_; dim=:comm_size), + Arg(:recvtype, datatype, in_), + Arg(:comm, comm, in_), + Arg(:info, info, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Neighbor_alltoallw, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcounts, integer, in_; dim=:comm_size), + Arg(:sdispls, address, in_; dim=:comm_size), + Arg(:sendtypes, datatype, in_; dim=:comm_size), + Arg(:recvbuf, buffer, out), + Arg(:recvcounts, integer, in_; dim=:comm_size), + Arg(:rdispls, address, in_; dim=:comm_size), + Arg(:recvtypes, datatype, in_; dim=:comm_size), + Arg(:comm, comm, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Neighbor_alltoallw_init, + void, + v"0", + [ + Arg(:sendbuf, buffer, in_), + Arg(:sendcounts, integer, in_; dim=:comm_size), + Arg(:sdispls, address, in_; dim=:comm_size), + Arg(:sendtypes, datatype, in_; dim=:comm_size), + Arg(:recvbuf, buffer, out), + Arg(:recvcounts, integer, in_; dim=:comm_size), + Arg(:rdispls, address, in_; dim=:comm_size), + Arg(:recvtypes, datatype, in_; dim=:comm_size), + Arg(:comm, comm, in_), + Arg(:info, info, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun(:MPI_Topo_test, void, v"0", [Arg(:comm, comm, in_), Arg(:status, integer, out), Arg(:ierror, errorcode, out)]), + + # A.5.7 MPI Environmental Management Fortran Bindings + + Fun(:MPI_Add_error_class, void, v"0", [Arg(:errorclass, integer, out), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Add_error_code, + void, + v"0", + [Arg(:errorclass, integer, in_), Arg(:errorcode, integer, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Add_error_string, + void, + v"0", + [Arg(:errorcode, integer, in_), Arg(:string, character, in_), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Alloc_mem, + void, + v"0", + [Arg(:size, address, in_), Arg(:info, info, in_), Arg(:baseptr, buffer, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Comm_call_errhandler, void, v"0", [Arg(:comm, comm, in_), Arg(:errorcode, integer, in_), Arg(:ierror, errorcode, out)] + ), + Fun( + :MPI_Comm_create_errhandler, + void, + v"99999", + [ + Arg(:comm_errhandler_fn, external, in_), # MPI_Comm_errhandler_function * + Arg(:errhandler, errhandler, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Comm_get_errhandler, + void, + v"0", + [Arg(:comm, comm, in_), Arg(:errhandler, errhandler, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Comm_set_errhandler, + void, + v"0", + [Arg(:comm, comm, in_), Arg(:errhandler, errhandler, in_), Arg(:ierror, errorcode, out)], + ), + Fun(:MPI_Errhandler_free, void, v"0", [Arg(:errhandler, errhandler, out), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Error_class, void, v"0", [Arg(:errorcode, integer, in_), Arg(:errorclass, integer, out), Arg(:ierror, errorcode, out)] + ), + Fun( + :MPI_Error_string, + void, + v"0", + [Arg(:errorcode, integer, in_), Arg(:string, character, out), Arg(:resultlen, integer, out), Arg(:ierror, errorcode, out)], + ), + Fun(:MPI_File_call_errhandler, void, v"0", [Arg(:fh, file, in_), Arg(:errorcode, integer, in_), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_File_create_errhandler, + void, + v"99999", + [ + Arg(:file_errhandler_fn, external, in_),# MPI_File_errhandler_function * + Arg(:errhandler, errhandler, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_File_get_errhandler, + void, + v"0", + [Arg(:file, file, in_), Arg(:errhandler, errhandler, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_File_set_errhandler, + void, + v"0", + [Arg(:file, file, in_), Arg(:errhandler, errhandler, in_), Arg(:ierror, errorcode, out)], + ), + Fun(:MPI_Free_mem, void, v"0", [Arg(:base, buffer, out), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Get_hw_resource_info, void, v"4.1", [Arg(:hw_info, info, out), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Get_library_version, + void, + v"0", + [Arg(:version, character, out), Arg(:resultlen, integer, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Get_processor_name, + void, + v"0", + [Arg(:name, character, out), Arg(:resultlen, integer, out), Arg(:ierror, errorcode, out)], + ), + Fun(:MPI_Get_version, void, v"0", [Arg(:version, integer, out), Arg(:subversion, integer, out), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Remove_error_class, void, v"4.1", [Arg(:errorclass, integer, in_), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Remove_error_code, void, v"4.1", [Arg(:errorcode, integer, in_), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Remove_error_string, void, v"4.1", [Arg(:errorcode, integer, in_), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Session_call_errhandler, + void, + v"0", + [Arg(:session, session, in_), Arg(:errorcode, integer, in_), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Session_create_errhandler, + void, + v"99999", + [ + Arg(:session_errhandler_fn, external, in_), # MPI_Session_errhandler_function * + Arg(:errhandler, errhandler, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Session_get_errhandler, + void, + v"0", + [Arg(:session, session, in_), Arg(:errhandler, errhandler, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Session_set_errhandler, + void, + v"0", + [Arg(:session, session, in_), Arg(:errhandler, errhandler, in_), Arg(:ierror, errorcode, out)], + ), + Fun(:MPI_Win_call_errhandler, void, v"0", [Arg(:win, win, in_), Arg(:errorcode, integer, in_), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Win_create_errhandler, + void, + v"99999", + [ + Arg(:win_errhandler_fn, external, in_), # MPI_Win_errhandler_function * + Arg(:errhandler, errhandler, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Win_get_errhandler, void, v"0", [Arg(:win, win, in_), Arg(:errhandler, errhandler, out), Arg(:ierror, errorcode, out)] + ), + Fun( + :MPI_Win_set_errhandler, void, v"0", [Arg(:win, win, in_), Arg(:errhandler, errhandler, in_), Arg(:ierror, errorcode, out)] + ), + Fun(:MPI_Wtick, double_precision, v"0", []), + Fun(:MPI_Wtime, double_precision, v"0", []), + + # A.5.8 The Info Object Fortran Bindings + + Fun(:MPI_Info_create, void, v"0", [Arg(:info, info, out), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Info_create_env, void, v"0", [Arg(:info, info, out), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Info_delete, void, v"0", [Arg(:info, info, in_), Arg(:key, character, in_), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Info_dup, void, v"0", [Arg(:info, info, in_), Arg(:newinfo, info, out), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Info_free, void, v"0", [Arg(:info, info, out), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Info_get_nkeys, void, v"0", [Arg(:info, info, in_), Arg(:nkeys, integer, out), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Info_get_nthkey, + void, + v"0", + [Arg(:info, info, in_), Arg(:n, integer, in_), Arg(:key, character, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Info_get_string, + void, + v"0", + [ + Arg(:info, info, in_), + Arg(:key, character, in_), + Arg(:buflen, integer, out), + Arg(:value, character, out), + Arg(:flag, logical, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Info_set, + void, + v"0", + [Arg(:info, info, in_), Arg(:key, character, in_), Arg(:value, character, in_), Arg(:ierror, errorcode, out)], + ), + + # A.5.9 Process Creation and Management Fortran Bindings + + Fun(:MPI_Abort, void, v"0", [Arg(:comm, comm, in_), Arg(:errorcode, integer, in_), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Close_port, void, v"0", [Arg(:port_name, character, in_), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Comm_accept, + void, + v"0", + [ + Arg(:port_name, character, in_), + Arg(:info, info, in_), + Arg(:root, integer, in_), + Arg(:comm, comm, in_), + Arg(:newcomm, comm, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Comm_connect, + void, + v"0", + [ + Arg(:port_name, character, in_), + Arg(:info, info, in_), + Arg(:root, integer, in_), + Arg(:comm, comm, in_), + Arg(:newcomm, comm, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun(:MPI_Comm_disconnect, void, v"0", [Arg(:comm, comm, out), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Comm_get_parent, void, v"0", [Arg(:parent, comm, out), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Comm_join, void, v"0", [Arg(:fd, integer, in_), Arg(:intercomm, comm, out), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Comm_spawn, + void, + v"0", + [ + Arg(:command, character, in_), + Arg(:argv, argv, in_; dim=:*), + Arg(:maxprocs, integer, in_), + Arg(:info, info, in_), + Arg(:root, integer, in_), + Arg(:comm, comm, in_), + Arg(:intercomm, comm, out), + Arg(:array_of_errcodes, errorcode, out; dim=:maxprocs), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Comm_spawn_multiple, + void, + v"99999", + [ + Arg(:count, integer, in_), + Arg(:array_of_commands, character, in_; dim=:count), + Arg(:array_of_argv, argvs, in_; dim=:*), # dim=(:count, :*) + Arg(:array_of_maxprocs, integer, in_; dim=:count), + Arg(:array_of_info, info, in_; dim=:count), + Arg(:root, integer, in_), + Arg(:comm, comm, in_), + Arg(:intercomm, comm, out), + Arg(:array_of_errcodes, errorcode, out; dim=:*), # dim=??? + Arg(:ierror, errorcode, out), + ], + ), + Fun(:MPI_Finalize, void, v"0", [Arg(:ierror, errorcode, out)]), + Fun(:MPI_Finalized, void, v"0", [Arg(:flag, logical, out), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Init, void, v"0", [Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Init_thread, + void, + v"0", + [Arg(:required, threadlevel, in_), Arg(:provided, threadlevel, out), Arg(:ierror, errorcode, out)], + ), + Fun(:MPI_Initialized, void, v"0", [Arg(:flag, logical, out), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Is_thread_main, void, v"0", [Arg(:flag, logical, out), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Lookup_name, + void, + v"0", + [Arg(:service_name, character, in_), Arg(:info, info, in_), Arg(:port_name, character, out), Arg(:ierror, errorcode, out)], + ), + Fun(:MPI_Open_port, void, v"0", [Arg(:info, info, in_), Arg(:port_name, character, out), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Publish_name, + void, + v"0", + [Arg(:service_name, character, in_), Arg(:info, info, in_), Arg(:port_name, character, in_), Arg(:ierror, errorcode, out)], + ), + Fun(:MPI_Query_thread, void, v"0", [Arg(:provided, threadlevel, out), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Session_finalize, void, v"0", [Arg(:session, session, out), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Session_get_info, void, v"0", [Arg(:session, session, in_), Arg(:info_used, info, out), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Session_get_nth_pset, + void, + v"0", + [ + Arg(:session, session, in_), + Arg(:info, info, in_), + Arg(:n, integer, in_), + Arg(:pset_len, integer, out), + Arg(:pset_name, character, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Session_get_num_psets, + void, + v"0", + [Arg(:session, session, in_), Arg(:info, info, in_), Arg(:npset_names, integer, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Session_get_pset_info, + void, + v"0", + [Arg(:session, session, in_), Arg(:pset_name, character, in_), Arg(:info, info, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Session_init, + void, + v"0", + [Arg(:info, info, in_), Arg(:errhandler, errhandler, in_), Arg(:session, session, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Unpublish_name, + void, + v"0", + [Arg(:service_name, character, in_), Arg(:info, info, in_), Arg(:port_name, character, in_), Arg(:ierror, errorcode, out)], + ), + + # A.5.10 One-Sided Communications Fortran Bindings + + Fun( + :MPI_Accumulate, + void, + v"0", + [ + Arg(:origin_addr, buffer, in_), + Arg(:origin_count, integer, in_), + Arg(:origin_datatype, datatype, in_), + Arg(:target_rank, integer, in_), + Arg(:target_disp, address, in_), + Arg(:target_count, integer, in_), + Arg(:target_datatype, datatype, in_), + Arg(:op, op, in_), + Arg(:win, win, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Compare_and_swap, + void, + v"0", + [ + Arg(:origin_addr, buffer, in_), + Arg(:compare_addr, buffer, in_), + Arg(:result_addr, buffer, out), + Arg(:datatype, datatype, in_), + Arg(:target_rank, integer, in_), + Arg(:target_disp, address, in_), + Arg(:win, win, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Fetch_and_op, + void, + v"0", + [ + Arg(:origin_addr, buffer, in_), + Arg(:result_addr, buffer, out), + Arg(:datatype, datatype, in_), + Arg(:target_rank, integer, in_), + Arg(:target_disp, address, in_), + Arg(:op, op, in_), + Arg(:win, win, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Get, + void, + v"0", + [ + Arg(:origin_addr, buffer, out), + Arg(:origin_count, integer, in_), + Arg(:origin_datatype, datatype, in_), + Arg(:target_rank, integer, in_), + Arg(:target_disp, address, in_), + Arg(:target_count, integer, in_), + Arg(:target_datatype, datatype, in_), + Arg(:win, win, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Get_accumulate, + void, + v"0", + [ + Arg(:origin_addr, buffer, in_), + Arg(:origin_count, integer, in_), + Arg(:origin_datatype, datatype, in_), + Arg(:result_addr, buffer, out), + Arg(:result_count, integer, in_), + Arg(:result_datatype, datatype, in_), + Arg(:target_rank, integer, in_), + Arg(:target_disp, address, in_), + Arg(:target_count, integer, in_), + Arg(:target_datatype, datatype, in_), + Arg(:op, op, in_), + Arg(:win, win, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Put, + void, + v"0", + [ + Arg(:origin_addr, buffer, in_), + Arg(:origin_count, integer, in_), + Arg(:origin_datatype, datatype, in_), + Arg(:target_rank, integer, in_), + Arg(:target_disp, address, in_), + Arg(:target_count, integer, in_), + Arg(:target_datatype, datatype, in_), + Arg(:win, win, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Raccumulate, + void, + v"0", + [ + Arg(:origin_addr, buffer, in_), + Arg(:origin_count, integer, in_), + Arg(:origin_datatype, datatype, in_), + Arg(:target_rank, integer, in_), + Arg(:target_disp, address, in_), + Arg(:target_count, integer, in_), + Arg(:target_datatype, datatype, in_), + Arg(:op, op, in_), + Arg(:win, win, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Rget, + void, + v"0", + [ + Arg(:origin_addr, buffer, out), + Arg(:origin_count, integer, in_), + Arg(:origin_datatype, datatype, in_), + Arg(:target_rank, integer, in_), + Arg(:target_disp, address, in_), + Arg(:target_count, integer, in_), + Arg(:target_datatype, datatype, in_), + Arg(:win, win, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Rget_accumulate, + void, + v"0", + [ + Arg(:origin_addr, buffer, in_), + Arg(:origin_count, integer, in_), + Arg(:origin_datatype, datatype, in_), + Arg(:result_addr, buffer, out), + Arg(:result_count, integer, in_), + Arg(:result_datatype, datatype, in_), + Arg(:target_rank, integer, in_), + Arg(:target_disp, address, in_), + Arg(:target_count, integer, in_), + Arg(:target_datatype, datatype, in_), + Arg(:op, op, in_), + Arg(:win, win, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Rput, + void, + v"0", + [ + Arg(:origin_addr, buffer, in_), + Arg(:origin_count, integer, in_), + Arg(:origin_datatype, datatype, in_), + Arg(:target_rank, integer, in_), + Arg(:target_disp, address, in_), + Arg(:target_count, integer, in_), + Arg(:target_datatype, datatype, in_), + Arg(:win, win, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Win_allocate, + void, + v"0", + [ + Arg(:size, address, in_), + Arg(:disp_unit, integer, in_), + Arg(:info, info, in_), + Arg(:comm, comm, in_), + Arg(:baseptr, buffer, out), + Arg(:win, win, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Win_allocate_shared, + void, + v"0", + [ + Arg(:size, address, in_), + Arg(:disp_unit, integer, in_), + Arg(:info, info, in_), + Arg(:comm, comm, in_), + Arg(:baseptr, buffer, out), + Arg(:win, win, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Win_attach, + void, + v"0", + [Arg(:win, win, in_), Arg(:base, buffer, out), Arg(:size, address, in_), Arg(:ierror, errorcode, out)], + ), + Fun(:MPI_Win_complete, void, v"0", [Arg(:win, win, in_), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Win_create, + void, + v"0", + [ + Arg(:base, buffer, out), + Arg(:size, address, in_), + Arg(:disp_unit, integer, in_), + Arg(:info, info, in_), + Arg(:comm, comm, in_), + Arg(:win, win, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Win_create_dynamic, + void, + v"0", + [Arg(:info, info, in_), Arg(:comm, comm, in_), Arg(:win, win, out), Arg(:ierror, errorcode, out)], + ), + Fun(:MPI_Win_detach, void, v"0", [Arg(:win, win, in_), Arg(:base, buffer, in_), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Win_fence, void, v"0", [Arg(:assert, integer, in_), Arg(:win, win, in_), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Win_flush, void, v"0", [Arg(:rank, integer, in_), Arg(:win, win, in_), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Win_flush_all, void, v"0", [Arg(:win, win, in_), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Win_flush_local, void, v"0", [Arg(:rank, integer, in_), Arg(:win, win, in_), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Win_flush_local_all, void, v"0", [Arg(:win, win, in_), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Win_free, void, v"0", [Arg(:win, win, out), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Win_get_group, void, v"0", [Arg(:win, win, in_), Arg(:group, group, out), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Win_get_info, void, v"0", [Arg(:win, win, in_), Arg(:info_used, info, out), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Win_lock, + void, + v"0", + [ + Arg(:lock_type, integer, in_), + Arg(:rank, integer, in_), + Arg(:assert, integer, in_), + Arg(:win, win, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun(:MPI_Win_lock_all, void, v"0", [Arg(:assert, integer, in_), Arg(:win, win, in_), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Win_post, + void, + v"0", + [Arg(:group, group, in_), Arg(:assert, integer, in_), Arg(:win, win, in_), Arg(:ierror, errorcode, out)], + ), + Fun(:MPI_Win_set_info, void, v"0", [Arg(:win, win, in_), Arg(:info, info, in_), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Win_shared_query, + void, + v"0", + [ + Arg(:win, win, in_), + Arg(:rank, integer, in_), + Arg(:size, address, out), + Arg(:disp_unit, integer, out), + Arg(:baseptr, buffer, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Win_start, + void, + v"0", + [Arg(:group, group, in_), Arg(:assert, integer, in_), Arg(:win, win, in_), Arg(:ierror, errorcode, out)], + ), + Fun(:MPI_Win_sync, void, v"0", [Arg(:win, win, in_), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Win_test, void, v"0", [Arg(:win, win, in_), Arg(:flag, logical, out), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Win_unlock, void, v"0", [Arg(:rank, integer, in_), Arg(:win, win, in_), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Win_unlock_all, void, v"0", [Arg(:win, win, in_), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Win_wait, void, v"0", [Arg(:win, win, in_), Arg(:ierror, errorcode, out)]), + + # A.5.11 External Interfaces Fortran Bindings + + Fun(:MPI_Grequest_complete, void, v"0", [Arg(:request, request, in_), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Grequest_start, + void, + v"99999", + [ + Arg(:query_fn, external, in_), # MPI_Grequest_query_function * + Arg(:free_fn, external, in_), # MPI_Grequest_free_function * + Arg(:cancel_fn, external, in_), # MPI_Grequest_cancel_function * + Arg(:extra_state, buffer, out), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun(:MPI_Status_set_cancelled, void, v"0", [Arg(:status, status, out), Arg(:flag, logical, in_), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Status_set_elements, + void, + v"0", + [Arg(:status, status, out), Arg(:datatype, datatype, in_), Arg(:count, integer, in_), Arg(:ierror, errorcode, out)], + ), + Fun(:MPI_Status_set_error, void, v"4.1", [Arg(:status, status, out), Arg(:err, integer, in_), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Status_set_source, void, v"4.1", [Arg(:status, status, out), Arg(:source, integer, in_), Arg(:ierror, errorcode, out)] + ), + Fun(:MPI_Status_set_tag, void, v"4.1", [Arg(:status, status, out), Arg(:tag, integer, in_), Arg(:ierror, errorcode, out)]), + + # A.5.12 I/O Fortran Bindings + + Fun(:MPI_File_close, void, v"0", [Arg(:fh, file, out), Arg(:ierror, errorcode, out)]), + Fun(:MPI_File_delete, void, v"0", [Arg(:filename, character, in_), Arg(:info, info, in_), Arg(:ierror, errorcode, out)]), + Fun(:MPI_File_get_amode, void, v"0", [Arg(:fh, file, in_), Arg(:amode, integer, out), Arg(:ierror, errorcode, out)]), + Fun(:MPI_File_get_atomicity, void, v"0", [Arg(:fh, file, in_), Arg(:flag, logical, out), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_File_get_byte_offset, + void, + v"0", + [Arg(:fh, file, in_), Arg(:offset, offset, in_), Arg(:disp, offset, out), Arg(:ierror, errorcode, out)], + ), + Fun(:MPI_File_get_group, void, v"0", [Arg(:fh, file, in_), Arg(:group, group, out), Arg(:ierror, errorcode, out)]), + Fun(:MPI_File_get_info, void, v"0", [Arg(:fh, file, in_), Arg(:info_used, info, out), Arg(:ierror, errorcode, out)]), + Fun(:MPI_File_get_position, void, v"0", [Arg(:fh, file, in_), Arg(:offset, offset, out), Arg(:ierror, errorcode, out)]), + Fun(:MPI_File_get_position_shared, void, v"0", [Arg(:fh, file, in_), Arg(:offset, offset, out), Arg(:ierror, errorcode, out)]), + Fun(:MPI_File_get_size, void, v"0", [Arg(:fh, file, in_), Arg(:size, offset, out), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_File_get_type_extent, + void, + v"0", + [Arg(:fh, file, in_), Arg(:datatype, datatype, in_), Arg(:extent, address, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_File_get_view, + void, + v"0", + [ + Arg(:fh, file, in_), + Arg(:disp, offset, out), + Arg(:etype, datatype, out), + Arg(:filetype, datatype, out), + Arg(:datarep, character, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_File_iread, + void, + v"0", + [ + Arg(:fh, file, in_), + Arg(:buf, buffer, out), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_File_iread_all, + void, + v"0", + [ + Arg(:fh, file, in_), + Arg(:buf, buffer, out), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_File_iread_at, + void, + v"0", + [ + Arg(:fh, file, in_), + Arg(:offset, offset, in_), + Arg(:buf, buffer, out), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_File_iread_at_all, + void, + v"0", + [ + Arg(:fh, file, in_), + Arg(:offset, offset, in_), + Arg(:buf, buffer, out), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_File_iread_shared, + void, + v"0", + [ + Arg(:fh, file, in_), + Arg(:buf, buffer, out), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_File_iwrite, + void, + v"0", + [ + Arg(:fh, file, in_), + Arg(:buf, buffer, in_), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_File_iwrite_all, + void, + v"0", + [ + Arg(:fh, file, in_), + Arg(:buf, buffer, in_), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_File_iwrite_at, + void, + v"0", + [ + Arg(:fh, file, in_), + Arg(:offset, offset, in_), + Arg(:buf, buffer, in_), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_File_iwrite_at_all, + void, + v"0", + [ + Arg(:fh, file, in_), + Arg(:offset, offset, in_), + Arg(:buf, buffer, in_), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_File_iwrite_shared, + void, + v"0", + [ + Arg(:fh, file, in_), + Arg(:buf, buffer, in_), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:request, request, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_File_open, + void, + v"0", + [ + Arg(:comm, comm, in_), + Arg(:filename, character, in_), + Arg(:amode, integer, in_), + Arg(:info, info, in_), + Arg(:fh, file, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun(:MPI_File_preallocate, void, v"0", [Arg(:fh, file, in_), Arg(:size, offset, in_), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_File_read, + void, + v"0", + [ + Arg(:fh, file, in_), + Arg(:buf, buffer, out), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:status, status, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_File_read_all, + void, + v"0", + [ + Arg(:fh, file, in_), + Arg(:buf, buffer, out), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:status, status, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_File_read_all_begin, + void, + v"0", + [ + Arg(:fh, file, in_), + Arg(:buf, buffer, out), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_File_read_all_end, + void, + v"0", + [Arg(:fh, file, in_), Arg(:buf, buffer, out), Arg(:status, status, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_File_read_at, + void, + v"0", + [ + Arg(:fh, file, in_), + Arg(:offset, offset, in_), + Arg(:buf, buffer, out), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:status, status, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_File_read_at_all, + void, + v"0", + [ + Arg(:fh, file, in_), + Arg(:offset, offset, in_), + Arg(:buf, buffer, out), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:status, status, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_File_read_at_all_begin, + void, + v"0", + [ + Arg(:fh, file, in_), + Arg(:offset, offset, in_), + Arg(:buf, buffer, out), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_File_read_at_all_end, + void, + v"0", + [Arg(:fh, file, in_), Arg(:buf, buffer, out), Arg(:status, status, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_File_read_ordered, + void, + v"0", + [ + Arg(:fh, file, in_), + Arg(:buf, buffer, out), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:status, status, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_File_read_ordered_begin, + void, + v"0", + [ + Arg(:fh, file, in_), + Arg(:buf, buffer, out), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_File_read_ordered_end, + void, + v"0", + [Arg(:fh, file, in_), Arg(:buf, buffer, out), Arg(:status, status, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_File_read_shared, + void, + v"0", + [ + Arg(:fh, file, in_), + Arg(:buf, buffer, out), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:status, status, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_File_seek, + void, + v"0", + [Arg(:fh, file, in_), Arg(:offset, offset, in_), Arg(:whence, integer, in_), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_File_seek_shared, + void, + v"0", + [Arg(:fh, file, in_), Arg(:offset, offset, in_), Arg(:whence, integer, in_), Arg(:ierror, errorcode, out)], + ), + Fun(:MPI_File_set_atomicity, void, v"0", [Arg(:fh, file, in_), Arg(:flag, logical, in_), Arg(:ierror, errorcode, out)]), + Fun(:MPI_File_set_info, void, v"0", [Arg(:fh, file, in_), Arg(:info, info, in_), Arg(:ierror, errorcode, out)]), + Fun(:MPI_File_set_size, void, v"0", [Arg(:fh, file, in_), Arg(:size, offset, in_), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_File_set_view, + void, + v"0", + [ + Arg(:fh, file, in_), + Arg(:disp, offset, in_), + Arg(:etype, datatype, in_), + Arg(:filetype, datatype, in_), + Arg(:datarep, character, in_), + Arg(:info, info, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun(:MPI_File_sync, void, v"0", [Arg(:fh, file, in_), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_File_write, + void, + v"0", + [ + Arg(:fh, file, in_), + Arg(:buf, buffer, in_), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:status, status, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_File_write_all, + void, + v"0", + [ + Arg(:fh, file, in_), + Arg(:buf, buffer, in_), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:status, status, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_File_write_all_begin, + void, + v"0", + [ + Arg(:fh, file, in_), + Arg(:buf, buffer, in_), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_File_write_all_end, + void, + v"0", + [Arg(:fh, file, in_), Arg(:buf, buffer, in_), Arg(:status, status, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_File_write_at, + void, + v"0", + [ + Arg(:fh, file, in_), + Arg(:offset, offset, in_), + Arg(:buf, buffer, in_), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:status, status, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_File_write_at_all, + void, + v"0", + [ + Arg(:fh, file, in_), + Arg(:offset, offset, in_), + Arg(:buf, buffer, in_), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:status, status, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_File_write_at_all_begin, + void, + v"0", + [ + Arg(:fh, file, in_), + Arg(:offset, offset, in_), + Arg(:buf, buffer, in_), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_File_write_at_all_end, + void, + v"0", + [Arg(:fh, file, in_), Arg(:buf, buffer, in_), Arg(:status, status, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_File_write_ordered, + void, + v"0", + [ + Arg(:fh, file, in_), + Arg(:buf, buffer, in_), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:status, status, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_File_write_ordered_begin, + void, + v"0", + [ + Arg(:fh, file, in_), + Arg(:buf, buffer, in_), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_File_write_ordered_end, + void, + v"0", + [Arg(:fh, file, in_), Arg(:buf, buffer, in_), Arg(:status, status, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_File_write_shared, + void, + v"0", + [ + Arg(:fh, file, in_), + Arg(:buf, buffer, in_), + Arg(:count, integer, in_), + Arg(:datatype, datatype, in_), + Arg(:status, status, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Register_datarep, + void, + v"99999", + [ + Arg(:datarep, character, in_), + Arg(:read_conversion_fn, external, in_), # MPI_Datarep_conversion_function * + Arg(:write_conversion_fn, external, in_), # MPI_Datarep_conversion_function * + Arg(:dtype_file_extent_fn, external, in_), # MPI_Datarep_extent_function * + Arg(:extra_state, buffer, out), + Arg(:ierror, errorcode, out), + ], + ), + + # A.5.13 Language Bindings Fortran Bindings + + Fun(:MPI_F_sync_reg, void, v"0", [Arg(:buf, buffer, out)]), + # The following procedure is not available with mpif.h: + # MPI_STATUS_F082F(F08_STATUS, F_STATUS, IERROR) + # TYPE(MPI_Status) :: F08_STATUS + # INTEGER :: F_STATUS(MPI_STATUS_SIZE), IERROR + # The following procedure is not available with mpif.h: + # MPI_STATUS_F2F08(F_STATUS, F08_STATUS, IERROR) + # INTEGER :: F_STATUS(MPI_STATUS_SIZE), IERROR + # TYPE(MPI_Status) :: F08_STATUS + Fun( + :MPI_Type_create_f90_complex, + void, + v"0", + [Arg(:p, integer, in_), Arg(:r, integer, in_), Arg(:newtype, datatype, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Type_create_f90_integer, + void, + v"0", + [Arg(:r, integer, in_), Arg(:newtype, datatype, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Type_create_f90_real, + void, + v"0", + [Arg(:p, integer, in_), Arg(:r, integer, in_), Arg(:newtype, datatype, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Type_match_size, + void, + v"0", + [Arg(:typeclass, integer, in_), Arg(:size, integer, in_), Arg(:newtype, datatype, out), Arg(:ierror, errorcode, out)], + ), + + # A.5.14 Tools / Profiling Interface Fortran Bindings + + Fun(:MPI_Pcontrol, void, v"0", [Arg(:level, integer, in_)]), + + # A.5.15 Deprecated Fortran Bindings + + Fun(:MPI_Attr_delete, void, v"0", [Arg(:comm, comm, in_), Arg(:keyval, integer, in_), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Attr_get, + void, + v"0", + [ + Arg(:comm, comm, in_), + Arg(:keyval, integer, in_), + Arg(:attribute_val, buffer, out), + Arg(:flag, logical, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Attr_put, + void, + v"0", + [Arg(:comm, comm, in_), Arg(:keyval, integer, in_), Arg(:attribute_val, buffer, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Get_elements_x, + void, + v"0", + [Arg(:status, status, in_), Arg(:datatype, datatype, in_), Arg(:count, count, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Info_get, + void, + v"0", + [ + Arg(:info, info, in_), + Arg(:key, character, in_), + Arg(:valuelen, integer, in_), + Arg(:value, character, out), + Arg(:flag, logical, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Info_get_valuelen, + void, + v"0", + [ + Arg(:info, info, in_), + Arg(:key, character, in_), + Arg(:valuelen, integer, out), + Arg(:flag, logical, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Keyval_create, + void, + v"99999", + [ + Arg(:copy_fn, external, in_), # MPI_Copy_function * + Arg(:delete_fn, external, in_), # MPI_Delete_function * + Arg(:keyval, integer, out), + Arg(:extra_state, buffer, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun(:MPI_Keyval_free, void, v"0", [Arg(:keyval, integer, out), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Status_set_elements_x, + void, + v"0", + [Arg(:status, status, out), Arg(:datatype, datatype, in_), Arg(:count, count, in_), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Type_get_extent_x, + void, + v"0", + [Arg(:datatype, datatype, in_), Arg(:lb, count, out), Arg(:extent, count, out), Arg(:ierror, errorcode, out)], + ), + Fun( + :MPI_Type_get_true_extent_x, + void, + v"0", + [Arg(:datatype, datatype, in_), Arg(:true_lb, count, out), Arg(:true_extent, count, out), Arg(:ierror, errorcode, out)], + ), + Fun(:MPI_Type_size_x, void, v"0", [Arg(:datatype, datatype, in_), Arg(:size, count, out), Arg(:ierror, errorcode, out)]), + + # Removed Fortran Bindings + + Fun(:MPI_Address, void, v"0", [Arg(:location, buffer, out), Arg(:address, address, out), Arg(:ierror, errorcode, out)]), + Fun( + :MPI_Type_hindexed, + void, + v"0", + [ + Arg(:count, integer, in_), + Arg(:array_of_blocklengths, integer, out), + Arg(:array_of_displacements, address, out), + Arg(:oldtype, datatype, in_), + Arg(:newtype, datatype, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Type_hvector, + void, + v"0", + [ + Arg(:count, integer, in_), + Arg(:blocklength, integer, in_), + Arg(:stride, address, in_), + Arg(:oldtype, datatype, in_), + Arg(:newtype, datatype, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun( + :MPI_Type_struct, + void, + v"0", + [ + Arg(:count, integer, in_), + Arg(:array_of_blocklengths, integer, out), + Arg(:array_of_displacements, address, out), + Arg(:array_of_types, datatype, out), + Arg(:newtype, datatype, out), + Arg(:ierror, errorcode, out), + ], + ), + Fun(:MPI_Type_extent, void, v"0", [Arg(:datatype, datatype, in_), Arg(:extent, address, out), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Type_lb, void, v"0", [Arg(:datatype, datatype, in_), Arg(:displacement, address, out), Arg(:ierror, errorcode, out)]), + Fun(:MPI_Type_ub, void, v"0", [Arg(:datatype, datatype, in_), Arg(:displacement, address, out), Arg(:ierror, errorcode, out)]), +] diff --git a/mpiabi/mpiabi_types.h b/mpiabi/mpiabi_types.h new file mode 100644 index 00000000..ac6f8fcf --- /dev/null +++ b/mpiabi/mpiabi_types.h @@ -0,0 +1,129 @@ +#ifndef MPIABI_TYPES_H +#define MPIABI_TYPES_H + +#include + +// Define MPIABI types + +// A.1.2 Types + +// C opaque types + +typedef ptrdiff_t MPIABI_Aint; +typedef ptrdiff_t MPIABI_Count; +typedef int MPIABI_Fint; +typedef ptrdiff_t MPIABI_Offset; + +typedef struct { + int MPI_SOURCE; + int MPI_TAG; + int MPI_ERROR; + int mpi_reserved[5]; +} MPIABI_Status; + +typedef MPIABI_Status MPIABI_F08_status; + +// C handles to assorted structures + +typedef struct MPIABI_ABI_Comm *MPIABI_Comm; +typedef struct MPIABI_ABI_Datatype *MPIABI_Datatype; +typedef struct MPIABI_ABI_Errhandler *MPIABI_Errhandler; +typedef struct MPIABI_ABI_File *MPIABI_File; +typedef struct MPIABI_ABI_Group *MPIABI_Group; +typedef struct MPIABI_ABI_Info *MPIABI_Info; +typedef struct MPIABI_ABI_Message *MPIABI_Message; +typedef struct MPIABI_ABI_Op *MPIABI_Op; +typedef struct MPIABI_ABI_Request *MPIABI_Request; +typedef struct MPIABI_ABI_Session *MPIABI_Session; +typedef struct MPIABI_ABI_Win *MPIABI_Win; + +// Types for the MPI_T interface + +typedef struct MPIABI_ABI_T_enum *MPIABI_T_enum; +typedef struct MPIABI_ABI_T_cvar_handle *MPIABI_T_cvar_handle; +typedef struct MPIABI_ABI_T_pvar_handle *MPIABI_T_pvar_handle; +typedef struct MPIABI_ABI_T_pvar_session *MPIABI_T_pvar_session; +typedef struct MPIABI_ABI_T_event_instance *MPIABI_T_event_instance; +typedef struct MPIABI_ABI_T_event_registration *MPIABI_T_event_registration; +typedef struct MPIABI_ABI_T_source_order *MPIABI_T_source_order; +typedef struct MPIABI_ABI_T_cb_safety *MPIABI_T_cb_safety; + +// Callback function types + +// A.1.3 Prototype Definitions + +typedef void MPIABI_User_function(void *invec, void *inoutvec, int *len, + MPIABI_Datatype *datatype); +typedef void MPIABI_User_function_c(void *invec, void *inoutvec, + MPIABI_Count *len, + MPIABI_Datatype *datatype); +typedef int MPIABI_Comm_copy_attr_function(MPIABI_Comm oldcomm, int comm_keyval, + void *extra_state, + void *attribute_val_in, + void *attribute_val_out, int *flag); +typedef int MPIABI_Comm_delete_attr_function(MPIABI_Comm comm, int comm_keyval, + void *attribute_val, + void *extra_state); +typedef int MPIABI_Win_copy_attr_function(MPIABI_Win oldwin, int win_keyval, + void *extra_state, + void *attribute_val_in, + void *attribute_val_out, int *flag); +typedef int MPIABI_Win_delete_attr_function(MPIABI_Win win, int win_keyval, + void *attribute_val, + void *extra_state); +typedef int MPIABI_Type_copy_attr_function(MPIABI_Datatype oldtype, + int type_keyval, void *extra_state, + void *attribute_val_in, + void *attribute_val_out, int *flag); +typedef int MPIABI_Type_delete_attr_function(MPIABI_Datatype datatype, + int type_keyval, + void *attribute_val, + void *extra_state); +typedef void MPIABI_Comm_errhandler_function(MPIABI_Comm *comm, int *error_code, + ...); +typedef void MPIABI_Win_errhandler_function(MPIABI_Win *win, int *error_code, + ...); +typedef void MPIABI_File_errhandler_function(MPIABI_File *file, int *error_code, + ...); +typedef void MPIABI_Session_errhandler_function(MPIABI_Session *session, + int *error_code, ...); +typedef int MPIABI_Grequest_query_function(void *extra_state, + MPIABI_Status *status); +typedef int MPIABI_Grequest_free_function(void *extra_state); +typedef int MPIABI_Grequest_cancel_function(void *extra_state, int complete); +typedef int MPIABI_Datarep_extent_function(MPIABI_Datatype datatype, + MPIABI_Aint *extent, + void *extra_state); +typedef int MPIABI_Datarep_conversion_function(void *userbuf, + MPIABI_Datatype datatype, + int count, void *filebuf, + MPIABI_Offset position, + void *extra_state); +typedef int +MPIABI_Datarep_conversion_function_c(void *userbuf, MPIABI_Datatype datatype, + MPIABI_Count count, void *filebuf, + MPIABI_Offset position, void *extra_state); +typedef void +MPIABI_T_event_cb_function(MPIABI_T_event_instance event_instance, + MPIABI_T_event_registration event_registration, + MPIABI_T_cb_safety cb_safety, void *user_data); +typedef void +MPIABI_T_event_free_cb_function(MPIABI_T_event_registration event_registration, + MPIABI_T_cb_safety cb_safety, void *user_data); +typedef void MPIABI_T_event_dropped_cb_function( + MPIABI_Count count, MPIABI_T_event_registration event_registration, + int source_index, MPIABI_T_cb_safety cb_safety, void *user_data); + +// A.1.4 Deprecated Prototype Definitions + +typedef int MPIABI_Copy_function(MPIABI_Comm oldcomm, int keyval, + void *extra_state, void *attribute_val_in, + void *attribute_val_out, int *flag); +typedef int MPIABI_Delete_function(MPIABI_Comm comm, int keyval, + void *attribute_val, void *extra_state); + +#define MPIABI_TYPES_H_INCLUDED +#endif // #ifndef MPIABI_TYPES_H +#ifndef MPIABI_TYPES_H_INCLUDED +#error +#endif diff --git a/mpiabi/mpiabi_version.h b/mpiabi/mpiabi_version.h new file mode 100644 index 00000000..dc1260a0 --- /dev/null +++ b/mpiabi/mpiabi_version.h @@ -0,0 +1,12 @@ +#ifndef MPIABI_VERSION_H +#define MPIABI_VERSION_H + +#define MPIABI_VERSION_MAJOR 3 +#define MPIABI_VERSION_MINOR 0 +#define MPIABI_VERSION_PATCH 0 + +#define MPIABI_VERSION_H_INCLUDED +#endif // #ifndef MPIABI_VERSION_H +#ifndef MPIABI_VERSION_H_INCLUDED +#error +#endif diff --git a/mpiabi/mpiabif.h.in b/mpiabi/mpiabif.h.in deleted file mode 100644 index 7fdf5e44..00000000 --- a/mpiabi/mpiabif.h.in +++ /dev/null @@ -1,49 +0,0 @@ -! These constants must be compatible with the respective C -! declarations. The string size constants need to be one less than -! in C since Fortran does not store a trailing NUL character. - - integer MPIABI_VERSION_MAJOR - parameter (MPIABI_VERSION_MAJOR = 2) - integer MPIABI_VERSION_MINOR - parameter (MPIABI_VERSION_MINOR = 7) - integer MPIABI_VERSION_PATCH - parameter (MPIABI_VERSION_PATCH = 0) - - integer MPIABI_MPI_VERSION - parameter (MPIABI_MPI_VERSION = 3) - integer MPIABI_MPI_SUBVERSION - parameter (MPIABI_MPI_SUBVERSION = 1) - - integer MPIABI_MAX_DATAREP_STRING - parameter (MPIABI_MAX_DATAREP_STRING = 127) - integer MPIABI_MAX_ERROR_STRING - parameter (MPIABI_MAX_ERROR_STRING = 1023) - integer MPIABI_MAX_INFO_KEY - parameter (MPIABI_MAX_INFO_KEY = 255) - integer MPIABI_MAX_INFO_VAL - parameter (MPIABI_MAX_INFO_VAL = 1023) - integer MPIABI_MAX_LIBRARY_VERSION_STRING - parameter (MPIABI_MAX_LIBRARY_VERSION_STRING = 8191) - integer MPIABI_MAX_OBJECT_NAME - parameter (MPIABI_MAX_OBJECT_NAME = 127) - integer MPIABI_MAX_PORT_NAME - parameter (MPIABI_MAX_PORT_NAME = 1023) - integer MPIABI_MAX_PROCESSOR_NAME - parameter (MPIABI_MAX_PROCESSOR_NAME = 255) - - logical MPIABI_ASYNC_PROTECTS_NONBLOCKING - parameter (MPIABI_ASYNC_PROTECTS_NONBLOCKING = .false.) - logical MPIABI_SUBARRAYS_SUPPORTED - parameter (MPIABI_SUBARRAYS_SUPPORTED = .false.) - - integer MPIABI_ADDRESS_KIND - parameter (MPIABI_ADDRESS_KIND = @MPITRAMPOLINE_SIZEOF_CPTRDIFF_T@) - integer MPIABI_COUNT_KIND - parameter (MPIABI_COUNT_KIND = 8) - integer MPIABI_INTEGER_KIND - parameter (MPIABI_INTEGER_KIND = 4) - integer MPIABI_OFFSET_KIND - parameter (MPIABI_OFFSET_KIND = 8) - - integer MPIABI_STATUS_SIZE - parameter (MPIABI_STATUS_SIZE = 6) diff --git a/mpiabi/mpiabif_constants.h b/mpiabi/mpiabif_constants.h new file mode 100644 index 00000000..0101e82e --- /dev/null +++ b/mpiabi/mpiabif_constants.h @@ -0,0 +1,786 @@ +! Define MPIABI constants + +! A.1.1 Defined Constants + +! Variable Address Size +! Define these first because they are used in other definitions. + + integer MPIABI_ADDRESS_KIND + parameter (MPIABI_ADDRESS_KIND = kind(loc(MPIABI_ADDRESS_KIND))) + integer MPIABI_COUNT_KIND + parameter (MPIABI_COUNT_KIND = MPIABI_ADDRESS_KIND) + integer MPIABI_INTEGER_KIND + parameter (MPIABI_INTEGER_KIND = kind(0)) + integer MPIABI_OFFSET_KIND + parameter (MPIABI_OFFSET_KIND = MPIABI_ADDRESS_KIND) + +! Error classes + + integer MPIABI_SUCCESS + parameter (MPIABI_SUCCESS = 0) + integer MPIABI_ERR_BUFFER + parameter (MPIABI_ERR_BUFFER = 1) + integer MPIABI_ERR_COUNT + parameter (MPIABI_ERR_COUNT = 2) + integer MPIABI_ERR_TYPE + parameter (MPIABI_ERR_TYPE = 3) + integer MPIABI_ERR_TAG + parameter (MPIABI_ERR_TAG = 4) + integer MPIABI_ERR_COMM + parameter (MPIABI_ERR_COMM = 5) + integer MPIABI_ERR_RANK + parameter (MPIABI_ERR_RANK = 6) + integer MPIABI_ERR_REQUEST + parameter (MPIABI_ERR_REQUEST = 7) + integer MPIABI_ERR_ROOT + parameter (MPIABI_ERR_ROOT = 8) + integer MPIABI_ERR_GROUP + parameter (MPIABI_ERR_GROUP = 9) + integer MPIABI_ERR_OP + parameter (MPIABI_ERR_OP = 10) + integer MPIABI_ERR_TOPOLOGY + parameter (MPIABI_ERR_TOPOLOGY = 11) + integer MPIABI_ERR_DIMS + parameter (MPIABI_ERR_DIMS = 12) + integer MPIABI_ERR_ARG + parameter (MPIABI_ERR_ARG = 13) + integer MPIABI_ERR_UNKNOWN + parameter (MPIABI_ERR_UNKNOWN = 14) + integer MPIABI_ERR_TRUNCATE + parameter (MPIABI_ERR_TRUNCATE = 15) + integer MPIABI_ERR_OTHER + parameter (MPIABI_ERR_OTHER = 16) + integer MPIABI_ERR_INTERN + parameter (MPIABI_ERR_INTERN = 17) + integer MPIABI_ERR_PENDING + parameter (MPIABI_ERR_PENDING = 18) + integer MPIABI_ERR_IN_STATUS + parameter (MPIABI_ERR_IN_STATUS = 19) + integer MPIABI_ERR_ACCESS + parameter (MPIABI_ERR_ACCESS = 20) + integer MPIABI_ERR_AMODE + parameter (MPIABI_ERR_AMODE = 21) + integer MPIABI_ERR_ASSERT + parameter (MPIABI_ERR_ASSERT = 22) + integer MPIABI_ERR_BAD_FILE + parameter (MPIABI_ERR_BAD_FILE = 23) + integer MPIABI_ERR_BASE + parameter (MPIABI_ERR_BASE = 24) + integer MPIABI_ERR_CONVERSION + parameter (MPIABI_ERR_CONVERSION = 25) + integer MPIABI_ERR_DISP + parameter (MPIABI_ERR_DISP = 26) + integer MPIABI_ERR_DUP_DATAREP + parameter (MPIABI_ERR_DUP_DATAREP = 27) + integer MPIABI_ERR_FILE_EXISTS + parameter (MPIABI_ERR_FILE_EXISTS = 28) + integer MPIABI_ERR_FILE_IN_USE + parameter (MPIABI_ERR_FILE_IN_USE = 29) + integer MPIABI_ERR_FILE + parameter (MPIABI_ERR_FILE = 30) + integer MPIABI_ERR_INFO_KEY + parameter (MPIABI_ERR_INFO_KEY = 31) + integer MPIABI_ERR_INFO_NOKEY + parameter (MPIABI_ERR_INFO_NOKEY = 32) + integer MPIABI_ERR_INFO_VALUE + parameter (MPIABI_ERR_INFO_VALUE = 33) + integer MPIABI_ERR_INFO + parameter (MPIABI_ERR_INFO = 34) + integer MPIABI_ERR_IO + parameter (MPIABI_ERR_IO = 35) + integer MPIABI_ERR_KEYVAL + parameter (MPIABI_ERR_KEYVAL = 36) + integer MPIABI_ERR_LOCKTYPE + parameter (MPIABI_ERR_LOCKTYPE = 37) + integer MPIABI_ERR_NAME + parameter (MPIABI_ERR_NAME = 38) + integer MPIABI_ERR_NO_MEM + parameter (MPIABI_ERR_NO_MEM = 39) + integer MPIABI_ERR_NOT_SAME + parameter (MPIABI_ERR_NOT_SAME = 40) + integer MPIABI_ERR_NO_SPACE + parameter (MPIABI_ERR_NO_SPACE = 41) + integer MPIABI_ERR_NO_SUCH_FILE + parameter (MPIABI_ERR_NO_SUCH_FILE = 42) + integer MPIABI_ERR_PORT + parameter (MPIABI_ERR_PORT = 43) + integer MPIABI_ERR_PROC_ABORTED + parameter (MPIABI_ERR_PROC_ABORTED = 44) + integer MPIABI_ERR_QUOTA + parameter (MPIABI_ERR_QUOTA = 45) + integer MPIABI_ERR_READ_ONLY + parameter (MPIABI_ERR_READ_ONLY = 46) + integer MPIABI_ERR_RMA_ATTACH + parameter (MPIABI_ERR_RMA_ATTACH = 47) + integer MPIABI_ERR_RMA_CONFLICT + parameter (MPIABI_ERR_RMA_CONFLICT = 48) + integer MPIABI_ERR_RMA_RANGE + parameter (MPIABI_ERR_RMA_RANGE = 49) + integer MPIABI_ERR_RMA_SHARED + parameter (MPIABI_ERR_RMA_SHARED = 50) + integer MPIABI_ERR_RMA_SYNC + parameter (MPIABI_ERR_RMA_SYNC = 51) + integer MPIABI_ERR_RMA_FLAVOR + parameter (MPIABI_ERR_RMA_FLAVOR = 52) + integer MPIABI_ERR_SERVICE + parameter (MPIABI_ERR_SERVICE = 53) + integer MPIABI_ERR_SESSION + parameter (MPIABI_ERR_SESSION = 54) + integer MPIABI_ERR_SIZE + parameter (MPIABI_ERR_SIZE = 55) + integer MPIABI_ERR_SPAWN + parameter (MPIABI_ERR_SPAWN = 56) + integer MPIABI_ERR_UNSUPPORTED_DATAREP + parameter (MPIABI_ERR_UNSUPPORTED_DATAREP = 57) + integer MPIABI_ERR_UNSUPPORTED_OPERATION + parameter (MPIABI_ERR_UNSUPPORTED_OPERATION = 58) + integer MPIABI_ERR_VALUE_TOO_LARGE + parameter (MPIABI_ERR_VALUE_TOO_LARGE = 59) + integer MPIABI_ERR_WIN + parameter (MPIABI_ERR_WIN = 60) + integer MPIABI_ERR_ERRHANDLER + parameter (MPIABI_ERR_ERRHANDLER = 61) + integer MPIABI_T_ERR_CANNOT_INIT + parameter (MPIABI_T_ERR_CANNOT_INIT = 1000) + integer MPIABI_T_ERR_NOT_ACCESSIBLE + parameter (MPIABI_T_ERR_NOT_ACCESSIBLE = 1001) + integer MPIABI_T_ERR_NOT_INITIALIZED + parameter (MPIABI_T_ERR_NOT_INITIALIZED = 1002) + integer MPIABI_T_ERR_NOT_SUPPORTED + parameter (MPIABI_T_ERR_NOT_SUPPORTED = 1003) + integer MPIABI_T_ERR_MEMORY + parameter (MPIABI_T_ERR_MEMORY = 1004) + integer MPIABI_T_ERR_INVALID + parameter (MPIABI_T_ERR_INVALID = 1005) + integer MPIABI_T_ERR_INVALID_INDEX + parameter (MPIABI_T_ERR_INVALID_INDEX = 1006) + integer MPIABI_T_ERR_INVALID_ITEM + parameter (MPIABI_T_ERR_INVALID_ITEM = 1007) + integer MPIABI_T_ERR_INVALID_SESSION + parameter (MPIABI_T_ERR_INVALID_SESSION = 1008) + integer MPIABI_T_ERR_INVALID_HANDLE + parameter (MPIABI_T_ERR_INVALID_HANDLE = 1009) + integer MPIABI_T_ERR_INVALID_NAME + parameter (MPIABI_T_ERR_INVALID_NAME = 1010) + integer MPIABI_T_ERR_OUT_OF_HANDLES + parameter (MPIABI_T_ERR_OUT_OF_HANDLES = 1011) + integer MPIABI_T_ERR_OUT_OF_SESSIONS + parameter (MPIABI_T_ERR_OUT_OF_SESSIONS = 1012) + integer MPIABI_T_ERR_CVAR_SET_NOT_NOW + parameter (MPIABI_T_ERR_CVAR_SET_NOT_NOW = 1013) + integer MPIABI_T_ERR_CVAR_SET_NEVER + parameter (MPIABI_T_ERR_CVAR_SET_NEVER = 1014) + integer MPIABI_T_ERR_PVAR_NO_WRITE + parameter (MPIABI_T_ERR_PVAR_NO_WRITE = 1015) + integer MPIABI_T_ERR_PVAR_NO_STARTSTOP + parameter (MPIABI_T_ERR_PVAR_NO_STARTSTOP = 1016) + integer MPIABI_T_ERR_PVAR_NO_ATOMIC + parameter (MPIABI_T_ERR_PVAR_NO_ATOMIC = 1017) + integer MPIABI_ERR_LASTCODE + parameter (MPIABI_ERR_LASTCODE = 16383) + +! Buffer Address Constants + +! We use Cray pointers to handle sentinel values. Unfortunately +! these might not be supported everywhere, and if they are, they +! require special compiler options. + + integer MPIABI_BOTTOM(1) + integer(MPIABI_ADDRESS_KIND) MPIABI_BOTTOM_PTR + pointer (MPIABI_BOTTOM_PTR, MPIABI_BOTTOM) + common /MPIABI_BOTTOM_PTR/ MPIABI_BOTTOM_PTR + integer MPIABI_BUFFER_AUTOMATIC(1) + integer(MPIABI_ADDRESS_KIND) MPIABI_BUFFER_AUTOMATIC_PTR + pointer (MPIABI_BUFFER_AUTOMATIC_PTR, MPIABI_BUFFER_AUTOMATIC) + common /MPIABI_BUFFER_AUTOMATIC_PTR/ MPIABI_BUFFER_AUTOMATIC_PTR + integer MPIABI_IN_PLACE(1) + integer(MPIABI_ADDRESS_KIND) MPIABI_IN_PLACE_PTR + pointer (MPIABI_IN_PLACE_PTR, MPIABI_IN_PLACE) + common /MPIABI_IN_PLACE_PTR/ MPIABI_IN_PLACE_PTR + +! Assorted Constants + + integer MPIABI_PROC_NULL + parameter (MPIABI_PROC_NULL = -2) + integer MPIABI_ANY_SOURCE + parameter (MPIABI_ANY_SOURCE = -1) + integer MPIABI_ANY_TAG + parameter (MPIABI_ANY_TAG = -101) + integer MPIABI_UNDEFINED + parameter (MPIABI_UNDEFINED = -601) + integer MPIABI_BSEND_OVERHEAD + parameter (MPIABI_BSEND_OVERHEAD = 512) + integer MPIABI_KEYVAL_INVALID + parameter (MPIABI_KEYVAL_INVALID = -401) + integer MPIABI_LOCK_EXCLUSIVE + parameter (MPIABI_LOCK_EXCLUSIVE = -901) + integer MPIABI_LOCK_SHARED + parameter (MPIABI_LOCK_SHARED = -902) + integer MPIABI_ROOT + parameter (MPIABI_ROOT = -3) + +! No Process Message Handle + + integer MPIABI_MESSAGE_NO_PROC + parameter (MPIABI_MESSAGE_NO_PROC = int(b'000100010101')) + +! Fortran Support Method Specific Constants + + logical MPIABI_SUBARRAYS_SUPPORTED + parameter (MPIABI_SUBARRAYS_SUPPORTED = .false.) + logical MPIABI_ASYNC_PROTECTS_NONBLOCKING + parameter (MPIABI_ASYNC_PROTECTS_NONBLOCKING = .false.) + +! / Status array size and reserved index values + + integer MPIABI_STATUS_SIZE + parameter (MPIABI_STATUS_SIZE = 8) + integer MPIABI_SOURCE + parameter (MPIABI_SOURCE = 1) + integer MPIABI_TAG + parameter (MPIABI_TAG = 2) + integer MPIABI_ERROR + parameter (MPIABI_ERROR = 3) + +! Fortran status array size and reserved index values + +! Variable Address Size +! These have already been defined above. + +! Error-handling specifiers + + integer MPIABI_ERRORS_ARE_FATAL + parameter (MPIABI_ERRORS_ARE_FATAL = int(b'000100011001')) + integer MPIABI_ERRORS_ABORT + parameter (MPIABI_ERRORS_ABORT = int(b'000100011011')) + integer MPIABI_ERRORS_RETURN + parameter (MPIABI_ERRORS_RETURN = int(b'000100011010')) + +! Maximum Sizes for Strings + + integer MPIABI_MAX_DATAREP_STRING + parameter (MPIABI_MAX_DATAREP_STRING = 128 - 1) + integer MPIABI_MAX_ERROR_STRING + parameter (MPIABI_MAX_ERROR_STRING = 512 - 1) + integer MPIABI_MAX_INFO_KEY + parameter (MPIABI_MAX_INFO_KEY = 255 - 1) + integer MPIABI_MAX_INFO_VAL + parameter (MPIABI_MAX_INFO_VAL = 1024 - 1) + integer MPIABI_MAX_LIBRARY_VERSION_STRING + parameter (MPIABI_MAX_LIBRARY_VERSION_STRING = 8192 - 1) + integer MPIABI_MAX_OBJECT_NAME + parameter (MPIABI_MAX_OBJECT_NAME = 128 - 1) + integer MPIABI_MAX_PORT_NAME + parameter (MPIABI_MAX_PORT_NAME = 1024 - 1) + integer MPIABI_MAX_PROCESSOR_NAME + parameter (MPIABI_MAX_PROCESSOR_NAME = 256 - 1) + integer MPIABI_MAX_PSET_NAME_LEN + parameter (MPIABI_MAX_PSET_NAME_LEN = 256 - 1) + integer MPIABI_MAX_STRINGTAG_LEN + parameter (MPIABI_MAX_STRINGTAG_LEN = 256 - 1) + +! Named Predefined Datatypes + +! [C types] + + integer MPIABI_CHAR + parameter (MPIABI_CHAR = int(b'001001000011')) + integer MPIABI_SHORT + parameter (MPIABI_SHORT = int(b'001000001000')) + integer MPIABI_INT + parameter (MPIABI_INT = int(b'001000001001')) + integer MPIABI_LONG + parameter (MPIABI_LONG = int(b'001000001010')) + integer MPIABI_LONG_LONG_INT + parameter (MPIABI_LONG_LONG_INT = int(b'001000001011')) + integer MPIABI_LONG_LONG + parameter (MPIABI_LONG_LONG = MPIABI_LONG_LONG_INT) + integer MPIABI_SIGNED_CHAR + parameter (MPIABI_SIGNED_CHAR = int(b'001001000100')) + integer MPIABI_UNSIGNED_CHAR + parameter (MPIABI_UNSIGNED_CHAR = int(b'001001000101')) + integer MPIABI_UNSIGNED_SHORT + parameter (MPIABI_UNSIGNED_SHORT = int(b'001000001100')) + integer MPIABI_UNSIGNED + parameter (MPIABI_UNSIGNED = int(b'001000001101')) + integer MPIABI_UNSIGNED_LONG + parameter (MPIABI_UNSIGNED_LONG = int(b'001000001110')) + integer MPIABI_UNSIGNED_LONG_LONG + parameter (MPIABI_UNSIGNED_LONG_LONG = int(b'001000001111')) + integer MPIABI_FLOAT + parameter (MPIABI_FLOAT = int(b'001001010010')) + integer MPIABI_DOUBLE + parameter (MPIABI_DOUBLE = int(b'001001011010')) + integer MPIABI_LONG_DOUBLE + parameter (MPIABI_LONG_DOUBLE = int(b'001000100000')) + integer MPIABI_WCHAR + parameter (MPIABI_WCHAR = int(b'001000111100')) + integer MPIABI_C_BOOL + parameter (MPIABI_C_BOOL = int(b'001000111000')) + integer MPIABI_INT8_T + parameter (MPIABI_INT8_T = int(b'001001000000')) + integer MPIABI_INT16_T + parameter (MPIABI_INT16_T = int(b'001001001000')) + integer MPIABI_INT32_T + parameter (MPIABI_INT32_T = int(b'001001010000')) + integer MPIABI_INT64_T + parameter (MPIABI_INT64_T = int(b'001001011000')) + integer MPIABI_UINT8_T + parameter (MPIABI_UINT8_T = int(b'001001000001')) + integer MPIABI_UINT16_T + parameter (MPIABI_UINT16_T = int(b'001001001001')) + integer MPIABI_UINT32_T + parameter (MPIABI_UINT32_T = int(b'001001010001')) + integer MPIABI_UINT64_T + parameter (MPIABI_UINT64_T = int(b'001001011001')) + integer MPIABI_AINT + parameter (MPIABI_AINT = int(b'001000000001')) + integer MPIABI_COUNT + parameter (MPIABI_COUNT = int(b'001000000010')) + integer MPIABI_OFFSET + parameter (MPIABI_OFFSET = int(b'001000000011')) + integer MPIABI_C_COMPLEX + parameter (MPIABI_C_COMPLEX = int(b'001001011011')) + integer MPIABI_C_FLOAT_COMPLEX + parameter (MPIABI_C_FLOAT_COMPLEX = MPIABI_C_COMPLEX) + integer MPIABI_C_DOUBLE_COMPLEX + parameter (MPIABI_C_DOUBLE_COMPLEX = int(b'001000010110')) + integer MPIABI_C_LONG_DOUBLE_COMPLEX + parameter (MPIABI_C_LONG_DOUBLE_COMPLEX = int(b'001000100100')) + integer MPIABI_BYTE + parameter (MPIABI_BYTE = int(b'001001000111')) + integer MPIABI_PACKED + parameter (MPIABI_PACKED = int(b'001000000111')) + +! [Fortran types] + + integer MPIABI_INTEGER + parameter (MPIABI_INTEGER = int(b'001000011000')) + integer MPIABI_REAL + parameter (MPIABI_REAL = int(b'001000011010')) + integer MPIABI_DOUBLE_PRECISION + parameter (MPIABI_DOUBLE_PRECISION = int(b'001000011100')) + integer MPIABI_COMPLEX + parameter (MPIABI_COMPLEX = int(b'001000011011')) + integer MPIABI_LOGICAL + parameter (MPIABI_LOGICAL = int(b'001000011001')) + integer MPIABI_CHARACTER + parameter (MPIABI_CHARACTER = int(b'001011000011')) + +! [C++ types] + + integer MPIABI_CXX_BOOL + parameter (MPIABI_CXX_BOOL = int(b'001000111001')) + integer MPIABI_CXX_FLOAT_COMPLEX + parameter (MPIABI_CXX_FLOAT_COMPLEX = int(b'001000010011')) + integer MPIABI_CXX_DOUBLE_COMPLEX + parameter (MPIABI_CXX_DOUBLE_COMPLEX = int(b'001000010111')) + integer MPIABI_CXX_LONG_DOUBLE_COMPLEX + parameter (MPIABI_CXX_LONG_DOUBLE_COMPLEX = int(b'001000100101')) + +! [Optional datatypes (Fortran)] + + integer MPIABI_DOUBLE_COMPLEX + parameter (MPIABI_DOUBLE_COMPLEX = int(b'001000011101')) + integer MPIABI_INTEGER1 + parameter (MPIABI_INTEGER1 = int(b'001011000000')) + integer MPIABI_INTEGER2 + parameter (MPIABI_INTEGER2 = int(b'001011001000')) + integer MPIABI_INTEGER4 + parameter (MPIABI_INTEGER4 = int(b'001011010000')) + integer MPIABI_INTEGER8 + parameter (MPIABI_INTEGER8 = int(b'001011011000')) + integer MPIABI_INTEGER16 + parameter (MPIABI_INTEGER16 = int(b'001011100000')) + integer MPIABI_REAL2 + parameter (MPIABI_REAL2 = int(b'001011001010')) + integer MPIABI_REAL4 + parameter (MPIABI_REAL4 = int(b'001011010010')) + integer MPIABI_REAL8 + parameter (MPIABI_REAL8 = int(b'001011011010')) + integer MPIABI_REAL16 + parameter (MPIABI_REAL16 = int(b'001000100010')) + integer MPIABI_COMPLEX4 + parameter (MPIABI_COMPLEX4 = int(b'001011010011')) + integer MPIABI_COMPLEX8 + parameter (MPIABI_COMPLEX8 = int(b'001011011011')) + integer MPIABI_COMPLEX16 + parameter (MPIABI_COMPLEX16 = int(b'001011100011')) + integer MPIABI_COMPLEX32 + parameter (MPIABI_COMPLEX32 = int(b'001011101011')) + +! [Extensions] + + integer MPIABI_REAL1 + parameter (MPIABI_REAL1 = int(b'001011000010')) + integer MPIABI_COMPLEX2 + parameter (MPIABI_COMPLEX2 = int(b'001011001011')) + integer MPIABI_LOGICAL1 + parameter (MPIABI_LOGICAL1 = int(b'001011000001')) + integer MPIABI_LOGICAL2 + parameter (MPIABI_LOGICAL2 = int(b'001011001001')) + integer MPIABI_LOGICAL4 + parameter (MPIABI_LOGICAL4 = int(b'001011010001')) + integer MPIABI_LOGICAL8 + parameter (MPIABI_LOGICAL8 = int(b'001011011001')) + integer MPIABI_LOGICAL16 + parameter (MPIABI_LOGICAL16 = int(b'001011100001')) + +! [Datatypes for reduction functions (C)] + + integer MPIABI_FLOAT_INT + parameter (MPIABI_FLOAT_INT = int(b'001000101000')) + integer MPIABI_DOUBLE_INT + parameter (MPIABI_DOUBLE_INT = int(b'001000101001')) + integer MPIABI_LONG_INT + parameter (MPIABI_LONG_INT = int(b'001000101010')) + integer MPIABI_2INT + parameter (MPIABI_2INT = int(b'001000101011')) + integer MPIABI_SHORT_INT + parameter (MPIABI_SHORT_INT = int(b'001000101100')) + integer MPIABI_LONG_DOUBLE_INT + parameter (MPIABI_LONG_DOUBLE_INT = int(b'001000101101')) + +! [Datatypes for reduction functions (Fortran)] + + integer MPIABI_2REAL + parameter (MPIABI_2REAL = int(b'001000110000')) + integer MPIABI_2DOUBLE_PRECISION + parameter (MPIABI_2DOUBLE_PRECISION = int(b'001000110001')) + integer MPIABI_2INTEGER + parameter (MPIABI_2integer = int(b'001000110010')) + +! [Removed constructs] + +! [nonstandard] + integer MPIABI_LB + parameter (MPIABI_LB = int(b'001000000100')) +! [nonstandard] + integer MPIABI_UB + parameter (MPIABI_UB = int(b'001000000101')) + +! Reserved communicators + + integer MPIABI_COMM_WORLD + parameter (MPIABI_COMM_WORLD = int(b'000100000001')) + integer MPIABI_COMM_SELF + parameter (MPIABI_COMM_SELF = int(b'000100000010')) + +! Communicator split type constants + + integer MPIABI_COMM_TYPE_SHARED + parameter (MPIABI_COMM_TYPE_SHARED = -1001) + integer MPIABI_COMM_TYPE_HW_UNGUIDED + parameter (MPIABI_COMM_TYPE_HW_UNGUIDED = -1002) + integer MPIABI_COMM_TYPE_HW_GUIDED + parameter (MPIABI_COMM_TYPE_HW_GUIDED = -1003) +! [nonstandard] + integer MPIABI_COMM_TYPE_RESOURCE_GUIDED + parameter (MPIABI_COMM_TYPE_RESOURCE_GUIDED = -1004) + +! Results of communicator and group comparisons + + integer MPIABI_IDENT + parameter (MPIABI_IDENT = -701) + integer MPIABI_CONGRUENT + parameter (MPIABI_CONGRUENT = -702) + integer MPIABI_SIMILAR + parameter (MPIABI_SIMILAR = -703) + integer MPIABI_UNEQUAL + parameter (MPIABI_UNEQUAL = -704) + +! Environmental inquiry info key + + integer MPIABI_INFO_ENV + parameter (MPIABI_INFO_ENV = int(b'000100110001')) + +! // Environmental inquiry keys + + integer MPIABI_TAG_UB + parameter (MPIABI_TAG_UB = -201) + integer MPIABI_IO + parameter (MPIABI_IO = -202) + integer MPIABI_HOST + parameter (MPIABI_HOST = -203) + integer MPIABI_WTIME_IS_GLOBAL + parameter (MPIABI_WTIME_IS_GLOBAL = -204) + +! // Collective Operations + + integer MPIABI_MAX + parameter (MPIABI_MAX = int(b'000000100011')) + integer MPIABI_MIN + parameter (MPIABI_MIN = int(b'000000100010')) + integer MPIABI_SUM + parameter (MPIABI_SUM = int(b'000000100001')) + integer MPIABI_PROD + parameter (MPIABI_PROD = int(b'000000100100')) + integer MPIABI_MAXLOC + parameter (MPIABI_MAXLOC = int(b'000000111001')) + integer MPIABI_MINLOC + parameter (MPIABI_MINLOC = int(b'000000111000')) + integer MPIABI_BAND + parameter (MPIABI_BAND = int(b'000000101000')) + integer MPIABI_BOR + parameter (MPIABI_BOR = int(b'000000101001')) + integer MPIABI_BXOR + parameter (MPIABI_BXOR = int(b'000000101010')) + integer MPIABI_LAND + parameter (MPIABI_LAND = int(b'000000110000')) + integer MPIABI_LOR + parameter (MPIABI_LOR = int(b'000000110001')) + integer MPIABI_LXOR + parameter (MPIABI_LXOR = int(b'000000110010')) + integer MPIABI_REPLACE + parameter (MPIABI_REPLACE = int(b'000000111100')) + integer MPIABI_NO_OP + parameter (MPIABI_NO_OP = int(b'000000111101')) + +! Null Handles + + integer MPIABI_GROUP_NULL + parameter (MPIABI_GROUP_NULL = int(b'000100000100')) + integer MPIABI_COMM_NULL + parameter (MPIABI_COMM_NULL = int(b'000100000000')) + integer MPIABI_DATATYPE_NULL + parameter (MPIABI_DATATYPE_NULL = int(b'001000000000')) + integer MPIABI_REQUEST_NULL + parameter (MPIABI_REQUEST_NULL = int(b'000100100000')) + integer MPIABI_OP_NULL + parameter (MPIABI_OP_NULL = int(b'000000100000')) + integer MPIABI_ERRHANDLER_NULL + parameter (MPIABI_ERRHANDLER_NULL = int(b'000100011000')) + integer MPIABI_FILE_NULL + parameter (MPIABI_FILE_NULL = int(b'000100001100')) + integer MPIABI_INFO_NULL + parameter (MPIABI_INFO_NULL = int(b'000100110000')) + integer MPIABI_SESSION_NULL + parameter (MPIABI_SESSION_NULL = int(b'000100010000')) + integer MPIABI_WIN_NULL + parameter (MPIABI_WIN_NULL = int(b'000100001000')) + integer MPIABI_MESSAGE_NULL + parameter (MPIABI_MESSAGE_NULL = int(b'000100010100')) + +! Empty group + + integer MPIABI_GROUP_EMPTY + parameter (MPIABI_GROUP_EMPTY = int(b'000100000101')) + +! Topologies + + integer MPIABI_GRAPH + parameter (MPIABI_GRAPH = -1801) + integer MPIABI_CART + parameter (MPIABI_CART = -1803) + integer MPIABI_DIST_GRAPH + parameter (MPIABI_DIST_GRAPH = -1802) + +! Predefined functions + +! MPIABI_COMM_NULL_COPY_FN +! MPIABI_COMM_DUP_FN +! MPIABI_COMM_NULL_DELETE_FN + +! MPIABI_WIN_NULL_COPY_FN +! MPIABI_WIN_DUP_FN +! MPIABI_WIN_NULL_DELETE_FN +! +! MPIABI_TYPE_NULL_COPY_FN +! MPIABI_TYPE_DUP_FN +! MPIABI_TYPE_NULL_DELETE_FN +! +! MPIABI_CONVERSION_FN_NULL +! MPIABI_CONVERSION_FN_NULL_C + +! Deprecated predefined functions +! +! MPIABI_NULL_COPY_FN +! MPIABI_DUP_FN +! MPIABI_NULL_DELETE_FN + +! Predefined Attribute Keys + + integer MPIABI_APPNUM + parameter (MPIABI_APPNUM = -205) + integer MPIABI_LASTUSEDCODE + parameter (MPIABI_LASTUSEDCODE = -206) + integer MPIABI_UNIVERSE_SIZE + parameter (MPIABI_UNIVERSE_SIZE = -207) + integer MPIABI_WIN_BASE + parameter (MPIABI_WIN_BASE = -301) + integer MPIABI_WIN_DISP_UNIT + parameter (MPIABI_WIN_DISP_UNIT = -302) + integer MPIABI_WIN_SIZE + parameter (MPIABI_WIN_SIZE = -303) + integer MPIABI_WIN_CREATE_FLAVOR + parameter (MPIABI_WIN_CREATE_FLAVOR = -304) + integer MPIABI_WIN_MODEL + parameter (MPIABI_WIN_MODEL = -305) + +! MPI Window Create Flavors + + integer MPIABI_WIN_FLAVOR_CREATE + parameter (MPIABI_WIN_FLAVOR_CREATE = -1102) + integer MPIABI_WIN_FLAVOR_ALLOCATE + parameter (MPIABI_WIN_FLAVOR_ALLOCATE = -1101) + integer MPIABI_WIN_FLAVOR_DYNAMIC + parameter (MPIABI_WIN_FLAVOR_DYNAMIC = -1103) + integer MPIABI_WIN_FLAVOR_SHARED + parameter (MPIABI_WIN_FLAVOR_SHARED = -1104) + +! MPI Window Models + + integer MPIABI_WIN_SEPARATE + parameter (MPIABI_WIN_SEPARATE = -1201) + integer MPIABI_WIN_UNIFIED + parameter (MPIABI_WIN_UNIFIED = -1202) + +! Mode Constants + + integer MPIABI_MODE_APPEND + parameter (MPIABI_MODE_APPEND = 1) + integer MPIABI_MODE_CREATE + parameter (MPIABI_MODE_CREATE = 2) + integer MPIABI_MODE_DELETE_ON_CLOSE + parameter (MPIABI_MODE_DELETE_ON_CLOSE = 4) + integer MPIABI_MODE_EXCL + parameter (MPIABI_MODE_EXCL = 8) + integer MPIABI_MODE_NOCHECK + parameter (MPIABI_MODE_NOCHECK = 1024) + integer MPIABI_MODE_NOPRECEDE + parameter (MPIABI_MODE_NOPRECEDE = 2048) + integer MPIABI_MODE_NOPUT + parameter (MPIABI_MODE_NOPUT = 4096) + integer MPIABI_MODE_NOSTORE + parameter (MPIABI_MODE_NOSTORE = 8192) + integer MPIABI_MODE_NOSUCCEED + parameter (MPIABI_MODE_NOSUCCEED = 16384) + integer MPIABI_MODE_RDONLY + parameter (MPIABI_MODE_RDONLY = 16) + integer MPIABI_MODE_RDWR + parameter (MPIABI_MODE_RDWR = 32) + integer MPIABI_MODE_SEQUENTIAL + parameter (MPIABI_MODE_SEQUENTIAL = 64) + integer MPIABI_MODE_UNIQUE_OPEN + parameter (MPIABI_MODE_UNIQUE_OPEN = 128) + integer MPIABI_MODE_WRONLY + parameter (MPIABI_MODE_WRONLY = 256) + +! Datatype Decoding Constants + + integer MPIABI_COMBINER_CONTIGUOUS + parameter (MPIABI_COMBINER_CONTIGUOUS = -1303) + integer MPIABI_COMBINER_DARRAY + parameter (MPIABI_COMBINER_DARRAY = -1312) + integer MPIABI_COMBINER_DUP + parameter (MPIABI_COMBINER_DUP = -1302) + integer MPIABI_COMBINER_F90_COMPLEX + parameter (MPIABI_COMBINER_F90_COMPLEX = -1314) + integer MPIABI_COMBINER_F90_INTEGER + parameter (MPIABI_COMBINER_F90_INTEGER = -1315) + integer MPIABI_COMBINER_F90_REAL + parameter (MPIABI_COMBINER_F90_REAL = -1313) + integer MPIABI_COMBINER_HINDEXED + parameter (MPIABI_COMBINER_HINDEXED = -1307) + integer MPIABI_COMBINER_HVECTOR + parameter (MPIABI_COMBINER_HVECTOR = -1305) + integer MPIABI_COMBINER_INDEXED_BLOCK + parameter (MPIABI_COMBINER_INDEXED_BLOCK = -1308) + integer MPIABI_COMBINER_HINDEXED_BLOCK + parameter (MPIABI_COMBINER_HINDEXED_BLOCK = -1309) + integer MPIABI_COMBINER_INDEXED + parameter (MPIABI_COMBINER_INDEXED = -1306) + integer MPIABI_COMBINER_NAMED + parameter (MPIABI_COMBINER_NAMED = -1301) + integer MPIABI_COMBINER_RESIZED + parameter (MPIABI_COMBINER_RESIZED = -1316) + integer MPIABI_COMBINER_STRUCT + parameter (MPIABI_COMBINER_STRUCT = -1310) + integer MPIABI_COMBINER_SUBARRAY + parameter (MPIABI_COMBINER_SUBARRAY = -1311) + integer MPIABI_COMBINER_VECTOR + parameter (MPIABI_COMBINER_VECTOR = -1304) + +! Threads Constants + + integer MPIABI_THREAD_FUNNELED + parameter (MPIABI_THREAD_FUNNELED = -803) + integer MPIABI_THREAD_MULTIPLE + parameter (MPIABI_THREAD_MULTIPLE = -801) + integer MPIABI_THREAD_SERIALIZED + parameter (MPIABI_THREAD_SERIALIZED = -802) + integer MPIABI_THREAD_SINGLE + parameter (MPIABI_THREAD_SINGLE = -804) + +! File Operation Constants, Part 1 + + integer MPIABI_DISPLACEMENT_CURRENT + parameter (MPIABI_DISPLACEMENT_CURRENT = -501) + +! File Operation Constants, Part 2 + + integer MPIABI_DISTRIBUTE_BLOCK + parameter (MPIABI_DISTRIBUTE_BLOCK = -1401) + integer MPIABI_DISTRIBUTE_CYCLIC + parameter (MPIABI_DISTRIBUTE_CYCLIC = -1402) + integer MPIABI_DISTRIBUTE_DFLT_DARG + parameter (MPIABI_DISTRIBUTE_DFLT_DARG = -1403) + integer MPIABI_DISTRIBUTE_NONE + parameter (MPIABI_DISTRIBUTE_NONE = -1404) + integer MPIABI_ORDER_C + parameter (MPIABI_ORDER_C = -1501) + integer MPIABI_ORDER_FORTRAN + parameter (MPIABI_ORDER_FORTRAN = -1502) + integer MPIABI_SEEK_CUR + parameter (MPIABI_SEEK_CUR = -1601) + integer MPIABI_SEEK_END + parameter (MPIABI_SEEK_END = -1602) + integer MPIABI_SEEK_SET + parameter (MPIABI_SEEK_SET = -1603) + +! F90 Datatype Matching Constants + + integer MPIABI_TYPECLASS_COMPLEX + parameter (MPIABI_TYPECLASS_COMPLEX = -1702) + integer MPIABI_TYPECLASS_INTEGER + parameter (MPIABI_TYPECLASS_INTEGER = -1703) + integer MPIABI_TYPECLASS_REAL + parameter (MPIABI_TYPECLASS_REAL = -1701) + +! Constants Specifying Empty or Ignored Input + + integer MPIABI_ARGVS_NULL(1) + integer(MPIABI_ADDRESS_KIND) MPIABI_ARGVS_NULL_PTR + pointer (MPIABI_ARGVS_NULL_PTR, MPIABI_ARGVS_NULL) + common /MPIABI_ARGVS_NULL_PTR/ MPIABI_ARGVS_NULL_PTR + integer MPIABI_ARGV_NULL(1) + integer(MPIABI_ADDRESS_KIND) MPIABI_ARGV_NULL_PTR + pointer (MPIABI_ARGV_NULL_PTR, MPIABI_ARGV_NULL) + common /MPIABI_ARGV_NULL_PTR/ MPIABI_ARGV_NULL_PTR + integer MPIABI_ERRCODES_IGNORE(1) + integer(MPIABI_ADDRESS_KIND) MPIABI_ERRCODES_IGNORE_PTR + pointer (MPIABI_ERRCODES_IGNORE_PTR, MPIABI_ERRCODES_IGNORE) + common /MPIABI_ERRCODES_IGNORE_PTR/ MPIABI_ERRCODES_IGNORE_PTR + integer MPIABI_STATUSES_IGNORE(MPIABI_STATUS_SIZE) + integer(MPIABI_ADDRESS_KIND) MPIABI_STATUSES_IGNORE_PTR + pointer (MPIABI_STATUSES_IGNORE_PTR, MPIABI_STATUSES_IGNORE) + common /MPIABI_STATUSES_IGNORE_PTR/ MPIABI_STATUSES_IGNORE_PTR + integer MPIABI_STATUS_IGNORE(MPIABI_STATUS_SIZE) + integer(MPIABI_ADDRESS_KIND) MPIABI_STATUS_IGNORE_PTR + pointer (MPIABI_STATUS_IGNORE_PTR, MPIABI_STATUS_IGNORE) + common /MPIABI_STATUS_IGNORE_PTR/ MPIABI_STATUS_IGNORE_PTR + integer MPIABI_UNWEIGHTED(1) + integer(MPIABI_ADDRESS_KIND) MPIABI_UNWEIGHTED_PTR + pointer (MPIABI_UNWEIGHTED_PTR, MPIABI_UNWEIGHTED) + common /MPIABI_UNWEIGHTED_PTR/ MPIABI_UNWEIGHTED_PTR + integer MPIABI_WEIGHTS_EMPTY(1) + integer(MPIABI_ADDRESS_KIND) MPIABI_WEIGHTS_EMPTY_PTR + pointer (MPIABI_WEIGHTS_EMPTY_PTR, MPIABI_WEIGHTS_EMPTY) + common /MPIABI_WEIGHTS_EMPTY_PTR/ MPIABI_WEIGHTS_EMPTY_PTR + +! C preprocessor Constants and Fortran Parameters + + integer MPIABI_SUBVERSION + parameter (MPIABI_SUBVERSION = 1) + integer MPIABI_VERSION + parameter (MPIABI_VERSION = 4) diff --git a/mpiabi/mpiabif_functions.h b/mpiabi/mpiabif_functions.h new file mode 100644 index 00000000..2870ddcd --- /dev/null +++ b/mpiabi/mpiabif_functions.h @@ -0,0 +1,1708 @@ +! Declare MPIABI functions + +! A.4 Fortran 2008 Bindings + + +! A.4.1 Point-to-Point Communication Fortran 2008 Bindings + + external MPIABI_Bsend + external MPIABI_Bsend_c + +! int MPIABI_Bsend_init(const void *buf, int count, MPIABI_Datatype datatype, int dest, int tag, MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Bsend_init_c(const void *buf, MPIABI_Count count, MPIABI_Datatype datatype, int dest, int tag, MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Buffer_attach(void *buffer, int size); +! int MPIABI_Buffer_attach_c(void *buffer, MPIABI_Count size); +! int MPIABI_Buffer_detach(void *buffer_addr, int *size); +! int MPIABI_Buffer_detach_c(void *buffer_addr, MPIABI_Count *size); +! int MPIABI_Buffer_flush(void); +! int MPIABI_Buffer_iflush(MPIABI_Request *request); +! int MPIABI_Cancel(MPIABI_Request *request); +! int MPIABI_Comm_attach_buffer(MPIABI_Comm comm, void *buffer, int size); +! int MPIABI_Comm_attach_buffer_c(MPIABI_Comm comm, void *buffer, +! MPIABI_Count size); +! int MPIABI_Comm_detach_buffer(MPIABI_Comm comm, void *buffer_addr, int *size); +! int MPIABI_Comm_detach_buffer_c(MPIABI_Comm comm, void *buffer_addr, +! MPIABI_Count *size); +! int MPIABI_Comm_flush_buffer(MPIABI_Comm comm); +! int MPIABI_Comm_iflush_buffer(MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Get_count(const MPIABI_Status *status, MPIABI_Datatype datatype, +! int *count); +! int MPIABI_Get_count_c(const MPIABI_Status *status, MPIABI_Datatype datatype, +! MPIABI_Count *count); +! int MPIABI_Ibsend(const void *buf, int count, MPIABI_Datatype datatype, +! int dest, int tag, MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Ibsend_c(const void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, int dest, int tag, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Improbe(int source, int tag, MPIABI_Comm comm, int *flag, +! MPIABI_Message *message, MPIABI_Status *status); +! int MPIABI_Imrecv(void *buf, int count, MPIABI_Datatype datatype, +! MPIABI_Message *message, MPIABI_Request *request); +! int MPIABI_Imrecv_c(void *buf, MPIABI_Count count, MPIABI_Datatype datatype, +! MPIABI_Message *message, MPIABI_Request *request); +! int MPIABI_Iprobe(int source, int tag, MPIABI_Comm comm, int *flag, +! MPIABI_Status *status); +! int MPIABI_Irecv(void *buf, int count, MPIABI_Datatype datatype, int source, +! int tag, MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Irecv_c(void *buf, MPIABI_Count count, MPIABI_Datatype datatype, +! int source, int tag, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Irsend(const void *buf, int count, MPIABI_Datatype datatype, +! int dest, int tag, MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Irsend_c(const void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, int dest, int tag, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Isend(const void *buf, int count, MPIABI_Datatype datatype, int dest, +! int tag, MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Isend_c(const void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, int dest, int tag, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Isendrecv(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, int dest, int sendtag, +! void *recvbuf, int recvcount, MPIABI_Datatype recvtype, +! int source, int recvtag, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Isendrecv_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, int dest, int sendtag, +! void *recvbuf, MPIABI_Count recvcount, +! MPIABI_Datatype recvtype, int source, int recvtag, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Isendrecv_replace(void *buf, int count, MPIABI_Datatype datatype, +! int dest, int sendtag, int source, int recvtag, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Isendrecv_replace_c(void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, int dest, int sendtag, +! int source, int recvtag, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Issend(const void *buf, int count, MPIABI_Datatype datatype, +! int dest, int tag, MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Issend_c(const void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, int dest, int tag, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Mprobe(int source, int tag, MPIABI_Comm comm, +! MPIABI_Message *message, MPIABI_Status *status); +! int MPIABI_Mrecv(void *buf, int count, MPIABI_Datatype datatype, +! MPIABI_Message *message, MPIABI_Status *status); +! int MPIABI_Mrecv_c(void *buf, MPIABI_Count count, MPIABI_Datatype datatype, +! MPIABI_Message *message, MPIABI_Status *status); +! int MPIABI_Probe(int source, int tag, MPIABI_Comm comm, MPIABI_Status *status); +! int MPIABI_Recv(void *buf, int count, MPIABI_Datatype datatype, int source, +! int tag, MPIABI_Comm comm, MPIABI_Status *status); +! int MPIABI_Recv_c(void *buf, MPIABI_Count count, MPIABI_Datatype datatype, +! int source, int tag, MPIABI_Comm comm, MPIABI_Status *status); +! int MPIABI_Recv_init(void *buf, int count, MPIABI_Datatype datatype, int source, +! int tag, MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Recv_init_c(void *buf, MPIABI_Count count, MPIABI_Datatype datatype, +! int source, int tag, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Request_free(MPIABI_Request *request); +! int MPIABI_Request_get_status(MPIABI_Request request, int *flag, +! MPIABI_Status *status); +! int MPIABI_Request_get_status_all(int count, +! const MPIABI_Request array_of_requests[], +! int *flag, MPIABI_Status array_of_statuses[]); +! int MPIABI_Request_get_status_any(int count, +! const MPIABI_Request array_of_requests[], +! int *index, int *flag, MPIABI_Status *status); +! int MPIABI_Request_get_status_some(int incount, +! const MPIABI_Request array_of_requests[], +! int *outcount, int array_of_indices[], +! MPIABI_Status array_of_statuses[]); +! int MPIABI_Rsend(const void *buf, int count, MPIABI_Datatype datatype, int dest, +! int tag, MPIABI_Comm comm); +! int MPIABI_Rsend_c(const void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, int dest, int tag, +! MPIABI_Comm comm); +! int MPIABI_Rsend_init(const void *buf, int count, MPIABI_Datatype datatype, +! int dest, int tag, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Rsend_init_c(const void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, int dest, int tag, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Send(const void *buf, int count, MPIABI_Datatype datatype, int dest, +! int tag, MPIABI_Comm comm); +! int MPIABI_Send_c(const void *buf, MPIABI_Count count, MPIABI_Datatype datatype, +! int dest, int tag, MPIABI_Comm comm); +! int MPIABI_Send_init(const void *buf, int count, MPIABI_Datatype datatype, +! int dest, int tag, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Send_init_c(const void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, int dest, int tag, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Sendrecv(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, int dest, int sendtag, +! void *recvbuf, int recvcount, MPIABI_Datatype recvtype, +! int source, int recvtag, MPIABI_Comm comm, +! MPIABI_Status *status); +! int MPIABI_Sendrecv_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, int dest, int sendtag, +! void *recvbuf, MPIABI_Count recvcount, +! MPIABI_Datatype recvtype, int source, int recvtag, +! MPIABI_Comm comm, MPIABI_Status *status); +! int MPIABI_Sendrecv_replace(void *buf, int count, MPIABI_Datatype datatype, +! int dest, int sendtag, int source, int recvtag, +! MPIABI_Comm comm, MPIABI_Status *status); +! int MPIABI_Sendrecv_replace_c(void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, int dest, int sendtag, +! int source, int recvtag, MPIABI_Comm comm, +! MPIABI_Status *status); +! int MPIABI_Session_attach_buffer(MPIABI_Session session, void *buffer, +! int size); +! int MPIABI_Session_attach_buffer_c(MPIABI_Session session, void *buffer, +! MPIABI_Count size); +! int MPIABI_Session_detach_buffer(MPIABI_Session session, void *buffer_addr, +! int *size); +! int MPIABI_Session_detach_buffer_c(MPIABI_Session session, void *buffer_addr, +! MPIABI_Count *size); +! int MPIABI_Session_flush_buffer(MPIABI_Session session); +! int MPIABI_Session_iflush_buffer(MPIABI_Session session, +! MPIABI_Request *request); +! int MPIABI_Ssend(const void *buf, int count, MPIABI_Datatype datatype, int dest, +! int tag, MPIABI_Comm comm); +! int MPIABI_Ssend_c(const void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, int dest, int tag, +! MPIABI_Comm comm); +! int MPIABI_Ssend_init(const void *buf, int count, MPIABI_Datatype datatype, +! int dest, int tag, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Ssend_init_c(const void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, int dest, int tag, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Start(MPIABI_Request *request); +! int MPIABI_Startall(int count, MPIABI_Request array_of_requests[]); +! int MPIABI_Status_get_error(MPIABI_Status *status, int *err); +! int MPIABI_Status_get_source(MPIABI_Status *status, int *source); +! int MPIABI_Status_get_tag(MPIABI_Status *status, int *tag); +! int MPIABI_Test(MPIABI_Request *request, int *flag, MPIABI_Status *status); +! int MPIABI_Test_cancelled(const MPIABI_Status *status, int *flag); +! int MPIABI_Testall(int count, MPIABI_Request array_of_requests[], int *flag, +! MPIABI_Status array_of_statuses[]); +! int MPIABI_Testany(int count, MPIABI_Request array_of_requests[], int *index, +! int *flag, MPIABI_Status *status); +! int MPIABI_Testsome(int incount, MPIABI_Request array_of_requests[], +! int *outcount, int array_of_indices[], +! MPIABI_Status array_of_statuses[]); +! int MPIABI_Wait(MPIABI_Request *request, MPIABI_Status *status); +! int MPIABI_Waitall(int count, MPIABI_Request array_of_requests[], +! MPIABI_Status array_of_statuses[]); +! int MPIABI_Waitany(int count, MPIABI_Request array_of_requests[], int *index, +! MPIABI_Status *status); +! int MPIABI_Waitsome(int incount, MPIABI_Request array_of_requests[], +! int *outcount, int array_of_indices[], +! MPIABI_Status array_of_statuses[]); +! +! // A.3.2 Partitioned Communication C Bindings +! +! int MPIABI_Parrived(MPIABI_Request request, int partition, int *flag); +! int MPIABI_Pready(int partition, MPIABI_Request request); +! int MPIABI_Pready_list(int length, const int array_of_partitions[], +! MPIABI_Request request); +! int MPIABI_Pready_range(int partition_low, int partition_high, +! MPIABI_Request request); +! int MPIABI_Precv_init(void *buf, int partitions, MPIABI_Count count, +! MPIABI_Datatype datatype, int source, int tag, +! MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Psend_init(const void *buf, int partitions, MPIABI_Count count, +! MPIABI_Datatype datatype, int dest, int tag, +! MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! +! // A.3.3 Datatypes C Bindings +! +! MPIABI_Aint MPIABI_Aint_add(MPIABI_Aint base, MPIABI_Aint disp); +! MPIABI_Aint MPIABI_Aint_diff(MPIABI_Aint addr1, MPIABI_Aint addr2); +! int MPIABI_Get_address(const void *location, MPIABI_Aint *address); +! int MPIABI_Get_elements(const MPIABI_Status *status, MPIABI_Datatype datatype, +! int *count); +! int MPIABI_Get_elements_c(const MPIABI_Status *status, MPIABI_Datatype datatype, +! MPIABI_Count *count); +! int MPIABI_Pack(const void *inbuf, int incount, MPIABI_Datatype datatype, +! void *outbuf, int outsize, int *position, MPIABI_Comm comm); +! int MPIABI_Pack_c(const void *inbuf, MPIABI_Count incount, +! MPIABI_Datatype datatype, void *outbuf, MPIABI_Count outsize, +! MPIABI_Count *position, MPIABI_Comm comm); +! int MPIABI_Pack_external(const char datarep[], const void *inbuf, int incount, +! MPIABI_Datatype datatype, void *outbuf, +! MPIABI_Aint outsize, MPIABI_Aint *position); +! int MPIABI_Pack_external_c(const char datarep[], const void *inbuf, +! MPIABI_Count incount, MPIABI_Datatype datatype, +! void *outbuf, MPIABI_Count outsize, +! MPIABI_Count *position); +! int MPIABI_Pack_external_size(const char datarep[], MPIABI_Count incount, +! MPIABI_Datatype datatype, MPIABI_Aint *size); +! int MPIABI_Pack_external_size_c(const char datarep[], MPIABI_Count incount, +! MPIABI_Datatype datatype, MPIABI_Count *size); +! int MPIABI_Pack_size_c(MPIABI_Count incount, MPIABI_Datatype datatype, +! MPIABI_Comm comm, MPIABI_Count *size); +! int MPIABI_Type_commit(MPIABI_Datatype *datatype); +! int MPIABI_Type_contiguous(int count, MPIABI_Datatype oldtype, +! MPIABI_Datatype *newtype); +! int MPIABI_Type_contiguous_c(MPIABI_Count count, MPIABI_Datatype oldtype, +! MPIABI_Datatype *newtype); +! int MPIABI_Type_create_darray(int size, int rank, int ndims, +! const int array_of_gsizes[], +! const int array_of_distribs[], +! const int array_of_dargs[], +! const int array_of_psizes[], int order, +! MPIABI_Datatype oldtype, +! MPIABI_Datatype *newtype); +! int MPIABI_Type_create_darray_c(int size, int rank, int ndims, +! const MPIABI_Count array_of_gsizes[], +! const int array_of_distribs[], +! const int array_of_dargs[], +! const int array_of_psizes[], int order, +! MPIABI_Datatype oldtype, +! MPIABI_Datatype *newtype); +! int MPIABI_Type_create_hindexed(int count, const int array_of_blocklengths[], +! const MPIABI_Aint array_of_displacements[], +! MPIABI_Datatype oldtype, +! MPIABI_Datatype *newtype); +! int MPIABI_Type_create_hindexed_block( +! int count, int blocklength, const MPIABI_Aint array_of_displacements[], +! MPIABI_Datatype oldtype, MPIABI_Datatype *newtype); +! int MPIABI_Type_create_hindexed_block_c( +! MPIABI_Count count, MPIABI_Count blocklength, +! const MPIABI_Count array_of_displacements[], MPIABI_Datatype oldtype, +! MPIABI_Datatype *newtype); +! int MPIABI_Type_create_hindexed_c(MPIABI_Count count, +! const MPIABI_Count array_of_blocklengths[], +! const MPIABI_Count array_of_displacements[], +! MPIABI_Datatype oldtype, +! MPIABI_Datatype *newtype); +! int MPIABI_Type_create_hvector(int count, int blocklength, MPIABI_Aint stride, +! MPIABI_Datatype oldtype, +! MPIABI_Datatype *newtype); +! int MPIABI_Type_create_hvector_c(MPIABI_Count count, MPIABI_Count blocklength, +! MPIABI_Count stride, MPIABI_Datatype oldtype, +! MPIABI_Datatype *newtype); +! int MPIABI_Type_create_indexed_block(int count, int blocklength, +! const int array_of_displacements[], +! MPIABI_Datatype oldtype, +! MPIABI_Datatype *newtype); +! int MPIABI_Type_create_indexed_block_c( +! MPIABI_Count count, MPIABI_Count blocklength, +! const MPIABI_Count array_of_displacements[], MPIABI_Datatype oldtype, +! MPIABI_Datatype *newtype); +! int MPIABI_Type_create_resized(MPIABI_Datatype oldtype, MPIABI_Aint lb, +! MPIABI_Aint extent, MPIABI_Datatype *newtype); +! int MPIABI_Type_create_resized_c(MPIABI_Datatype oldtype, MPIABI_Count lb, +! MPIABI_Count extent, MPIABI_Datatype *newtype); +! int MPIABI_Type_create_struct(int count, const int array_of_blocklengths[], +! const MPIABI_Aint array_of_displacements[], +! const MPIABI_Datatype array_of_types[], +! MPIABI_Datatype *newtype); +! int MPIABI_Type_create_struct_c(MPIABI_Count count, +! const MPIABI_Count array_of_blocklengths[], +! const MPIABI_Count array_of_displacements[], +! const MPIABI_Datatype array_of_types[], +! MPIABI_Datatype *newtype); +! int MPIABI_Type_create_subarray(int ndims, const int array_of_sizes[], +! const int array_of_subsizes[], +! const int array_of_starts[], int order, +! MPIABI_Datatype oldtype, +! MPIABI_Datatype *newtype); +! int MPIABI_Type_create_subarray_c(int ndims, +! const MPIABI_Count array_of_sizes[], +! const MPIABI_Count array_of_subsizes[], +! const MPIABI_Count array_of_starts[], +! int order, MPIABI_Datatype oldtype, +! MPIABI_Datatype *newtype); +! int MPIABI_Type_dup(MPIABI_Datatype oldtype, MPIABI_Datatype *newtype); +! int MPIABI_Type_free(MPIABI_Datatype *datatype); +! int MPIABI_Type_get_contents(MPIABI_Datatype datatype, int max_integers, +! int max_addresses, int max_datatypes, +! int array_of_integers[], +! MPIABI_Aint array_of_addresses[], +! MPIABI_Datatype array_of_datatypes[]); +! int MPIABI_Type_get_contents_c( +! MPIABI_Datatype datatype, MPIABI_Count max_integers, +! MPIABI_Count max_addresses, MPIABI_Count max_large_counts, +! MPIABI_Count max_datatypes, int array_of_integers[], +! MPIABI_Aint array_of_addresses[], MPIABI_Count array_of_large_counts[], +! MPIABI_Datatype array_of_datatypes[]); +! int MPIABI_Type_get_envelope(MPIABI_Datatype datatype, int *num_integers, +! int *num_addresses, int *num_datatypes, +! int *combiner); +! int MPIABI_Type_get_envelope_c(MPIABI_Datatype datatype, +! MPIABI_Count *num_integers, +! MPIABI_Count *num_addresses, +! MPIABI_Count *num_large_counts, +! MPIABI_Count *num_datatypes, int *combiner); +! int MPIABI_Type_get_extent(MPIABI_Datatype datatype, MPIABI_Aint *lb, +! MPIABI_Aint *extent); +! int MPIABI_Type_get_extent_c(MPIABI_Datatype datatype, MPIABI_Count *lb, +! MPIABI_Count *extent); +! int MPIABI_Type_get_true_extent(MPIABI_Datatype datatype, MPIABI_Aint *true_lb, +! MPIABI_Aint *true_extent); +! int MPIABI_Type_get_true_extent_c(MPIABI_Datatype datatype, +! MPIABI_Count *true_lb, +! MPIABI_Count *true_extent); +! int MPIABI_Type_indexed(int count, const int array_of_blocklengths[], +! const int array_of_displacements[], +! MPIABI_Datatype oldtype, MPIABI_Datatype *newtype); +! int MPIABI_Type_indexed_c(MPIABI_Count count, +! const MPIABI_Count array_of_blocklengths[], +! const MPIABI_Count array_of_displacements[], +! MPIABI_Datatype oldtype, MPIABI_Datatype *newtype); +! int MPIABI_Type_size(MPIABI_Datatype datatype, int *size); +! int MPIABI_Type_size_c(MPIABI_Datatype datatype, MPIABI_Count *size); +! int MPIABI_Type_vector(int count, int blocklength, int stride, +! MPIABI_Datatype oldtype, MPIABI_Datatype *newtype); +! int MPIABI_Type_vector_c(MPIABI_Count count, MPIABI_Count blocklength, +! MPIABI_Count stride, MPIABI_Datatype oldtype, +! MPIABI_Datatype *newtype); +! int MPIABI_Unpack(const void *inbuf, int insize, int *position, void *outbuf, +! int outcount, MPIABI_Datatype datatype, MPIABI_Comm comm); +! int MPIABI_Unpack_c(const void *inbuf, MPIABI_Count insize, +! MPIABI_Count *position, void *outbuf, MPIABI_Count outcount, +! MPIABI_Datatype datatype, MPIABI_Comm comm); +! int MPIABI_Unpack_external(const char datarep[], const void *inbuf, +! MPIABI_Aint insize, MPIABI_Aint *position, +! void *outbuf, int outcount, +! MPIABI_Datatype datatype); +! int MPIABI_Unpack_external_c(const char datarep[], const void *inbuf, +! MPIABI_Count insize, MPIABI_Count *position, +! void *outbuf, MPIABI_Count outcount, +! MPIABI_Datatype datatype); +! +! // A.3.4 Collective Communication C Bindings +! +! int MPIABI_Allgather(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, int recvcount, +! MPIABI_Datatype recvtype, MPIABI_Comm comm); +! int MPIABI_Allgather_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! MPIABI_Count recvcount, MPIABI_Datatype recvtype, +! MPIABI_Comm comm); +! int MPIABI_Allgather_init(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! int recvcount, MPIABI_Datatype recvtype, +! MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Allgather_init_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! MPIABI_Count recvcount, MPIABI_Datatype recvtype, +! MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Allgatherv(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! const int recvcounts[], const int displs[], +! MPIABI_Datatype recvtype, MPIABI_Comm comm); +! int MPIABI_Allgatherv_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! const MPIABI_Count recvcounts[], +! const MPIABI_Aint displs[], MPIABI_Datatype recvtype, +! MPIABI_Comm comm); +! int MPIABI_Allgatherv_init(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! const int recvcounts[], const int displs[], +! MPIABI_Datatype recvtype, MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Allgatherv_init_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! const MPIABI_Count recvcounts[], +! const MPIABI_Aint displs[], +! MPIABI_Datatype recvtype, MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Allreduce(const void *sendbuf, void *recvbuf, int count, +! MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm); +! int MPIABI_Allreduce_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Op op, +! MPIABI_Comm comm); +! int MPIABI_Allreduce_init(const void *sendbuf, void *recvbuf, int count, +! MPIABI_Datatype datatype, MPIABI_Op op, +! MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Allreduce_init_c(const void *sendbuf, void *recvbuf, +! MPIABI_Count count, MPIABI_Datatype datatype, +! MPIABI_Op op, MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Alltoall(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, int recvcount, +! MPIABI_Datatype recvtype, MPIABI_Comm comm); +! int MPIABI_Alltoall_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! MPIABI_Count recvcount, MPIABI_Datatype recvtype, +! MPIABI_Comm comm); +! int MPIABI_Alltoall_init(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, int recvcount, +! MPIABI_Datatype recvtype, MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Alltoall_init_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! MPIABI_Count recvcount, MPIABI_Datatype recvtype, +! MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Alltoallv(const void *sendbuf, const int sendcounts[], +! const int sdispls[], MPIABI_Datatype sendtype, +! void *recvbuf, const int recvcounts[], const int rdispls[], +! MPIABI_Datatype recvtype, MPIABI_Comm comm); +! int MPIABI_Alltoallv_c(const void *sendbuf, const MPIABI_Count sendcounts[], +! const MPIABI_Aint sdispls[], MPIABI_Datatype sendtype, +! void *recvbuf, const MPIABI_Count recvcounts[], +! const MPIABI_Aint rdispls[], MPIABI_Datatype recvtype, +! MPIABI_Comm comm); +! int MPIABI_Alltoallv_init(const void *sendbuf, const int sendcounts[], +! const int sdispls[], MPIABI_Datatype sendtype, +! void *recvbuf, const int recvcounts[], +! const int rdispls[], MPIABI_Datatype recvtype, +! MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Alltoallv_init_c(const void *sendbuf, +! const MPIABI_Count sendcounts[], +! const MPIABI_Aint sdispls[], +! MPIABI_Datatype sendtype, void *recvbuf, +! const MPIABI_Count recvcounts[], +! const MPIABI_Aint rdispls[], +! MPIABI_Datatype recvtype, MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Alltoallw(const void *sendbuf, const int sendcounts[], +! const int sdispls[], const MPIABI_Datatype sendtypes[], +! void *recvbuf, const int recvcounts[], const int rdispls[], +! const MPIABI_Datatype recvtypes[], MPIABI_Comm comm); +! int MPIABI_Alltoallw_c(const void *sendbuf, const MPIABI_Count sendcounts[], +! const MPIABI_Aint sdispls[], +! const MPIABI_Datatype sendtypes[], void *recvbuf, +! const MPIABI_Count recvcounts[], +! const MPIABI_Aint rdispls[], +! const MPIABI_Datatype recvtypes[], MPIABI_Comm comm); +! int MPIABI_Alltoallw_init(const void *sendbuf, const int sendcounts[], +! const int sdispls[], +! const MPIABI_Datatype sendtypes[], void *recvbuf, +! const int recvcounts[], const int rdispls[], +! const MPIABI_Datatype recvtypes[], MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Alltoallw_init_c(const void *sendbuf, +! const MPIABI_Count sendcounts[], +! const MPIABI_Aint sdispls[], +! const MPIABI_Datatype sendtypes[], void *recvbuf, +! const MPIABI_Count recvcounts[], +! const MPIABI_Aint rdispls[], +! const MPIABI_Datatype recvtypes[], MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Barrier(MPIABI_Comm comm); +! int MPIABI_Barrier_init(MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Bcast(void *buffer, int count, MPIABI_Datatype datatype, int root, +! MPIABI_Comm comm); +! int MPIABI_Bcast_c(void *buffer, MPIABI_Count count, MPIABI_Datatype datatype, +! int root, MPIABI_Comm comm); +! int MPIABI_Bcast_init(void *buffer, int count, MPIABI_Datatype datatype, +! int root, MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Bcast_init_c(void *buffer, MPIABI_Count count, +! MPIABI_Datatype datatype, int root, MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Exscan(const void *sendbuf, void *recvbuf, int count, +! MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm); +! int MPIABI_Exscan_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm); +! int MPIABI_Exscan_init(const void *sendbuf, void *recvbuf, int count, +! MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Exscan_init_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Op op, +! MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Gather(const void *sendbuf, int sendcount, MPIABI_Datatype sendtype, +! void *recvbuf, int recvcount, MPIABI_Datatype recvtype, +! int root, MPIABI_Comm comm); +! int MPIABI_Gather_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! MPIABI_Count recvcount, MPIABI_Datatype recvtype, int root, +! MPIABI_Comm comm); +! int MPIABI_Gather_init(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, int recvcount, +! MPIABI_Datatype recvtype, int root, MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Gather_init_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! MPIABI_Count recvcount, MPIABI_Datatype recvtype, +! int root, MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Gatherv(const void *sendbuf, int sendcount, MPIABI_Datatype sendtype, +! void *recvbuf, const int recvcounts[], const int displs[], +! MPIABI_Datatype recvtype, int root, MPIABI_Comm comm); +! int MPIABI_Gatherv_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! const MPIABI_Count recvcounts[], +! const MPIABI_Aint displs[], MPIABI_Datatype recvtype, +! int root, MPIABI_Comm comm); +! int MPIABI_Gatherv_init(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! const int recvcounts[], const int displs[], +! MPIABI_Datatype recvtype, int root, MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Gatherv_init_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! const MPIABI_Count recvcounts[], +! const MPIABI_Aint displs[], MPIABI_Datatype recvtype, +! int root, MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Iallgather(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, int recvcount, +! MPIABI_Datatype recvtype, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Iallgather_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! MPIABI_Count recvcount, MPIABI_Datatype recvtype, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Iallgatherv(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! const int recvcounts[], const int displs[], +! MPIABI_Datatype recvtype, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Iallgatherv_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! const MPIABI_Count recvcounts[], +! const MPIABI_Aint displs[], MPIABI_Datatype recvtype, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Iallreduce(const void *sendbuf, void *recvbuf, int count, +! MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Iallreduce_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Op op, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Ialltoall(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, int recvcount, +! MPIABI_Datatype recvtype, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Ialltoall_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! MPIABI_Count recvcount, MPIABI_Datatype recvtype, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Ialltoallv(const void *sendbuf, const int sendcounts[], +! const int sdispls[], MPIABI_Datatype sendtype, +! void *recvbuf, const int recvcounts[], +! const int rdispls[], MPIABI_Datatype recvtype, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Ialltoallv_c(const void *sendbuf, const MPIABI_Count sendcounts[], +! const MPIABI_Aint sdispls[], MPIABI_Datatype sendtype, +! void *recvbuf, const MPIABI_Count recvcounts[], +! const MPIABI_Aint rdispls[], MPIABI_Datatype recvtype, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Ialltoallw(const void *sendbuf, const int sendcounts[], +! const int sdispls[], const MPIABI_Datatype sendtypes[], +! void *recvbuf, const int recvcounts[], +! const int rdispls[], const MPIABI_Datatype recvtypes[], +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Ialltoallw_c(const void *sendbuf, const MPIABI_Count sendcounts[], +! const MPIABI_Aint sdispls[], +! const MPIABI_Datatype sendtypes[], void *recvbuf, +! const MPIABI_Count recvcounts[], +! const MPIABI_Aint rdispls[], +! const MPIABI_Datatype recvtypes[], MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Ibarrier(MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Ibcast(void *buffer, int count, MPIABI_Datatype datatype, int root, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Ibcast_c(void *buffer, MPIABI_Count count, MPIABI_Datatype datatype, +! int root, MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Iexscan(const void *sendbuf, void *recvbuf, int count, +! MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Iexscan_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Igather(const void *sendbuf, int sendcount, MPIABI_Datatype sendtype, +! void *recvbuf, int recvcount, MPIABI_Datatype recvtype, +! int root, MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Igather_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! MPIABI_Count recvcount, MPIABI_Datatype recvtype, int root, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Igatherv(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! const int recvcounts[], const int displs[], +! MPIABI_Datatype recvtype, int root, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Igatherv_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! const MPIABI_Count recvcounts[], +! const MPIABI_Aint displs[], MPIABI_Datatype recvtype, +! int root, MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Ireduce(const void *sendbuf, void *recvbuf, int count, +! MPIABI_Datatype datatype, MPIABI_Op op, int root, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Ireduce_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Op op, int root, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Ireduce_scatter(const void *sendbuf, void *recvbuf, +! const int recvcounts[], MPIABI_Datatype datatype, +! MPIABI_Op op, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Ireduce_scatter_block(const void *sendbuf, void *recvbuf, +! int recvcount, MPIABI_Datatype datatype, +! MPIABI_Op op, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Ireduce_scatter_block_c(const void *sendbuf, void *recvbuf, +! MPIABI_Count recvcount, +! MPIABI_Datatype datatype, MPIABI_Op op, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Ireduce_scatter_c(const void *sendbuf, void *recvbuf, +! const MPIABI_Count recvcounts[], +! MPIABI_Datatype datatype, MPIABI_Op op, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Iscan(const void *sendbuf, void *recvbuf, int count, +! MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Iscan_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Iscatter(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, int recvcount, +! MPIABI_Datatype recvtype, int root, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Iscatter_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! MPIABI_Count recvcount, MPIABI_Datatype recvtype, +! int root, MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Iscatterv(const void *sendbuf, const int sendcounts[], +! const int displs[], MPIABI_Datatype sendtype, +! void *recvbuf, int recvcount, MPIABI_Datatype recvtype, +! int root, MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Iscatterv_c(const void *sendbuf, const MPIABI_Count sendcounts[], +! const MPIABI_Aint displs[], MPIABI_Datatype sendtype, +! void *recvbuf, MPIABI_Count recvcount, +! MPIABI_Datatype recvtype, int root, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Op_commutative(MPIABI_Op op, int *commute); +! int MPIABI_Op_create(MPIABI_User_function *user_fn, int commute, MPIABI_Op *op); +! int MPIABI_Op_create_c(MPIABI_User_function_c *user_fn, int commute, +! MPIABI_Op *op); +! int MPIABI_Op_free(MPIABI_Op *op); +! int MPIABI_Reduce(const void *sendbuf, void *recvbuf, int count, +! MPIABI_Datatype datatype, MPIABI_Op op, int root, +! MPIABI_Comm comm); +! int MPIABI_Reduce_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Op op, int root, +! MPIABI_Comm comm); +! int MPIABI_Reduce_init(const void *sendbuf, void *recvbuf, int count, +! MPIABI_Datatype datatype, MPIABI_Op op, int root, +! MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Reduce_init_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Op op, int root, +! MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Reduce_local(const void *inbuf, void *inoutbuf, int count, +! MPIABI_Datatype datatype, MPIABI_Op op); +! int MPIABI_Reduce_local_c(const void *inbuf, void *inoutbuf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Op op); +! int MPIABI_Reduce_scatter(const void *sendbuf, void *recvbuf, +! const int recvcounts[], MPIABI_Datatype datatype, +! MPIABI_Op op, MPIABI_Comm comm); +! int MPIABI_Reduce_scatter_block(const void *sendbuf, void *recvbuf, +! int recvcount, MPIABI_Datatype datatype, +! MPIABI_Op op, MPIABI_Comm comm); +! int MPIABI_Reduce_scatter_block_c(const void *sendbuf, void *recvbuf, +! MPIABI_Count recvcount, +! MPIABI_Datatype datatype, MPIABI_Op op, +! MPIABI_Comm comm); +! int MPIABI_Reduce_scatter_block_init(const void *sendbuf, void *recvbuf, +! int recvcount, MPIABI_Datatype datatype, +! MPIABI_Op op, MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Reduce_scatter_block_init_c(const void *sendbuf, void *recvbuf, +! MPIABI_Count recvcount, +! MPIABI_Datatype datatype, MPIABI_Op op, +! MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Reduce_scatter_c(const void *sendbuf, void *recvbuf, +! const MPIABI_Count recvcounts[], +! MPIABI_Datatype datatype, MPIABI_Op op, +! MPIABI_Comm comm); +! int MPIABI_Reduce_scatter_init(const void *sendbuf, void *recvbuf, +! const int recvcounts[], MPIABI_Datatype datatype, +! MPIABI_Op op, MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Reduce_scatter_init_c(const void *sendbuf, void *recvbuf, +! const MPIABI_Count recvcounts[], +! MPIABI_Datatype datatype, MPIABI_Op op, +! MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Scan(const void *sendbuf, void *recvbuf, int count, +! MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm); +! int MPIABI_Scan_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm); +! int MPIABI_Scan_init(const void *sendbuf, void *recvbuf, int count, +! MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Scan_init_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Scatter(const void *sendbuf, int sendcount, MPIABI_Datatype sendtype, +! void *recvbuf, int recvcount, MPIABI_Datatype recvtype, +! int root, MPIABI_Comm comm); +! int MPIABI_Scatter_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! MPIABI_Count recvcount, MPIABI_Datatype recvtype, int root, +! MPIABI_Comm comm); +! int MPIABI_Scatter_init(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, int recvcount, +! MPIABI_Datatype recvtype, int root, MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Scatter_init_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! MPIABI_Count recvcount, MPIABI_Datatype recvtype, +! int root, MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Scatterv(const void *sendbuf, const int sendcounts[], +! const int displs[], MPIABI_Datatype sendtype, void *recvbuf, +! int recvcount, MPIABI_Datatype recvtype, int root, +! MPIABI_Comm comm); +! int MPIABI_Scatterv_c(const void *sendbuf, const MPIABI_Count sendcounts[], +! const MPIABI_Aint displs[], MPIABI_Datatype sendtype, +! void *recvbuf, MPIABI_Count recvcount, +! MPIABI_Datatype recvtype, int root, MPIABI_Comm comm); +! int MPIABI_Scatterv_init(const void *sendbuf, const int sendcounts[], +! const int displs[], MPIABI_Datatype sendtype, +! void *recvbuf, int recvcount, MPIABI_Datatype recvtype, +! int root, MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Scatterv_init_c(const void *sendbuf, const MPIABI_Count sendcounts[], +! const MPIABI_Aint displs[], MPIABI_Datatype sendtype, +! void *recvbuf, MPIABI_Count recvcount, +! MPIABI_Datatype recvtype, int root, MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Type_get_value_index(MPIABI_Datatype value_type, +! MPIABI_Datatype index_type, +! MPIABI_Datatype *pair_type); +! +! // A.3.5 Groups, Contexts, Communicators, and Caching C Bindings +! +! int MPIABI_Comm_compare(MPIABI_Comm comm1, MPIABI_Comm comm2, int *result); +! int MPIABI_Comm_create(MPIABI_Comm comm, MPIABI_Group group, +! MPIABI_Comm *newcomm); +! int MPIABI_Comm_create_from_group(MPIABI_Group group, const char *stringtag, +! MPIABI_Info info, +! MPIABI_Errhandler errhandler, +! MPIABI_Comm *newcomm); +! int MPIABI_Comm_create_group(MPIABI_Comm comm, MPIABI_Group group, int tag, +! MPIABI_Comm *newcomm); +! int MPIABI_Comm_create_keyval( +! MPIABI_Comm_copy_attr_function *comm_copy_attr_fn, +! MPIABI_Comm_delete_attr_function *comm_delete_attr_fn, int *comm_keyval, +! void *extra_state); +! int MPIABI_Comm_delete_attr(MPIABI_Comm comm, int comm_keyval); +! int MPIABI_Comm_dup(MPIABI_Comm comm, MPIABI_Comm *newcomm); +! int MPIABI_Comm_dup_with_info(MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Comm *newcomm); +! int MPIABI_Comm_free(MPIABI_Comm *comm); +! int MPIABI_Comm_get_name(MPIABI_Comm comm, char *comm_name, int *resultlen); +! int MPIABI_Comm_free_keyval(int *comm_keyval); +! int MPIABI_Comm_get_attr(MPIABI_Comm comm, int comm_keyval, void *attribute_val, +! int *flag); +! int MPIABI_Comm_get_info(MPIABI_Comm comm, MPIABI_Info *info_used); +! int MPIABI_Comm_group(MPIABI_Comm comm, MPIABI_Group *group); +! int MPIABI_Comm_idup(MPIABI_Comm comm, MPIABI_Comm *newcomm, +! MPIABI_Request *request); +! int MPIABI_Comm_idup_with_info(MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Comm *newcomm, MPIABI_Request *request); +! int MPIABI_Comm_rank(MPIABI_Comm comm, int *rank); +! int MPIABI_Comm_remote_group(MPIABI_Comm comm, MPIABI_Group *group); +! int MPIABI_Comm_remote_size(MPIABI_Comm comm, int *size); +! int MPIABI_Comm_set_attr(MPIABI_Comm comm, int comm_keyval, +! void *attribute_val); +! int MPIABI_Comm_set_info(MPIABI_Comm comm, MPIABI_Info info); +! int MPIABI_Comm_set_name(MPIABI_Comm comm, const char *comm_name); +! int MPIABI_Comm_size(MPIABI_Comm comm, int *size); +! int MPIABI_Comm_split(MPIABI_Comm comm, int color, int key, +! MPIABI_Comm *newcomm); +! int MPIABI_Group_free(MPIABI_Group *group); +! int MPIABI_Comm_split_type(MPIABI_Comm comm, int split_type, int key, +! MPIABI_Info info, MPIABI_Comm *newcomm); +! int MPIABI_Comm_test_inter(MPIABI_Comm comm, int *flag); +! int MPIABI_Group_compare(MPIABI_Group group1, MPIABI_Group group2, int *result); +! int MPIABI_Group_difference(MPIABI_Group group1, MPIABI_Group group2, +! MPIABI_Group *newgroup); +! int MPIABI_Group_excl(MPIABI_Group group, int n, const int ranks[], +! MPIABI_Group *newgroup); +! int MPIABI_Group_from_session_pset(MPIABI_Session session, +! const char *pset_name, +! MPIABI_Group *newgroup); +! int MPIABI_Group_incl(MPIABI_Group group, int n, const int ranks[], +! MPIABI_Group *newgroup); +! int MPIABI_Group_intersection(MPIABI_Group group1, MPIABI_Group group2, +! MPIABI_Group *newgroup); +! int MPIABI_Group_range_excl(MPIABI_Group group, int n, int ranges[][3], +! MPIABI_Group *newgroup); +! int MPIABI_Group_range_incl(MPIABI_Group group, int n, int ranges[][3], +! MPIABI_Group *newgroup); +! int MPIABI_Group_rank(MPIABI_Group group, int *rank); +! int MPIABI_Group_size(MPIABI_Group group, int *size); +! int MPIABI_Group_translate_ranks(MPIABI_Group group1, int n, const int ranks1[], +! MPIABI_Group group2, int ranks2[]); +! int MPIABI_Group_union(MPIABI_Group group1, MPIABI_Group group2, +! MPIABI_Group *newgroup); +! int MPIABI_Intercomm_create(MPIABI_Comm local_comm, int local_leader, +! MPIABI_Comm peer_comm, int remote_leader, int tag, +! MPIABI_Comm *newintercomm); +! int MPIABI_Intercomm_create_from_groups( +! MPIABI_Group local_group, int local_leader, MPIABI_Group remote_group, +! int remote_leader, const char *stringtag, MPIABI_Info info, +! MPIABI_Errhandler errhandler, MPIABI_Comm *newintercomm); +! int MPIABI_Intercomm_merge(MPIABI_Comm intercomm, int high, +! MPIABI_Comm *newintracomm); +! int MPIABI_Type_create_keyval( +! MPIABI_Type_copy_attr_function *type_copy_attr_fn, +! MPIABI_Type_delete_attr_function *type_delete_attr_fn, int *type_keyval, +! void *extra_state); +! int MPIABI_Type_delete_attr(MPIABI_Datatype datatype, int type_keyval); +! int MPIABI_Type_free_keyval(int *type_keyval); +! int MPIABI_Type_get_attr(MPIABI_Datatype datatype, int type_keyval, +! void *attribute_val, int *flag); +! int MPIABI_Type_get_name(MPIABI_Datatype datatype, char *type_name, +! int *resultlen); +! int MPIABI_Type_set_attr(MPIABI_Datatype datatype, int type_keyval, +! void *attribute_val); +! int MPIABI_Type_set_name(MPIABI_Datatype datatype, const char *type_name); +! int MPIABI_Win_create_keyval( +! MPIABI_Win_copy_attr_function *win_copy_attr_fn, +! MPIABI_Win_delete_attr_function *win_delete_attr_fn, int *win_keyval, +! void *extra_state); +! int MPIABI_Win_delete_attr(MPIABI_Win win, int win_keyval); +! int MPIABI_Win_free_keyval(int *win_keyval); +! int MPIABI_Win_get_attr(MPIABI_Win win, int win_keyval, void *attribute_val, +! int *flag); +! int MPIABI_Win_get_name(MPIABI_Win win, char *win_name, int *resultlen); +! int MPIABI_Win_set_attr(MPIABI_Win win, int win_keyval, void *attribute_val); +! int MPIABI_Win_set_name(MPIABI_Win win, const char *win_name); +! +! // A.3.6 Virtual Topologies for MPI Processes C Bindings +! +! int MPIABI_Cart_coords(MPIABI_Comm comm, int rank, int maxdims, int coords[]); +! int MPIABI_Cart_create(MPIABI_Comm comm_old, int ndims, const int dims[], +! const int periods[], int reorder, +! MPIABI_Comm *comm_cart); +! int MPIABI_Cart_get(MPIABI_Comm comm, int maxdims, int dims[], int periods[], +! int coords[]); +! int MPIABI_Cart_map(MPIABI_Comm comm, int ndims, const int dims[], +! const int periods[], int *newrank); +! int MPIABI_Cart_rank(MPIABI_Comm comm, const int coords[], int *rank); +! int MPIABI_Cart_shift(MPIABI_Comm comm, int direction, int disp, +! int *rank_source, int *rank_dest); +! int MPIABI_Cart_sub(MPIABI_Comm comm, const int remain_dims[], +! MPIABI_Comm *newcomm); +! int MPIABI_Cartdim_get(MPIABI_Comm comm, int *ndims); +! int MPIABI_Dims_create(int nnodes, int ndims, int dims[]); +! int MPIABI_Dist_graph_create(MPIABI_Comm comm_old, int n, const int sources[], +! const int degrees[], const int destinations[], +! const int weights[], MPIABI_Info info, int reorder, +! MPIABI_Comm *comm_dist_graph); +! int MPIABI_Dist_graph_create_adjacent(MPIABI_Comm comm_old, int indegree, +! const int sources[], +! const int sourceweights[], int outdegree, +! const int destinations[], +! const int destweights[], MPIABI_Info info, +! int reorder, +! MPIABI_Comm *comm_dist_graph); +! int MPIABI_Dist_graph_neighbors(MPIABI_Comm comm, int maxindegree, +! int sources[], int sourceweights[], +! int maxoutdegree, int destinations[], +! int destweights[]); +! int MPIABI_Dist_graph_neighbors_count(MPIABI_Comm comm, int *indegree, +! int *outdegree, int *weighted); +! int MPIABI_Graph_create(MPIABI_Comm comm_old, int nnodes, const int index[], +! const int edges[], int reorder, +! MPIABI_Comm *comm_graph); +! int MPIABI_Graph_get(MPIABI_Comm comm, int maxindex, int maxedges, int index[], +! int edges[]); +! int MPIABI_Graph_map(MPIABI_Comm comm, int nnodes, const int index[], +! const int edges[], int *newrank); +! int MPIABI_Graph_neighbors(MPIABI_Comm comm, int rank, int maxneighbors, +! int neighbors[]); +! int MPIABI_Graph_neighbors_count(MPIABI_Comm comm, int rank, int *nneighbors); +! int MPIABI_Graphdims_get(MPIABI_Comm comm, int *nnodes, int *nedges); +! int MPIABI_Ineighbor_allgather(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! int recvcount, MPIABI_Datatype recvtype, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Ineighbor_allgather_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! MPIABI_Count recvcount, +! MPIABI_Datatype recvtype, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Ineighbor_allgatherv(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! const int recvcounts[], const int displs[], +! MPIABI_Datatype recvtype, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Ineighbor_allgatherv_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! const MPIABI_Count recvcounts[], +! const MPIABI_Aint displs[], +! MPIABI_Datatype recvtype, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Ineighbor_alltoall(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! int recvcount, MPIABI_Datatype recvtype, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Ineighbor_alltoall_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! MPIABI_Count recvcount, +! MPIABI_Datatype recvtype, MPIABI_Comm comm, +! MPIABI_Request *request); +! int MPIABI_Ineighbor_alltoallv(const void *sendbuf, const int sendcounts[], +! const int sdispls[], MPIABI_Datatype sendtype, +! void *recvbuf, const int recvcounts[], +! const int rdispls[], MPIABI_Datatype recvtype, +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Ineighbor_alltoallv_c( +! const void *sendbuf, const MPIABI_Count sendcounts[], +! const MPIABI_Aint sdispls[], MPIABI_Datatype sendtype, void *recvbuf, +! const MPIABI_Count recvcounts[], const MPIABI_Aint rdispls[], +! MPIABI_Datatype recvtype, MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Ineighbor_alltoallw(const void *sendbuf, const int sendcounts[], +! const MPIABI_Aint sdispls[], +! const MPIABI_Datatype sendtypes[], void *recvbuf, +! const int recvcounts[], +! const MPIABI_Aint rdispls[], +! const MPIABI_Datatype recvtypes[], +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Ineighbor_alltoallw_c(const void *sendbuf, +! const MPIABI_Count sendcounts[], +! const MPIABI_Aint sdispls[], +! const MPIABI_Datatype sendtypes[], +! void *recvbuf, const MPIABI_Count recvcounts[], +! const MPIABI_Aint rdispls[], +! const MPIABI_Datatype recvtypes[], +! MPIABI_Comm comm, MPIABI_Request *request); +! int MPIABI_Neighbor_allgather(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! int recvcount, MPIABI_Datatype recvtype, +! MPIABI_Comm comm); +! int MPIABI_Neighbor_allgather_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! MPIABI_Count recvcount, +! MPIABI_Datatype recvtype, MPIABI_Comm comm); +! int MPIABI_Neighbor_allgather_init(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! int recvcount, MPIABI_Datatype recvtype, +! MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Neighbor_allgather_init_c(const void *sendbuf, +! MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! MPIABI_Count recvcount, +! MPIABI_Datatype recvtype, MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Neighbor_allgatherv(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! const int recvcounts[], const int displs[], +! MPIABI_Datatype recvtype, MPIABI_Comm comm); +! int MPIABI_Neighbor_allgatherv_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! const MPIABI_Count recvcounts[], +! const MPIABI_Aint displs[], +! MPIABI_Datatype recvtype, MPIABI_Comm comm); +! int MPIABI_Neighbor_allgatherv_init(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! const int recvcounts[], const int displs[], +! MPIABI_Datatype recvtype, MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Neighbor_allgatherv_init_c( +! const void *sendbuf, MPIABI_Count sendcount, MPIABI_Datatype sendtype, +! void *recvbuf, const MPIABI_Count recvcounts[], const MPIABI_Aint displs[], +! MPIABI_Datatype recvtype, MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Neighbor_alltoall(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! int recvcount, MPIABI_Datatype recvtype, +! MPIABI_Comm comm); +! int MPIABI_Neighbor_alltoall_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! MPIABI_Count recvcount, MPIABI_Datatype recvtype, +! MPIABI_Comm comm); +! int MPIABI_Neighbor_alltoall_init(const void *sendbuf, int sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! int recvcount, MPIABI_Datatype recvtype, +! MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Neighbor_alltoall_init_c(const void *sendbuf, MPIABI_Count sendcount, +! MPIABI_Datatype sendtype, void *recvbuf, +! MPIABI_Count recvcount, +! MPIABI_Datatype recvtype, MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Neighbor_alltoallv(const void *sendbuf, const int sendcounts[], +! const int sdispls[], MPIABI_Datatype sendtype, +! void *recvbuf, const int recvcounts[], +! const int rdispls[], MPIABI_Datatype recvtype, +! MPIABI_Comm comm); +! int MPIABI_Neighbor_alltoallv_c(const void *sendbuf, +! const MPIABI_Count sendcounts[], +! const MPIABI_Aint sdispls[], +! MPIABI_Datatype sendtype, void *recvbuf, +! const MPIABI_Count recvcounts[], +! const MPIABI_Aint rdispls[], +! MPIABI_Datatype recvtype, MPIABI_Comm comm); +! int MPIABI_Neighbor_alltoallv_init(const void *sendbuf, const int sendcounts[], +! const int sdispls[], +! MPIABI_Datatype sendtype, void *recvbuf, +! const int recvcounts[], const int rdispls[], +! MPIABI_Datatype recvtype, MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Neighbor_alltoallv_init_c(const void *sendbuf, +! const MPIABI_Count sendcounts[], +! const MPIABI_Aint sdispls[], +! MPIABI_Datatype sendtype, void *recvbuf, +! const MPIABI_Count recvcounts[], +! const MPIABI_Aint rdispls[], +! MPIABI_Datatype recvtype, MPIABI_Comm comm, +! MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Neighbor_alltoallw(const void *sendbuf, const int sendcounts[], +! const MPIABI_Aint sdispls[], +! const MPIABI_Datatype sendtypes[], void *recvbuf, +! const int recvcounts[], +! const MPIABI_Aint rdispls[], +! const MPIABI_Datatype recvtypes[], +! MPIABI_Comm comm); +! int MPIABI_Neighbor_alltoallw_c( +! const void *sendbuf, const MPIABI_Count sendcounts[], +! const MPIABI_Aint sdispls[], const MPIABI_Datatype sendtypes[], +! void *recvbuf, const MPIABI_Count recvcounts[], const MPIABI_Aint rdispls[], +! const MPIABI_Datatype recvtypes[], MPIABI_Comm comm); +! int MPIABI_Neighbor_alltoallw_init( +! const void *sendbuf, const int sendcounts[], const MPIABI_Aint sdispls[], +! const MPIABI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], +! const MPIABI_Aint rdispls[], const MPIABI_Datatype recvtypes[], +! MPIABI_Comm comm, MPIABI_Info info, MPIABI_Request *request); +! int MPIABI_Neighbor_alltoallw_init_c( +! const void *sendbuf, const MPIABI_Count sendcounts[], +! const MPIABI_Aint sdispls[], const MPIABI_Datatype sendtypes[], +! void *recvbuf, const MPIABI_Count recvcounts[], const MPIABI_Aint rdispls[], +! const MPIABI_Datatype recvtypes[], MPIABI_Comm comm, MPIABI_Info info, +! MPIABI_Request *request); +! int MPIABI_Topo_test(MPIABI_Comm comm, int *status); +! +! // A.3.7 MPI Environmental Management C Bindings +! +! int MPIABI_Add_error_class(int *errorclass); +! int MPIABI_Add_error_code(int errorclass, int *errorcode); +! int MPIABI_Add_error_string(int errorcode, const char *string); +! int MPIABI_Alloc_mem(MPIABI_Aint size, MPIABI_Info info, void *baseptr); +! int MPIABI_Comm_call_errhandler(MPIABI_Comm comm, int errorcode); +! int MPIABI_Comm_create_errhandler( +! MPIABI_Comm_errhandler_function *comm_errhandler_fn, +! MPIABI_Errhandler *errhandler); +! int MPIABI_Comm_get_errhandler(MPIABI_Comm comm, MPIABI_Errhandler *errhandler); +! int MPIABI_Comm_set_errhandler(MPIABI_Comm comm, MPIABI_Errhandler errhandler); +! int MPIABI_Errhandler_free(MPIABI_Errhandler *errhandler); +! int MPIABI_Error_class(int errorcode, int *errorclass); +! int MPIABI_Error_string(int errorcode, char *string, int *resultlen); +! int MPIABI_File_call_errhandler(MPIABI_File fh, int errorcode); +! int MPIABI_File_create_errhandler( +! MPIABI_File_errhandler_function *file_errhandler_fn, +! MPIABI_Errhandler *errhandler); +! int MPIABI_File_get_errhandler(MPIABI_File file, MPIABI_Errhandler *errhandler); +! int MPIABI_File_set_errhandler(MPIABI_File file, MPIABI_Errhandler errhandler); +! int MPIABI_Free_mem(void *base); +! int MPIABI_Get_hw_resource_info(MPIABI_Info *hw_info); +! int MPIABI_Get_library_version(char *version, int *resultlen); +! int MPIABI_Get_processor_name(char *name, int *resultlen); +! int MPIABI_Get_version(int *version, int *subversion); +! int MPIABI_Remove_error_class(int errorclass); +! int MPIABI_Remove_error_code(int errorcode); +! int MPIABI_Remove_error_string(int errorcode); +! int MPIABI_Session_call_errhandler(MPIABI_Session session, int errorcode); +! int MPIABI_Session_create_errhandler( +! MPIABI_Session_errhandler_function *session_errhandler_fn, +! MPIABI_Errhandler *errhandler); +! int MPIABI_Session_get_errhandler(MPIABI_Session session, +! MPIABI_Errhandler *errhandler); +! int MPIABI_Session_set_errhandler(MPIABI_Session session, +! MPIABI_Errhandler errhandler); +! int MPIABI_Win_call_errhandler(MPIABI_Win win, int errorcode); +! int MPIABI_Win_create_errhandler( +! MPIABI_Win_errhandler_function *win_errhandler_fn, +! MPIABI_Errhandler *errhandler); +! int MPIABI_Win_get_errhandler(MPIABI_Win win, MPIABI_Errhandler *errhandler); +! int MPIABI_Win_set_errhandler(MPIABI_Win win, MPIABI_Errhandler errhandler); +! double MPIABI_Wtick(void); +! double MPIABI_Wtime(void); +! +! // A.3.8 The Info Object C Bindings +! +! int MPIABI_Info_create(MPIABI_Info *info); +! int MPIABI_Info_create_env(int argc, char *argv[], MPIABI_Info *info); +! int MPIABI_Info_delete(MPIABI_Info info, const char *key); +! int MPIABI_Info_dup(MPIABI_Info info, MPIABI_Info *newinfo); +! int MPIABI_Info_free(MPIABI_Info *info); +! int MPIABI_Info_get_nkeys(MPIABI_Info info, int *nkeys); +! int MPIABI_Info_get_nthkey(MPIABI_Info info, int n, char *key); +! int MPIABI_Info_get_string(MPIABI_Info info, const char *key, int *buflen, +! char *value, int *flag); +! int MPIABI_Info_set(MPIABI_Info info, const char *key, const char *value); +! +! // A.3.9 Process Creation and Management C Bindings +! +! int MPIABI_Abort(MPIABI_Comm comm, int errorcode); +! int MPIABI_Close_port(const char *port_name); +! int MPIABI_Comm_accept(const char *port_name, MPIABI_Info info, int root, +! MPIABI_Comm comm, MPIABI_Comm *newcomm); +! int MPIABI_Comm_connect(const char *port_name, MPIABI_Info info, int root, +! MPIABI_Comm comm, MPIABI_Comm *newcomm); +! int MPIABI_Comm_disconnect(MPIABI_Comm *comm); +! int MPIABI_Comm_get_parent(MPIABI_Comm *parent); +! int MPIABI_Comm_join(int fd, MPIABI_Comm *intercomm); +! int MPIABI_Comm_spawn(const char *command, char *argv[], int maxprocs, +! MPIABI_Info info, int root, MPIABI_Comm comm, +! MPIABI_Comm *intercomm, int array_of_errcodes[]); +! int MPIABI_Comm_spawn_multiple(int count, char *array_of_commands[], +! char **array_of_argv[], +! const int array_of_maxprocs[], +! const MPIABI_Info array_of_info[], int root, +! MPIABI_Comm comm, MPIABI_Comm *intercomm, +! int array_of_errcodes[]); +! int MPIABI_Finalize(void); +! int MPIABI_Finalized(int *flag); +! int MPIABI_Init(int *argc, char ***argv); +! int MPIABI_Init_thread(int *argc, char ***argv, int required, int *provided); +! int MPIABI_Initialized(int *flag); +! int MPIABI_Is_thread_main(int *flag); +! int MPIABI_Lookup_name(const char *service_name, MPIABI_Info info, +! char *port_name); +! int MPIABI_Open_port(MPIABI_Info info, char *port_name); +! int MPIABI_Publish_name(const char *service_name, MPIABI_Info info, +! const char *port_name); +! int MPIABI_Query_thread(int *provided); +! int MPIABI_Session_finalize(MPIABI_Session *session); +! int MPIABI_Session_get_info(MPIABI_Session session, MPIABI_Info *info_used); +! int MPIABI_Session_get_nth_pset(MPIABI_Session session, MPIABI_Info info, int n, +! int *pset_len, char *pset_name); +! int MPIABI_Session_get_num_psets(MPIABI_Session session, MPIABI_Info info, +! int *npset_names); +! int MPIABI_Session_get_pset_info(MPIABI_Session session, const char *pset_name, +! MPIABI_Info *info); +! int MPIABI_Session_init(MPIABI_Info info, MPIABI_Errhandler errhandler, +! MPIABI_Session *session); +! int MPIABI_Unpublish_name(const char *service_name, MPIABI_Info info, +! const char *port_name); +! +! // A.3.10 One-Sided Communications C Bindings +! +! int MPIABI_Accumulate(const void *origin_addr, int origin_count, +! MPIABI_Datatype origin_datatype, int target_rank, +! MPIABI_Aint target_disp, int target_count, +! MPIABI_Datatype target_datatype, MPIABI_Op op, +! MPIABI_Win win); +! int MPIABI_Accumulate_c(const void *origin_addr, MPIABI_Count origin_count, +! MPIABI_Datatype origin_datatype, int target_rank, +! MPIABI_Aint target_disp, MPIABI_Count target_count, +! MPIABI_Datatype target_datatype, MPIABI_Op op, +! MPIABI_Win win); +! int MPIABI_Compare_and_swap(const void *origin_addr, const void *compare_addr, +! void *result_addr, MPIABI_Datatype datatype, +! int target_rank, MPIABI_Aint target_disp, +! MPIABI_Win win); +! int MPIABI_Fetch_and_op(const void *origin_addr, void *result_addr, +! MPIABI_Datatype datatype, int target_rank, +! MPIABI_Aint target_disp, MPIABI_Op op, MPIABI_Win win); +! int MPIABI_Get(void *origin_addr, int origin_count, +! MPIABI_Datatype origin_datatype, int target_rank, +! MPIABI_Aint target_disp, int target_count, +! MPIABI_Datatype target_datatype, MPIABI_Win win); +! int MPIABI_Get_accumulate(const void *origin_addr, int origin_count, +! MPIABI_Datatype origin_datatype, void *result_addr, +! int result_count, MPIABI_Datatype result_datatype, +! int target_rank, MPIABI_Aint target_disp, +! int target_count, MPIABI_Datatype target_datatype, +! MPIABI_Op op, MPIABI_Win win); +! int MPIABI_Get_accumulate_c(const void *origin_addr, MPIABI_Count origin_count, +! MPIABI_Datatype origin_datatype, void *result_addr, +! MPIABI_Count result_count, +! MPIABI_Datatype result_datatype, int target_rank, +! MPIABI_Aint target_disp, MPIABI_Count target_count, +! MPIABI_Datatype target_datatype, MPIABI_Op op, +! MPIABI_Win win); +! int MPIABI_Get_c(void *origin_addr, MPIABI_Count origin_count, +! MPIABI_Datatype origin_datatype, int target_rank, +! MPIABI_Aint target_disp, MPIABI_Count target_count, +! MPIABI_Datatype target_datatype, MPIABI_Win win); +! int MPIABI_Put(const void *origin_addr, int origin_count, +! MPIABI_Datatype origin_datatype, int target_rank, +! MPIABI_Aint target_disp, int target_count, +! MPIABI_Datatype target_datatype, MPIABI_Win win); +! int MPIABI_Put_c(const void *origin_addr, MPIABI_Count origin_count, +! MPIABI_Datatype origin_datatype, int target_rank, +! MPIABI_Aint target_disp, MPIABI_Count target_count, +! MPIABI_Datatype target_datatype, MPIABI_Win win); +! int MPIABI_Raccumulate(const void *origin_addr, int origin_count, +! MPIABI_Datatype origin_datatype, int target_rank, +! MPIABI_Aint target_disp, int target_count, +! MPIABI_Datatype target_datatype, MPIABI_Op op, +! MPIABI_Win win, MPIABI_Request *request); +! int MPIABI_Raccumulate_c(const void *origin_addr, MPIABI_Count origin_count, +! MPIABI_Datatype origin_datatype, int target_rank, +! MPIABI_Aint target_disp, MPIABI_Count target_count, +! MPIABI_Datatype target_datatype, MPIABI_Op op, +! MPIABI_Win win, MPIABI_Request *request); +! int MPIABI_Rget(void *origin_addr, int origin_count, +! MPIABI_Datatype origin_datatype, int target_rank, +! MPIABI_Aint target_disp, int target_count, +! MPIABI_Datatype target_datatype, MPIABI_Win win, +! MPIABI_Request *request); +! int MPIABI_Rget_accumulate(const void *origin_addr, int origin_count, +! MPIABI_Datatype origin_datatype, void *result_addr, +! int result_count, MPIABI_Datatype result_datatype, +! int target_rank, MPIABI_Aint target_disp, +! int target_count, MPIABI_Datatype target_datatype, +! MPIABI_Op op, MPIABI_Win win, +! MPIABI_Request *request); +! int MPIABI_Rget_accumulate_c(const void *origin_addr, MPIABI_Count origin_count, +! MPIABI_Datatype origin_datatype, void *result_addr, +! MPIABI_Count result_count, +! MPIABI_Datatype result_datatype, int target_rank, +! MPIABI_Aint target_disp, MPIABI_Count target_count, +! MPIABI_Datatype target_datatype, MPIABI_Op op, +! MPIABI_Win win, MPIABI_Request *request); +! int MPIABI_Rget_c(void *origin_addr, MPIABI_Count origin_count, +! MPIABI_Datatype origin_datatype, int target_rank, +! MPIABI_Aint target_disp, MPIABI_Count target_count, +! MPIABI_Datatype target_datatype, MPIABI_Win win, +! MPIABI_Request *request); +! int MPIABI_Rput(const void *origin_addr, int origin_count, +! MPIABI_Datatype origin_datatype, int target_rank, +! MPIABI_Aint target_disp, int target_count, +! MPIABI_Datatype target_datatype, MPIABI_Win win, +! MPIABI_Request *request); +! int MPIABI_Rput_c(const void *origin_addr, MPIABI_Count origin_count, +! MPIABI_Datatype origin_datatype, int target_rank, +! MPIABI_Aint target_disp, MPIABI_Count target_count, +! MPIABI_Datatype target_datatype, MPIABI_Win win, +! MPIABI_Request *request); +! int MPIABI_Win_allocate(MPIABI_Aint size, int disp_unit, MPIABI_Info info, +! MPIABI_Comm comm, void *baseptr, MPIABI_Win *win); +! int MPIABI_Win_allocate_c(MPIABI_Aint size, MPIABI_Aint disp_unit, +! MPIABI_Info info, MPIABI_Comm comm, void *baseptr, +! MPIABI_Win *win); +! int MPIABI_Win_allocate_shared(MPIABI_Aint size, int disp_unit, +! MPIABI_Info info, MPIABI_Comm comm, +! void *baseptr, MPIABI_Win *win); +! int MPIABI_Win_allocate_shared_c(MPIABI_Aint size, MPIABI_Aint disp_unit, +! MPIABI_Info info, MPIABI_Comm comm, +! void *baseptr, MPIABI_Win *win); +! int MPIABI_Win_attach(MPIABI_Win win, void *base, MPIABI_Aint size); +! int MPIABI_Win_complete(MPIABI_Win win); +! int MPIABI_Win_create(void *base, MPIABI_Aint size, int disp_unit, +! MPIABI_Info info, MPIABI_Comm comm, MPIABI_Win *win); +! int MPIABI_Win_create_c(void *base, MPIABI_Aint size, MPIABI_Aint disp_unit, +! MPIABI_Info info, MPIABI_Comm comm, MPIABI_Win *win); +! int MPIABI_Win_create_dynamic(MPIABI_Info info, MPIABI_Comm comm, +! MPIABI_Win *win); +! int MPIABI_Win_detach(MPIABI_Win win, const void *base); +! int MPIABI_Win_fence(int assert, MPIABI_Win win); +! int MPIABI_Win_flush(int rank, MPIABI_Win win); +! int MPIABI_Win_flush_all(MPIABI_Win win); +! int MPIABI_Win_flush_local(int rank, MPIABI_Win win); +! int MPIABI_Win_flush_local_all(MPIABI_Win win); +! int MPIABI_Win_free(MPIABI_Win *win); +! int MPIABI_Win_get_group(MPIABI_Win win, MPIABI_Group *group); +! int MPIABI_Win_get_info(MPIABI_Win win, MPIABI_Info *info_used); +! int MPIABI_Win_lock(int lock_type, int rank, int assert, MPIABI_Win win); +! int MPIABI_Win_lock_all(int assert, MPIABI_Win win); +! int MPIABI_Win_post(MPIABI_Group group, int assert, MPIABI_Win win); +! int MPIABI_Win_set_info(MPIABI_Win win, MPIABI_Info info); +! int MPIABI_Win_shared_query(MPIABI_Win win, int rank, MPIABI_Aint *size, +! int *disp_unit, void *baseptr); +! int MPIABI_Win_shared_query_c(MPIABI_Win win, int rank, MPIABI_Aint *size, +! MPIABI_Aint *disp_unit, void *baseptr); +! int MPIABI_Win_start(MPIABI_Group group, int assert, MPIABI_Win win); +! int MPIABI_Win_sync(MPIABI_Win win); +! int MPIABI_Win_test(MPIABI_Win win, int *flag); +! int MPIABI_Win_unlock(int rank, MPIABI_Win win); +! int MPIABI_Win_unlock_all(MPIABI_Win win); +! int MPIABI_Win_wait(MPIABI_Win win); +! +! // A.3.11 External Interfaces C Bindings +! +! int MPIABI_Grequest_complete(MPIABI_Request request); +! int MPIABI_Grequest_start(MPIABI_Grequest_query_function *query_fn, +! MPIABI_Grequest_free_function *free_fn, +! MPIABI_Grequest_cancel_function *cancel_fn, +! void *extra_state, MPIABI_Request *request); +! int MPIABI_Status_set_cancelled(MPIABI_Status *status, int flag); +! int MPIABI_Status_set_elements(MPIABI_Status *status, MPIABI_Datatype datatype, +! int count); +! int MPIABI_Status_set_elements_c(MPIABI_Status *status, +! MPIABI_Datatype datatype, MPIABI_Count count); +! int MPIABI_Status_set_error(MPIABI_Status *status, int err); +! int MPIABI_Status_set_source(MPIABI_Status *status, int source); +! int MPIABI_Status_set_tag(MPIABI_Status *status, int tag); +! +! // A.3.12 I/O C Bindings +! +! int MPIABI_File_close(MPIABI_File *fh); +! int MPIABI_File_delete(const char *filename, MPIABI_Info info); +! int MPIABI_File_get_amode(MPIABI_File fh, int *amode); +! int MPIABI_File_get_atomicity(MPIABI_File fh, int *flag); +! int MPIABI_File_get_byte_offset(MPIABI_File fh, MPIABI_Offset offset, +! MPIABI_Offset *disp); +! int MPIABI_File_get_group(MPIABI_File fh, MPIABI_Group *group); +! int MPIABI_File_get_info(MPIABI_File fh, MPIABI_Info *info_used); +! int MPIABI_File_get_position(MPIABI_File fh, MPIABI_Offset *offset); +! int MPIABI_File_get_position_shared(MPIABI_File fh, MPIABI_Offset *offset); +! int MPIABI_File_get_size(MPIABI_File fh, MPIABI_Offset *size); +! int MPIABI_File_get_type_extent(MPIABI_File fh, MPIABI_Datatype datatype, +! MPIABI_Aint *extent); +! int MPIABI_File_get_type_extent_c(MPIABI_File fh, MPIABI_Datatype datatype, +! MPIABI_Count *extent); +! int MPIABI_File_get_view(MPIABI_File fh, MPIABI_Offset *disp, +! MPIABI_Datatype *etype, MPIABI_Datatype *filetype, +! char *datarep); +! int MPIABI_File_iread(MPIABI_File fh, void *buf, int count, +! MPIABI_Datatype datatype, MPIABI_Request *request); +! int MPIABI_File_iread_all(MPIABI_File fh, void *buf, int count, +! MPIABI_Datatype datatype, MPIABI_Request *request); +! int MPIABI_File_iread_all_c(MPIABI_File fh, void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Request *request); +! int MPIABI_File_iread_at(MPIABI_File fh, MPIABI_Offset offset, void *buf, +! int count, MPIABI_Datatype datatype, +! MPIABI_Request *request); +! int MPIABI_File_iread_at_all(MPIABI_File fh, MPIABI_Offset offset, void *buf, +! int count, MPIABI_Datatype datatype, +! MPIABI_Request *request); +! int MPIABI_File_iread_at_all_c(MPIABI_File fh, MPIABI_Offset offset, void *buf, +! MPIABI_Count count, MPIABI_Datatype datatype, +! MPIABI_Request *request); +! int MPIABI_File_iread_at_c(MPIABI_File fh, MPIABI_Offset offset, void *buf, +! MPIABI_Count count, MPIABI_Datatype datatype, +! MPIABI_Request *request); +! int MPIABI_File_iread_c(MPIABI_File fh, void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Request *request); +! int MPIABI_File_iread_shared(MPIABI_File fh, void *buf, int count, +! MPIABI_Datatype datatype, MPIABI_Request *request); +! int MPIABI_File_iread_shared_c(MPIABI_File fh, void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, +! MPIABI_Request *request); +! int MPIABI_File_iwrite(MPIABI_File fh, const void *buf, int count, +! MPIABI_Datatype datatype, MPIABI_Request *request); +! int MPIABI_File_iwrite_all(MPIABI_File fh, const void *buf, int count, +! MPIABI_Datatype datatype, MPIABI_Request *request); +! int MPIABI_File_iwrite_all_c(MPIABI_File fh, const void *buf, +! MPIABI_Count count, MPIABI_Datatype datatype, +! MPIABI_Request *request); +! int MPIABI_File_iwrite_at(MPIABI_File fh, MPIABI_Offset offset, const void *buf, +! int count, MPIABI_Datatype datatype, +! MPIABI_Request *request); +! int MPIABI_File_iwrite_at_all(MPIABI_File fh, MPIABI_Offset offset, +! const void *buf, int count, +! MPIABI_Datatype datatype, +! MPIABI_Request *request); +! int MPIABI_File_iwrite_at_all_c(MPIABI_File fh, MPIABI_Offset offset, +! const void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, +! MPIABI_Request *request); +! int MPIABI_File_iwrite_at_c(MPIABI_File fh, MPIABI_Offset offset, +! const void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Request *request); +! int MPIABI_File_iwrite_c(MPIABI_File fh, const void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Request *request); +! int MPIABI_File_iwrite_shared(MPIABI_File fh, const void *buf, int count, +! MPIABI_Datatype datatype, +! MPIABI_Request *request); +! int MPIABI_File_iwrite_shared_c(MPIABI_File fh, const void *buf, +! MPIABI_Count count, MPIABI_Datatype datatype, +! MPIABI_Request *request); +! int MPIABI_File_open(MPIABI_Comm comm, const char *filename, int amode, +! MPIABI_Info info, MPIABI_File *fh); +! int MPIABI_File_preallocate(MPIABI_File fh, MPIABI_Offset size); +! int MPIABI_File_read(MPIABI_File fh, void *buf, int count, +! MPIABI_Datatype datatype, MPIABI_Status *status); +! int MPIABI_File_read_all(MPIABI_File fh, void *buf, int count, +! MPIABI_Datatype datatype, MPIABI_Status *status); +! int MPIABI_File_read_all_begin(MPIABI_File fh, void *buf, int count, +! MPIABI_Datatype datatype); +! int MPIABI_File_read_all_begin_c(MPIABI_File fh, void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype); +! int MPIABI_File_read_all_c(MPIABI_File fh, void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Status *status); +! int MPIABI_File_read_all_end(MPIABI_File fh, void *buf, MPIABI_Status *status); +! int MPIABI_File_read_at(MPIABI_File fh, MPIABI_Offset offset, void *buf, +! int count, MPIABI_Datatype datatype, +! MPIABI_Status *status); +! int MPIABI_File_read_at_all(MPIABI_File fh, MPIABI_Offset offset, void *buf, +! int count, MPIABI_Datatype datatype, +! MPIABI_Status *status); +! int MPIABI_File_read_at_all_begin(MPIABI_File fh, MPIABI_Offset offset, +! void *buf, int count, +! MPIABI_Datatype datatype); +! int MPIABI_File_read_at_all_begin_c(MPIABI_File fh, MPIABI_Offset offset, +! void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype); +! int MPIABI_File_read_at_all_c(MPIABI_File fh, MPIABI_Offset offset, void *buf, +! MPIABI_Count count, MPIABI_Datatype datatype, +! MPIABI_Status *status); +! int MPIABI_File_read_at_all_end(MPIABI_File fh, void *buf, +! MPIABI_Status *status); +! int MPIABI_File_read_at_c(MPIABI_File fh, MPIABI_Offset offset, void *buf, +! MPIABI_Count count, MPIABI_Datatype datatype, +! MPIABI_Status *status); +! int MPIABI_File_read_c(MPIABI_File fh, void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Status *status); +! int MPIABI_File_read_ordered(MPIABI_File fh, void *buf, int count, +! MPIABI_Datatype datatype, MPIABI_Status *status); +! int MPIABI_File_read_ordered_begin(MPIABI_File fh, void *buf, int count, +! MPIABI_Datatype datatype); +! int MPIABI_File_read_ordered_begin_c(MPIABI_File fh, void *buf, +! MPIABI_Count count, +! MPIABI_Datatype datatype); +! int MPIABI_File_read_ordered_c(MPIABI_File fh, void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Status *status); +! int MPIABI_File_read_ordered_end(MPIABI_File fh, void *buf, +! MPIABI_Status *status); +! int MPIABI_File_read_shared(MPIABI_File fh, void *buf, int count, +! MPIABI_Datatype datatype, MPIABI_Status *status); +! int MPIABI_File_read_shared_c(MPIABI_File fh, void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Status *status); +! int MPIABI_File_seek(MPIABI_File fh, MPIABI_Offset offset, int whence); +! int MPIABI_File_seek_shared(MPIABI_File fh, MPIABI_Offset offset, int whence); +! int MPIABI_File_set_atomicity(MPIABI_File fh, int flag); +! int MPIABI_File_set_info(MPIABI_File fh, MPIABI_Info info); +! int MPIABI_File_set_size(MPIABI_File fh, MPIABI_Offset size); +! int MPIABI_File_set_view(MPIABI_File fh, MPIABI_Offset disp, +! MPIABI_Datatype etype, MPIABI_Datatype filetype, +! const char *datarep, MPIABI_Info info); +! int MPIABI_File_sync(MPIABI_File fh); +! int MPIABI_File_write(MPIABI_File fh, const void *buf, int count, +! MPIABI_Datatype datatype, MPIABI_Status *status); +! int MPIABI_File_write_all(MPIABI_File fh, const void *buf, int count, +! MPIABI_Datatype datatype, MPIABI_Status *status); +! int MPIABI_File_write_all_begin(MPIABI_File fh, const void *buf, int count, +! MPIABI_Datatype datatype); +! int MPIABI_File_write_all_begin_c(MPIABI_File fh, const void *buf, +! MPIABI_Count count, MPIABI_Datatype datatype); +! int MPIABI_File_write_all_c(MPIABI_File fh, const void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Status *status); +! int MPIABI_File_write_all_end(MPIABI_File fh, const void *buf, +! MPIABI_Status *status); +! int MPIABI_File_write_at(MPIABI_File fh, MPIABI_Offset offset, const void *buf, +! int count, MPIABI_Datatype datatype, +! MPIABI_Status *status); +! int MPIABI_File_write_at_all(MPIABI_File fh, MPIABI_Offset offset, +! const void *buf, int count, +! MPIABI_Datatype datatype, MPIABI_Status *status); +! int MPIABI_File_write_at_all_begin(MPIABI_File fh, MPIABI_Offset offset, +! const void *buf, int count, +! MPIABI_Datatype datatype); +! int MPIABI_File_write_at_all_begin_c(MPIABI_File fh, MPIABI_Offset offset, +! const void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype); +! int MPIABI_File_write_at_all_c(MPIABI_File fh, MPIABI_Offset offset, +! const void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Status *status); +! int MPIABI_File_write_at_all_end(MPIABI_File fh, const void *buf, +! MPIABI_Status *status); +! int MPIABI_File_write_at_c(MPIABI_File fh, MPIABI_Offset offset, +! const void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Status *status); +! int MPIABI_File_write_c(MPIABI_File fh, const void *buf, MPIABI_Count count, +! MPIABI_Datatype datatype, MPIABI_Status *status); +! int MPIABI_File_write_ordered(MPIABI_File fh, const void *buf, int count, +! MPIABI_Datatype datatype, MPIABI_Status *status); +! int MPIABI_File_write_ordered_begin(MPIABI_File fh, const void *buf, int count, +! MPIABI_Datatype datatype); +! int MPIABI_File_write_ordered_begin_c(MPIABI_File fh, const void *buf, +! MPIABI_Count count, +! MPIABI_Datatype datatype); +! int MPIABI_File_write_ordered_c(MPIABI_File fh, const void *buf, +! MPIABI_Count count, MPIABI_Datatype datatype, +! MPIABI_Status *status); +! int MPIABI_File_write_ordered_end(MPIABI_File fh, const void *buf, +! MPIABI_Status *status); +! int MPIABI_File_write_shared(MPIABI_File fh, const void *buf, int count, +! MPIABI_Datatype datatype, MPIABI_Status *status); +! int MPIABI_File_write_shared_c(MPIABI_File fh, const void *buf, +! MPIABI_Count count, MPIABI_Datatype datatype, +! MPIABI_Status *status); +! int MPIABI_Register_datarep( +! const char *datarep, MPIABI_Datarep_conversion_function *read_conversion_fn, +! MPIABI_Datarep_conversion_function *write_conversion_fn, +! MPIABI_Datarep_extent_function *dtype_file_extent_fn, void *extra_state); +! int MPIABI_Register_datarep_c( +! const char *datarep, +! MPIABI_Datarep_conversion_function_c *read_conversion_fn, +! MPIABI_Datarep_conversion_function_c *write_conversion_fn, +! MPIABI_Datarep_extent_function *dtype_file_extent_fn, void *extra_state); +! +! // A.3.13 Language Bindings C Bindings +! +! MPIABI_Fint MPIABI_Comm_c2f(MPIABI_Comm comm); +! MPIABI_Comm MPIABI_Comm_f2c(MPIABI_Fint comm); +! MPIABI_Fint MPIABI_Errhandler_c2f(MPIABI_Errhandler errhandler); +! MPIABI_Errhandler MPIABI_Errhandler_f2c(MPIABI_Fint errhandler); +! MPIABI_Fint MPIABI_File_c2f(MPIABI_File file); +! MPIABI_File MPIABI_File_f2c(MPIABI_Fint file); +! MPIABI_Fint MPIABI_Group_c2f(MPIABI_Group group); +! MPIABI_Group MPIABI_Group_f2c(MPIABI_Fint group); +! MPIABI_Fint MPIABI_Info_c2f(MPIABI_Info info); +! MPIABI_Info MPIABI_Info_f2c(MPIABI_Fint info); +! MPIABI_Fint MPIABI_Message_c2f(MPIABI_Message message); +! MPIABI_Message MPIABI_Message_f2c(MPIABI_Fint message); +! MPIABI_Fint MPIABI_Op_c2f(MPIABI_Op op); +! MPIABI_Op MPIABI_Op_f2c(MPIABI_Fint op); +! MPIABI_Fint MPIABI_Request_c2f(MPIABI_Request request); +! MPIABI_Request MPIABI_Request_f2c(MPIABI_Fint request); +! MPIABI_Fint MPIABI_Session_c2f(MPIABI_Session session); +! MPIABI_Session MPIABI_Session_f2c(MPIABI_Fint session); +! int MPIABI_Status_f082f(const MPIABI_F08_status *f08_status, +! MPIABI_Fint *f_status); +! int MPIABI_Status_c2f(const MPIABI_Status *c_status, MPIABI_Fint *f_status); +! int MPIABI_Status_c2f08(const MPIABI_Status *c_status, +! MPIABI_F08_status *f08_status); +! int MPIABI_Status_f082c(const MPIABI_F08_status *f08_status, +! MPIABI_Status *c_status); +! int MPIABI_Status_f2c(const MPIABI_Fint *f_status, MPIABI_Status *c_status); +! int MPIABI_Status_f2f08(const MPIABI_Fint *f_status, +! MPIABI_F08_status *f08_status); +! MPIABI_Fint MPIABI_Type_c2f(MPIABI_Datatype datatype); +! int MPIABI_Type_create_f90_complex(int p, int r, MPIABI_Datatype *newtype); +! int MPIABI_Type_create_f90_integer(int r, MPIABI_Datatype *newtype); +! int MPIABI_Type_create_f90_real(int p, int r, MPIABI_Datatype *newtype); +! MPIABI_Datatype MPIABI_Type_f2c(MPIABI_Fint datatype); +! int MPIABI_Type_match_size(int typeclass, int size, MPIABI_Datatype *datatype); +! MPIABI_Fint MPIABI_Win_c2f(MPIABI_Win win); +! MPIABI_Win MPIABI_Win_f2c(MPIABI_Fint win); +! +! // A.3.14 Tools / Profiling Interface C Bindings +! +! int MPIABI_Pcontrol(const int level, ...); +! +! // A.3.15 Tools / MPI Tool Information Interface C Bindings +! +! int MPIABI_T_category_changed(int *update_number); +! int MPIABI_T_category_get_categories(int cat_index, int len, int indices[]); +! int MPIABI_T_category_get_cvars(int cat_index, int len, int indices[]); +! int MPIABI_T_category_get_events(int cat_index, int len, int indices[]); +! int MPIABI_T_category_get_index(const char *name, int *cat_index); +! int MPIABI_T_category_get_info(int cat_index, char *name, int *name_len, +! char *desc, int *desc_len, int *num_cvars, +! int *num_pvars, int *num_categories); +! int MPIABI_T_category_get_num(int *num_cat); +! int MPIABI_T_category_get_num_events(int cat_index, int *num_events); +! int MPIABI_T_category_get_pvars(int cat_index, int len, int indices[]); +! int MPIABI_T_cvar_get_index(const char *name, int *cvar_index); +! int MPIABI_T_cvar_get_info(int cvar_index, char *name, int *name_len, +! int *verbosity, MPIABI_Datatype *datatype, +! MPIABI_T_enum *enumtype, char *desc, int *desc_len, +! int *bind, int *scope); +! int MPIABI_T_cvar_get_num(int *num_cvar); +! int MPIABI_T_cvar_handle_alloc(int cvar_index, void *obj_handle, +! MPIABI_T_cvar_handle *handle, int *count); +! int MPIABI_T_cvar_handle_free(MPIABI_T_cvar_handle *handle); +! int MPIABI_T_cvar_read(MPIABI_T_cvar_handle handle, void *buf); +! int MPIABI_T_cvar_write(MPIABI_T_cvar_handle handle, const void *buf); +! int MPIABI_T_enum_get_info(MPIABI_T_enum enumtype, int *num, char *name, +! int *name_len); +! int MPIABI_T_enum_get_item(MPIABI_T_enum enumtype, int index, int *value, +! char *name, int *name_len); +! int MPIABI_T_event_callback_get_info( +! MPIABI_T_event_registration event_registration, +! MPIABI_T_cb_safety cb_safety, MPIABI_Info *info_used); +! int MPIABI_T_event_callback_set_info( +! MPIABI_T_event_registration event_registration, +! MPIABI_T_cb_safety cb_safety, MPIABI_Info info); +! int MPIABI_T_event_copy(MPIABI_T_event_instance event_instance, void *buffer); +! int MPIABI_T_event_get_index(const char *name, int *event_index); +! int MPIABI_T_event_get_info(int event_index, char *name, int *name_len, +! int *verbosity, +! MPIABI_Datatype array_of_datatypes[], +! MPIABI_Aint array_of_displacements[], +! int *num_elements, MPIABI_T_enum *enumtype, +! MPIABI_Info *info, char *desc, int *desc_len, +! int *bind); +! int MPIABI_T_event_get_num(int *num_events); +! int MPIABI_T_event_get_source(MPIABI_T_event_instance event_instance, +! int *source_index); +! int MPIABI_T_event_get_timestamp(MPIABI_T_event_instance event_instance, +! MPIABI_Count *event_timestamp); +! int MPIABI_T_event_handle_alloc( +! int event_index, void *obj_handle, MPIABI_Info info, +! MPIABI_T_event_registration *event_registration); +! int MPIABI_T_event_handle_free( +! MPIABI_T_event_registration event_registration, void *user_data, +! MPIABI_T_event_free_cb_function free_cb_function); +! int MPIABI_T_event_handle_get_info( +! MPIABI_T_event_registration event_registration, MPIABI_Info *info_used); +! int MPIABI_T_event_handle_set_info( +! MPIABI_T_event_registration event_registration, MPIABI_Info info); +! int MPIABI_T_event_read(MPIABI_T_event_instance event_instance, +! int element_index, void *buffer); +! int MPIABI_T_event_register_callback( +! MPIABI_T_event_registration event_registration, +! MPIABI_T_cb_safety cb_safety, MPIABI_Info info, void *user_data, +! MPIABI_T_event_cb_function event_cb_function); +! int MPIABI_T_event_set_dropped_handler( +! MPIABI_T_event_registration event_registration, +! MPIABI_T_event_dropped_cb_function dropped_cb_function); +! int MPIABI_T_finalize(void); +! int MPIABI_T_init_thread(int required, int *provided); +! int MPIABI_T_pvar_get_index(const char *name, int var_class, int *pvar_index); +! int MPIABI_T_pvar_get_info(int pvar_index, char *name, int *name_len, +! int *verbosity, int *var_class, +! MPIABI_Datatype *datatype, MPIABI_T_enum *enumtype, +! char *desc, int *desc_len, int *bind, int *readonly, +! int *continuous, int *atomic); +! int MPIABI_T_pvar_get_num(int *num_pvar); +! int MPIABI_T_pvar_handle_alloc(MPIABI_T_pvar_session pe_session, int pvar_index, +! void *obj_handle, MPIABI_T_pvar_handle *handle, +! int *count); +! int MPIABI_T_pvar_handle_free(MPIABI_T_pvar_session pe_session, +! MPIABI_T_pvar_handle *handle); +! int MPIABI_T_pvar_read(MPIABI_T_pvar_session pe_session, +! MPIABI_T_pvar_handle handle, void *buf); +! int MPIABI_T_pvar_readreset(MPIABI_T_pvar_session pe_session, +! MPIABI_T_pvar_handle handle, void *buf); +! int MPIABI_T_pvar_reset(MPIABI_T_pvar_session pe_session, +! MPIABI_T_pvar_handle handle); +! int MPIABI_T_pvar_session_create(MPIABI_T_pvar_session *pe_session); +! int MPIABI_T_pvar_session_free(MPIABI_T_pvar_session *pe_session); +! int MPIABI_T_pvar_start(MPIABI_T_pvar_session pe_session, +! MPIABI_T_pvar_handle handle); +! int MPIABI_T_pvar_stop(MPIABI_T_pvar_session pe_session, +! MPIABI_T_pvar_handle handle); +! int MPIABI_T_pvar_write(MPIABI_T_pvar_session pe_session, +! MPIABI_T_pvar_handle handle, const void *buf); +! int MPIABI_T_source_get_info(int source_index, char *name, int *name_len, +! char *desc, int *desc_len, +! MPIABI_T_source_order *ordering, +! MPIABI_Count *ticks_per_second, +! MPIABI_Count *max_ticks, MPIABI_Info *info); +! int MPIABI_T_source_get_num(int *num_sources); +! int MPIABI_T_source_get_timestamp(int source_index, MPIABI_Count *timestamp); +! +! // A.3.16 Deprecated C Bindings +! +! int MPIABI_Attr_delete(MPIABI_Comm comm, int keyval); +! int MPIABI_Attr_get(MPIABI_Comm comm, int keyval, void *attribute_val, +! int *flag); +! int MPIABI_Attr_put(MPIABI_Comm comm, int keyval, void *attribute_val); +! int MPIABI_Get_elements_x(const MPIABI_Status *status, MPIABI_Datatype datatype, +! MPIABI_Count *count); +! int MPIABI_Info_get(MPIABI_Info info, const char *key, int valuelen, +! char *value, int *flag); +! int MPIABI_Info_get_valuelen(MPIABI_Info info, const char *key, int *valuelen, +! int *flag); +! int MPIABI_Keyval_create(MPIABI_Copy_function *copy_fn, +! MPIABI_Delete_function *delete_fn, int *keyval, +! void *extra_state); +! int MPIABI_Keyval_free(int *keyval); +! int MPIABI_Status_set_elements_x(MPIABI_Status *status, +! MPIABI_Datatype datatype, MPIABI_Count count); +! int MPIABI_Type_get_extent_x(MPIABI_Datatype datatype, MPIABI_Count *lb, +! MPIABI_Count *extent); +! int MPIABI_Type_get_true_extent_x(MPIABI_Datatype datatype, +! MPIABI_Count *true_lb, +! MPIABI_Count *true_extent); +! int MPIABI_Type_size_x(MPIABI_Datatype datatype, MPIABI_Count *size); +! +! // MPIX +! +! int MPIXABI_Query_cuda_support(void); +! +! int MPIXABI_Query_hip_support(void); +! +! int MPIXABI_Query_rocm_support(void); +! +! int MPIXABI_Query_ze_support(void); diff --git a/mpiabi/mpiabif_types.h b/mpiabi/mpiabif_types.h new file mode 100644 index 00000000..e69de29b diff --git a/mpitrampoline/CMakeLists.txt b/mpitrampoline/CMakeLists.txt new file mode 100644 index 00000000..31629827 --- /dev/null +++ b/mpitrampoline/CMakeLists.txt @@ -0,0 +1,276 @@ +cmake_minimum_required(VERSION 3.12...3.20) +project( + MPItrampoline VERSION 6.0.0 + DESCRIPTION "MPI trampoline" + HOMEPAGE_URL "https://github.com/eschnett/MPItrampoline" + LANGUAGES C + ) + +# SOVERSION is the ABI version of MPItrampoline. (That's different +# from the MPI_ABI version.) +# +# SOVERSION is handled differently under Linux and macOS. We are using +# a single-digit SOVERSION to avoid confusion between VERSION (which +# consists of 3 numbers) and SOVERSION. +# +# Different SOVERSIONs are incompatible; there is no need to have a +# major/minor version number. +set(SOVERSION 6) + +include(CheckLanguage) + +check_language(C) +if(NOT(CMAKE_C_COMPILER)) + message(FATAL_ERROR "No C support") +endif() +set(CMAKE_C_STANDARD 99) +enable_language(C) + +check_language(CXX) +if(NOT(CMAKE_CXX_COMPILER)) + message(FATAL_ERROR "No C++ support") +endif() +# set(CMAKE_CXX_STANDARD 11) +enable_language(CXX) + +check_language(Fortran) +if(NOT(CMAKE_Fortran_COMPILER)) + message(FATAL_ERROR "No C support") +endif() +enable_language(Fortran) + +set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/include) +include(GNUInstallDirs) + +# Check for Fortran features + +include(CheckFortranCompilerFlag) +check_fortran_compiler_flag(-fallow-argument-mismatch Fortran_flag_allow_argument_mismatch) +if(Fortran_flag_allow_argument_mismatch) + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch") +endif() +check_fortran_compiler_flag(-fcray-pointer Fortran_flag_cray_pointer) +if(Fortran_flag_cray_pointer) + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fcray-pointer") +endif() +check_fortran_source_compiles( + " + end + subroutine sub(buf) + implicit none + integer buf(*) + end + subroutine caller1(buf) + implicit none + integer buf(1) + interface + subroutine sub(buf) + implicit none + integer buf(*) + !dir$ ignore_tkr(tkr) buf + end subroutine sub + end interface + call sub(buf) + end subroutine caller1 + subroutine caller2(buf) + implicit none + real buf(1) + interface + subroutine sub(buf) + implicit none + integer buf(*) + !dir$ ignore_tkr(tkr) buf + end subroutine sub + end interface + call sub(buf) + end subroutine caller2 + subroutine caller3(buf) + implicit none + real buf + interface + subroutine sub(buf) + implicit none + integer buf(*) + !dir$ ignore_tkr(tkr) buf + end subroutine sub + end interface + call sub(buf) + end subroutine caller3 + " + HAVE_Fortran_attribute_dir_ignore_tkr + SRC_EXT f90 +) +if(HAVE_Fortran_attribute_dir_ignore_tkr) + set(DIR_IGNORE_TKR "") +else() + set(DIR_IGNORE_TKR "!disabled ") +endif() +check_fortran_source_compiles( + " + end + subroutine sub(buf) + implicit none + !gcc$ attributes no_arg_check :: buf + integer buf(*) + end + subroutine caller1(buf) + implicit none + integer buf(1) + interface + subroutine sub(buf) + implicit none + integer buf(*) + !gcc$ attributes no_arg_check :: buf + end subroutine sub + end interface + call sub(buf) + end subroutine caller1 + subroutine caller2(buf) + implicit none + real buf(1) + interface + subroutine sub(buf) + implicit none + integer buf(*) + !gcc$ attributes no_arg_check :: buf + end subroutine sub + end interface + call sub(buf) + end subroutine caller2 + subroutine caller3(buf) + implicit none + real buf + interface + subroutine sub(buf) + implicit none + integer buf(*) + !gcc$ attributes no_arg_check :: buf + end subroutine sub + end interface + call sub(buf) + end subroutine caller3 + " + HAVE_Fortran_attribute_gcc_attributes_no_arg_check + SRC_EXT f90 +) +if(HAVE_Fortran_attribute_gcc_attributes_no_arg_check) + set(GCC_ATTRIBUTES_NO_ARG_CHECK "") +else() + set(GCC_ATTRIBUTES_NO_ARG_CHECK "!disabled ") +endif() +add_compile_definitions(ENABLE_FORTRAN) + +configure_file(include/mpitrampoline.h.in include/mpitrampoline.h @ONLY) +configure_file(include/mpitrampolinef.h.in include/mpitrampolinef.h @ONLY) +configure_file(include/mpif_functions.h.in include/mpif_functions.h @ONLY) +configure_file(src/mpi_f08_functions.F90.in src/mpi_f08_functions.F90 @ONLY) + +add_library(mpitrampoline + # MPI C header files + include/mpitrampoline.h + include/mpi.h + include/mpi_mpitrampoline.h + include/mpi_types.h + include/mpi_constants.h + include/mpi_functions.h + include/mpi_mpiabi_function_pointers.h + # MPI Fortran header files + include/mpitrampolinef.h + include/mpif.h + include/mpif_types.h + include/mpif_constants.h + include/mpif_functions.h + # MPI Fortran modules + src/mpi.F90 + src/mpi_f08.F90 + src/mpi_f08_types.F90 + src/mpi_f08_constants.F90 + src/mpi_f08_functions.F90 + # Implementation + src/mpitrampoline.c + src/mpi_functions.c + src/mpi_functions_fortran.c + src/mpi_mpiabi_function_pointers.c + src/mpi_mpiabi_function_pointers_fortran.c + src/mpi_set_mpiabi_function_pointers.c + src/mpi_set_mpiabi_function_pointers_fortran.c + src/mpif_special_functions.F90 +) +# target_compile_options(mpitrampoline PRIVATE -Wall -Wextra -Wno-unused-dummy-argument -Wno-unused-parameter) +target_include_directories( + mpitrampoline + PRIVATE include ${CMAKE_CURRENT_BINARY_DIR}/include + PRIVATE ../mpiabi +) +target_link_libraries(mpitrampoline PRIVATE ${CMAKE_DL_LIBS}) +list(APPEND public_headers + ${CMAKE_CURRENT_BINARY_DIR}/include/mpitrampoline.h + include/mpi.h + include/mpi_mpitrampoline.h + include/mpi_types.h + include/mpi_constants.h + include/mpi_functions.h + include/mpi_mpiabi_function_pointers.h + ../mpiabi/mpiabi_types.h + ../mpiabi/mpiabi_constants.h + ../mpiabi/mpiabi_version.h + ${CMAKE_CURRENT_BINARY_DIR}/include/mpitrampolinef.h + include/mpif.h + include/mpif_types.h + include/mpif_constants.h + ${CMAKE_CURRENT_BINARY_DIR}/include/mpif_functions.h + ../mpiabi/mpiabif_types.h + ../mpiabi/mpiabif_constants.h + ../mpiabi/mpiabif_functions.h +) +set_target_properties(mpitrampoline PROPERTIES + VERSION ${PROJECT_VERSION} + SOVERSION ${SOVERSION} + PUBLIC_HEADER "${public_headers}" +) + +install(TARGETS mpitrampoline EXPORT MPItrampolineTargets) + +install(FILES ${CMAKE_Fortran_MODULE_DIRECTORY}/mpi.mod DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +install(FILES ${CMAKE_Fortran_MODULE_DIRECTORY}/mpi_f08_types.mod DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +install(FILES ${CMAKE_Fortran_MODULE_DIRECTORY}/mpi_f08_constants.mod DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +install(FILES ${CMAKE_Fortran_MODULE_DIRECTORY}/mpi_f08_functions.mod DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +install(FILES ${CMAKE_Fortran_MODULE_DIRECTORY}/mpi_f08_functions_internal.mod DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +install(FILES ${CMAKE_Fortran_MODULE_DIRECTORY}/mpi_f08.mod DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + +# Install pkgconfig files + +configure_file(pkgconfig/MPItrampoline.pc.in pkgconfig/MPItrampoline.pc @ONLY) +configure_file(pkgconfig/mpi-c.pc.in pkgconfig/mpi-c.pc @ONLY) +configure_file(pkgconfig/mpi-cxx.pc.in pkgconfig/mpi-cxx.pc @ONLY) +configure_file(pkgconfig/mpi-fort.pc.in pkgconfig/mpi-fort.pc @ONLY) +install( + FILES + ${CMAKE_BINARY_DIR}/pkgconfig/MPItrampoline.pc + ${CMAKE_BINARY_DIR}/pkgconfig/mpi-c.pc + ${CMAKE_BINARY_DIR}/pkgconfig/mpi-cxx.pc + ${CMAKE_BINARY_DIR}/pkgconfig/mpi-fort.pc + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig +) + +# Install compiler wrappers + +configure_file(bin/mpicc.in bin/mpicc @ONLY) +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/bin/mpicc + DESTINATION ${CMAKE_INSTALL_BINDIR} + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE +) +configure_file(bin/mpicxx.in bin/mpicxx @ONLY) +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/bin/mpicxx + DESTINATION ${CMAKE_INSTALL_BINDIR} + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE +) +configure_file(bin/mpifc.in bin/mpifc @ONLY) +configure_file(bin/mpifort.in bin/mpifort @ONLY) +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/bin/mpifc ${CMAKE_CURRENT_BINARY_DIR}/bin/mpifort + DESTINATION ${CMAKE_INSTALL_BINDIR} + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE +) diff --git a/bin/mpicc.in b/mpitrampoline/bin/mpicc.in similarity index 100% rename from bin/mpicc.in rename to mpitrampoline/bin/mpicc.in diff --git a/bin/mpicxx.in b/mpitrampoline/bin/mpicxx.in similarity index 100% rename from bin/mpicxx.in rename to mpitrampoline/bin/mpicxx.in diff --git a/bin/mpifc.in b/mpitrampoline/bin/mpifc.in similarity index 100% rename from bin/mpifc.in rename to mpitrampoline/bin/mpifc.in diff --git a/bin/mpifort.in b/mpitrampoline/bin/mpifort.in similarity index 100% rename from bin/mpifort.in rename to mpitrampoline/bin/mpifort.in diff --git a/mpitrampoline/generate_trampoline.jl b/mpitrampoline/generate_trampoline.jl new file mode 100644 index 00000000..c227ee08 --- /dev/null +++ b/mpitrampoline/generate_trampoline.jl @@ -0,0 +1,481 @@ +include("../mpiabi/mpiabi_functions_fortran.jl") + +function fortran(type::Typ, dim::Union{Nothing,Symbol}; hide_comm_size=false) + if dim === nothing + type === address && return "integer(MPI_ADDRESS_KIND)", "" + type === buffer && return "integer", "(*)" + type === buffer_inplace && return "integer", "(*)" + type === count && return "integer(MPI_COUNT_KIND)", "" + type === character && return "character(*)", "" + type === double_precision && return "double precision", "" + type === external && return "external", "" + type === logical && return "logical", "" + type === offset && return "integer(MPI_OFFSET_KIND)", "" + type === status && return "integer", "(MPI_STATUS_SIZE)" + @assert type !== argv + @assert type !== argvs + @assert type !== void + @assert type !== weight + return "integer", "" + else + dim = hide_comm_size && dim === :comm_size ? "*" : dim + type === address && return "integer(MPI_ADDRESS_KIND)", "($dim)" + type === argv && return "character(*)", "($dim)" + type === argvs && return "character(*)", "(count, $dim)" # we cheat to know it's `count` + @assert !(type === buffer) + @assert !(type === buffer_inplace) + type === character && return "character(*)", "($dim)" + type === count && return "integer(MPI_COUNT_KIND)", "($dim)" + type === double_precision && return "double precision", "($dim)" + @assert !(type === external) + type === logical && return "logical", "($dim)" + type === offset && return "integer(MPI_OFFSET_KIND)", "($dim)" + type === status && return "integer", "(MPI_STATUS_SIZE, $dim)" + @assert type !== void + return "integer", "($dim)" + end +end + +function fortran08(type::Typ, dim::Union{Nothing,Symbol}; hide_comm_size=false) + if dim === nothing + type === comm && return "type(MPI_Comm)", "" + type === datatype && return "type(MPI_Datatype)", "" + type === errhandler && return "type(MPI_Errhandler)", "" + type === file && return "type(MPI_File)", "" + type === group && return "type(MPI_Group)", "" + type === info && return "type(MPI_Info)", "" + type === message && return "type(MPI_Message)", "" + type === session && return "type(MPI_Session)", "" + type === op && return "type(MPI_Op)", "" + type === request && return "type(MPI_Request)", "" + type === win && return "type(MPI_Win)", "" + type === address && return "integer(MPI_ADDRESS_KIND)", "" + type === buffer && return "integer", "(*)" + type === buffer_inplace && return "integer", "(*)" + type === count && return "integer(MPI_COUNT_KIND)", "" + type === character && return "character(*)", "" + type === double_precision && return "double precision", "" + type === external && return "external", "" + type === logical && return "logical", "" + type === offset && return "integer(MPI_OFFSET_KIND)", "" + type === status && return "type(MPI_Status)", "", @assert type !== argv + @assert type !== argvs + @assert type !== void + @assert type !== weight + return "integer", "" + else + dim = hide_comm_size && dim === :comm_size ? "*" : dim + type === comm && return "type(MPI_Comm)", "($dim)" + type === datatype && return "type(MPI_Datatype)", "($dim)" + type === errhandler && return "type(MPI_Errhandler)", "($dim)" + type === file && return "type(MPI_File)", "($dim)" + type === group && return "type(MPI_Group)", "($dim)" + type === info && return "type(MPI_Info)", "($dim)" + type === message && return "type(MPI_Message)", "($dim)" + type === session && return "type(MPI_Session)", "($dim)" + type === op && return "type(MPI_Op)", "($dim)" + type === request && return "type(MPI_Request)", "($dim)" + type === win && return "type(MPI_Win)", "($dim)" + type === address && return "integer(MPI_ADDRESS_KIND)", "($dim)" + type === argv && return "character(*)", "($dim)" + type === argvs && return "character(*)", "(count, $dim)" # we cheat to know it's `count` + @assert !(type === buffer) + @assert !(type === buffer_inplace) + type === character && return "character(*)", "($dim)" + type === count && return "integer(MPI_COUNT_KIND)", "($dim)" + type === double_precision && return "double precision", "($dim)" + @assert !(type === external) + type === logical && return "logical", "($dim)" + type === offset && return "integer(MPI_OFFSET_KIND)", "($dim)" + type === status && return "type(MPI_Status)", "($dim)" + @assert type !== void + return "integer", "($dim)" + end +end + +function c(type::Typ) + type === address && return "MPI_Aint ", "" + type === argv && return "char *", "" + type === argvs && return "char *", "" + type === buffer && return "void ", "" + type === buffer_inplace && return "void ", "" + type === count && return "MPI_Count ", "" + type === character && return "char *", "" + type === double_precision && return "double ", "" + type === external && return "void (*", ")(void)" + type === logical && return "MPI_Fint ", "" + type === offset && return "MPI_Offset ", "" + type === status && return "MPI_Fint ", "[MPI_F_STATUS_SIZE]" + type === void && return "void ", "" + type === weight && return "MPI_Fint ", "" + return "MPI_Fint ", "" +end + +mpi2abi(str) = replace(str, "MPI" => "MPIABI") + +function format_line(line::AbstractString; is_cont::Bool=false, has_cont::Bool=false) + line = " "^5 * (is_cont ? "&" : " ") * line + if length(line) <= 72 + if has_cont + line = line * " "^(72 - length(line)) * "&" + end + else + pos = findfirst("::", line) + @assert !isempty(pos) + line1 = line[begin:(pos.stop)] + line1indent = findfirst(!isspace, line1[6:end]) + line2 = " "^5 * "&" * " "^line1indent * line[(pos.stop + 1):end] + @assert length(line2) <= 72 + line1 = line1 * " "^(72 - length(line1)) * "&" + if has_cont + line2 = line2 * " "^(72 - length(line2)) * "&" + end + line = line1 * "\n" * line2 + end + return line +end + +function generate_mpif_functions_h(io::IO) + indent = " " + println(io, "! MPI Fortran function bindings") + println(io) + println(io, "! This file has been generated automatically") + println(io, "! by `mpitrampoline/generate_trampoline.jl`.") + println(io, "! Do not modify this file, changes will be overwritten.") + println(io) + println(io, format_line("interface")) + println(io) + for fun in functions + # Function name + funtype = fun.result === void ? "subroutine" : "function" + funresult = fun.result === void ? "" : " result(result)" + println(io, format_line("$funtype $(fun.name)("; has_cont=true)) + # Function argument names + for (n, arg) in enumerate(fun.args) + sep = n == length(fun.args) ? "" : "," + println(io, format_line("$(indent)$(arg.name)$sep"; is_cont=true, has_cont=true)) + end + println(io, format_line(")$funresult"; is_cont=true)) + println(io, format_line("$(indent)implicit none")) + println(io, format_line("$(indent)include \"mpif_constants.h\"")) + # Function argument types + for arg in fun.args + type, dim = fortran(arg.type, arg.dim; hide_comm_size=true) + intent = fortran(arg.intent) + intent = isempty(intent) || arg.type === external ? "" : ", $intent" + if arg.type === buffer + println(io, "@DIR_IGNORE_TKR@!dir\$ ignore_tkr(tkr) $(arg.name)") + println(io, "@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc\$ $(indent)attributes no_arg_check :: $(arg.name)") + if arg.intent === out + intent = "" + end + end + println(io, format_line("$(indent)$type$intent :: $(arg.name)$dim")) + end + if fun.result !== void + type, dim = fortran(fun.result, nothing) + println(io, format_line("$(indent)$type :: result$dim")) + end + println(io, format_line("end $funtype $(fun.name)")) + println(io) + end + println(io, format_line("end interface")) + return nothing +end + +function generate_mpi_f08_functions_f90(io::IO) + indent = " " + println(io, "! MPI Fortran 2008 function bindings") + println(io) + println(io, "! This file has been generated automatically") + println(io, "! by `mpitrampoline/generate_trampoline.jl`.") + println(io, "! Do not modify this file, changes will be overwritten.") + println(io) + println(io, "#include ") + println(io) + println(io, "module mpi_f08_functions_internal") + println(io, "$(indent)use mpi_f08_types") + println(io, "$(indent)use mpi_f08_constants") + println(io) + println(io, "$(indent)implicit none") + println(io, "$(indent)public") + println(io, "$(indent)save") + println(io) + println(io, "$(indent)interface") + println(io) + for fun in functions + # Function name + funtype = fun.result === void ? "subroutine" : "function" + funresult = fun.result === void ? "" : " result(result)" + println(io, "$(indent)$(indent)$funtype $(fun.name)( &") + # Function argument names + for (n, arg) in enumerate(fun.args) + sep = n == length(fun.args) ? "" : "," + println(io, "$(indent)$(indent)$(indent)$(arg.name)$sep &") + end + println(io, "$(indent)$(indent))$funresult") + println(io, "$(indent)$(indent)$(indent)use mpi_f08_types") + println(io, "$(indent)$(indent)$(indent)use mpi_f08_constants") + println(io, "$(indent)$(indent)$(indent)implicit none") + # Function argument types + for arg in fun.args + type, dim = fortran08(arg.type, arg.dim; hide_comm_size=true) + intent = fortran(arg.intent) + intent = isempty(intent) || arg.type === external ? "" : ", $intent" + if arg.type === buffer + println(io, "$(indent)$(indent)$(indent)@DIR_IGNORE_TKR@!dir\$ ignore_tkr(tkr) $(arg.name)") + println(io, "$(indent)$(indent)$(indent)@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc\$ attributes no_arg_check :: $(arg.name)") + if arg.intent === out + intent = "" + end + end + println(io, "$(indent)$(indent)$(indent)$type$intent :: $(arg.name)$dim") + end + if fun.result !== void + type, dim = fortran08(fun.result, nothing) + println(io, "$(indent)$(indent)$(indent)$type :: result$dim") + end + println(io, "$(indent)$(indent)end $funtype $(fun.name)") + println(io) + end + println(io, "$(indent)end interface") + println(io) + println(io, "end module mpi_f08_functions_internal") + println(io) + println(io, "module mpi_f08_functions") + println(io, "$(indent)use mpi_f08_types") + println(io, "$(indent)use mpi_f08_constants") + println(io) + println(io, "$(indent)use mpi_f08_functions_internal, &") + for (n, fun) in enumerate(functions) + sep = n == length(functions) ? "" : ", &" + println(io, "$(indent)$(indent)wrapped_$(fun.name) => $(fun.name)$sep") + end + println(io) + println(io, "$(indent)implicit none") + println(io, "$(indent)private") + println(io, "$(indent)save") + println(io) + for fun in functions + println(io, "$(indent)public :: $(fun.name)") + end + println(io) + println(io, "contains") + println(io) + for fun in functions + # Function name + funtype = fun.result === void ? "subroutine" : "function" + funresult = fun.result === void ? "" : " result(result)" + println(io, "$(indent)$funtype $(fun.name)( &") + # Function argument names + for (n, arg) in enumerate(fun.args) + sep = n == length(fun.args) ? "" : "," + println(io, "$(indent)$(indent)$(arg.name)$sep &") + end + println(io, "$(indent))$funresult") + # Function argument types + have_ierror = false + for arg in fun.args + type, dim = fortran08(arg.type, arg.dim; hide_comm_size=true) + intent = fortran(arg.intent) + intent = isempty(intent) || arg.type === external ? "" : ", $intent" + if arg.type === buffer + println(io, "$(indent)$(indent)@DIR_IGNORE_TKR@!dir\$ ignore_tkr(tkr) $(arg.name)") + println(io, "$(indent)$(indent)@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc\$ attributes no_arg_check :: $(arg.name)") + if arg.intent === out + intent = "" + end + end + optional = arg.name == :ierror ? ", optional" : "" + have_ierror = have_ierror || arg.name == :ierror + println(io, "$(indent)$(indent)$type$intent$optional :: $(arg.name)$dim") + end + if fun.result !== void + type, dim = fortran08(fun.result, nothing) + println(io, "$(indent)$(indent)$type :: result$dim") + end + if have_ierror + println(io, "$(indent)$(indent)integer :: wrap_ierror") + end + # Forward call + call = fun.result === void ? "call " : "result = " + println(io, "$(indent)$(indent)$(call)wrapped_$(fun.name)( &") + # Function arguments + for (n, arg) in enumerate(fun.args) + sep = n == length(fun.args) ? "" : "," + name = arg.name + if name == :ierror + name = :wrap_ierror + end + # if arg.type in [comm, datatype, errhandler, file, group, info, message, session, op, request, win, status] + # name = "$name%MPI_VAL" + # end + println(io, "$(indent)$(indent)$(indent)$name$sep &") + end + println(io, "$(indent)$(indent))") + if have_ierror + println(io, "$(indent)$(indent)if (present(ierror)) ierror = wrap_ierror") + end + println(io, "$(indent)end $funtype $(fun.name)") + println(io) + end + println(io, "end module mpi_f08_functions") + return nothing +end + +function generate_mpi_mpiabi_function_pointers_fortran_h(io::IO) + indent = " " + println(io, "// MPIABI Fortran function pointers") + println(io) + println(io, "// This file has been generated automatically") + println(io, "// by `mpitrampoline/generate_trampoline.jl`.") + println(io, "// Do not modify this file, changes will be overwritten.") + println(io) + println(io, "#include ") + println(io, "#include ") + println(io) + for fun in functions + # Function name + type, suffix = c(fun.result) + @assert isempty(suffix) + println(io, "extern $(mpi2abi(type))(*$(lowercase(mpi2abi(string(fun.name))))_ptr)(") + # Function arguments names + for (n, arg) in enumerate(fun.args) + sep = n == length(fun.args) ? "" : "," + type, suffix = c(arg.type) + if arg.intent === in_ + type = "const $type*" + else + type = "$type*" + end + println(io, "$(indent)$(mpi2abi(type))$(arg.name)$(mpi2abi(suffix))$sep") + end + println(io, ");") + println(io) + end + return nothing +end + +function generate_mpi_mpiabi_function_pointers_fortran_c(io::IO) + indent = " " + println(io, "// MPIABI Fortran function pointers") + println(io) + println(io, "// This file has been generated automatically") + println(io, "// by `mpitrampoline/generate_trampoline.jl`.") + println(io, "// Do not modify this file, changes will be overwritten.") + println(io) + println(io, "#include ") + println(io, "#include ") + println(io, "#include ") + println(io) + for fun in functions + # Function name + type, suffix = c(fun.result) + @assert isempty(suffix) + println(io, "$(mpi2abi(type))(*$(lowercase(mpi2abi(string(fun.name))))_ptr)(") + # Function arguments names + for (n, arg) in enumerate(fun.args) + sep = n == length(fun.args) ? "" : "," + type, suffix = c(arg.type) + if arg.intent === in_ + type = "const $type*" + else + type = "$type*" + end + println(io, "$(indent)$(mpi2abi(type))$(arg.name)$(mpi2abi(suffix))$sep") + end + println(io, ");") + println(io) + end + return nothing +end + +function generate_mpi_set_mpiabi_function_pointers_fortran_c(io::IO) + indent = " " + println(io, "// Set MPIABI Fortran function pointers") + println(io) + println(io, "// This file has been generated automatically") + println(io, "// by `mpitrampoline/generate_trampoline.jl`.") + println(io, "// Do not modify this file, changes will be overwritten.") + println(io) + println(io, "#include ") + println(io) + println(io, "void *mpitrampoline_get_symbol(void *handle, const char *name);") + println(io) + println(io, "void mpi_set_mpiabi_function_pointers_fortran(void *handle) {") + for fun in functions + # Function name + name = lowercase(mpi2abi(string(fun.name))) + println(io, " $(name)_ptr = mpitrampoline_get_symbol(handle, \"$(name)_\");") + end + println(io, "}") + return nothing +end + +function generate_mpi_functions_fortran_c(io::IO) + indent = " " + println(io, "// MPI Fortran function wrappers") + println(io) + println(io, "// This file has been generated automatically") + println(io, "// by `mpitrampoline/generate_trampoline.jl`.") + println(io, "// Do not modify this file, changes will be overwritten.") + println(io) + println(io, "#include ") + println(io, "#include ") + println(io) + for fun in functions + # Function name + type, suffix = c(fun.result) + @assert isempty(suffix) + println(io, "$type$(lowercase(string(fun.name)))_(") + # Function arguments names + for (n, arg) in enumerate(fun.args) + sep = n == length(fun.args) ? "" : "," + type, suffix = c(arg.type) + if arg.intent === in_ + type = "const $type*" + else + type = "$type*" + end + println(io, "$(indent)$type$(arg.name)$suffix$sep") + end + println(io, ") {") + # Forward call + println(io, "$(indent)return (*$(lowercase(mpi2abi(string(fun.name))))_ptr)(") + for (n, arg) in enumerate(fun.args) + sep = n == length(fun.args) ? "" : "," + println(io, "$(indent)$(indent)$(arg.name)$sep") + end + println(io, "$(indent));") + println(io, "}") + println(io) + end + return nothing +end + +open("include/mpif_functions.h.in", "w") do fh + generate_mpif_functions_h(fh) + nothing +end +open("src/mpi_f08_functions.F90.in", "w") do fh + generate_mpi_f08_functions_f90(fh) + nothing +end +open("include/mpi_mpiabi_function_pointers_fortran.h", "w") do fh + generate_mpi_mpiabi_function_pointers_fortran_h(fh) + nothing +end +open("src/mpi_mpiabi_function_pointers_fortran.c", "w") do fh + generate_mpi_mpiabi_function_pointers_fortran_c(fh) + nothing +end +open("src/mpi_set_mpiabi_function_pointers_fortran.c", "w") do fh + generate_mpi_set_mpiabi_function_pointers_fortran_c(fh) + nothing +end +open("src/mpi_functions_fortran.c", "w") do fh + generate_mpi_functions_fortran_c(fh) + nothing +end + +nothing diff --git a/mpitrampoline/include/mpi.h b/mpitrampoline/include/mpi.h new file mode 100644 index 00000000..cdf813eb --- /dev/null +++ b/mpitrampoline/include/mpi.h @@ -0,0 +1,15 @@ +#ifndef MPI_H +#define MPI_H + +#include + +#include +#include +#include +#include + +#define MPI_H_INCLUDED +#endif // #ifndef MPI_H +#ifndef MPI_H_INCLUDED +#error +#endif diff --git a/mpitrampoline/include/mpi_constants.h b/mpitrampoline/include/mpi_constants.h new file mode 100644 index 00000000..fb8fbcb4 --- /dev/null +++ b/mpitrampoline/include/mpi_constants.h @@ -0,0 +1,583 @@ +#ifndef MPI_CONSTANTS_H +#define MPI_CONSTANTS_H + +#include + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +// Define MPI constants + +// A.1.1 Defined Constants + +// Error classes + +enum { + MPI_SUCCESS = MPIABI_SUCCESS, + MPI_ERR_BUFFER = MPIABI_ERR_BUFFER, + MPI_ERR_COUNT = MPIABI_ERR_COUNT, + MPI_ERR_TYPE = MPIABI_ERR_TYPE, + MPI_ERR_TAG = MPIABI_ERR_TAG, + MPI_ERR_COMM = MPIABI_ERR_COMM, + MPI_ERR_RANK = MPIABI_ERR_RANK, + MPI_ERR_REQUEST = MPIABI_ERR_REQUEST, + MPI_ERR_ROOT = MPIABI_ERR_ROOT, + MPI_ERR_GROUP = MPIABI_ERR_GROUP, + MPI_ERR_OP = MPIABI_ERR_OP, + MPI_ERR_TOPOLOGY = MPIABI_ERR_TOPOLOGY, + MPI_ERR_DIMS = MPIABI_ERR_DIMS, + MPI_ERR_ARG = MPIABI_ERR_ARG, + MPI_ERR_UNKNOWN = MPIABI_ERR_UNKNOWN, + MPI_ERR_TRUNCATE = MPIABI_ERR_TRUNCATE, + MPI_ERR_OTHER = MPIABI_ERR_OTHER, + MPI_ERR_INTERN = MPIABI_ERR_INTERN, + MPI_ERR_PENDING = MPIABI_ERR_PENDING, + MPI_ERR_IN_STATUS = MPIABI_ERR_IN_STATUS, + MPI_ERR_ACCESS = MPIABI_ERR_ACCESS, + MPI_ERR_AMODE = MPIABI_ERR_AMODE, + MPI_ERR_ASSERT = MPIABI_ERR_ASSERT, + MPI_ERR_BAD_FILE = MPIABI_ERR_BAD_FILE, + MPI_ERR_BASE = MPIABI_ERR_BASE, + MPI_ERR_CONVERSION = MPIABI_ERR_CONVERSION, + MPI_ERR_DISP = MPIABI_ERR_DISP, + MPI_ERR_DUP_DATAREP = MPIABI_ERR_DUP_DATAREP, + MPI_ERR_FILE_EXISTS = MPIABI_ERR_FILE_EXISTS, + MPI_ERR_FILE_IN_USE = MPIABI_ERR_FILE_IN_USE, + MPI_ERR_FILE = MPIABI_ERR_FILE, + MPI_ERR_INFO_KEY = MPIABI_ERR_INFO_KEY, + MPI_ERR_INFO_NOKEY = MPIABI_ERR_INFO_NOKEY, + MPI_ERR_INFO_VALUE = MPIABI_ERR_INFO_VALUE, + MPI_ERR_INFO = MPIABI_ERR_INFO, + MPI_ERR_IO = MPIABI_ERR_IO, + MPI_ERR_KEYVAL = MPIABI_ERR_KEYVAL, + MPI_ERR_LOCKTYPE = MPIABI_ERR_LOCKTYPE, + MPI_ERR_NAME = MPIABI_ERR_NAME, + MPI_ERR_NO_MEM = MPIABI_ERR_NO_MEM, + MPI_ERR_NOT_SAME = MPIABI_ERR_NOT_SAME, + MPI_ERR_NO_SPACE = MPIABI_ERR_NO_SPACE, + MPI_ERR_NO_SUCH_FILE = MPIABI_ERR_NO_SUCH_FILE, + MPI_ERR_PORT = MPIABI_ERR_PORT, + MPI_ERR_PROC_ABORTED = MPIABI_ERR_PROC_ABORTED, + MPI_ERR_QUOTA = MPIABI_ERR_QUOTA, + MPI_ERR_READ_ONLY = MPIABI_ERR_READ_ONLY, + MPI_ERR_RMA_ATTACH = MPIABI_ERR_RMA_ATTACH, + MPI_ERR_RMA_CONFLICT = MPIABI_ERR_RMA_CONFLICT, + MPI_ERR_RMA_RANGE = MPIABI_ERR_RMA_RANGE, + MPI_ERR_RMA_SHARED = MPIABI_ERR_RMA_SHARED, + MPI_ERR_RMA_SYNC = MPIABI_ERR_RMA_SYNC, + MPI_ERR_RMA_FLAVOR = MPIABI_ERR_RMA_FLAVOR, + MPI_ERR_SERVICE = MPIABI_ERR_SERVICE, + MPI_ERR_SESSION = MPIABI_ERR_SESSION, + MPI_ERR_SIZE = MPIABI_ERR_SIZE, + MPI_ERR_SPAWN = MPIABI_ERR_SPAWN, + MPI_ERR_UNSUPPORTED_DATAREP = MPIABI_ERR_UNSUPPORTED_DATAREP, + MPI_ERR_UNSUPPORTED_OPERATION = MPIABI_ERR_UNSUPPORTED_OPERATION, + MPI_ERR_VALUE_TOO_LARGE = MPIABI_ERR_VALUE_TOO_LARGE, + MPI_ERR_WIN = MPIABI_ERR_WIN, + MPI_ERR_ERRHANDLER = MPIABI_ERR_ERRHANDLER, + MPI_T_ERR_CANNOT_INIT = MPIABI_T_ERR_CANNOT_INIT, + MPI_T_ERR_NOT_ACCESSIBLE = MPIABI_T_ERR_NOT_ACCESSIBLE, + MPI_T_ERR_NOT_INITIALIZED = MPIABI_T_ERR_NOT_INITIALIZED, + MPI_T_ERR_NOT_SUPPORTED = MPIABI_T_ERR_NOT_SUPPORTED, + MPI_T_ERR_MEMORY = MPIABI_T_ERR_MEMORY, + MPI_T_ERR_INVALID = MPIABI_T_ERR_INVALID, + MPI_T_ERR_INVALID_INDEX = MPIABI_T_ERR_INVALID_INDEX, + MPI_T_ERR_INVALID_ITEM = MPIABI_T_ERR_INVALID_ITEM, + MPI_T_ERR_INVALID_SESSION = MPIABI_T_ERR_INVALID_SESSION, + MPI_T_ERR_INVALID_HANDLE = MPIABI_T_ERR_INVALID_HANDLE, + MPI_T_ERR_INVALID_NAME = MPIABI_T_ERR_INVALID_NAME, + MPI_T_ERR_OUT_OF_HANDLES = MPIABI_T_ERR_OUT_OF_HANDLES, + MPI_T_ERR_OUT_OF_SESSIONS = MPIABI_T_ERR_OUT_OF_SESSIONS, + MPI_T_ERR_CVAR_SET_NOT_NOW = MPIABI_T_ERR_CVAR_SET_NOT_NOW, + MPI_T_ERR_CVAR_SET_NEVER = MPIABI_T_ERR_CVAR_SET_NEVER, + MPI_T_ERR_PVAR_NO_WRITE = MPIABI_T_ERR_PVAR_NO_WRITE, + MPI_T_ERR_PVAR_NO_STARTSTOP = MPIABI_T_ERR_PVAR_NO_STARTSTOP, + MPI_T_ERR_PVAR_NO_ATOMIC = MPIABI_T_ERR_PVAR_NO_ATOMIC, + MPI_ERR_LASTCODE = MPIABI_ERR_LASTCODE, +}; + +// Buffer Address Constants + +#define MPI_BOTTOM MPIABI_BOTTOM +#define MPI_BUFFER_AUTOMATIC MPIABI_BUFFER_AUTOMATIC +#define MPI_IN_PLACE MPIABI_IN_PLACE + +// Assorted Constants + +enum { + MPI_PROC_NULL = MPIABI_PROC_NULL, + MPI_ANY_SOURCE = MPIABI_ANY_SOURCE, + MPI_ANY_TAG = MPIABI_ANY_TAG, + MPI_UNDEFINED = MPIABI_UNDEFINED, + MPI_BSEND_OVERHEAD = MPIABI_BSEND_OVERHEAD, + MPI_KEYVAL_INVALID = MPIABI_KEYVAL_INVALID, + MPI_LOCK_EXCLUSIVE = MPIABI_LOCK_EXCLUSIVE, + MPI_LOCK_SHARED = MPIABI_LOCK_SHARED, + MPI_ROOT = MPIABI_ROOT, +}; + +// No Process Message Handle + +#define MPI_MESSAGE_NO_PROC MPIABI_MESSAGE_NO_PROC + +// Fortran Support Method Specific Constants + +// Status array size and reserved index values + +// Fortran status array size and reserved index values + +enum { + MPI_F_STATUS_SIZE = MPIABI_F_STATUS_SIZE, + MPI_F_SOURCE = MPIABI_F_SOURCE, + MPI_F_TAG = MPIABI_F_TAG, + MPI_F_ERROR = MPIABI_F_ERROR, +}; + +// Variable Address Size + +// Error-handling specifiers + +#define MPI_ERRORS_ARE_FATAL MPIABI_ERRORS_ARE_FATAL +#define MPI_ERRORS_ABORT MPIABI_ERRORS_ABORT +#define MPI_ERRORS_RETURN MPIABI_ERRORS_RETURN + +// Maximum Sizes for Strings + +enum { + MPI_MAX_DATAREP_STRING = MPIABI_MAX_DATAREP_STRING, + MPI_MAX_ERROR_STRING = MPIABI_MAX_ERROR_STRING, + MPI_MAX_INFO_KEY = MPIABI_MAX_INFO_KEY, + MPI_MAX_INFO_VAL = MPIABI_MAX_INFO_VAL, + MPI_MAX_LIBRARY_VERSION_STRING = MPIABI_MAX_LIBRARY_VERSION_STRING, + MPI_MAX_OBJECT_NAME = MPIABI_MAX_OBJECT_NAME, + MPI_MAX_PORT_NAME = MPIABI_MAX_PORT_NAME, + MPI_MAX_PROCESSOR_NAME = MPIABI_MAX_PROCESSOR_NAME, + MPI_MAX_PSET_NAME_LEN = MPIABI_MAX_PSET_NAME_LEN, + MPI_MAX_STRINGTAG_LEN = MPIABI_MAX_STRINGTAG_LEN, +}; + +// Named Predefined Datatypes + +// [C types] + +#define MPI_CHAR MPIABI_CHAR +#define MPI_SHORT MPIABI_SHORT +#define MPI_INT MPIABI_INT +#define MPI_LONG MPIABI_LONG +#define MPI_LONG_LONG_INT MPIABI_LONG_LONG_INT +#define MPI_LONG_LONG MPIABI_LONG_LONG +#define MPI_SIGNED_CHAR MPIABI_SIGNED_CHAR +#define MPI_UNSIGNED_CHAR MPIABI_UNSIGNED_CHAR +#define MPI_UNSIGNED_SHORT MPIABI_UNSIGNED_SHORT +#define MPI_UNSIGNED MPIABI_UNSIGNED +#define MPI_UNSIGNED_LONG MPIABI_UNSIGNED_LONG +#define MPI_UNSIGNED_LONG_LONG MPIABI_UNSIGNED_LONG_LONG +#define MPI_FLOAT MPIABI_FLOAT +#define MPI_DOUBLE MPIABI_DOUBLE +#define MPI_LONG_DOUBLE MPIABI_LONG_DOUBLE +#define MPI_WCHAR MPIABI_WCHAR +#define MPI_C_BOOL MPIABI_C_BOOL +#define MPI_INT8_T MPIABI_INT8_T +#define MPI_INT16_T MPIABI_INT16_T +#define MPI_INT32_T MPIABI_INT32_T +#define MPI_INT64_T MPIABI_INT64_T +#define MPI_UINT8_T MPIABI_UINT8_T +#define MPI_UINT16_T MPIABI_UINT16_T +#define MPI_UINT32_T MPIABI_UINT32_T +#define MPI_UINT64_T MPIABI_UINT64_T +#define MPI_AINT MPIABI_AINT +#define MPI_COUNT MPIABI_COUNT +#define MPI_OFFSET MPIABI_OFFSET +#define MPI_C_COMPLEX MPIABI_C_COMPLEX +#define MPI_C_FLOAT_COMPLEX MPIABI_C_FLOAT_COMPLEX +#define MPI_C_DOUBLE_COMPLEX MPIABI_C_DOUBLE_COMPLEX +#define MPI_C_LONG_DOUBLE_COMPLEX MPIABI_C_LONG_DOUBLE_COMPLEX +#define MPI_BYTE MPIABI_BYTE +#define MPI_PACKED MPIABI_PACKED + +// [Fortran types] + +#define MPI_INTEGER MPIABI_INTEGER +#define MPI_REAL MPIABI_REAL +#define MPI_DOUBLE_PRECISION MPIABI_DOUBLE_PRECISION +#define MPI_COMPLEX MPIABI_COMPLEX +#define MPI_LOGICAL MPIABI_LOGICAL +#define MPI_CHARACTER MPIABI_CHARACTER + +// [C++ types] + +#define MPI_CXX_BOOL MPIABI_CXX_BOOL +#define MPI_CXX_FLOAT_COMPLEX MPIABI_CXX_FLOAT_COMPLEX +#define MPI_CXX_DOUBLE_COMPLEX MPIABI_CXX_DOUBLE_COMPLEX +#define MPI_CXX_LONG_DOUBLE_COMPLEX MPIABI_CXX_LONG_DOUBLE_COMPLEX + +// [Optional datatypes (Fortran)] + +#define MPI_DOUBLE_COMPLEX MPIABI_DOUBLE_COMPLEX +#define MPI_INTEGER1 MPIABI_INTEGER1 +#define MPI_INTEGER2 MPIABI_INTEGER2 +#define MPI_INTEGER4 MPIABI_INTEGER4 +#define MPI_INTEGER8 MPIABI_INTEGER8 +#define MPI_INTEGER16 MPIABI_INTEGER16 +#define MPI_REAL2 MPIABI_REAL2 +#define MPI_REAL4 MPIABI_REAL4 +#define MPI_REAL8 MPIABI_REAL8 +#define MPI_REAL16 MPIABI_REAL16 +#define MPI_COMPLEX4 MPIABI_COMPLEX4 +#define MPI_COMPLEX8 MPIABI_COMPLEX8 +#define MPI_COMPLEX16 MPIABI_COMPLEX16 +#define MPI_COMPLEX32 MPIABI_COMPLEX32 + +// [Extensions] + +#define MPI_REAL1 MPIABI_REAL1 +#define MPI_COMPLEX2 MPIABI_COMPLEX2 +#define MPI_LOGICAL1 MPIABI_LOGICAL1 +#define MPI_LOGICAL2 MPIABI_LOGICAL2 +#define MPI_LOGICAL4 MPIABI_LOGICAL4 +#define MPI_LOGICAL8 MPIABI_LOGICAL8 +#define MPI_LOGICAL16 MPIABI_LOGICAL16 + +// [Datatypes for reduction functions (C)] + +#define MPI_FLOAT_INT MPIABI_FLOAT_INT +#define MPI_DOUBLE_INT MPIABI_DOUBLE_INT +#define MPI_LONG_INT MPIABI_LONG_INT +#define MPI_2INT MPIABI_2INT +#define MPI_SHORT_INT MPIABI_SHORT_INT +#define MPI_LONG_DOUBLE_INT MPIABI_LONG_DOUBLE_INT + +// [Datatypes for reduction functions (Fortran)] + +#define MPI_2REAL MPIABI_2REAL +#define MPI_2DOUBLE_PRECISION MPIABI_2DOUBLE_PRECISION +#define MPI_2INTEGER MPIABI_2INTEGER + +// [Removed constructs] + +#define MPI_LB MPIABI_LB +#define MPI_UB MPIABI_UB + +// Reserved communicators + +#define MPI_COMM_WORLD MPIABI_COMM_WORLD +#define MPI_COMM_SELF MPIABI_COMM_SELF + +// Communicator split type constants +enum { + MPI_COMM_TYPE_SHARED = MPIABI_COMM_TYPE_SHARED, + MPI_COMM_TYPE_HW_UNGUIDED = MPIABI_COMM_TYPE_HW_UNGUIDED, + MPI_COMM_TYPE_HW_GUIDED = MPIABI_COMM_TYPE_HW_GUIDED, + MPI_COMM_TYPE_RESOURCE_GUIDED = MPIABI_COMM_TYPE_RESOURCE_GUIDED, +}; + +// Results of communicator and group comparisons + +enum { + MPI_IDENT = MPIABI_IDENT, + MPI_CONGRUENT = MPIABI_CONGRUENT, + MPI_SIMILAR = MPIABI_SIMILAR, + MPI_UNEQUAL = MPIABI_UNEQUAL, +}; + +// Environmental inquiry info key + +#define MPI_INFO_ENV MPIABI_INFO_ENV + +// Environmental inquiry keys + +enum { + MPI_TAG_UB = MPIABI_TAG_UB, + MPI_IO = MPIABI_IO, + MPI_HOST = MPIABI_HOST, + MPI_WTIME_IS_GLOBAL = MPIABI_WTIME_IS_GLOBAL, +}; + +// Collective Operations + +#define MPI_MAX MPIABI_MAX +#define MPI_MIN MPIABI_MIN +#define MPI_SUM MPIABI_SUM +#define MPI_PROD MPIABI_PROD +#define MPI_MAXLOC MPIABI_MAXLOC +#define MPI_MINLOC MPIABI_MINLOC +#define MPI_BAND MPIABI_BAND +#define MPI_BOR MPIABI_BOR +#define MPI_BXOR MPIABI_BXOR +#define MPI_LAND MPIABI_LAND +#define MPI_LOR MPIABI_LOR +#define MPI_LXOR MPIABI_LXOR +#define MPI_REPLACE MPIABI_REPLACE +#define MPI_NO_OP MPIABI_NO_OP + +// Null Handles + +#define MPI_GROUP_NULL MPIABI_GROUP_NULL +#define MPI_COMM_NULL MPIABI_COMM_NULL +#define MPI_DATATYPE_NULL MPIABI_DATATYPE_NULL +#define MPI_REQUEST_NULL MPIABI_REQUEST_NULL +#define MPI_OP_NULL MPIABI_OP_NULL +#define MPI_ERRHANDLER_NULL MPIABI_ERRHANDLER_NULL +#define MPI_FILE_NULL MPIABI_FILE_NULL +#define MPI_INFO_NULL MPIABI_INFO_NULL +#define MPI_SESSION_NULL MPIABI_SESSION_NULL +#define MPI_WIN_NULL MPIABI_WIN_NULL +#define MPI_MESSAGE_NULL MPIABI_MESSAGE_NULL + +// Empty group + +#define MPI_GROUP_EMPTY MPIABI_GROUP_EMPTY + +// Topologies + +enum { + MPI_GRAPH = MPIABI_GRAPH, + MPI_CART = MPIABI_CART, + MPI_DIST_GRAPH = MPIABI_DIST_GRAPH, +}; + +// Predefined functions + +#define MPI_COMM_NULL_COPY_FN MPIABI_COMM_NULL_COPY_FN +#define MPI_COMM_DUP_FN MPIABI_COMM_DUP_FN +#define MPI_COMM_NULL_DELETE_FN MPIABI_COMM_NULL_DELETE_FN + +#define MPI_WIN_NULL_COPY_FN MPIABI_WIN_NULL_COPY_FN +#define MPI_WIN_DUP_FN MPIABI_WIN_DUP_FN +#define MPI_WIN_NULL_DELETE_FN MPIABI_WIN_NULL_DELETE_FN + +#define MPI_TYPE_NULL_COPY_FN MPIABI_TYPE_NULL_COPY_FN +#define MPI_TYPE_DUP_FN MPIABI_TYPE_DUP_FN +#define MPI_TYPE_NULL_DELETE_FN MPIABI_TYPE_NULL_DELETE_FN + +#define MPI_CONVERSION_FN_NULL MPIABI_CONVERSION_FN_NULL +#define MPI_CONVERSION_FN_NULL_C MPIABI_CONVERSION_FN_NULL_C + +// Deprecated predefined functions + +#define MPI_NULL_COPY_FN MPIABI_NULL_COPY_FN +#define MPI_DUP_FN MPIABI_DUP_FN +#define MPI_NULL_DELETE_FN MPIABI_NULL_DELETE_FN + +// Predefined Attribute Keys + +enum { + MPI_APPNUM = MPIABI_APPNUM, + MPI_LASTUSEDCODE = MPIABI_LASTUSEDCODE, + MPI_UNIVERSE_SIZE = MPIABI_UNIVERSE_SIZE, + MPI_WIN_BASE = MPIABI_WIN_BASE, + MPI_WIN_DISP_UNIT = MPIABI_WIN_DISP_UNIT, + MPI_WIN_SIZE = MPIABI_WIN_SIZE, + MPI_WIN_CREATE_FLAVOR = MPIABI_WIN_CREATE_FLAVOR, + MPI_WIN_MODEL = MPIABI_WIN_MODEL, +}; + +// MPI Window Create Flavors + +enum { + MPI_WIN_FLAVOR_CREATE = MPIABI_WIN_FLAVOR_CREATE, + MPI_WIN_FLAVOR_ALLOCATE = MPIABI_WIN_FLAVOR_ALLOCATE, + MPI_WIN_FLAVOR_DYNAMIC = MPIABI_WIN_FLAVOR_DYNAMIC, + MPI_WIN_FLAVOR_SHARED = MPIABI_WIN_FLAVOR_SHARED, +}; + +// MPI Window Models + +enum { + MPI_WIN_SEPARATE = MPIABI_WIN_SEPARATE, + MPI_WIN_UNIFIED = MPIABI_WIN_UNIFIED, +}; + +// Mode Constants + +enum { + MPI_MODE_APPEND = MPIABI_MODE_APPEND, + MPI_MODE_CREATE = MPIABI_MODE_CREATE, + MPI_MODE_DELETE_ON_CLOSE = MPIABI_MODE_DELETE_ON_CLOSE, + MPI_MODE_EXCL = MPIABI_MODE_EXCL, + MPI_MODE_NOCHECK = MPIABI_MODE_NOCHECK, + MPI_MODE_NOPRECEDE = MPIABI_MODE_NOPRECEDE, + MPI_MODE_NOPUT = MPIABI_MODE_NOPUT, + MPI_MODE_NOSTORE = MPIABI_MODE_NOSTORE, + MPI_MODE_NOSUCCEED = MPIABI_MODE_NOSUCCEED, + MPI_MODE_RDONLY = MPIABI_MODE_RDONLY, + MPI_MODE_RDWR = MPIABI_MODE_RDWR, + MPI_MODE_SEQUENTIAL = MPIABI_MODE_SEQUENTIAL, + MPI_MODE_UNIQUE_OPEN = MPIABI_MODE_UNIQUE_OPEN, + MPI_MODE_WRONLY = MPIABI_MODE_WRONLY, +}; + +// Datatype Decoding Constants + +enum { + MPI_COMBINER_CONTIGUOUS = MPIABI_COMBINER_CONTIGUOUS, + MPI_COMBINER_DARRAY = MPIABI_COMBINER_DARRAY, + MPI_COMBINER_DUP = MPIABI_COMBINER_DUP, + MPI_COMBINER_F90_COMPLEX = MPIABI_COMBINER_F90_COMPLEX, + MPI_COMBINER_F90_INTEGER = MPIABI_COMBINER_F90_INTEGER, + MPI_COMBINER_F90_REAL = MPIABI_COMBINER_F90_REAL, + MPI_COMBINER_HINDEXED = MPIABI_COMBINER_HINDEXED, + MPI_COMBINER_HVECTOR = MPIABI_COMBINER_HVECTOR, + MPI_COMBINER_INDEXED_BLOCK = MPIABI_COMBINER_INDEXED_BLOCK, + MPI_COMBINER_HINDEXED_BLOCK = MPIABI_COMBINER_HINDEXED_BLOCK, + MPI_COMBINER_INDEXED = MPIABI_COMBINER_INDEXED, + MPI_COMBINER_NAMED = MPIABI_COMBINER_NAMED, + MPI_COMBINER_RESIZED = MPIABI_COMBINER_RESIZED, + MPI_COMBINER_STRUCT = MPIABI_COMBINER_STRUCT, + MPI_COMBINER_SUBARRAY = MPIABI_COMBINER_SUBARRAY, + MPI_COMBINER_VECTOR = MPIABI_COMBINER_VECTOR, +}; + +// Threads Constants + +enum { + MPI_THREAD_FUNNELED = MPIABI_THREAD_FUNNELED, + MPI_THREAD_MULTIPLE = MPIABI_THREAD_MULTIPLE, + MPI_THREAD_SERIALIZED = MPIABI_THREAD_SERIALIZED, + MPI_THREAD_SINGLE = MPIABI_THREAD_SINGLE, +}; + +// File Operation Constants, Part 1 + +#define MPI_DISPLACEMENT_CURRENT MPIABI_DISPLACEMENT_CURRENT + +// File Operation Constants, Part 2 + +enum { + MPI_DISTRIBUTE_BLOCK = MPIABI_DISTRIBUTE_BLOCK, + MPI_DISTRIBUTE_CYCLIC = MPIABI_DISTRIBUTE_CYCLIC, + MPI_DISTRIBUTE_DFLT_DARG = MPIABI_DISTRIBUTE_DFLT_DARG, + MPI_DISTRIBUTE_NONE = MPIABI_DISTRIBUTE_NONE, + MPI_ORDER_C = MPIABI_ORDER_C, + MPI_ORDER_FORTRAN = MPIABI_ORDER_FORTRAN, + MPI_SEEK_CUR = MPIABI_SEEK_CUR, + MPI_SEEK_END = MPIABI_SEEK_END, + MPI_SEEK_SET = MPIABI_SEEK_SET, +}; + +// F90 Datatype Matching Constants + +enum { + MPI_TYPECLASS_COMPLEX = MPIABI_TYPECLASS_COMPLEX, + MPI_TYPECLASS_INTEGER = MPIABI_TYPECLASS_INTEGER, + MPI_TYPECLASS_REAL = MPIABI_TYPECLASS_REAL, +}; + +// Constants Specifying Empty or Ignored Input + +#define MPI_ARGVS_NULL MPIABI_ARGVS_NULL +#define MPI_ARGV_NULL MPIABI_ARGV_NULL +#define MPI_ERRCODES_IGNORE MPIABI_ERRCODES_IGNORE +#define MPI_STATUSES_IGNORE MPIABI_STATUSES_IGNORE +#define MPI_STATUS_IGNORE MPIABI_STATUS_IGNORE +#define MPI_UNWEIGHTED MPIABI_UNWEIGHTED +#define MPI_WEIGHTS_EMPTY MPIABI_WEIGHTS_EMPTY + +// C Constants Specifying Ignored Input (no Fortran) + +#define MPI_F_STATUSES_IGNORE MPIABI_F_STATUSES_IGNORE +#define MPI_F_STATUS_IGNORE MPIABI_F_STATUS_IGNORE + +#define MPI_F08_STATUSES_IGNORE MPIABI_F08_STATUSES_IGNORE +#define MPI_F08_STATUS_IGNORE MPIABI_F08_STATUS_IGNORE + +// C preprocessor Constants and Fortran Parameters + +#define MPI_SUBVERSION MPIABI_SUBVERSION +#define MPI_VERSION MPIABI_VERSION + +// Null handles used in the MPI tool information interface + +#define MPI_T_ENUM_NULL MPIABI_T_ENUM_NULL +#define MPI_T_CVAR_HANDLE_NULL MPIABI_T_CVAR_HANDLE_NULL +#define MPI_T_PVAR_HANDLE_NULL MPIABI_T_PVAR_HANDLE_NULL +#define MPI_T_PVAR_SESSION_NULL MPIABI_T_PVAR_SESSION_NULL + +// Verbosity Levels in the MPI tool information interface + +enum { + MPI_T_VERBOSITY_USER_BASIC = MPIABI_T_VERBOSITY_USER_BASIC, + MPI_T_VERBOSITY_USER_DETAIL = MPIABI_T_VERBOSITY_USER_DETAIL, + MPI_T_VERBOSITY_USER_ALL = MPIABI_T_VERBOSITY_USER_ALL, + MPI_T_VERBOSITY_TUNER_BASIC = MPIABI_T_VERBOSITY_TUNER_BASIC, + MPI_T_VERBOSITY_TUNER_DETAIL = MPIABI_T_VERBOSITY_TUNER_DETAIL, + MPI_T_VERBOSITY_TUNER_ALL = MPIABI_T_VERBOSITY_TUNER_ALL, + MPI_T_VERBOSITY_MPIDEV_BASIC = MPIABI_T_VERBOSITY_MPIDEV_BASIC, + MPI_T_VERBOSITY_MPIDEV_DETAIL = MPIABI_T_VERBOSITY_MPIDEV_DETAIL, + MPI_T_VERBOSITY_MPIDEV_ALL = MPIABI_T_VERBOSITY_MPIDEV_ALL, +}; + +// Constants to identify associations of variables in the MPI tool information +// interface + +enum { + MPI_T_BIND_NO_OBJECT = MPIABI_T_BIND_NO_OBJECT, + MPI_T_BIND_MPI_COMM = MPIABI_T_BIND_MPI_COMM, + MPI_T_BIND_MPI_DATATYPE = MPIABI_T_BIND_MPI_DATATYPE, + MPI_T_BIND_MPI_ERRHANDLER = MPIABI_T_BIND_MPI_ERRHANDLER, + MPI_T_BIND_MPI_FILE = MPIABI_T_BIND_MPI_FILE, + MPI_T_BIND_MPI_GROUP = MPIABI_T_BIND_MPI_GROUP, + MPI_T_BIND_MPI_OP = MPIABI_T_BIND_MPI_OP, + MPI_T_BIND_MPI_REQUEST = MPIABI_T_BIND_MPI_REQUEST, + MPI_T_BIND_MPI_WIN = MPIABI_T_BIND_MPI_WIN, + MPI_T_BIND_MPI_MESSAGE = MPIABI_T_BIND_MPI_MESSAGE, + MPI_T_BIND_MPI_INFO = MPIABI_T_BIND_MPI_INFO, + MPI_T_BIND_MPI_SESSION = MPIABI_T_BIND_MPI_SESSION, +}; + +// Constants describing the scope of a control variable in the MPI tool +// information interface + +enum { + MPI_T_SCOPE_CONSTANT = MPIABI_T_SCOPE_CONSTANT, + MPI_T_SCOPE_READONLY = MPIABI_T_SCOPE_READONLY, + MPI_T_SCOPE_LOCAL = MPIABI_T_SCOPE_LOCAL, + MPI_T_SCOPE_GROUP = MPIABI_T_SCOPE_GROUP, + MPI_T_SCOPE_GROUP_EQ = MPIABI_T_SCOPE_GROUP_EQ, + MPI_T_SCOPE_ALL = MPIABI_T_SCOPE_ALL, + MPI_T_SCOPE_ALL_EQ = MPIABI_T_SCOPE_ALL_EQ, +}; + +// Additional constants used + +#define MPI_T_PVAR_ALL_HANDLES + +// Performance variables classes used by the MPI tool information interface + +enum { + MPI_T_PVAR_CLASS_STATE = MPIABI_T_PVAR_CLASS_STATE, + MPI_T_PVAR_CLASS_LEVEL = MPIABI_T_PVAR_CLASS_LEVEL, + MPI_T_PVAR_CLASS_SIZE = MPIABI_T_PVAR_CLASS_SIZE, + MPI_T_PVAR_CLASS_PERCENTAGE = MPIABI_T_PVAR_CLASS_PERCENTAGE, + MPI_T_PVAR_CLASS_HIGHWATERMARK = MPIABI_T_PVAR_CLASS_HIGHWATERMARK, + MPI_T_PVAR_CLASS_LOWWATERMARK = MPIABI_T_PVAR_CLASS_LOWWATERMARK, + MPI_T_PVAR_CLASS_COUNTER = MPIABI_T_PVAR_CLASS_COUNTER, + MPI_T_PVAR_CLASS_AGGREGATE = MPIABI_T_PVAR_CLASS_AGGREGATE, + MPI_T_PVAR_CLASS_TIMER = MPIABI_T_PVAR_CLASS_TIMER, + MPI_T_PVAR_CLASS_GENERIC = MPIABI_T_PVAR_CLASS_GENERIC, +}; + +// Source event ordering guarantees in the MPI tool information interface + +#define MPI_T_SOURCE_ORDERED MPIABI_T_SOURCE_ORDERED +#define MPI_T_SOURCE_UNORDERED MPIABI_T_SOURCE_UNORDERED + +// Callback safety requirement levels used in the MPI tool information interface + +#define MPI_T_CB_REQUIRE_NONE MPIABI_T_CB_REQUIRE_NONE +#define MPI_T_CB_REQUIRE_MPI_RESTRICTED MPIABI_T_CB_REQUIRE_MPI_RESTRICTED +#define MPI_T_CB_REQUIRE_THREAD_SAFE MPIABI_T_CB_REQUIRE_THREAD_SAFE +#define MPI_T_CB_REQUIRE_ASYNC_SIGNAL_SAFE MPIABI_T_CB_REQUIRE_ASYNC_SIGNAL_SAFE + +#ifdef __cplusplus +} +#endif + +#define MPI_CONSTANTS_H_INCLUDED +#endif // #ifndef MPI_CONSTANTS_H +#ifndef MPI_CONSTANTS_H_INCLUDED +#error +#endif diff --git a/mpitrampoline/include/mpi_functions.h b/mpitrampoline/include/mpi_functions.h new file mode 100644 index 00000000..78ca360e --- /dev/null +++ b/mpitrampoline/include/mpi_functions.h @@ -0,0 +1,4051 @@ +#ifndef MPI_FUNCTIONS_H +#define MPI_FUNCTIONS_H + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +// Declare (and inline-define) MPI functions + +// A.3 C Bindings + +// A.3.1 Point-to-Point Communication C Bindings + +inline int MPI_Bsend(const void *buf, int count, MPI_Datatype datatype, + int dest, int tag, MPI_Comm comm) { + return (*MPIABI_Bsend_ptr)(buf, count, datatype, dest, tag, comm); +} + +inline int MPI_Bsend_c(const void *buf, MPI_Count count, MPI_Datatype datatype, + int dest, int tag, MPI_Comm comm) { + return (*MPIABI_Bsend_c_ptr)(buf, count, datatype, dest, tag, comm); +} + +inline int MPI_Bsend_init(const void *buf, int count, MPI_Datatype datatype, + int dest, int tag, MPI_Comm comm, + MPI_Request *request) { + return (*MPIABI_Bsend_init_ptr)(buf, count, datatype, dest, tag, comm, + request); +} + +inline int MPI_Bsend_init_c(const void *buf, MPI_Count count, + MPI_Datatype datatype, int dest, int tag, + MPI_Comm comm, MPI_Request *request) { + return (*MPIABI_Bsend_init_c_ptr)(buf, count, datatype, dest, tag, comm, + request); +} + +inline int MPI_Buffer_attach(void *buffer, int size) { + return (*MPIABI_Buffer_attach_ptr)(buffer, size); +} + +inline int MPI_Buffer_attach_c(void *buffer, MPI_Count size) { + return (*MPIABI_Buffer_attach_c_ptr)(buffer, size); +} + +inline int MPI_Buffer_detach(void *buffer_addr, int *size) { + return (*MPIABI_Buffer_detach_ptr)(buffer_addr, size); +} + +inline int MPI_Buffer_detach_c(void *buffer_addr, MPI_Count *size) { + return (*MPIABI_Buffer_detach_c_ptr)(buffer_addr, size); +} + +inline int MPI_Buffer_flush(void) { return (*MPIABI_Buffer_flush_ptr)(); } + +inline int MPI_Buffer_iflush(MPI_Request *request) { + return (*MPIABI_Buffer_iflush_ptr)(request); +} + +inline int MPI_Cancel(MPI_Request *request) { + return (*MPIABI_Cancel_ptr)(request); +} + +inline int MPI_Comm_attach_buffer(MPI_Comm comm, void *buffer, int size) { + return (*MPIABI_Comm_attach_buffer_ptr)(comm, buffer, size); +} + +inline int MPI_Comm_attach_buffer_c(MPI_Comm comm, void *buffer, + MPI_Count size) { + return (*MPIABI_Comm_attach_buffer_c_ptr)(comm, buffer, size); +} + +inline int MPI_Comm_detach_buffer(MPI_Comm comm, void *buffer_addr, int *size) { + return (*MPIABI_Comm_detach_buffer_ptr)(comm, buffer_addr, size); +} + +inline int MPI_Comm_detach_buffer_c(MPI_Comm comm, void *buffer_addr, + MPI_Count *size) { + return (*MPIABI_Comm_detach_buffer_c_ptr)(comm, buffer_addr, size); +} + +inline int MPI_Comm_flush_buffer(MPI_Comm comm) { + return (*MPIABI_Comm_flush_buffer_ptr)(comm); +} + +inline int MPI_Comm_iflush_buffer(MPI_Comm comm, MPI_Request *request) { + return (*MPIABI_Comm_iflush_buffer_ptr)(comm, request); +} + +inline int MPI_Get_count(const MPI_Status *status, MPI_Datatype datatype, + int *count) { + return (*MPIABI_Get_count_ptr)(status, datatype, count); +} + +inline int MPI_Get_count_c(const MPI_Status *status, MPI_Datatype datatype, + MPI_Count *count) { + return (*MPIABI_Get_count_c_ptr)(status, datatype, count); +} + +inline int MPI_Ibsend(const void *buf, int count, MPI_Datatype datatype, + int dest, int tag, MPI_Comm comm, MPI_Request *request) { + return (*MPIABI_Ibsend_ptr)(buf, count, datatype, dest, tag, comm, request); +} + +inline int MPI_Ibsend_c(const void *buf, MPI_Count count, MPI_Datatype datatype, + int dest, int tag, MPI_Comm comm, + MPI_Request *request) { + return (*MPIABI_Ibsend_c_ptr)(buf, count, datatype, dest, tag, comm, request); +} + +inline int MPI_Improbe(int source, int tag, MPI_Comm comm, int *flag, + MPI_Message *message, MPI_Status *status) { + return (*MPIABI_Improbe_ptr)(source, tag, comm, flag, message, status); +} + +inline int MPI_Imrecv(void *buf, int count, MPI_Datatype datatype, + MPI_Message *message, MPI_Request *request) { + return (*MPIABI_Imrecv_ptr)(buf, count, datatype, message, request); +} + +inline int MPI_Imrecv_c(void *buf, MPI_Count count, MPI_Datatype datatype, + MPI_Message *message, MPI_Request *request) { + return (*MPIABI_Imrecv_c_ptr)(buf, count, datatype, message, request); +} + +inline int MPI_Iprobe(int source, int tag, MPI_Comm comm, int *flag, + MPI_Status *status) { + return (*MPIABI_Iprobe_ptr)(source, tag, comm, flag, status); +} + +inline int MPI_Irecv(void *buf, int count, MPI_Datatype datatype, int source, + int tag, MPI_Comm comm, MPI_Request *request) { + return (*MPIABI_Irecv_ptr)(buf, count, datatype, source, tag, comm, request); +} + +inline int MPI_Irecv_c(void *buf, MPI_Count count, MPI_Datatype datatype, + int source, int tag, MPI_Comm comm, + MPI_Request *request) { + return (*MPIABI_Irecv_c_ptr)(buf, count, datatype, source, tag, comm, + request); +} + +inline int MPI_Irsend(const void *buf, int count, MPI_Datatype datatype, + int dest, int tag, MPI_Comm comm, MPI_Request *request) { + return (*MPIABI_Irsend_ptr)(buf, count, datatype, dest, tag, comm, request); +} + +inline int MPI_Irsend_c(const void *buf, MPI_Count count, MPI_Datatype datatype, + int dest, int tag, MPI_Comm comm, + MPI_Request *request) { + return (*MPIABI_Irsend_c_ptr)(buf, count, datatype, dest, tag, comm, request); +} + +inline int MPI_Isend(const void *buf, int count, MPI_Datatype datatype, + int dest, int tag, MPI_Comm comm, MPI_Request *request) { + return (*MPIABI_Isend_ptr)(buf, count, datatype, dest, tag, comm, request); +} + +inline int MPI_Isend_c(const void *buf, MPI_Count count, MPI_Datatype datatype, + int dest, int tag, MPI_Comm comm, MPI_Request *request) { + return (*MPIABI_Isend_c_ptr)(buf, count, datatype, dest, tag, comm, request); +} + +inline int MPI_Isendrecv(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, int dest, int sendtag, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + int source, int recvtag, MPI_Comm comm, + MPI_Request *request) { + return (*MPIABI_Isendrecv_ptr)(sendbuf, sendcount, sendtype, dest, sendtag, + recvbuf, recvcount, recvtype, source, recvtag, + comm, request); +} + +inline int MPI_Isendrecv_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, int dest, int sendtag, + void *recvbuf, MPI_Count recvcount, + MPI_Datatype recvtype, int source, int recvtag, + MPI_Comm comm, MPI_Request *request) { + return (*MPIABI_Isendrecv_c_ptr)(sendbuf, sendcount, sendtype, dest, sendtag, + recvbuf, recvcount, recvtype, source, + recvtag, comm, request); +} + +inline int MPI_Isendrecv_replace(void *buf, int count, MPI_Datatype datatype, + int dest, int sendtag, int source, int recvtag, + MPI_Comm comm, MPI_Request *request) { + return (*MPIABI_Isendrecv_replace_ptr)(buf, count, datatype, dest, sendtag, + source, recvtag, comm, request); +} + +inline int MPI_Isendrecv_replace_c(void *buf, MPI_Count count, + MPI_Datatype datatype, int dest, int sendtag, + int source, int recvtag, MPI_Comm comm, + MPI_Request *request) { + return (*MPIABI_Isendrecv_replace_c_ptr)(buf, count, datatype, dest, sendtag, + source, recvtag, comm, request); +} + +inline int MPI_Issend(const void *buf, int count, MPI_Datatype datatype, + int dest, int tag, MPI_Comm comm, MPI_Request *request) { + return (*MPIABI_Issend_ptr)(buf, count, datatype, dest, tag, comm, request); +} + +inline int MPI_Issend_c(const void *buf, MPI_Count count, MPI_Datatype datatype, + int dest, int tag, MPI_Comm comm, + MPI_Request *request) { + return (*MPIABI_Issend_c_ptr)(buf, count, datatype, dest, tag, comm, request); +} + +inline int MPI_Mprobe(int source, int tag, MPI_Comm comm, MPI_Message *message, + MPI_Status *status) { + return (*MPIABI_Mprobe_ptr)(source, tag, comm, message, status); +} + +inline int MPI_Mrecv(void *buf, int count, MPI_Datatype datatype, + MPI_Message *message, MPI_Status *status) { + return (*MPIABI_Mrecv_ptr)(buf, count, datatype, message, status); +} + +inline int MPI_Mrecv_c(void *buf, MPI_Count count, MPI_Datatype datatype, + MPI_Message *message, MPI_Status *status) { + return (*MPIABI_Mrecv_c_ptr)(buf, count, datatype, message, status); +} + +inline int MPI_Probe(int source, int tag, MPI_Comm comm, MPI_Status *status) { + return (*MPIABI_Probe_ptr)(source, tag, comm, status); +} + +inline int MPI_Recv(void *buf, int count, MPI_Datatype datatype, int source, + int tag, MPI_Comm comm, MPI_Status *status) { + return (*MPIABI_Recv_ptr)(buf, count, datatype, source, tag, comm, status); +} + +inline int MPI_Recv_c(void *buf, MPI_Count count, MPI_Datatype datatype, + int source, int tag, MPI_Comm comm, MPI_Status *status) { + return (*MPIABI_Recv_c_ptr)(buf, count, datatype, source, tag, comm, status); +} + +inline int MPI_Recv_init(void *buf, int count, MPI_Datatype datatype, + int source, int tag, MPI_Comm comm, + MPI_Request *request) { + return (*MPIABI_Recv_init_ptr)(buf, count, datatype, source, tag, comm, + request); +} + +inline int MPI_Recv_init_c(void *buf, MPI_Count count, MPI_Datatype datatype, + int source, int tag, MPI_Comm comm, + MPI_Request *request) { + return (*MPIABI_Recv_init_c_ptr)(buf, count, datatype, source, tag, comm, + request); +} + +inline int MPI_Request_free(MPI_Request *request) { + return (*MPIABI_Request_free_ptr)(request); +} + +inline int MPI_Request_get_status(MPI_Request request, int *flag, + MPI_Status *status) { + return (*MPIABI_Request_get_status_ptr)(request, flag, status); +} + +inline int MPI_Request_get_status_all(int count, + const MPI_Request array_of_requests[], + int *flag, + MPI_Status array_of_statuses[]) { + return (*MPIABI_Request_get_status_all_ptr)(count, array_of_requests, flag, + array_of_statuses); +} + +inline int MPI_Request_get_status_any(int count, + const MPI_Request array_of_requests[], + int *index, int *flag, + MPI_Status *status) { + return (*MPIABI_Request_get_status_any_ptr)(count, array_of_requests, index, + flag, status); +} + +inline int MPI_Request_get_status_some(int incount, + const MPI_Request array_of_requests[], + int *outcount, int array_of_indices[], + MPI_Status array_of_statuses[]) { + return (*MPIABI_Request_get_status_some_ptr)(incount, array_of_requests, + outcount, array_of_indices, + array_of_statuses); +} + +inline int MPI_Rsend(const void *buf, int count, MPI_Datatype datatype, + int dest, int tag, MPI_Comm comm) { + return (*MPIABI_Rsend_ptr)(buf, count, datatype, dest, tag, comm); +} + +inline int MPI_Rsend_c(const void *buf, MPI_Count count, MPI_Datatype datatype, + int dest, int tag, MPI_Comm comm) { + return (*MPIABI_Rsend_c_ptr)(buf, count, datatype, dest, tag, comm); +} + +inline int MPI_Rsend_init(const void *buf, int count, MPI_Datatype datatype, + int dest, int tag, MPI_Comm comm, + MPI_Request *request) { + return (*MPIABI_Rsend_init_ptr)(buf, count, datatype, dest, tag, comm, + request); +} + +inline int MPI_Rsend_init_c(const void *buf, MPI_Count count, + MPI_Datatype datatype, int dest, int tag, + MPI_Comm comm, MPI_Request *request) { + return (*MPIABI_Rsend_init_c_ptr)(buf, count, datatype, dest, tag, comm, + request); +} + +inline int MPI_Send(const void *buf, int count, MPI_Datatype datatype, int dest, + int tag, MPI_Comm comm) { + return (*MPIABI_Send_ptr)(buf, count, datatype, dest, tag, comm); +} + +inline int MPI_Send_c(const void *buf, MPI_Count count, MPI_Datatype datatype, + int dest, int tag, MPI_Comm comm) { + return (*MPIABI_Send_c_ptr)(buf, count, datatype, dest, tag, comm); +} + +inline int MPI_Send_init(const void *buf, int count, MPI_Datatype datatype, + int dest, int tag, MPI_Comm comm, + MPI_Request *request) { + return (*MPIABI_Send_init_ptr)(buf, count, datatype, dest, tag, comm, + request); +} + +inline int MPI_Send_init_c(const void *buf, MPI_Count count, + MPI_Datatype datatype, int dest, int tag, + MPI_Comm comm, MPI_Request *request) { + return (*MPIABI_Send_init_c_ptr)(buf, count, datatype, dest, tag, comm, + request); +} + +inline int MPI_Sendrecv(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, int dest, int sendtag, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + int source, int recvtag, MPI_Comm comm, + MPI_Status *status) { + return (*MPIABI_Sendrecv_ptr)(sendbuf, sendcount, sendtype, dest, sendtag, + recvbuf, recvcount, recvtype, source, recvtag, + comm, status); +} + +inline int MPI_Sendrecv_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, int dest, int sendtag, + void *recvbuf, MPI_Count recvcount, + MPI_Datatype recvtype, int source, int recvtag, + MPI_Comm comm, MPI_Status *status) { + return (*MPIABI_Sendrecv_c_ptr)(sendbuf, sendcount, sendtype, dest, sendtag, + recvbuf, recvcount, recvtype, source, recvtag, + comm, status); +} + +inline int MPI_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype, + int dest, int sendtag, int source, int recvtag, + MPI_Comm comm, MPI_Status *status) { + return (*MPIABI_Sendrecv_replace_ptr)(buf, count, datatype, dest, sendtag, + source, recvtag, comm, status); +} + +inline int MPI_Sendrecv_replace_c(void *buf, MPI_Count count, + MPI_Datatype datatype, int dest, int sendtag, + int source, int recvtag, MPI_Comm comm, + MPI_Status *status) { + return (*MPIABI_Sendrecv_replace_c_ptr)(buf, count, datatype, dest, sendtag, + source, recvtag, comm, status); +} + +inline int MPI_Session_attach_buffer(MPI_Session session, void *buffer, + int size) { + return (*MPIABI_Session_attach_buffer_ptr)(session, buffer, size); +} + +inline int MPI_Session_attach_buffer_c(MPI_Session session, void *buffer, + MPI_Count size) { + return (*MPIABI_Session_attach_buffer_c_ptr)(session, buffer, size); +} + +inline int MPI_Session_detach_buffer(MPI_Session session, void *buffer_addr, + int *size) { + return (*MPIABI_Session_detach_buffer_ptr)(session, buffer_addr, size); +} + +inline int MPI_Session_detach_buffer_c(MPI_Session session, void *buffer_addr, + MPI_Count *size) { + return (*MPIABI_Session_detach_buffer_c_ptr)(session, buffer_addr, size); +} + +inline int MPI_Session_flush_buffer(MPI_Session session) { + return (*MPIABI_Session_flush_buffer_ptr)(session); +} + +inline int MPI_Session_iflush_buffer(MPI_Session session, + MPI_Request *request) { + return (*MPIABI_Session_iflush_buffer_ptr)(session, request); +} + +inline int MPI_Ssend(const void *buf, int count, MPI_Datatype datatype, + int dest, int tag, MPI_Comm comm) { + return (*MPIABI_Ssend_ptr)(buf, count, datatype, dest, tag, comm); +} + +inline int MPI_Ssend_c(const void *buf, MPI_Count count, MPI_Datatype datatype, + int dest, int tag, MPI_Comm comm) { + return (*MPIABI_Ssend_c_ptr)(buf, count, datatype, dest, tag, comm); +} + +inline int MPI_Ssend_init(const void *buf, int count, MPI_Datatype datatype, + int dest, int tag, MPI_Comm comm, + MPI_Request *request) { + return (*MPIABI_Ssend_init_ptr)(buf, count, datatype, dest, tag, comm, + request); +} + +inline int MPI_Ssend_init_c(const void *buf, MPI_Count count, + MPI_Datatype datatype, int dest, int tag, + MPI_Comm comm, MPI_Request *request) { + return (*MPIABI_Ssend_init_c_ptr)(buf, count, datatype, dest, tag, comm, + request); +} + +inline int MPI_Start(MPI_Request *request) { + return (*MPIABI_Start_ptr)(request); +} + +inline int MPI_Startall(int count, MPI_Request array_of_requests[]) { + return (*MPIABI_Startall_ptr)(count, array_of_requests); +} + +inline int MPI_Status_get_error(MPI_Status *status, int *err) { + return (*MPIABI_Status_get_error_ptr)(status, err); +} + +inline int MPI_Status_get_source(MPI_Status *status, int *source) { + return (*MPIABI_Status_get_source_ptr)(status, source); +} + +inline int MPI_Status_get_tag(MPI_Status *status, int *tag) { + return (*MPIABI_Status_get_tag_ptr)(status, tag); +} + +inline int MPI_Test(MPI_Request *request, int *flag, MPI_Status *status) { + return (*MPIABI_Test_ptr)(request, flag, status); +} + +inline int MPI_Test_cancelled(const MPI_Status *status, int *flag) { + return (*MPIABI_Test_cancelled_ptr)(status, flag); +} + +inline int MPI_Testall(int count, MPI_Request array_of_requests[], int *flag, + MPI_Status array_of_statuses[]) { + return (*MPIABI_Testall_ptr)(count, array_of_requests, flag, + array_of_statuses); +} + +inline int MPI_Testany(int count, MPI_Request array_of_requests[], int *index, + int *flag, MPI_Status *status) { + return (*MPIABI_Testany_ptr)(count, array_of_requests, index, flag, status); +} + +inline int MPI_Testsome(int incount, MPI_Request array_of_requests[], + int *outcount, int array_of_indices[], + MPI_Status array_of_statuses[]) { + return (*MPIABI_Testsome_ptr)(incount, array_of_requests, outcount, + array_of_indices, array_of_statuses); +} + +inline int MPI_Wait(MPI_Request *request, MPI_Status *status) { + return (*MPIABI_Wait_ptr)(request, status); +} + +inline int MPI_Waitall(int count, MPI_Request array_of_requests[], + MPI_Status array_of_statuses[]) { + return (*MPIABI_Waitall_ptr)(count, array_of_requests, array_of_statuses); +} + +inline int MPI_Waitany(int count, MPI_Request array_of_requests[], int *index, + MPI_Status *status) { + return (*MPIABI_Waitany_ptr)(count, array_of_requests, index, status); +} + +inline int MPI_Waitsome(int incount, MPI_Request array_of_requests[], + int *outcount, int array_of_indices[], + MPI_Status array_of_statuses[]) { + return (*MPIABI_Waitsome_ptr)(incount, array_of_requests, outcount, + array_of_indices, array_of_statuses); +} + +// A.3.2 Partitioned Communication C Bindings + +inline int MPI_Parrived(MPI_Request request, int partition, int *flag) { + return (*MPIABI_Parrived_ptr)(request, partition, flag); +} + +inline int MPI_Pready(int partition, MPI_Request request) { + return (*MPIABI_Pready_ptr)(partition, request); +} + +inline int MPI_Pready_list(int length, const int array_of_partitions[], + MPI_Request request) { + return (*MPIABI_Pready_list_ptr)(length, array_of_partitions, request); +} + +inline int MPI_Pready_range(int partition_low, int partition_high, + MPI_Request request) { + return (*MPIABI_Pready_range_ptr)(partition_low, partition_high, request); +} + +inline int MPI_Precv_init(void *buf, int partitions, MPI_Count count, + MPI_Datatype datatype, int source, int tag, + MPI_Comm comm, MPI_Info info, MPI_Request *request) { + return (*MPIABI_Precv_init_ptr)(buf, partitions, count, datatype, source, tag, + comm, info, request); +} + +inline int MPI_Psend_init(const void *buf, int partitions, MPI_Count count, + MPI_Datatype datatype, int dest, int tag, + MPI_Comm comm, MPI_Info info, MPI_Request *request) { + return (*MPIABI_Psend_init_ptr)(buf, partitions, count, datatype, dest, tag, + comm, info, request); +} + +// A.3.3 Datatypes C Bindings + +inline MPI_Aint MPI_Aint_add(MPI_Aint base, MPI_Aint disp) { + return (*MPIABI_Aint_add_ptr)(base, disp); +} + +inline MPI_Aint MPI_Aint_diff(MPI_Aint addr1, MPI_Aint addr2) { + return (*MPIABI_Aint_diff_ptr)(addr1, addr2); +} + +inline int MPI_Get_address(const void *location, MPI_Aint *address) { + return (*MPIABI_Get_address_ptr)(location, address); +} + +inline int MPI_Get_elements(const MPI_Status *status, MPI_Datatype datatype, + int *count) { + return (*MPIABI_Get_elements_ptr)(status, datatype, count); +} + +inline int MPI_Get_elements_c(const MPI_Status *status, MPI_Datatype datatype, + MPI_Count *count) { + return (*MPIABI_Get_elements_c_ptr)(status, datatype, count); +} + +inline int MPI_Pack(const void *inbuf, int incount, MPI_Datatype datatype, + void *outbuf, int outsize, int *position, MPI_Comm comm) { + return (*MPIABI_Pack_ptr)(inbuf, incount, datatype, outbuf, outsize, position, + comm); +} + +inline int MPI_Pack_c(const void *inbuf, MPI_Count incount, + MPI_Datatype datatype, void *outbuf, MPI_Count outsize, + MPI_Count *position, MPI_Comm comm) { + return (*MPIABI_Pack_c_ptr)(inbuf, incount, datatype, outbuf, outsize, + position, comm); +} + +inline int MPI_Pack_external(const char datarep[], const void *inbuf, + int incount, MPI_Datatype datatype, void *outbuf, + MPI_Aint outsize, MPI_Aint *position) { + return (*MPIABI_Pack_external_ptr)(datarep, inbuf, incount, datatype, outbuf, + outsize, position); +} + +inline int MPI_Pack_external_c(const char datarep[], const void *inbuf, + MPI_Count incount, MPI_Datatype datatype, + void *outbuf, MPI_Count outsize, + MPI_Count *position) { + return (*MPIABI_Pack_external_c_ptr)(datarep, inbuf, incount, datatype, + outbuf, outsize, position); +} + +inline int MPI_Pack_external_size(const char datarep[], MPI_Count incount, + MPI_Datatype datatype, MPI_Count *size) { + return (*MPIABI_Pack_external_size_ptr)(datarep, incount, datatype, size); +} + +inline int MPI_Pack_external_size_c(const char datarep[], MPI_Count incount, + MPI_Datatype datatype, MPI_Aint *size) { + return (*MPIABI_Pack_external_size_c_ptr)(datarep, incount, datatype, size); +} + +inline int MPI_Pack_size(int incount, MPI_Datatype datatype, MPI_Comm comm, + int *size) { + return (*MPIABI_Pack_size_ptr)(incount, datatype, comm, size); +} + +inline int MPI_Pack_size_c(MPI_Count incount, MPI_Datatype datatype, + MPI_Comm comm, MPI_Count *size) { + return (*MPIABI_Pack_size_c_ptr)(incount, datatype, comm, size); +} + +inline int MPI_Type_commit(MPI_Datatype *datatype) { + return (*MPIABI_Type_commit_ptr)(datatype); +} + +inline int MPI_Type_contiguous(int count, MPI_Datatype oldtype, + MPI_Datatype *newtype) { + return (*MPIABI_Type_contiguous_ptr)(count, oldtype, newtype); +} + +inline int MPI_Type_contiguous_c(MPI_Count count, MPI_Datatype oldtype, + MPI_Datatype *newtype) { + return (*MPIABI_Type_contiguous_c_ptr)(count, oldtype, newtype); +} + +inline int MPI_Type_create_darray(int size, int rank, int ndims, + const int array_of_gsizes[], + const int array_of_distribs[], + const int array_of_dargs[], + const int array_of_psizes[], int order, + MPI_Datatype oldtype, MPI_Datatype *newtype) { + return (*MPIABI_Type_create_darray_ptr)( + size, rank, ndims, array_of_gsizes, array_of_distribs, array_of_dargs, + array_of_psizes, order, oldtype, newtype); +} + +inline int MPI_Type_create_darray_c(int size, int rank, int ndims, + const MPI_Count array_of_gsizes[], + const int array_of_distribs[], + const int array_of_dargs[], + const int array_of_psizes[], int order, + MPI_Datatype oldtype, + MPI_Datatype *newtype) { + return (*MPIABI_Type_create_darray_c_ptr)( + size, rank, ndims, array_of_gsizes, array_of_distribs, array_of_dargs, + array_of_psizes, order, oldtype, newtype); +} + +inline int MPI_Type_create_hindexed(int count, + const int array_of_blocklengths[], + const MPI_Aint array_of_displacements[], + MPI_Datatype oldtype, + MPI_Datatype *newtype) { + return (*MPIABI_Type_create_hindexed_ptr)( + count, array_of_blocklengths, array_of_displacements, oldtype, newtype); +} + +inline int +MPI_Type_create_hindexed_block(int count, int blocklength, + const MPI_Aint array_of_displacements[], + MPI_Datatype oldtype, MPI_Datatype *newtype) { + return (*MPIABI_Type_create_hindexed_block_ptr)( + count, blocklength, array_of_displacements, oldtype, newtype); +} + +inline int +MPI_Type_create_hindexed_block_c(MPI_Count count, MPI_Count blocklength, + const MPI_Count array_of_displacements[], + MPI_Datatype oldtype, MPI_Datatype *newtype) { + return (*MPIABI_Type_create_hindexed_block_c_ptr)( + count, blocklength, array_of_displacements, oldtype, newtype); +} + +inline int MPI_Type_create_hindexed_c(MPI_Count count, + const MPI_Count array_of_blocklengths[], + const MPI_Count array_of_displacements[], + MPI_Datatype oldtype, + MPI_Datatype *newtype) { + return (*MPIABI_Type_create_hindexed_c_ptr)( + count, array_of_blocklengths, array_of_displacements, oldtype, newtype); +} + +inline int MPI_Type_create_hvector(int count, int blocklength, MPI_Aint stride, + MPI_Datatype oldtype, + MPI_Datatype *newtype) { + return (*MPIABI_Type_create_hvector_ptr)(count, blocklength, stride, oldtype, + newtype); +} + +inline int MPI_Type_create_hvector_c(MPI_Count count, MPI_Count blocklength, + MPI_Count stride, MPI_Datatype oldtype, + MPI_Datatype *newtype) { + return (*MPIABI_Type_create_hvector_c_ptr)(count, blocklength, stride, + oldtype, newtype); +} + +inline int MPI_Type_create_indexed_block(int count, int blocklength, + const int array_of_displacements[], + MPI_Datatype oldtype, + MPI_Datatype *newtype) { + return (*MPIABI_Type_create_indexed_block_ptr)( + count, blocklength, array_of_displacements, oldtype, newtype); +} + +inline int +MPI_Type_create_indexed_block_c(MPI_Count count, MPI_Count blocklength, + const MPI_Count array_of_displacements[], + MPI_Datatype oldtype, MPI_Datatype *newtype) { + return (*MPIABI_Type_create_indexed_block_c_ptr)( + count, blocklength, array_of_displacements, oldtype, newtype); +} + +inline int MPI_Type_create_resized(MPI_Datatype oldtype, MPI_Aint lb, + MPI_Aint extent, MPI_Datatype *newtype) { + return (*MPIABI_Type_create_resized_ptr)(oldtype, lb, extent, newtype); +} + +inline int MPI_Type_create_resized_c(MPI_Datatype oldtype, MPI_Count lb, + MPI_Count extent, MPI_Datatype *newtype) { + return (*MPIABI_Type_create_resized_c_ptr)(oldtype, lb, extent, newtype); +} + +inline int MPI_Type_create_struct(int count, const int array_of_blocklengths[], + const MPI_Aint array_of_displacements[], + const MPI_Datatype array_of_types[], + MPI_Datatype *newtype) { + return (*MPIABI_Type_create_struct_ptr)(count, array_of_blocklengths, + array_of_displacements, + array_of_types, newtype); +} + +inline int MPI_Type_create_struct_c(MPI_Count count, + const MPI_Count array_of_blocklengths[], + const MPI_Count array_of_displacements[], + const MPI_Datatype array_of_types[], + MPI_Datatype *newtype) { + return (*MPIABI_Type_create_struct_c_ptr)(count, array_of_blocklengths, + array_of_displacements, + array_of_types, newtype); +} + +inline int MPI_Type_create_subarray(int ndims, const int array_of_sizes[], + const int array_of_subsizes[], + const int array_of_starts[], int order, + MPI_Datatype oldtype, + MPI_Datatype *newtype) { + return (*MPIABI_Type_create_subarray_ptr)(ndims, array_of_sizes, + array_of_subsizes, array_of_starts, + order, oldtype, newtype); +} + +inline int MPI_Type_create_subarray_c(int ndims, + const MPI_Count array_of_sizes[], + const MPI_Count array_of_subsizes[], + const MPI_Count array_of_starts[], + int order, MPI_Datatype oldtype, + MPI_Datatype *newtype) { + return (*MPIABI_Type_create_subarray_c_ptr)( + ndims, array_of_sizes, array_of_subsizes, array_of_starts, order, oldtype, + newtype); +} + +inline int MPI_Type_dup(MPI_Datatype oldtype, MPI_Datatype *newtype) { + return (*MPIABI_Type_dup_ptr)(oldtype, newtype); +} + +inline int MPI_Type_free(MPI_Datatype *datatype) { + return (*MPIABI_Type_free_ptr)(datatype); +} + +inline int MPI_Type_get_contents(MPI_Datatype datatype, int max_integers, + int max_addresses, int max_datatypes, + int array_of_integers[], + MPI_Aint array_of_addresses[], + MPI_Datatype array_of_datatypes[]) { + return (*MPIABI_Type_get_contents_ptr)( + datatype, max_integers, max_addresses, max_datatypes, array_of_integers, + array_of_addresses, array_of_datatypes); +} + +inline int MPI_Type_get_contents_c( + MPI_Datatype datatype, MPI_Count max_integers, MPI_Count max_addresses, + MPI_Count max_large_counts, MPI_Count max_datatypes, + int array_of_integers[], MPI_Aint array_of_addresses[], + MPI_Count array_of_large_counts[], MPI_Datatype array_of_datatypes[]) { + return (*MPIABI_Type_get_contents_c_ptr)( + datatype, max_integers, max_addresses, max_large_counts, max_datatypes, + array_of_integers, array_of_addresses, array_of_large_counts, + array_of_datatypes); +} + +inline int MPI_Type_get_envelope(MPI_Datatype datatype, int *num_integers, + int *num_addresses, int *num_datatypes, + int *combiner) { + return (*MPIABI_Type_get_envelope_ptr)(datatype, num_integers, num_addresses, + num_datatypes, combiner); +} + +inline int MPI_Type_get_envelope_c(MPI_Datatype datatype, + MPI_Count *num_integers, + MPI_Count *num_addresses, + MPI_Count *num_large_counts, + MPI_Count *num_datatypes, int *combiner) { + return (*MPIABI_Type_get_envelope_c_ptr)(datatype, num_integers, + num_addresses, num_large_counts, + num_datatypes, combiner); +} + +inline int MPI_Type_get_extent(MPI_Datatype datatype, MPI_Aint *lb, + MPI_Aint *extent) { + return (*MPIABI_Type_get_extent_ptr)(datatype, lb, extent); +} + +inline int MPI_Type_get_extent_c(MPI_Datatype datatype, MPI_Count *lb, + MPI_Count *extent) { + return (*MPIABI_Type_get_extent_c_ptr)(datatype, lb, extent); +} + +inline int MPI_Type_get_true_extent(MPI_Datatype datatype, MPI_Aint *true_lb, + MPI_Aint *true_extent) { + return (*MPIABI_Type_get_true_extent_ptr)(datatype, true_lb, true_extent); +} + +inline int MPI_Type_get_true_extent_c(MPI_Datatype datatype, MPI_Count *true_lb, + MPI_Count *true_extent) { + return (*MPIABI_Type_get_true_extent_c_ptr)(datatype, true_lb, true_extent); +} + +inline int MPI_Type_indexed(int count, const int array_of_blocklengths[], + const int array_of_displacements[], + MPI_Datatype oldtype, MPI_Datatype *newtype) { + return (*MPIABI_Type_indexed_ptr)(count, array_of_blocklengths, + array_of_displacements, oldtype, newtype); +} + +inline int MPI_Type_indexed_c(MPI_Count count, + const MPI_Count array_of_blocklengths[], + const MPI_Count array_of_displacements[], + MPI_Datatype oldtype, MPI_Datatype *newtype) { + return (*MPIABI_Type_indexed_c_ptr)(count, array_of_blocklengths, + array_of_displacements, oldtype, newtype); +} + +inline int MPI_Type_size(MPI_Datatype datatype, int *size) { + return (*MPIABI_Type_size_ptr)(datatype, size); +} + +inline int MPI_Type_size_c(MPI_Datatype datatype, MPI_Count *size) { + return (*MPIABI_Type_size_c_ptr)(datatype, size); +} + +inline int MPI_Type_vector(int count, int blocklength, int stride, + MPI_Datatype oldtype, MPI_Datatype *newtype) { + return (*MPIABI_Type_vector_ptr)(count, blocklength, stride, oldtype, + newtype); +} + +inline int MPI_Type_vector_c(MPI_Count count, MPI_Count blocklength, + MPI_Count stride, MPI_Datatype oldtype, + MPI_Datatype *newtype) { + return (*MPIABI_Type_vector_c_ptr)(count, blocklength, stride, oldtype, + newtype); +} + +inline int MPI_Unpack(const void *inbuf, int insize, int *position, + void *outbuf, int outcount, MPI_Datatype datatype, + MPI_Comm comm) { + return (*MPIABI_Unpack_ptr)(inbuf, insize, position, outbuf, outcount, + datatype, comm); +} + +inline int MPI_Unpack_c(const void *inbuf, MPI_Count insize, + MPI_Count *position, void *outbuf, MPI_Count outcount, + MPI_Datatype datatype, MPI_Comm comm) { + return (*MPIABI_Unpack_c_ptr)(inbuf, insize, position, outbuf, outcount, + datatype, comm); +} + +inline int MPI_Unpack_external(const char datarep[], const void *inbuf, + MPI_Aint insize, MPI_Aint *position, + void *outbuf, int outcount, + MPI_Datatype datatype) { + return (*MPIABI_Unpack_external_ptr)(datarep, inbuf, insize, position, outbuf, + outcount, datatype); +} + +inline int MPI_Unpack_external_c(const char datarep[], const void *inbuf, + MPI_Count insize, MPI_Count *position, + void *outbuf, MPI_Count outcount, + MPI_Datatype datatype) { + return (*MPIABI_Unpack_external_c_ptr)(datarep, inbuf, insize, position, + outbuf, outcount, datatype); +} + +// A.3.4 Collective Communication C Bindings + +inline int MPI_Allgather(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, MPI_Comm comm) { + return (*MPIABI_Allgather_ptr)(sendbuf, sendcount, sendtype, recvbuf, + recvcount, recvtype, comm); +} + +inline int MPI_Allgather_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + MPI_Count recvcount, MPI_Datatype recvtype, + MPI_Comm comm) { + return (*MPIABI_Allgather_c_ptr)(sendbuf, sendcount, sendtype, recvbuf, + recvcount, recvtype, comm); +} + +inline int MPI_Allgather_init(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, + MPI_Comm comm, MPI_Info info, + MPI_Request *request) { + return (*MPIABI_Allgather_init_ptr)(sendbuf, sendcount, sendtype, recvbuf, + recvcount, recvtype, comm, info, request); +} + +inline int MPI_Allgather_init_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + MPI_Count recvcount, MPI_Datatype recvtype, + MPI_Comm comm, MPI_Info info, + MPI_Request *request) { + return (*MPIABI_Allgather_init_c_ptr)(sendbuf, sendcount, sendtype, recvbuf, + recvcount, recvtype, comm, info, + request); +} + +inline int MPI_Allgatherv(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPI_Datatype recvtype, MPI_Comm comm) { + return (*MPIABI_Allgatherv_ptr)(sendbuf, sendcount, sendtype, recvbuf, + recvcounts, displs, recvtype, comm); +} + +inline int MPI_Allgatherv_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + const MPI_Count recvcounts[], + const MPI_Aint displs[], MPI_Datatype recvtype, + MPI_Comm comm) { + return (*MPIABI_Allgatherv_c_ptr)(sendbuf, sendcount, sendtype, recvbuf, + recvcounts, displs, recvtype, comm); +} + +inline int MPI_Allgatherv_init(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPI_Datatype recvtype, MPI_Comm comm, + MPI_Info info, MPI_Request *request) { + return (*MPIABI_Allgatherv_init_ptr)(sendbuf, sendcount, sendtype, recvbuf, + recvcounts, displs, recvtype, comm, info, + request); +} + +inline int MPI_Allgatherv_init_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + const MPI_Count recvcounts[], + const MPI_Aint displs[], MPI_Datatype recvtype, + MPI_Comm comm, MPI_Info info, + MPI_Request *request) { + return (*MPIABI_Allgatherv_init_c_ptr)(sendbuf, sendcount, sendtype, recvbuf, + recvcounts, displs, recvtype, comm, + info, request); +} + +inline int MPI_Allreduce(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) { + return (*MPIABI_Allreduce_ptr)(sendbuf, recvbuf, count, datatype, op, comm); +} + +inline int MPI_Allreduce_c(const void *sendbuf, void *recvbuf, MPI_Count count, + MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) { + return (*MPIABI_Allreduce_c_ptr)(sendbuf, recvbuf, count, datatype, op, comm); +} + +inline int MPI_Allreduce_init(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, + MPI_Info info, MPI_Request *request) { + return (*MPIABI_Allreduce_init_ptr)(sendbuf, recvbuf, count, datatype, op, + comm, info, request); +} + +inline int MPI_Allreduce_init_c(const void *sendbuf, void *recvbuf, + MPI_Count count, MPI_Datatype datatype, + MPI_Op op, MPI_Comm comm, MPI_Info info, + MPI_Request *request) { + return (*MPIABI_Allreduce_init_c_ptr)(sendbuf, recvbuf, count, datatype, op, + comm, info, request); +} + +inline int MPI_Alltoall(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, MPI_Comm comm) { + return (*MPIABI_Alltoall_ptr)(sendbuf, sendcount, sendtype, recvbuf, + recvcount, recvtype, comm); +} + +inline int MPI_Alltoall_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + MPI_Count recvcount, MPI_Datatype recvtype, + MPI_Comm comm) { + return (*MPIABI_Alltoall_c_ptr)(sendbuf, sendcount, sendtype, recvbuf, + recvcount, recvtype, comm); +} + +inline int MPI_Alltoall_init(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, + MPI_Comm comm, MPI_Info info, + MPI_Request *request) { + return (*MPIABI_Alltoall_init_ptr)(sendbuf, sendcount, sendtype, recvbuf, + recvcount, recvtype, comm, info, request); +} + +inline int MPI_Alltoall_init_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + MPI_Count recvcount, MPI_Datatype recvtype, + MPI_Comm comm, MPI_Info info, + MPI_Request *request) { + return (*MPIABI_Alltoall_init_c_ptr)(sendbuf, sendcount, sendtype, recvbuf, + recvcount, recvtype, comm, info, + request); +} + +inline int MPI_Alltoallv(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], + const int rdispls[], MPI_Datatype recvtype, + MPI_Comm comm) { + return (*MPIABI_Alltoallv_ptr)(sendbuf, sendcounts, sdispls, sendtype, + recvbuf, recvcounts, rdispls, recvtype, comm); +} + +inline int MPI_Alltoallv_c(const void *sendbuf, const MPI_Count sendcounts[], + const MPI_Aint sdispls[], MPI_Datatype sendtype, + void *recvbuf, const MPI_Count recvcounts[], + const MPI_Aint rdispls[], MPI_Datatype recvtype, + MPI_Comm comm) { + return (*MPIABI_Alltoallv_c_ptr)(sendbuf, sendcounts, sdispls, sendtype, + recvbuf, recvcounts, rdispls, recvtype, + comm); +} + +inline int MPI_Alltoallv_init(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], + const int rdispls[], MPI_Datatype recvtype, + MPI_Comm comm, MPI_Info info, + MPI_Request *request) { + return (*MPIABI_Alltoallv_init_ptr)(sendbuf, sendcounts, sdispls, sendtype, + recvbuf, recvcounts, rdispls, recvtype, + comm, info, request); +} + +inline int MPI_Alltoallv_init_c(const void *sendbuf, + const MPI_Count sendcounts[], + const MPI_Aint sdispls[], MPI_Datatype sendtype, + void *recvbuf, const MPI_Count recvcounts[], + const MPI_Aint rdispls[], MPI_Datatype recvtype, + MPI_Comm comm, MPI_Info info, + MPI_Request *request) { + return (*MPIABI_Alltoallv_init_c_ptr)(sendbuf, sendcounts, sdispls, sendtype, + recvbuf, recvcounts, rdispls, recvtype, + comm, info, request); +} + +inline int 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[], + MPI_Comm comm) { + return (*MPIABI_Alltoallw_ptr)(sendbuf, sendcounts, sdispls, sendtypes, + recvbuf, recvcounts, rdispls, recvtypes, comm); +} + +inline int MPI_Alltoallw_c(const void *sendbuf, const MPI_Count sendcounts[], + const MPI_Aint sdispls[], + const MPI_Datatype sendtypes[], void *recvbuf, + const MPI_Count recvcounts[], + const MPI_Aint rdispls[], + const MPI_Datatype recvtypes[], MPI_Comm comm) { + return (*MPIABI_Alltoallw_c_ptr)(sendbuf, sendcounts, sdispls, sendtypes, + recvbuf, recvcounts, rdispls, recvtypes, + comm); +} + +inline int MPI_Alltoallw_init(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[], MPI_Comm comm, + MPI_Info info, MPI_Request *request) { + return (*MPIABI_Alltoallw_init_ptr)(sendbuf, sendcounts, sdispls, sendtypes, + recvbuf, recvcounts, rdispls, recvtypes, + comm, info, request); +} + +inline int +MPI_Alltoallw_init_c(const void *sendbuf, const MPI_Count sendcounts[], + const MPI_Aint sdispls[], const MPI_Datatype sendtypes[], + void *recvbuf, const MPI_Count recvcounts[], + const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], + MPI_Comm comm, MPI_Info info, MPI_Request *request) { + return (*MPIABI_Alltoallw_init_c_ptr)(sendbuf, sendcounts, sdispls, sendtypes, + recvbuf, recvcounts, rdispls, recvtypes, + comm, info, request); +} + +inline int MPI_Barrier(MPI_Comm comm) { return (*MPIABI_Barrier_ptr)(comm); } + +inline int MPI_Barrier_init(MPI_Comm comm, MPI_Info info, + MPI_Request *request) { + return (*MPIABI_Barrier_init_ptr)(comm, info, request); +} + +inline int MPI_Bcast(void *buffer, int count, MPI_Datatype datatype, int root, + MPI_Comm comm) { + return (*MPIABI_Bcast_ptr)(buffer, count, datatype, root, comm); +} + +inline int MPI_Bcast_c(void *buffer, MPI_Count count, MPI_Datatype datatype, + int root, MPI_Comm comm) { + return (*MPIABI_Bcast_c_ptr)(buffer, count, datatype, root, comm); +} + +inline int MPI_Bcast_init(void *buffer, int count, MPI_Datatype datatype, + int root, MPI_Comm comm, MPI_Info info, + MPI_Request *request) { + return (*MPIABI_Bcast_init_ptr)(buffer, count, datatype, root, comm, info, + request); +} + +inline int MPI_Bcast_init_c(void *buffer, MPI_Count count, + MPI_Datatype datatype, int root, MPI_Comm comm, + MPI_Info info, MPI_Request *request) { + return (*MPIABI_Bcast_init_c_ptr)(buffer, count, datatype, root, comm, info, + request); +} + +inline int MPI_Exscan(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) { + return (*MPIABI_Exscan_ptr)(sendbuf, recvbuf, count, datatype, op, comm); +} + +inline int MPI_Exscan_c(const void *sendbuf, void *recvbuf, MPI_Count count, + MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) { + return (*MPIABI_Exscan_c_ptr)(sendbuf, recvbuf, count, datatype, op, comm); +} + +inline int MPI_Exscan_init(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, + MPI_Info info, MPI_Request *request) { + return (*MPIABI_Exscan_init_ptr)(sendbuf, recvbuf, count, datatype, op, comm, + info, request); +} + +inline int MPI_Exscan_init_c(const void *sendbuf, void *recvbuf, + MPI_Count count, MPI_Datatype datatype, MPI_Op op, + MPI_Comm comm, MPI_Info info, + MPI_Request *request) { + return (*MPIABI_Exscan_init_c_ptr)(sendbuf, recvbuf, count, datatype, op, + comm, info, request); +} + +inline int MPI_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + int root, MPI_Comm comm) { + return (*MPIABI_Gather_ptr)(sendbuf, sendcount, sendtype, recvbuf, recvcount, + recvtype, root, comm); +} + +inline int MPI_Gather_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + MPI_Count recvcount, MPI_Datatype recvtype, int root, + MPI_Comm comm) { + return (*MPIABI_Gather_c_ptr)(sendbuf, sendcount, sendtype, recvbuf, + recvcount, recvtype, root, comm); +} + +inline int MPI_Gather_init(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, int root, MPI_Comm comm, + MPI_Info info, MPI_Request *request) { + return (*MPIABI_Gather_init_ptr)(sendbuf, sendcount, sendtype, recvbuf, + recvcount, recvtype, root, comm, info, + request); +} + +inline int MPI_Gather_init_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + MPI_Count recvcount, MPI_Datatype recvtype, + int root, MPI_Comm comm, MPI_Info info, + MPI_Request *request) { + return (*MPIABI_Gather_init_c_ptr)(sendbuf, sendcount, sendtype, recvbuf, + recvcount, recvtype, root, comm, info, + request); +} + +inline int MPI_Gatherv(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPI_Datatype recvtype, int root, MPI_Comm comm) { + return (*MPIABI_Gatherv_ptr)(sendbuf, sendcount, sendtype, recvbuf, + recvcounts, displs, recvtype, root, comm); +} + +inline int MPI_Gatherv_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + const MPI_Count recvcounts[], const MPI_Aint displs[], + MPI_Datatype recvtype, int root, MPI_Comm comm) { + return (*MPIABI_Gatherv_c_ptr)(sendbuf, sendcount, sendtype, recvbuf, + recvcounts, displs, recvtype, root, comm); +} + +inline int MPI_Gatherv_init(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPI_Datatype recvtype, int root, MPI_Comm comm, + MPI_Info info, MPI_Request *request) { + return (*MPIABI_Gatherv_init_ptr)(sendbuf, sendcount, sendtype, recvbuf, + recvcounts, displs, recvtype, root, comm, + info, request); +} + +inline int MPI_Gatherv_init_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + const MPI_Count recvcounts[], + const MPI_Aint displs[], MPI_Datatype recvtype, + int root, MPI_Comm comm, MPI_Info info, + MPI_Request *request) { + return (*MPIABI_Gatherv_init_c_ptr)(sendbuf, sendcount, sendtype, recvbuf, + recvcounts, displs, recvtype, root, comm, + info, request); +} + +inline int MPI_Iallgather(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, MPI_Comm comm, + MPI_Request *request) { + return (*MPIABI_Iallgather_ptr)(sendbuf, sendcount, sendtype, recvbuf, + recvcount, recvtype, comm, request); +} + +inline int MPI_Iallgather_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + MPI_Count recvcount, MPI_Datatype recvtype, + MPI_Comm comm, MPI_Request *request) { + return (*MPIABI_Iallgather_c_ptr)(sendbuf, sendcount, sendtype, recvbuf, + recvcount, recvtype, comm, request); +} + +inline int MPI_Iallgatherv(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPI_Datatype recvtype, MPI_Comm comm, + MPI_Request *request) { + return (*MPIABI_Iallgatherv_ptr)(sendbuf, sendcount, sendtype, recvbuf, + recvcounts, displs, recvtype, comm, request); +} + +inline int MPI_Iallgatherv_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + const MPI_Count recvcounts[], + const MPI_Aint displs[], MPI_Datatype recvtype, + MPI_Comm comm, MPI_Request *request) { + return (*MPIABI_Iallgatherv_c_ptr)(sendbuf, sendcount, sendtype, recvbuf, + recvcounts, displs, recvtype, comm, + request); +} + +inline int MPI_Iallreduce(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, + MPI_Request *request) { + return (*MPIABI_Iallreduce_ptr)(sendbuf, recvbuf, count, datatype, op, comm, + request); +} + +inline int MPI_Iallreduce_c(const void *sendbuf, void *recvbuf, MPI_Count count, + MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, + MPI_Request *request) { + return (*MPIABI_Iallreduce_c_ptr)(sendbuf, recvbuf, count, datatype, op, comm, + request); +} + +inline int MPI_Ialltoall(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, MPI_Comm comm, + MPI_Request *request) { + return (*MPIABI_Ialltoall_ptr)(sendbuf, sendcount, sendtype, recvbuf, + recvcount, recvtype, comm, request); +} + +inline int MPI_Ialltoall_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + MPI_Count recvcount, MPI_Datatype recvtype, + MPI_Comm comm, MPI_Request *request) { + return (*MPIABI_Ialltoall_c_ptr)(sendbuf, sendcount, sendtype, recvbuf, + recvcount, recvtype, comm, request); +} + +inline int 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, + MPI_Comm comm, MPI_Request *request) { + return (*MPIABI_Ialltoallv_ptr)(sendbuf, sendcounts, sdispls, sendtype, + recvbuf, recvcounts, rdispls, recvtype, comm, + request); +} + +inline int MPI_Ialltoallv_c(const void *sendbuf, const MPI_Count sendcounts[], + const MPI_Aint sdispls[], MPI_Datatype sendtype, + void *recvbuf, const MPI_Count recvcounts[], + const MPI_Aint rdispls[], MPI_Datatype recvtype, + MPI_Comm comm, MPI_Request *request) { + return (*MPIABI_Ialltoallv_c_ptr)(sendbuf, sendcounts, sdispls, sendtype, + recvbuf, recvcounts, rdispls, recvtype, + comm, request); +} + +inline int 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[], + MPI_Comm comm, MPI_Request *request) { + return (*MPIABI_Ialltoallw_ptr)(sendbuf, sendcounts, sdispls, sendtypes, + recvbuf, recvcounts, rdispls, recvtypes, comm, + request); +} + +inline int MPI_Ialltoallw_c(const void *sendbuf, const MPI_Count sendcounts[], + const MPI_Aint sdispls[], + const MPI_Datatype sendtypes[], void *recvbuf, + const MPI_Count recvcounts[], + const MPI_Aint rdispls[], + const MPI_Datatype recvtypes[], MPI_Comm comm, + MPI_Request *request) { + return (*MPIABI_Ialltoallw_c_ptr)(sendbuf, sendcounts, sdispls, sendtypes, + recvbuf, recvcounts, rdispls, recvtypes, + comm, request); +} + +inline int MPI_Ibarrier(MPI_Comm comm, MPI_Request *request) { + return (*MPIABI_Ibarrier_ptr)(comm, request); +} + +inline int MPI_Ibcast(void *buffer, int count, MPI_Datatype datatype, int root, + MPI_Comm comm, MPI_Request *request) { + return (*MPIABI_Ibcast_ptr)(buffer, count, datatype, root, comm, request); +} + +inline int MPI_Ibcast_c(void *buffer, MPI_Count count, MPI_Datatype datatype, + int root, MPI_Comm comm, MPI_Request *request) { + return (*MPIABI_Ibcast_c_ptr)(buffer, count, datatype, root, comm, request); +} + +inline int MPI_Iexscan(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, + MPI_Request *request) { + return (*MPIABI_Iexscan_ptr)(sendbuf, recvbuf, count, datatype, op, comm, + request); +} + +inline int MPI_Iexscan_c(const void *sendbuf, void *recvbuf, MPI_Count count, + MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, + MPI_Request *request) { + return (*MPIABI_Iexscan_c_ptr)(sendbuf, recvbuf, count, datatype, op, comm, + request); +} + +inline int MPI_Igather(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, int root, MPI_Comm comm, + MPI_Request *request) { + return (*MPIABI_Igather_ptr)(sendbuf, sendcount, sendtype, recvbuf, recvcount, + recvtype, root, comm, request); +} + +inline int MPI_Igather_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + MPI_Count recvcount, MPI_Datatype recvtype, int root, + MPI_Comm comm, MPI_Request *request) { + return (*MPIABI_Igather_c_ptr)(sendbuf, sendcount, sendtype, recvbuf, + recvcount, recvtype, root, comm, request); +} + +inline int MPI_Igatherv(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPI_Datatype recvtype, int root, MPI_Comm comm, + MPI_Request *request) { + return (*MPIABI_Igatherv_ptr)(sendbuf, sendcount, sendtype, recvbuf, + recvcounts, displs, recvtype, root, comm, + request); +} + +inline int MPI_Igatherv_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + const MPI_Count recvcounts[], const MPI_Aint displs[], + MPI_Datatype recvtype, int root, MPI_Comm comm, + MPI_Request *request) { + return (*MPIABI_Igatherv_c_ptr)(sendbuf, sendcount, sendtype, recvbuf, + recvcounts, displs, recvtype, root, comm, + request); +} + +inline int MPI_Ireduce(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, int root, + MPI_Comm comm, MPI_Request *request) { + return (*MPIABI_Ireduce_ptr)(sendbuf, recvbuf, count, datatype, op, root, + comm, request); +} + +inline int MPI_Ireduce_c(const void *sendbuf, void *recvbuf, MPI_Count count, + MPI_Datatype datatype, MPI_Op op, int root, + MPI_Comm comm, MPI_Request *request) { + return (*MPIABI_Ireduce_c_ptr)(sendbuf, recvbuf, count, datatype, op, root, + comm, request); +} + +inline int MPI_Ireduce_scatter(const void *sendbuf, void *recvbuf, + const int recvcounts[], MPI_Datatype datatype, + MPI_Op op, MPI_Comm comm, MPI_Request *request) { + return (*MPIABI_Ireduce_scatter_ptr)(sendbuf, recvbuf, recvcounts, datatype, + op, comm, request); +} + +inline int MPI_Ireduce_scatter_block(const void *sendbuf, void *recvbuf, + int recvcount, MPI_Datatype datatype, + MPI_Op op, MPI_Comm comm, + MPI_Request *request) { + return (*MPIABI_Ireduce_scatter_block_ptr)(sendbuf, recvbuf, recvcount, + datatype, op, comm, request); +} + +inline int MPI_Ireduce_scatter_block_c(const void *sendbuf, void *recvbuf, + MPI_Count recvcount, + MPI_Datatype datatype, MPI_Op op, + MPI_Comm comm, MPI_Request *request) { + return (*MPIABI_Ireduce_scatter_block_c_ptr)(sendbuf, recvbuf, recvcount, + datatype, op, comm, request); +} + +inline int MPI_Ireduce_scatter_c(const void *sendbuf, void *recvbuf, + const MPI_Count recvcounts[], + MPI_Datatype datatype, MPI_Op op, + MPI_Comm comm, MPI_Request *request) { + return (*MPIABI_Ireduce_scatter_c_ptr)(sendbuf, recvbuf, recvcounts, datatype, + op, comm, request); +} + +inline int MPI_Iscan(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, + MPI_Request *request) { + return (*MPIABI_Iscan_ptr)(sendbuf, recvbuf, count, datatype, op, comm, + request); +} + +inline int MPI_Iscan_c(const void *sendbuf, void *recvbuf, MPI_Count count, + MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, + MPI_Request *request) { + return (*MPIABI_Iscan_c_ptr)(sendbuf, recvbuf, count, datatype, op, comm, + request); +} + +inline int MPI_Iscatter(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, int root, MPI_Comm comm, + MPI_Request *request) { + return (*MPIABI_Iscatter_ptr)(sendbuf, sendcount, sendtype, recvbuf, + recvcount, recvtype, root, comm, request); +} + +inline int MPI_Iscatter_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + MPI_Count recvcount, MPI_Datatype recvtype, int root, + MPI_Comm comm, MPI_Request *request) { + return (*MPIABI_Iscatter_c_ptr)(sendbuf, sendcount, sendtype, recvbuf, + recvcount, recvtype, root, comm, request); +} + +inline int MPI_Iscatterv(const void *sendbuf, const int sendcounts[], + const int displs[], MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + int root, MPI_Comm comm, MPI_Request *request) { + return (*MPIABI_Iscatterv_ptr)(sendbuf, sendcounts, displs, sendtype, recvbuf, + recvcount, recvtype, root, comm, request); +} + +inline int MPI_Iscatterv_c(const void *sendbuf, const MPI_Count sendcounts[], + const MPI_Aint displs[], MPI_Datatype sendtype, + void *recvbuf, MPI_Count recvcount, + MPI_Datatype recvtype, int root, MPI_Comm comm, + MPI_Request *request) { + return (*MPIABI_Iscatterv_c_ptr)(sendbuf, sendcounts, displs, sendtype, + recvbuf, recvcount, recvtype, root, comm, + request); +} + +inline int MPI_Op_commutative(MPI_Op op, int *commute) { + return (*MPIABI_Op_commutative_ptr)(op, commute); +} + +inline int MPI_Op_create(MPI_User_function *user_fn, int commute, MPI_Op *op) { + return (*MPIABI_Op_create_ptr)(user_fn, commute, op); +} + +inline int MPI_Op_create_c(MPI_User_function_c *user_fn, int commute, + MPI_Op *op) { + return (*MPIABI_Op_create_c_ptr)(user_fn, commute, op); +} + +inline int MPI_Op_free(MPI_Op *op) { return (*MPIABI_Op_free_ptr)(op); } + +inline int MPI_Reduce(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, int root, + MPI_Comm comm) { + return (*MPIABI_Reduce_ptr)(sendbuf, recvbuf, count, datatype, op, root, + comm); +} + +inline int MPI_Reduce_c(const void *sendbuf, void *recvbuf, MPI_Count count, + MPI_Datatype datatype, MPI_Op op, int root, + MPI_Comm comm) { + return (*MPIABI_Reduce_c_ptr)(sendbuf, recvbuf, count, datatype, op, root, + comm); +} + +inline int MPI_Reduce_init(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, int root, + MPI_Comm comm, MPI_Info info, MPI_Request *request) { + return (*MPIABI_Reduce_init_ptr)(sendbuf, recvbuf, count, datatype, op, root, + comm, info, request); +} + +inline int MPI_Reduce_init_c(const void *sendbuf, void *recvbuf, + MPI_Count count, MPI_Datatype datatype, MPI_Op op, + int root, MPI_Comm comm, MPI_Info info, + MPI_Request *request) { + return (*MPIABI_Reduce_init_c_ptr)(sendbuf, recvbuf, count, datatype, op, + root, comm, info, request); +} + +inline int MPI_Reduce_local(const void *inbuf, void *inoutbuf, int count, + MPI_Datatype datatype, MPI_Op op) { + return (*MPIABI_Reduce_local_ptr)(inbuf, inoutbuf, count, datatype, op); +} + +inline int MPI_Reduce_local_c(const void *inbuf, void *inoutbuf, + MPI_Count count, MPI_Datatype datatype, + MPI_Op op) { + return (*MPIABI_Reduce_local_c_ptr)(inbuf, inoutbuf, count, datatype, op); +} + +inline int MPI_Reduce_scatter(const void *sendbuf, void *recvbuf, + const int recvcounts[], MPI_Datatype datatype, + MPI_Op op, MPI_Comm comm) { + return (*MPIABI_Reduce_scatter_ptr)(sendbuf, recvbuf, recvcounts, datatype, + op, comm); +} + +inline int MPI_Reduce_scatter_block(const void *sendbuf, void *recvbuf, + int recvcount, MPI_Datatype datatype, + MPI_Op op, MPI_Comm comm) { + return (*MPIABI_Reduce_scatter_block_ptr)(sendbuf, recvbuf, recvcount, + datatype, op, comm); +} + +inline int MPI_Reduce_scatter_block_c(const void *sendbuf, void *recvbuf, + MPI_Count recvcount, + MPI_Datatype datatype, MPI_Op op, + MPI_Comm comm) { + return (*MPIABI_Reduce_scatter_block_c_ptr)(sendbuf, recvbuf, recvcount, + datatype, op, comm); +} + +inline int MPI_Reduce_scatter_block_init(const void *sendbuf, void *recvbuf, + int recvcount, MPI_Datatype datatype, + MPI_Op op, MPI_Comm comm, + MPI_Info info, MPI_Request *request) { + return (*MPIABI_Reduce_scatter_block_init_ptr)( + sendbuf, recvbuf, recvcount, datatype, op, comm, info, request); +} + +inline int MPI_Reduce_scatter_block_init_c(const void *sendbuf, void *recvbuf, + MPI_Count recvcount, + MPI_Datatype datatype, MPI_Op op, + MPI_Comm comm, MPI_Info info, + MPI_Request *request) { + return (*MPIABI_Reduce_scatter_block_init_c_ptr)( + sendbuf, recvbuf, recvcount, datatype, op, comm, info, request); +} + +inline int MPI_Reduce_scatter_c(const void *sendbuf, void *recvbuf, + const MPI_Count recvcounts[], + MPI_Datatype datatype, MPI_Op op, + MPI_Comm comm) { + return (*MPIABI_Reduce_scatter_c_ptr)(sendbuf, recvbuf, recvcounts, datatype, + op, comm); +} + +inline int MPI_Reduce_scatter_init(const void *sendbuf, void *recvbuf, + const int recvcounts[], + MPI_Datatype datatype, MPI_Op op, + MPI_Comm comm, MPI_Info info, + MPI_Request *request) { + return (*MPIABI_Reduce_scatter_init_ptr)(sendbuf, recvbuf, recvcounts, + datatype, op, comm, info, request); +} + +inline int MPI_Reduce_scatter_init_c(const void *sendbuf, void *recvbuf, + const MPI_Count recvcounts[], + MPI_Datatype datatype, MPI_Op op, + MPI_Comm comm, MPI_Info info, + MPI_Request *request) { + return (*MPIABI_Reduce_scatter_init_c_ptr)(sendbuf, recvbuf, recvcounts, + datatype, op, comm, info, request); +} + +inline int MPI_Scan(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) { + return (*MPIABI_Scan_ptr)(sendbuf, recvbuf, count, datatype, op, comm); +} + +inline int MPI_Scan_c(const void *sendbuf, void *recvbuf, MPI_Count count, + MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) { + return (*MPIABI_Scan_c_ptr)(sendbuf, recvbuf, count, datatype, op, comm); +} + +inline int MPI_Scan_init(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, + MPI_Info info, MPI_Request *request) { + return (*MPIABI_Scan_init_ptr)(sendbuf, recvbuf, count, datatype, op, comm, + info, request); +} + +inline int MPI_Scan_init_c(const void *sendbuf, void *recvbuf, MPI_Count count, + MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, + MPI_Info info, MPI_Request *request) { + return (*MPIABI_Scan_init_c_ptr)(sendbuf, recvbuf, count, datatype, op, comm, + info, request); +} + +inline int MPI_Scatter(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, int root, MPI_Comm comm) { + return (*MPIABI_Scatter_ptr)(sendbuf, sendcount, sendtype, recvbuf, recvcount, + recvtype, root, comm); +} + +inline int MPI_Scatter_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + MPI_Count recvcount, MPI_Datatype recvtype, int root, + MPI_Comm comm) { + return (*MPIABI_Scatter_c_ptr)(sendbuf, sendcount, sendtype, recvbuf, + recvcount, recvtype, root, comm); +} + +inline int MPI_Scatter_init(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, int root, MPI_Comm comm, + MPI_Info info, MPI_Request *request) { + return (*MPIABI_Scatter_init_ptr)(sendbuf, sendcount, sendtype, recvbuf, + recvcount, recvtype, root, comm, info, + request); +} + +inline int MPI_Scatter_init_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + MPI_Count recvcount, MPI_Datatype recvtype, + int root, MPI_Comm comm, MPI_Info info, + MPI_Request *request) { + return (*MPIABI_Scatter_init_c_ptr)(sendbuf, sendcount, sendtype, recvbuf, + recvcount, recvtype, root, comm, info, + request); +} + +inline int MPI_Scatterv(const void *sendbuf, const int sendcounts[], + const int displs[], MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + int root, MPI_Comm comm) { + return (*MPIABI_Scatterv_ptr)(sendbuf, sendcounts, displs, sendtype, recvbuf, + recvcount, recvtype, root, comm); +} + +inline int MPI_Scatterv_c(const void *sendbuf, const MPI_Count sendcounts[], + const MPI_Aint displs[], MPI_Datatype sendtype, + void *recvbuf, MPI_Count recvcount, + MPI_Datatype recvtype, int root, MPI_Comm comm) { + return (*MPIABI_Scatterv_c_ptr)(sendbuf, sendcounts, displs, sendtype, + recvbuf, recvcount, recvtype, root, comm); +} + +inline int MPI_Scatterv_init(const void *sendbuf, const int sendcounts[], + const int displs[], MPI_Datatype sendtype, + void *recvbuf, int recvcount, + MPI_Datatype recvtype, int root, MPI_Comm comm, + MPI_Info info, MPI_Request *request) { + return (*MPIABI_Scatterv_init_ptr)(sendbuf, sendcounts, displs, sendtype, + recvbuf, recvcount, recvtype, root, comm, + info, request); +} + +inline int MPI_Scatterv_init_c(const void *sendbuf, + const MPI_Count sendcounts[], + const MPI_Aint displs[], MPI_Datatype sendtype, + void *recvbuf, MPI_Count recvcount, + MPI_Datatype recvtype, int root, MPI_Comm comm, + MPI_Info info, MPI_Request *request) { + return (*MPIABI_Scatterv_init_c_ptr)(sendbuf, sendcounts, displs, sendtype, + recvbuf, recvcount, recvtype, root, comm, + info, request); +} + +inline int MPI_Type_get_value_index(MPI_Datatype value_type, + MPI_Datatype index_type, + MPI_Datatype *pair_type) { + return (*MPIABI_Type_get_value_index_ptr)(value_type, index_type, pair_type); +} + +// A.3.5 Groups, Contexts, Communicators, and Caching C Bindings + +inline int MPI_Comm_compare(MPI_Comm comm1, MPI_Comm comm2, int *result) { + return (*MPIABI_Comm_compare_ptr)(comm1, comm2, result); +} + +inline int MPI_Comm_create(MPI_Comm comm, MPI_Group group, MPI_Comm *newcomm) { + return (*MPIABI_Comm_create_ptr)(comm, group, newcomm); +} + +inline int MPI_Comm_create_from_group(MPI_Group group, const char *stringtag, + MPI_Info info, MPI_Errhandler errhandler, + MPI_Comm *newcomm) { + return (*MPIABI_Comm_create_from_group_ptr)(group, stringtag, info, + errhandler, newcomm); +} + +inline int MPI_Comm_create_group(MPI_Comm comm, MPI_Group group, int tag, + MPI_Comm *newcomm) { + return (*MPIABI_Comm_create_group_ptr)(comm, group, tag, newcomm); +} + +inline int +MPI_Comm_create_keyval(MPI_Comm_copy_attr_function *comm_copy_attr_fn, + MPI_Comm_delete_attr_function *comm_delete_attr_fn, + int *comm_keyval, void *extra_state) { + return (*MPIABI_Comm_create_keyval_ptr)( + comm_copy_attr_fn, comm_delete_attr_fn, comm_keyval, extra_state); +} + +inline int MPI_Comm_delete_attr(MPI_Comm comm, int comm_keyval) { + return (*MPIABI_Comm_delete_attr_ptr)(comm, comm_keyval); +} + +inline int MPI_Comm_dup(MPI_Comm comm, MPI_Comm *newcomm) { + return (*MPIABI_Comm_dup_ptr)(comm, newcomm); +} + +inline int MPI_Comm_dup_with_info(MPI_Comm comm, MPI_Info info, + MPI_Comm *newcomm) { + return (*MPIABI_Comm_dup_with_info_ptr)(comm, info, newcomm); +} + +inline int MPI_Comm_free(MPI_Comm *comm) { + return (*MPIABI_Comm_free_ptr)(comm); +} + +inline int MPI_Comm_get_name(MPI_Comm comm, char *comm_name, int *resultlen) { + return (*MPIABI_Comm_get_name_ptr)(comm, comm_name, resultlen); +} + +inline int MPI_Comm_free_keyval(int *comm_keyval) { + return (*MPIABI_Comm_free_keyval_ptr)(comm_keyval); +} + +inline int MPI_Comm_get_attr(MPI_Comm comm, int comm_keyval, + void *attribute_val, int *flag) { + return (*MPIABI_Comm_get_attr_ptr)(comm, comm_keyval, attribute_val, flag); +} + +inline int MPI_Comm_get_info(MPI_Comm comm, MPI_Info *info_used) { + return (*MPIABI_Comm_get_info_ptr)(comm, info_used); +} + +inline int MPI_Comm_group(MPI_Comm comm, MPI_Group *group) { + return (*MPIABI_Comm_group_ptr)(comm, group); +} + +inline int MPI_Comm_idup(MPI_Comm comm, MPI_Comm *newcomm, + MPI_Request *request) { + return (*MPIABI_Comm_idup_ptr)(comm, newcomm, request); +} + +inline int MPI_Comm_idup_with_info(MPI_Comm comm, MPI_Info info, + MPI_Comm *newcomm, MPI_Request *request) { + return (*MPIABI_Comm_idup_with_info_ptr)(comm, info, newcomm, request); +} + +inline int MPI_Comm_rank(MPI_Comm comm, int *rank) { + return (*MPIABI_Comm_rank_ptr)(comm, rank); +} + +inline int MPI_Comm_remote_group(MPI_Comm comm, MPI_Group *group) { + return (*MPIABI_Comm_remote_group_ptr)(comm, group); +} + +inline int MPI_Comm_remote_size(MPI_Comm comm, int *size) { + return (*MPIABI_Comm_remote_size_ptr)(comm, size); +} + +inline int MPI_Comm_set_attr(MPI_Comm comm, int comm_keyval, + void *attribute_val) { + return (*MPIABI_Comm_set_attr_ptr)(comm, comm_keyval, attribute_val); +} + +inline int MPI_Comm_set_info(MPI_Comm comm, MPI_Info info) { + return (*MPIABI_Comm_set_info_ptr)(comm, info); +} + +inline int MPI_Comm_set_name(MPI_Comm comm, const char *comm_name) { + return (*MPIABI_Comm_set_name_ptr)(comm, comm_name); +} + +inline int MPI_Comm_size(MPI_Comm comm, int *size) { + return (*MPIABI_Comm_size_ptr)(comm, size); +} + +inline int MPI_Comm_split(MPI_Comm comm, int color, int key, + MPI_Comm *newcomm) { + return (*MPIABI_Comm_split_ptr)(comm, color, key, newcomm); +} + +inline int MPI_Group_free(MPI_Group *group) { + return (*MPIABI_Group_free_ptr)(group); +} + +inline int MPI_Comm_split_type(MPI_Comm comm, int split_type, int key, + MPI_Info info, MPI_Comm *newcomm) { + return (*MPIABI_Comm_split_type_ptr)(comm, split_type, key, info, newcomm); +} + +inline int MPI_Comm_test_inter(MPI_Comm comm, int *flag) { + return (*MPIABI_Comm_test_inter_ptr)(comm, flag); +} + +inline int MPI_Group_compare(MPI_Group group1, MPI_Group group2, int *result) { + return (*MPIABI_Group_compare_ptr)(group1, group2, result); +} + +inline int MPI_Group_difference(MPI_Group group1, MPI_Group group2, + MPI_Group *newgroup) { + return (*MPIABI_Group_difference_ptr)(group1, group2, newgroup); +} + +inline int MPI_Group_excl(MPI_Group group, int n, const int ranks[], + MPI_Group *newgroup) { + return (*MPIABI_Group_excl_ptr)(group, n, ranks, newgroup); +} + +inline int MPI_Group_from_session_pset(MPI_Session session, + const char *pset_name, + MPI_Group *newgroup) { + return (*MPIABI_Group_from_session_pset_ptr)(session, pset_name, newgroup); +} + +inline int MPI_Group_incl(MPI_Group group, int n, const int ranks[], + MPI_Group *newgroup) { + return (*MPIABI_Group_incl_ptr)(group, n, ranks, newgroup); +} + +inline int MPI_Group_intersection(MPI_Group group1, MPI_Group group2, + MPI_Group *newgroup) { + return (*MPIABI_Group_intersection_ptr)(group1, group2, newgroup); +} + +inline int MPI_Group_range_excl(MPI_Group group, int n, int ranges[][3], + MPI_Group *newgroup) { + return (*MPIABI_Group_range_excl_ptr)(group, n, ranges, newgroup); +} + +inline int MPI_Group_range_incl(MPI_Group group, int n, int ranges[][3], + MPI_Group *newgroup) { + return (*MPIABI_Group_range_incl_ptr)(group, n, ranges, newgroup); +} + +inline int MPI_Group_rank(MPI_Group group, int *rank) { + return (*MPIABI_Group_rank_ptr)(group, rank); +} + +inline int MPI_Group_size(MPI_Group group, int *size) { + return (*MPIABI_Group_size_ptr)(group, size); +} + +inline int MPI_Group_translate_ranks(MPI_Group group1, int n, + const int ranks1[], MPI_Group group2, + int ranks2[]) { + return (*MPIABI_Group_translate_ranks_ptr)(group1, n, ranks1, group2, ranks2); +} + +inline int MPI_Group_union(MPI_Group group1, MPI_Group group2, + MPI_Group *newgroup) { + return (*MPIABI_Group_union_ptr)(group1, group2, newgroup); +} + +inline int MPI_Intercomm_create(MPI_Comm local_comm, int local_leader, + MPI_Comm peer_comm, int remote_leader, int tag, + MPI_Comm *newintercomm) { + return (*MPIABI_Intercomm_create_ptr)(local_comm, local_leader, peer_comm, + remote_leader, tag, newintercomm); +} + +inline int MPI_Intercomm_create_from_groups( + MPI_Group local_group, int local_leader, MPI_Group remote_group, + int remote_leader, const char *stringtag, MPI_Info info, + MPI_Errhandler errhandler, MPI_Comm *newintercomm) { + return (*MPIABI_Intercomm_create_from_groups_ptr)( + local_group, local_leader, remote_group, remote_leader, stringtag, info, + errhandler, newintercomm); +} + +inline int MPI_Intercomm_merge(MPI_Comm intercomm, int high, + MPI_Comm *newintracomm) { + return (*MPIABI_Intercomm_merge_ptr)(intercomm, high, newintracomm); +} + +inline int +MPI_Type_create_keyval(MPI_Type_copy_attr_function *type_copy_attr_fn, + MPI_Type_delete_attr_function *type_delete_attr_fn, + int *type_keyval, void *extra_state) { + return (*MPIABI_Type_create_keyval_ptr)( + type_copy_attr_fn, type_delete_attr_fn, type_keyval, extra_state); +} + +inline int MPI_Type_delete_attr(MPI_Datatype datatype, int type_keyval) { + return (*MPIABI_Type_delete_attr_ptr)(datatype, type_keyval); +} + +inline int MPI_Type_free_keyval(int *type_keyval) { + return (*MPIABI_Type_free_keyval_ptr)(type_keyval); +} + +inline int MPI_Type_get_attr(MPI_Datatype datatype, int type_keyval, + void *attribute_val, int *flag) { + return (*MPIABI_Type_get_attr_ptr)(datatype, type_keyval, attribute_val, + flag); +} + +inline int MPI_Type_get_name(MPI_Datatype datatype, char *type_name, + int *resultlen) { + return (*MPIABI_Type_get_name_ptr)(datatype, type_name, resultlen); +} + +inline int MPI_Type_set_attr(MPI_Datatype datatype, int type_keyval, + void *attribute_val) { + return (*MPIABI_Type_set_attr_ptr)(datatype, type_keyval, attribute_val); +} + +inline int MPI_Type_set_name(MPI_Datatype datatype, const char *type_name) { + return (*MPIABI_Type_set_name_ptr)(datatype, type_name); +} + +inline int +MPI_Win_create_keyval(MPI_Win_copy_attr_function *win_copy_attr_fn, + MPI_Win_delete_attr_function *win_delete_attr_fn, + int *win_keyval, void *extra_state) { + return (*MPIABI_Win_create_keyval_ptr)(win_copy_attr_fn, win_delete_attr_fn, + win_keyval, extra_state); +} + +inline int MPI_Win_delete_attr(MPI_Win win, int win_keyval) { + return (*MPIABI_Win_delete_attr_ptr)(win, win_keyval); +} + +inline int MPI_Win_free_keyval(int *win_keyval) { + return (*MPIABI_Win_free_keyval_ptr)(win_keyval); +} + +inline int MPI_Win_get_attr(MPI_Win win, int win_keyval, void *attribute_val, + int *flag) { + return (*MPIABI_Win_get_attr_ptr)(win, win_keyval, attribute_val, flag); +} + +inline int MPI_Win_get_name(MPI_Win win, char *win_name, int *resultlen) { + return (*MPIABI_Win_get_name_ptr)(win, win_name, resultlen); +} + +inline int MPI_Win_set_attr(MPI_Win win, int win_keyval, void *attribute_val) { + return (*MPIABI_Win_set_attr_ptr)(win, win_keyval, attribute_val); +} + +inline int MPI_Win_set_name(MPI_Win win, const char *win_name) { + return (*MPIABI_Win_set_name_ptr)(win, win_name); +} + +// A.3.6 Virtual Topologies for MPI Processes C Bindings + +inline int MPI_Cart_coords(MPI_Comm comm, int rank, int maxdims, int coords[]) { + return (*MPIABI_Cart_coords_ptr)(comm, rank, maxdims, coords); +} + +inline int MPI_Cart_create(MPI_Comm comm_old, int ndims, const int dims[], + const int periods[], int reorder, + MPI_Comm *comm_cart) { + return (*MPIABI_Cart_create_ptr)(comm_old, ndims, dims, periods, reorder, + comm_cart); +} + +inline int MPI_Cart_get(MPI_Comm comm, int maxdims, int dims[], int periods[], + int coords[]) { + return (*MPIABI_Cart_get_ptr)(comm, maxdims, dims, periods, coords); +} + +inline int MPI_Cart_map(MPI_Comm comm, int ndims, const int dims[], + const int periods[], int *newrank) { + return (*MPIABI_Cart_map_ptr)(comm, ndims, dims, periods, newrank); +} + +inline int MPI_Cart_rank(MPI_Comm comm, const int coords[], int *rank) { + return (*MPIABI_Cart_rank_ptr)(comm, coords, rank); +} + +inline int MPI_Cart_shift(MPI_Comm comm, int direction, int disp, + int *rank_source, int *rank_dest) { + return (*MPIABI_Cart_shift_ptr)(comm, direction, disp, rank_source, + rank_dest); +} + +inline int MPI_Cart_sub(MPI_Comm comm, const int remain_dims[], + MPI_Comm *newcomm) { + return (*MPIABI_Cart_sub_ptr)(comm, remain_dims, newcomm); +} + +inline int MPI_Cartdim_get(MPI_Comm comm, int *ndims) { + return (*MPIABI_Cartdim_get_ptr)(comm, ndims); +} + +inline int MPI_Dims_create(int nnodes, int ndims, int dims[]) { + return (*MPIABI_Dims_create_ptr)(nnodes, ndims, dims); +} + +inline int MPI_Dist_graph_create(MPI_Comm comm_old, int n, const int sources[], + const int degrees[], const int destinations[], + const int weights[], MPI_Info info, + int reorder, MPI_Comm *comm_dist_graph) { + return (*MPIABI_Dist_graph_create_ptr)(comm_old, n, sources, degrees, + destinations, weights, info, reorder, + comm_dist_graph); +} + +inline int +MPI_Dist_graph_create_adjacent(MPI_Comm comm_old, int indegree, + const int sources[], const int sourceweights[], + int outdegree, const int destinations[], + const int destweights[], MPI_Info info, + int reorder, MPI_Comm *comm_dist_graph) { + return (*MPIABI_Dist_graph_create_adjacent_ptr)( + comm_old, indegree, sources, sourceweights, outdegree, destinations, + destweights, info, reorder, comm_dist_graph); +} + +inline int MPI_Dist_graph_neighbors(MPI_Comm comm, int maxindegree, + int sources[], int sourceweights[], + int maxoutdegree, int destinations[], + int destweights[]) { + return (*MPIABI_Dist_graph_neighbors_ptr)(comm, maxindegree, sources, + sourceweights, maxoutdegree, + destinations, destweights); +} + +inline int MPI_Dist_graph_neighbors_count(MPI_Comm comm, int *indegree, + int *outdegree, int *weighted) { + return (*MPIABI_Dist_graph_neighbors_count_ptr)(comm, indegree, outdegree, + weighted); +} + +inline int MPI_Graph_create(MPI_Comm comm_old, int nnodes, const int index[], + const int edges[], int reorder, + MPI_Comm *comm_graph) { + return (*MPIABI_Graph_create_ptr)(comm_old, nnodes, index, edges, reorder, + comm_graph); +} + +inline int MPI_Graph_get(MPI_Comm comm, int maxindex, int maxedges, int index[], + int edges[]) { + return (*MPIABI_Graph_get_ptr)(comm, maxindex, maxedges, index, edges); +} + +inline int MPI_Graph_map(MPI_Comm comm, int nnodes, const int index[], + const int edges[], int *newrank) { + return (*MPIABI_Graph_map_ptr)(comm, nnodes, index, edges, newrank); +} + +inline int MPI_Graph_neighbors(MPI_Comm comm, int rank, int maxneighbors, + int neighbors[]) { + return (*MPIABI_Graph_neighbors_ptr)(comm, rank, maxneighbors, neighbors); +} + +inline int MPI_Graph_neighbors_count(MPI_Comm comm, int rank, int *nneighbors) { + return (*MPIABI_Graph_neighbors_count_ptr)(comm, rank, nneighbors); +} + +inline int MPI_Graphdims_get(MPI_Comm comm, int *nnodes, int *nedges) { + return (*MPIABI_Graphdims_get_ptr)(comm, nnodes, nedges); +} + +inline int MPI_Ineighbor_allgather(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, + MPI_Comm comm, MPI_Request *request) { + return (*MPIABI_Ineighbor_allgather_ptr)(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, comm, + request); +} + +inline int MPI_Ineighbor_allgather_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + MPI_Count recvcount, MPI_Datatype recvtype, + MPI_Comm comm, MPI_Request *request) { + return (*MPIABI_Ineighbor_allgather_c_ptr)(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, comm, + request); +} + +inline int MPI_Ineighbor_allgatherv(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPI_Datatype recvtype, MPI_Comm comm, + MPI_Request *request) { + return (*MPIABI_Ineighbor_allgatherv_ptr)(sendbuf, sendcount, sendtype, + recvbuf, recvcounts, displs, + recvtype, comm, request); +} + +inline int MPI_Ineighbor_allgatherv_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + const MPI_Count recvcounts[], + const MPI_Aint displs[], + MPI_Datatype recvtype, MPI_Comm comm, + MPI_Request *request) { + return (*MPIABI_Ineighbor_allgatherv_c_ptr)(sendbuf, sendcount, sendtype, + recvbuf, recvcounts, displs, + recvtype, comm, request); +} + +inline int MPI_Ineighbor_alltoall(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, + MPI_Comm comm, MPI_Request *request) { + return (*MPIABI_Ineighbor_alltoall_ptr)(sendbuf, sendcount, sendtype, recvbuf, + recvcount, recvtype, comm, request); +} + +inline int MPI_Ineighbor_alltoall_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + MPI_Count recvcount, MPI_Datatype recvtype, + MPI_Comm comm, MPI_Request *request) { + return (*MPIABI_Ineighbor_alltoall_c_ptr)(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, comm, + request); +} + +inline int 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, + MPI_Comm comm, MPI_Request *request) { + return (*MPIABI_Ineighbor_alltoallv_ptr)(sendbuf, sendcounts, sdispls, + sendtype, recvbuf, recvcounts, + rdispls, recvtype, comm, request); +} + +inline int +MPI_Ineighbor_alltoallv_c(const void *sendbuf, const MPI_Count sendcounts[], + const MPI_Aint sdispls[], MPI_Datatype sendtype, + void *recvbuf, const MPI_Count recvcounts[], + const MPI_Aint rdispls[], MPI_Datatype recvtype, + MPI_Comm comm, MPI_Request *request) { + return (*MPIABI_Ineighbor_alltoallv_c_ptr)(sendbuf, sendcounts, sdispls, + sendtype, recvbuf, recvcounts, + rdispls, recvtype, comm, request); +} + +inline int 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[], + MPI_Comm comm, MPI_Request *request) { + return (*MPIABI_Ineighbor_alltoallw_ptr)(sendbuf, sendcounts, sdispls, + sendtypes, recvbuf, recvcounts, + rdispls, recvtypes, comm, request); +} + +inline int MPI_Ineighbor_alltoallw_c( + const void *sendbuf, const MPI_Count sendcounts[], const MPI_Aint sdispls[], + const MPI_Datatype sendtypes[], void *recvbuf, const MPI_Count recvcounts[], + const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], MPI_Comm comm, + MPI_Request *request) { + return (*MPIABI_Ineighbor_alltoallw_c_ptr)(sendbuf, sendcounts, sdispls, + sendtypes, recvbuf, recvcounts, + rdispls, recvtypes, comm, request); +} + +inline int MPI_Neighbor_allgather(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, + MPI_Comm comm) { + return (*MPIABI_Neighbor_allgather_ptr)(sendbuf, sendcount, sendtype, recvbuf, + recvcount, recvtype, comm); +} + +inline int MPI_Neighbor_allgather_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + MPI_Count recvcount, MPI_Datatype recvtype, + MPI_Comm comm) { + return (*MPIABI_Neighbor_allgather_c_ptr)(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, comm); +} + +inline int MPI_Neighbor_allgather_init(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, + MPI_Comm comm, MPI_Info info, + MPI_Request *request) { + return (*MPIABI_Neighbor_allgather_init_ptr)(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, + comm, info, request); +} + +inline int MPI_Neighbor_allgather_init_c(const void *sendbuf, + MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + MPI_Count recvcount, + MPI_Datatype recvtype, MPI_Comm comm, + MPI_Info info, MPI_Request *request) { + return (*MPIABI_Neighbor_allgather_init_c_ptr)(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, + comm, info, request); +} + +inline int MPI_Neighbor_allgatherv(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPI_Datatype recvtype, MPI_Comm comm) { + return (*MPIABI_Neighbor_allgatherv_ptr)(sendbuf, sendcount, sendtype, + recvbuf, recvcounts, displs, + recvtype, comm); +} + +inline int MPI_Neighbor_allgatherv_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + const MPI_Count recvcounts[], + const MPI_Aint displs[], + MPI_Datatype recvtype, MPI_Comm comm) { + return (*MPIABI_Neighbor_allgatherv_c_ptr)(sendbuf, sendcount, sendtype, + recvbuf, recvcounts, displs, + recvtype, comm); +} + +inline int MPI_Neighbor_allgatherv_init(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], + const int displs[], + MPI_Datatype recvtype, MPI_Comm comm, + MPI_Info info, MPI_Request *request) { + return (*MPIABI_Neighbor_allgatherv_init_ptr)(sendbuf, sendcount, sendtype, + recvbuf, recvcounts, displs, + recvtype, comm, info, request); +} + +inline int MPI_Neighbor_allgatherv_init_c( + const void *sendbuf, MPI_Count sendcount, MPI_Datatype sendtype, + void *recvbuf, const MPI_Count recvcounts[], const MPI_Aint displs[], + MPI_Datatype recvtype, MPI_Comm comm, MPI_Info info, MPI_Request *request) { + return (*MPIABI_Neighbor_allgatherv_init_c_ptr)( + sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, + info, request); +} + +inline int MPI_Neighbor_alltoall(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, + MPI_Comm comm) { + return (*MPIABI_Neighbor_alltoall_ptr)(sendbuf, sendcount, sendtype, recvbuf, + recvcount, recvtype, comm); +} + +inline int MPI_Neighbor_alltoall_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + MPI_Count recvcount, MPI_Datatype recvtype, + MPI_Comm comm) { + return (*MPIABI_Neighbor_alltoall_c_ptr)(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, comm); +} + +inline int MPI_Neighbor_alltoall_init(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, + MPI_Comm comm, MPI_Info info, + MPI_Request *request) { + return (*MPIABI_Neighbor_alltoall_init_ptr)(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, + comm, info, request); +} + +inline int MPI_Neighbor_alltoall_init_c(const void *sendbuf, + MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + MPI_Count recvcount, + MPI_Datatype recvtype, MPI_Comm comm, + MPI_Info info, MPI_Request *request) { + return (*MPIABI_Neighbor_alltoall_init_c_ptr)(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, + comm, info, request); +} + +inline int 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, + MPI_Comm comm) { + return (*MPIABI_Neighbor_alltoallv_ptr)(sendbuf, sendcounts, sdispls, + sendtype, recvbuf, recvcounts, + rdispls, recvtype, comm); +} + +inline int MPI_Neighbor_alltoallv_c( + const void *sendbuf, const MPI_Count sendcounts[], const MPI_Aint sdispls[], + MPI_Datatype sendtype, void *recvbuf, const MPI_Count recvcounts[], + const MPI_Aint rdispls[], MPI_Datatype recvtype, MPI_Comm comm) { + return (*MPIABI_Neighbor_alltoallv_c_ptr)(sendbuf, sendcounts, sdispls, + sendtype, recvbuf, recvcounts, + rdispls, recvtype, comm); +} + +inline int MPI_Neighbor_alltoallv_init( + const void *sendbuf, const int sendcounts[], const int sdispls[], + MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], + const int rdispls[], MPI_Datatype recvtype, MPI_Comm comm, MPI_Info info, + MPI_Request *request) { + return (*MPIABI_Neighbor_alltoallv_init_ptr)( + sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, + recvtype, comm, info, request); +} + +inline int MPI_Neighbor_alltoallv_init_c( + const void *sendbuf, const MPI_Count sendcounts[], const MPI_Aint sdispls[], + MPI_Datatype sendtype, void *recvbuf, const MPI_Count recvcounts[], + const MPI_Aint rdispls[], MPI_Datatype recvtype, MPI_Comm comm, + MPI_Info info, MPI_Request *request) { + return (*MPIABI_Neighbor_alltoallv_init_c_ptr)( + sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, + recvtype, comm, info, request); +} + +inline int 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[], MPI_Comm comm) { + return (*MPIABI_Neighbor_alltoallw_ptr)(sendbuf, sendcounts, sdispls, + sendtypes, recvbuf, recvcounts, + rdispls, recvtypes, comm); +} + +inline int MPI_Neighbor_alltoallw_c( + const void *sendbuf, const MPI_Count sendcounts[], const MPI_Aint sdispls[], + const MPI_Datatype sendtypes[], void *recvbuf, const MPI_Count recvcounts[], + const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], MPI_Comm comm) { + return (*MPIABI_Neighbor_alltoallw_c_ptr)(sendbuf, sendcounts, sdispls, + sendtypes, recvbuf, recvcounts, + rdispls, recvtypes, comm); +} + +inline int MPI_Neighbor_alltoallw_init( + 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[], MPI_Comm comm, + MPI_Info info, MPI_Request *request) { + return (*MPIABI_Neighbor_alltoallw_init_ptr)( + sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, + recvtypes, comm, info, request); +} + +inline int MPI_Neighbor_alltoallw_init_c( + const void *sendbuf, const MPI_Count sendcounts[], const MPI_Aint sdispls[], + const MPI_Datatype sendtypes[], void *recvbuf, const MPI_Count recvcounts[], + const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], MPI_Comm comm, + MPI_Info info, MPI_Request *request) { + return (*MPIABI_Neighbor_alltoallw_init_c_ptr)( + sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, + recvtypes, comm, info, request); +} + +inline int MPI_Topo_test(MPI_Comm comm, int *status) { + return (*MPIABI_Topo_test_ptr)(comm, status); +} + +// A.3.7 MPI Environmental Management C Bindings + +inline int MPI_Add_error_class(int *errorclass) { + return (*MPIABI_Add_error_class_ptr)(errorclass); +} + +inline int MPI_Add_error_code(int errorclass, int *errorcode) { + return (*MPIABI_Add_error_code_ptr)(errorclass, errorcode); +} + +inline int MPI_Add_error_string(int errorcode, const char *string) { + return (*MPIABI_Add_error_string_ptr)(errorcode, string); +} + +inline int MPI_Alloc_mem(MPI_Aint size, MPI_Info info, void *baseptr) { + return (*MPIABI_Alloc_mem_ptr)(size, info, baseptr); +} + +inline int MPI_Comm_call_errhandler(MPI_Comm comm, int errorcode) { + return (*MPIABI_Comm_call_errhandler_ptr)(comm, errorcode); +} + +inline int +MPI_Comm_create_errhandler(MPI_Comm_errhandler_function *comm_errhandler_fn, + MPI_Errhandler *errhandler) { + return (*MPIABI_Comm_create_errhandler_ptr)(comm_errhandler_fn, errhandler); +} + +inline int MPI_Comm_get_errhandler(MPI_Comm comm, MPI_Errhandler *errhandler) { + return (*MPIABI_Comm_get_errhandler_ptr)(comm, errhandler); +} + +inline int MPI_Comm_set_errhandler(MPI_Comm comm, MPI_Errhandler errhandler) { + return (*MPIABI_Comm_set_errhandler_ptr)(comm, errhandler); +} + +inline int MPI_Errhandler_free(MPI_Errhandler *errhandler) { + return (*MPIABI_Errhandler_free_ptr)(errhandler); +} + +inline int MPI_Error_class(int errorcode, int *errorclass) { + return (*MPIABI_Error_class_ptr)(errorcode, errorclass); +} + +inline int MPI_Error_string(int errorcode, char *string, int *resultlen) { + return (*MPIABI_Error_string_ptr)(errorcode, string, resultlen); +} + +inline int MPI_File_call_errhandler(MPI_File fh, int errorcode) { + return (*MPIABI_File_call_errhandler_ptr)(fh, errorcode); +} + +inline int +MPI_File_create_errhandler(MPI_File_errhandler_function *file_errhandler_fn, + MPI_Errhandler *errhandler) { + return (*MPIABI_File_create_errhandler_ptr)(file_errhandler_fn, errhandler); +} + +inline int MPI_File_get_errhandler(MPI_File file, MPI_Errhandler *errhandler) { + return (*MPIABI_File_get_errhandler_ptr)(file, errhandler); +} + +inline int MPI_File_set_errhandler(MPI_File file, MPI_Errhandler errhandler) { + return (*MPIABI_File_set_errhandler_ptr)(file, errhandler); +} + +inline int MPI_Free_mem(void *base) { return (*MPIABI_Free_mem_ptr)(base); } + +inline int MPI_Get_hw_resource_info(MPI_Info *hw_info) { + return (*MPIABI_Get_hw_resource_info_ptr)(hw_info); +} + +inline int MPI_Get_library_version(char *version, int *resultlen) { + return (*MPIABI_Get_library_version_ptr)(version, resultlen); +} + +inline int MPI_Get_processor_name(char *name, int *resultlen) { + return (*MPIABI_Get_processor_name_ptr)(name, resultlen); +} + +inline int MPI_Get_version(int *version, int *subversion) { + return (*MPIABI_Get_version_ptr)(version, subversion); +} + +inline int MPI_Remove_error_class(int errorclass) { + return (*MPIABI_Remove_error_class_ptr)(errorclass); +} + +inline int MPI_Remove_error_code(int errorcode) { + return (*MPIABI_Remove_error_code_ptr)(errorcode); +} + +inline int MPI_Remove_error_string(int errorcode) { + return (*MPIABI_Remove_error_string_ptr)(errorcode); +} + +inline int MPI_Session_call_errhandler(MPI_Session session, int errorcode) { + return (*MPIABI_Session_call_errhandler_ptr)(session, errorcode); +} + +inline int MPI_Session_create_errhandler( + MPI_Session_errhandler_function *session_errhandler_fn, + MPI_Errhandler *errhandler) { + return (*MPIABI_Session_create_errhandler_ptr)(session_errhandler_fn, + errhandler); +} + +inline int MPI_Session_get_errhandler(MPI_Session session, + MPI_Errhandler *errhandler) { + return (*MPIABI_Session_get_errhandler_ptr)(session, errhandler); +} + +inline int MPI_Session_set_errhandler(MPI_Session session, + MPI_Errhandler errhandler) { + return (*MPIABI_Session_set_errhandler_ptr)(session, errhandler); +} + +inline int MPI_Win_call_errhandler(MPI_Win win, int errorcode) { + return (*MPIABI_Win_call_errhandler_ptr)(win, errorcode); +} + +inline int +MPI_Win_create_errhandler(MPI_Win_errhandler_function *win_errhandler_fn, + MPI_Errhandler *errhandler) { + return (*MPIABI_Win_create_errhandler_ptr)(win_errhandler_fn, errhandler); +} + +inline int MPI_Win_get_errhandler(MPI_Win win, MPI_Errhandler *errhandler) { + return (*MPIABI_Win_get_errhandler_ptr)(win, errhandler); +} + +inline int MPI_Win_set_errhandler(MPI_Win win, MPI_Errhandler errhandler) { + return (*MPIABI_Win_set_errhandler_ptr)(win, errhandler); +} + +inline double MPI_Wtick(void) { return (*MPIABI_Wtick_ptr)(); } + +inline double MPI_Wtime(void) { return (*MPIABI_Wtime_ptr)(); } + +// A.3.8 The Info Object C Bindings + +inline int MPI_Info_create(MPI_Info *info) { + return (*MPIABI_Info_create_ptr)(info); +} + +inline int MPI_Info_create_env(int argc, char *argv[], MPI_Info *info) { + return (*MPIABI_Info_create_env_ptr)(argc, argv, info); +} + +inline int MPI_Info_delete(MPI_Info info, const char *key) { + return (*MPIABI_Info_delete_ptr)(info, key); +} + +inline int MPI_Info_dup(MPI_Info info, MPI_Info *newinfo) { + return (*MPIABI_Info_dup_ptr)(info, newinfo); +} + +inline int MPI_Info_free(MPI_Info *info) { + return (*MPIABI_Info_free_ptr)(info); +} + +inline int MPI_Info_get_nkeys(MPI_Info info, int *nkeys) { + return (*MPIABI_Info_get_nkeys_ptr)(info, nkeys); +} + +inline int MPI_Info_get_nthkey(MPI_Info info, int n, char *key) { + return (*MPIABI_Info_get_nthkey_ptr)(info, n, key); +} + +inline int MPI_Info_get_string(MPI_Info info, const char *key, int *buflen, + char *value, int *flag) { + return (*MPIABI_Info_get_string_ptr)(info, key, buflen, value, flag); +} + +inline int MPI_Info_set(MPI_Info info, const char *key, const char *value) { + return (*MPIABI_Info_set_ptr)(info, key, value); +} + +// A.3.9 Process Creation and Management C Bindings + +inline int MPI_Abort(MPI_Comm comm, int errorcode) { + return (*MPIABI_Abort_ptr)(comm, errorcode); +} + +inline int MPI_Close_port(const char *port_name) { + return (*MPIABI_Close_port_ptr)(port_name); +} + +inline int MPI_Comm_accept(const char *port_name, MPI_Info info, int root, + MPI_Comm comm, MPI_Comm *newcomm) { + return (*MPIABI_Comm_accept_ptr)(port_name, info, root, comm, newcomm); +} + +inline int MPI_Comm_connect(const char *port_name, MPI_Info info, int root, + MPI_Comm comm, MPI_Comm *newcomm) { + return (*MPIABI_Comm_connect_ptr)(port_name, info, root, comm, newcomm); +} + +inline int MPI_Comm_disconnect(MPI_Comm *comm) { + return (*MPIABI_Comm_disconnect_ptr)(comm); +} + +inline int MPI_Comm_get_parent(MPI_Comm *parent) { + return (*MPIABI_Comm_get_parent_ptr)(parent); +} + +inline int MPI_Comm_join(int fd, MPI_Comm *intercomm) { + return (*MPIABI_Comm_join_ptr)(fd, intercomm); +} + +inline int MPI_Comm_spawn(const char *command, char *argv[], int maxprocs, + MPI_Info info, int root, MPI_Comm comm, + MPI_Comm *intercomm, int array_of_errcodes[]) { + return (*MPIABI_Comm_spawn_ptr)(command, argv, maxprocs, info, root, comm, + intercomm, array_of_errcodes); +} + +inline int MPI_Comm_spawn_multiple(int count, char *array_of_commands[], + char **array_of_argv[], + const int array_of_maxprocs[], + const MPI_Info array_of_info[], int root, + MPI_Comm comm, MPI_Comm *intercomm, + int array_of_errcodes[]) { + return (*MPIABI_Comm_spawn_multiple_ptr)( + count, array_of_commands, array_of_argv, array_of_maxprocs, array_of_info, + root, comm, intercomm, array_of_errcodes); +} + +inline int MPI_Finalize(void) { return (*MPIABI_Finalize_ptr)(); } + +inline int MPI_Finalized(int *flag) { return (*MPIABI_Finalized_ptr)(flag); } + +inline int MPI_Init(int *argc, char ***argv) { + return (*MPIABI_Init_ptr)(argc, argv); +} + +inline int MPI_Init_thread(int *argc, char ***argv, int required, + int *provided) { + return (*MPIABI_Init_thread_ptr)(argc, argv, required, provided); +} + +inline int MPI_Initialized(int *flag) { + return (*MPIABI_Initialized_ptr)(flag); +} + +inline int MPI_Is_thread_main(int *flag) { + return (*MPIABI_Is_thread_main_ptr)(flag); +} + +inline int MPI_Lookup_name(const char *service_name, MPI_Info info, + char *port_name) { + return (*MPIABI_Lookup_name_ptr)(service_name, info, port_name); +} + +inline int MPI_Open_port(MPI_Info info, char *port_name) { + return (*MPIABI_Open_port_ptr)(info, port_name); +} + +inline int MPI_Publish_name(const char *service_name, MPI_Info info, + const char *port_name) { + return (*MPIABI_Publish_name_ptr)(service_name, info, port_name); +} + +inline int MPI_Query_thread(int *provided) { + return (*MPIABI_Query_thread_ptr)(provided); +} + +inline int MPI_Session_finalize(MPI_Session *session) { + return (*MPIABI_Session_finalize_ptr)(session); +} + +inline int MPI_Session_get_info(MPI_Session session, MPI_Info *info_used) { + return (*MPIABI_Session_get_info_ptr)(session, info_used); +} + +inline int MPI_Session_get_nth_pset(MPI_Session session, MPI_Info info, int n, + int *pset_len, char *pset_name) { + return (*MPIABI_Session_get_nth_pset_ptr)(session, info, n, pset_len, + pset_name); +} + +inline int MPI_Session_get_num_psets(MPI_Session session, MPI_Info info, + int *npset_names) { + return (*MPIABI_Session_get_num_psets_ptr)(session, info, npset_names); +} + +inline int MPI_Session_get_pset_info(MPI_Session session, const char *pset_name, + MPI_Info *info) { + return (*MPIABI_Session_get_pset_info_ptr)(session, pset_name, info); +} + +inline int MPI_Session_init(MPI_Info info, MPI_Errhandler errhandler, + MPI_Session *session) { + return (*MPIABI_Session_init_ptr)(info, errhandler, session); +} + +inline int MPI_Unpublish_name(const char *service_name, MPI_Info info, + const char *port_name) { + return (*MPIABI_Unpublish_name_ptr)(service_name, info, port_name); +} + +// A.3.10 One-Sided Communications C Bindings + +inline int MPI_Accumulate(const void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, int target_count, + MPI_Datatype target_datatype, MPI_Op op, + MPI_Win win) { + return (*MPIABI_Accumulate_ptr)(origin_addr, origin_count, origin_datatype, + target_rank, target_disp, target_count, + target_datatype, op, win); +} + +inline int MPI_Accumulate_c(const void *origin_addr, MPI_Count origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, MPI_Count target_count, + MPI_Datatype target_datatype, MPI_Op op, + MPI_Win win) { + return (*MPIABI_Accumulate_c_ptr)(origin_addr, origin_count, origin_datatype, + target_rank, target_disp, target_count, + target_datatype, op, win); +} + +inline int MPI_Compare_and_swap(const void *origin_addr, + const void *compare_addr, void *result_addr, + MPI_Datatype datatype, int target_rank, + MPI_Aint target_disp, MPI_Win win) { + return (*MPIABI_Compare_and_swap_ptr)(origin_addr, compare_addr, result_addr, + datatype, target_rank, target_disp, + win); +} + +inline int MPI_Fetch_and_op(const void *origin_addr, void *result_addr, + MPI_Datatype datatype, int target_rank, + MPI_Aint target_disp, MPI_Op op, MPI_Win win) { + return (*MPIABI_Fetch_and_op_ptr)(origin_addr, result_addr, datatype, + target_rank, target_disp, op, win); +} + +inline int MPI_Get(void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, int target_count, + MPI_Datatype target_datatype, MPI_Win win) { + return (*MPIABI_Get_ptr)(origin_addr, origin_count, origin_datatype, + target_rank, target_disp, target_count, + target_datatype, win); +} + +inline int 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, MPI_Win win) { + return (*MPIABI_Get_accumulate_ptr)( + origin_addr, origin_count, origin_datatype, result_addr, result_count, + result_datatype, target_rank, target_disp, target_count, target_datatype, + op, win); +} + +inline int MPI_Get_accumulate_c(const void *origin_addr, MPI_Count origin_count, + MPI_Datatype origin_datatype, void *result_addr, + MPI_Count result_count, + MPI_Datatype result_datatype, int target_rank, + MPI_Aint target_disp, MPI_Count target_count, + MPI_Datatype target_datatype, MPI_Op op, + MPI_Win win) { + return (*MPIABI_Get_accumulate_c_ptr)( + origin_addr, origin_count, origin_datatype, result_addr, result_count, + result_datatype, target_rank, target_disp, target_count, target_datatype, + op, win); +} + +inline int MPI_Get_c(void *origin_addr, MPI_Count origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, MPI_Count target_count, + MPI_Datatype target_datatype, MPI_Win win) { + return (*MPIABI_Get_c_ptr)(origin_addr, origin_count, origin_datatype, + target_rank, target_disp, target_count, + target_datatype, win); +} + +inline int MPI_Put(const void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, int target_count, + MPI_Datatype target_datatype, MPI_Win win) { + return (*MPIABI_Put_ptr)(origin_addr, origin_count, origin_datatype, + target_rank, target_disp, target_count, + target_datatype, win); +} + +inline int MPI_Put_c(const void *origin_addr, MPI_Count origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, MPI_Count target_count, + MPI_Datatype target_datatype, MPI_Win win) { + return (*MPIABI_Put_c_ptr)(origin_addr, origin_count, origin_datatype, + target_rank, target_disp, target_count, + target_datatype, win); +} + +inline int MPI_Raccumulate(const void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, int target_count, + MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, + MPI_Request *request) { + return (*MPIABI_Raccumulate_ptr)(origin_addr, origin_count, origin_datatype, + target_rank, target_disp, target_count, + target_datatype, op, win, request); +} + +inline int MPI_Raccumulate_c(const void *origin_addr, MPI_Count origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, MPI_Count target_count, + MPI_Datatype target_datatype, MPI_Op op, + MPI_Win win, MPI_Request *request) { + return (*MPIABI_Raccumulate_c_ptr)(origin_addr, origin_count, origin_datatype, + target_rank, target_disp, target_count, + target_datatype, op, win, request); +} + +inline int MPI_Rget(void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, int target_count, + MPI_Datatype target_datatype, MPI_Win win, + MPI_Request *request) { + return (*MPIABI_Rget_ptr)(origin_addr, origin_count, origin_datatype, + target_rank, target_disp, target_count, + target_datatype, win, request); +} + +inline int MPI_Rget_accumulate(const void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, void *result_addr, + int result_count, MPI_Datatype result_datatype, + int target_rank, MPI_Aint target_disp, + int target_count, MPI_Datatype target_datatype, + MPI_Op op, MPI_Win win, MPI_Request *request) { + return (*MPIABI_Rget_accumulate_ptr)( + origin_addr, origin_count, origin_datatype, result_addr, result_count, + result_datatype, target_rank, target_disp, target_count, target_datatype, + op, win, request); +} + +inline int MPI_Rget_accumulate_c(const void *origin_addr, + MPI_Count origin_count, + MPI_Datatype origin_datatype, + void *result_addr, MPI_Count result_count, + MPI_Datatype result_datatype, int target_rank, + MPI_Aint target_disp, MPI_Count target_count, + MPI_Datatype target_datatype, MPI_Op op, + MPI_Win win, MPI_Request *request) { + return (*MPIABI_Rget_accumulate_c_ptr)( + origin_addr, origin_count, origin_datatype, result_addr, result_count, + result_datatype, target_rank, target_disp, target_count, target_datatype, + op, win, request); +} + +inline int MPI_Rget_c(void *origin_addr, MPI_Count origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, MPI_Count target_count, + MPI_Datatype target_datatype, MPI_Win win, + MPI_Request *request) { + return (*MPIABI_Rget_c_ptr)(origin_addr, origin_count, origin_datatype, + target_rank, target_disp, target_count, + target_datatype, win, request); +} + +inline int MPI_Rput(const void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, int target_count, + MPI_Datatype target_datatype, MPI_Win win, + MPI_Request *request) { + return (*MPIABI_Rput_ptr)(origin_addr, origin_count, origin_datatype, + target_rank, target_disp, target_count, + target_datatype, win, request); +} + +inline int MPI_Rput_c(const void *origin_addr, MPI_Count origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, MPI_Count target_count, + MPI_Datatype target_datatype, MPI_Win win, + MPI_Request *request) { + return (*MPIABI_Rput_c_ptr)(origin_addr, origin_count, origin_datatype, + target_rank, target_disp, target_count, + target_datatype, win, request); +} + +inline int MPI_Win_allocate(MPI_Aint size, int disp_unit, MPI_Info info, + MPI_Comm comm, void *baseptr, MPI_Win *win) { + return (*MPIABI_Win_allocate_ptr)(size, disp_unit, info, comm, baseptr, win); +} + +inline int MPI_Win_allocate_c(MPI_Aint size, MPI_Aint disp_unit, MPI_Info info, + MPI_Comm comm, void *baseptr, MPI_Win *win) { + return (*MPIABI_Win_allocate_c_ptr)(size, disp_unit, info, comm, baseptr, + win); +} + +inline int MPI_Win_allocate_shared(MPI_Aint size, int disp_unit, MPI_Info info, + MPI_Comm comm, void *baseptr, MPI_Win *win) { + return (*MPIABI_Win_allocate_shared_ptr)(size, disp_unit, info, comm, baseptr, + win); +} + +inline int MPI_Win_allocate_shared_c(MPI_Aint size, MPI_Aint disp_unit, + MPI_Info info, MPI_Comm comm, + void *baseptr, MPI_Win *win) { + return (*MPIABI_Win_allocate_shared_c_ptr)(size, disp_unit, info, comm, + baseptr, win); +} + +inline int MPI_Win_attach(MPI_Win win, void *base, MPI_Aint size) { + return (*MPIABI_Win_attach_ptr)(win, base, size); +} + +inline int MPI_Win_complete(MPI_Win win) { + return (*MPIABI_Win_complete_ptr)(win); +} + +inline int MPI_Win_create(void *base, MPI_Aint size, int disp_unit, + MPI_Info info, MPI_Comm comm, MPI_Win *win) { + return (*MPIABI_Win_create_ptr)(base, size, disp_unit, info, comm, win); +} + +inline int MPI_Win_create_c(void *base, MPI_Aint size, MPI_Aint disp_unit, + MPI_Info info, MPI_Comm comm, MPI_Win *win) { + return (*MPIABI_Win_create_c_ptr)(base, size, disp_unit, info, comm, win); +} + +inline int MPI_Win_create_dynamic(MPI_Info info, MPI_Comm comm, MPI_Win *win) { + return (*MPIABI_Win_create_dynamic_ptr)(info, comm, win); +} + +inline int MPI_Win_detach(MPI_Win win, const void *base) { + return (*MPIABI_Win_detach_ptr)(win, base); +} + +inline int MPI_Win_fence(int assert, MPI_Win win) { + return (*MPIABI_Win_fence_ptr)(assert, win); +} + +inline int MPI_Win_flush(int rank, MPI_Win win) { + return (*MPIABI_Win_flush_ptr)(rank, win); +} + +inline int MPI_Win_flush_all(MPI_Win win) { + return (*MPIABI_Win_flush_all_ptr)(win); +} + +inline int MPI_Win_flush_local(int rank, MPI_Win win) { + return (*MPIABI_Win_flush_local_ptr)(rank, win); +} + +inline int MPI_Win_flush_local_all(MPI_Win win) { + return (*MPIABI_Win_flush_local_all_ptr)(win); +} + +inline int MPI_Win_free(MPI_Win *win) { return (*MPIABI_Win_free_ptr)(win); } + +inline int MPI_Win_get_group(MPI_Win win, MPI_Group *group) { + return (*MPIABI_Win_get_group_ptr)(win, group); +} + +inline int MPI_Win_get_info(MPI_Win win, MPI_Info *info_used) { + return (*MPIABI_Win_get_info_ptr)(win, info_used); +} + +inline int MPI_Win_lock(int lock_type, int rank, int assert, MPI_Win win) { + return (*MPIABI_Win_lock_ptr)(lock_type, rank, assert, win); +} + +inline int MPI_Win_lock_all(int assert, MPI_Win win) { + return (*MPIABI_Win_lock_all_ptr)(assert, win); +} + +inline int MPI_Win_post(MPI_Group group, int assert, MPI_Win win) { + return (*MPIABI_Win_post_ptr)(group, assert, win); +} + +inline int MPI_Win_set_info(MPI_Win win, MPI_Info info) { + return (*MPIABI_Win_set_info_ptr)(win, info); +} + +inline int MPI_Win_shared_query(MPI_Win win, int rank, MPI_Aint *size, + int *disp_unit, void *baseptr) { + return (*MPIABI_Win_shared_query_ptr)(win, rank, size, disp_unit, baseptr); +} + +inline int MPI_Win_shared_query_c(MPI_Win win, int rank, MPI_Aint *size, + MPI_Aint *disp_unit, void *baseptr) { + return (*MPIABI_Win_shared_query_c_ptr)(win, rank, size, disp_unit, baseptr); +} + +inline int MPI_Win_start(MPI_Group group, int assert, MPI_Win win) { + return (*MPIABI_Win_start_ptr)(group, assert, win); +} + +inline int MPI_Win_sync(MPI_Win win) { return (*MPIABI_Win_sync_ptr)(win); } + +inline int MPI_Win_test(MPI_Win win, int *flag) { + return (*MPIABI_Win_test_ptr)(win, flag); +} + +inline int MPI_Win_unlock(int rank, MPI_Win win) { + return (*MPIABI_Win_unlock_ptr)(rank, win); +} + +inline int MPI_Win_unlock_all(MPI_Win win) { + return (*MPIABI_Win_unlock_all_ptr)(win); +} + +inline int MPI_Win_wait(MPI_Win win) { return (*MPIABI_Win_wait_ptr)(win); } + +// A.3.11 External Interfaces C Bindings + +inline int MPI_Grequest_complete(MPI_Request request) { + return (*MPIABI_Grequest_complete_ptr)(request); +} + +inline int MPI_Grequest_start(MPI_Grequest_query_function *query_fn, + MPI_Grequest_free_function *free_fn, + MPI_Grequest_cancel_function *cancel_fn, + void *extra_state, MPI_Request *request) { + return (*MPIABI_Grequest_start_ptr)(query_fn, free_fn, cancel_fn, extra_state, + request); +} + +inline int MPI_Status_set_cancelled(MPI_Status *status, int flag) { + return (*MPIABI_Status_set_cancelled_ptr)(status, flag); +} + +inline int MPI_Status_set_elements(MPI_Status *status, MPI_Datatype datatype, + int count) { + return (*MPIABI_Status_set_elements_ptr)(status, datatype, count); +} + +inline int MPI_Status_set_elements_c(MPI_Status *status, MPI_Datatype datatype, + MPI_Count count) { + return (*MPIABI_Status_set_elements_c_ptr)(status, datatype, count); +} + +inline int MPI_Status_set_error(MPI_Status *status, int err) { + return (*MPIABI_Status_set_error_ptr)(status, err); +} + +inline int MPI_Status_set_source(MPI_Status *status, int source) { + return (*MPIABI_Status_set_source_ptr)(status, source); +} + +inline int MPI_Status_set_tag(MPI_Status *status, int tag) { + return (*MPIABI_Status_set_tag_ptr)(status, tag); +} + +// A.3.12 I/O C Bindings + +inline int MPI_File_close(MPI_File *fh) { return (*MPIABI_File_close_ptr)(fh); } + +inline int MPI_File_delete(const char *filename, MPI_Info info) { + return (*MPIABI_File_delete_ptr)(filename, info); +} + +inline int MPI_File_get_amode(MPI_File fh, int *amode) { + return (*MPIABI_File_get_amode_ptr)(fh, amode); +} + +inline int MPI_File_get_atomicity(MPI_File fh, int *flag) { + return (*MPIABI_File_get_atomicity_ptr)(fh, flag); +} + +inline int MPI_File_get_byte_offset(MPI_File fh, MPI_Offset offset, + MPI_Offset *disp) { + return (*MPIABI_File_get_byte_offset_ptr)(fh, offset, disp); +} + +inline int MPI_File_get_group(MPI_File fh, MPI_Group *group) { + return (*MPIABI_File_get_group_ptr)(fh, group); +} + +inline int MPI_File_get_info(MPI_File fh, MPI_Info *info_used) { + return (*MPIABI_File_get_info_ptr)(fh, info_used); +} + +inline int MPI_File_get_position(MPI_File fh, MPI_Offset *offset) { + return (*MPIABI_File_get_position_ptr)(fh, offset); +} + +inline int MPI_File_get_position_shared(MPI_File fh, MPI_Offset *offset) { + return (*MPIABI_File_get_position_shared_ptr)(fh, offset); +} + +inline int MPI_File_get_size(MPI_File fh, MPI_Offset *size) { + return (*MPIABI_File_get_size_ptr)(fh, size); +} + +inline int MPI_File_get_type_extent(MPI_File fh, MPI_Datatype datatype, + MPI_Aint *extent) { + return (*MPIABI_File_get_type_extent_ptr)(fh, datatype, extent); +} + +inline int MPI_File_get_type_extent_c(MPI_File fh, MPI_Datatype datatype, + MPI_Count *extent) { + return (*MPIABI_File_get_type_extent_c_ptr)(fh, datatype, extent); +} + +inline int MPI_File_get_view(MPI_File fh, MPI_Offset *disp, MPI_Datatype *etype, + MPI_Datatype *filetype, char *datarep) { + return (*MPIABI_File_get_view_ptr)(fh, disp, etype, filetype, datarep); +} + +inline int MPI_File_iread(MPI_File fh, void *buf, int count, + MPI_Datatype datatype, MPI_Request *request) { + return (*MPIABI_File_iread_ptr)(fh, buf, count, datatype, request); +} + +inline int MPI_File_iread_all(MPI_File fh, void *buf, int count, + MPI_Datatype datatype, MPI_Request *request) { + return (*MPIABI_File_iread_all_ptr)(fh, buf, count, datatype, request); +} + +inline int MPI_File_iread_all_c(MPI_File fh, void *buf, MPI_Count count, + MPI_Datatype datatype, MPI_Request *request) { + return (*MPIABI_File_iread_all_c_ptr)(fh, buf, count, datatype, request); +} + +inline int MPI_File_iread_at(MPI_File fh, MPI_Offset offset, void *buf, + int count, MPI_Datatype datatype, + MPI_Request *request) { + return (*MPIABI_File_iread_at_ptr)(fh, offset, buf, count, datatype, request); +} + +inline int MPI_File_iread_at_all(MPI_File fh, MPI_Offset offset, void *buf, + int count, MPI_Datatype datatype, + MPI_Request *request) { + return (*MPIABI_File_iread_at_all_ptr)(fh, offset, buf, count, datatype, + request); +} + +inline int MPI_File_iread_at_all_c(MPI_File fh, MPI_Offset offset, void *buf, + MPI_Count count, MPI_Datatype datatype, + MPI_Request *request) { + return (*MPIABI_File_iread_at_all_c_ptr)(fh, offset, buf, count, datatype, + request); +} + +inline int MPI_File_iread_at_c(MPI_File fh, MPI_Offset offset, void *buf, + MPI_Count count, MPI_Datatype datatype, + MPI_Request *request) { + return (*MPIABI_File_iread_at_c_ptr)(fh, offset, buf, count, datatype, + request); +} + +inline int MPI_File_iread_c(MPI_File fh, void *buf, MPI_Count count, + MPI_Datatype datatype, MPI_Request *request) { + return (*MPIABI_File_iread_c_ptr)(fh, buf, count, datatype, request); +} + +inline int MPI_File_iread_shared(MPI_File fh, void *buf, int count, + MPI_Datatype datatype, MPI_Request *request) { + return (*MPIABI_File_iread_shared_ptr)(fh, buf, count, datatype, request); +} + +inline int MPI_File_iread_shared_c(MPI_File fh, void *buf, MPI_Count count, + MPI_Datatype datatype, + MPI_Request *request) { + return (*MPIABI_File_iread_shared_c_ptr)(fh, buf, count, datatype, request); +} + +inline int MPI_File_iwrite(MPI_File fh, const void *buf, int count, + MPI_Datatype datatype, MPI_Request *request) { + return (*MPIABI_File_iwrite_ptr)(fh, buf, count, datatype, request); +} + +inline int MPI_File_iwrite_all(MPI_File fh, const void *buf, int count, + MPI_Datatype datatype, MPI_Request *request) { + return (*MPIABI_File_iwrite_all_ptr)(fh, buf, count, datatype, request); +} + +inline int MPI_File_iwrite_all_c(MPI_File fh, const void *buf, MPI_Count count, + MPI_Datatype datatype, MPI_Request *request) { + return (*MPIABI_File_iwrite_all_c_ptr)(fh, buf, count, datatype, request); +} + +inline int MPI_File_iwrite_at(MPI_File fh, MPI_Offset offset, const void *buf, + int count, MPI_Datatype datatype, + MPI_Request *request) { + return (*MPIABI_File_iwrite_at_ptr)(fh, offset, buf, count, datatype, + request); +} + +inline int MPI_File_iwrite_at_all(MPI_File fh, MPI_Offset offset, + const void *buf, int count, + MPI_Datatype datatype, MPI_Request *request) { + return (*MPIABI_File_iwrite_at_all_ptr)(fh, offset, buf, count, datatype, + request); +} + +inline int MPI_File_iwrite_at_all_c(MPI_File fh, MPI_Offset offset, + const void *buf, MPI_Count count, + MPI_Datatype datatype, + MPI_Request *request) { + return (*MPIABI_File_iwrite_at_all_c_ptr)(fh, offset, buf, count, datatype, + request); +} + +inline int MPI_File_iwrite_at_c(MPI_File fh, MPI_Offset offset, const void *buf, + MPI_Count count, MPI_Datatype datatype, + MPI_Request *request) { + return (*MPIABI_File_iwrite_at_c_ptr)(fh, offset, buf, count, datatype, + request); +} + +inline int MPI_File_iwrite_c(MPI_File fh, const void *buf, MPI_Count count, + MPI_Datatype datatype, MPI_Request *request) { + return (*MPIABI_File_iwrite_c_ptr)(fh, buf, count, datatype, request); +} + +inline int MPI_File_iwrite_shared(MPI_File fh, const void *buf, int count, + MPI_Datatype datatype, MPI_Request *request) { + return (*MPIABI_File_iwrite_shared_ptr)(fh, buf, count, datatype, request); +} + +inline int MPI_File_iwrite_shared_c(MPI_File fh, const void *buf, + MPI_Count count, MPI_Datatype datatype, + MPI_Request *request) { + return (*MPIABI_File_iwrite_shared_c_ptr)(fh, buf, count, datatype, request); +} + +inline int MPI_File_open(MPI_Comm comm, const char *filename, int amode, + MPI_Info info, MPI_File *fh) { + return (*MPIABI_File_open_ptr)(comm, filename, amode, info, fh); +} + +inline int MPI_File_preallocate(MPI_File fh, MPI_Offset size) { + return (*MPIABI_File_preallocate_ptr)(fh, size); +} + +inline int MPI_File_read(MPI_File fh, void *buf, int count, + MPI_Datatype datatype, MPI_Status *status) { + return (*MPIABI_File_read_ptr)(fh, buf, count, datatype, status); +} + +inline int MPI_File_read_all(MPI_File fh, void *buf, int count, + MPI_Datatype datatype, MPI_Status *status) { + return (*MPIABI_File_read_all_ptr)(fh, buf, count, datatype, status); +} + +inline int MPI_File_read_all_begin(MPI_File fh, void *buf, int count, + MPI_Datatype datatype) { + return (*MPIABI_File_read_all_begin_ptr)(fh, buf, count, datatype); +} + +inline int MPI_File_read_all_begin_c(MPI_File fh, void *buf, MPI_Count count, + MPI_Datatype datatype) { + return (*MPIABI_File_read_all_begin_c_ptr)(fh, buf, count, datatype); +} + +inline int MPI_File_read_all_c(MPI_File fh, void *buf, MPI_Count count, + MPI_Datatype datatype, MPI_Status *status) { + return (*MPIABI_File_read_all_c_ptr)(fh, buf, count, datatype, status); +} + +inline int MPI_File_read_all_end(MPI_File fh, void *buf, MPI_Status *status) { + return (*MPIABI_File_read_all_end_ptr)(fh, buf, status); +} + +inline int MPI_File_read_at(MPI_File fh, MPI_Offset offset, void *buf, + int count, MPI_Datatype datatype, + MPI_Status *status) { + return (*MPIABI_File_read_at_ptr)(fh, offset, buf, count, datatype, status); +} + +inline int MPI_File_read_at_all(MPI_File fh, MPI_Offset offset, void *buf, + int count, MPI_Datatype datatype, + MPI_Status *status) { + return (*MPIABI_File_read_at_all_ptr)(fh, offset, buf, count, datatype, + status); +} + +inline int MPI_File_read_at_all_begin(MPI_File fh, MPI_Offset offset, void *buf, + int count, MPI_Datatype datatype) { + return (*MPIABI_File_read_at_all_begin_ptr)(fh, offset, buf, count, datatype); +} + +inline int MPI_File_read_at_all_begin_c(MPI_File fh, MPI_Offset offset, + void *buf, MPI_Count count, + MPI_Datatype datatype) { + return (*MPIABI_File_read_at_all_begin_c_ptr)(fh, offset, buf, count, + datatype); +} + +inline int MPI_File_read_at_all_c(MPI_File fh, MPI_Offset offset, void *buf, + MPI_Count count, MPI_Datatype datatype, + MPI_Status *status) { + return (*MPIABI_File_read_at_all_c_ptr)(fh, offset, buf, count, datatype, + status); +} + +inline int MPI_File_read_at_all_end(MPI_File fh, void *buf, + MPI_Status *status) { + return (*MPIABI_File_read_at_all_end_ptr)(fh, buf, status); +} + +inline int MPI_File_read_at_c(MPI_File fh, MPI_Offset offset, void *buf, + MPI_Count count, MPI_Datatype datatype, + MPI_Status *status) { + return (*MPIABI_File_read_at_c_ptr)(fh, offset, buf, count, datatype, status); +} + +inline int MPI_File_read_c(MPI_File fh, void *buf, MPI_Count count, + MPI_Datatype datatype, MPI_Status *status) { + return (*MPIABI_File_read_c_ptr)(fh, buf, count, datatype, status); +} + +inline int MPI_File_read_ordered(MPI_File fh, void *buf, int count, + MPI_Datatype datatype, MPI_Status *status) { + return (*MPIABI_File_read_ordered_ptr)(fh, buf, count, datatype, status); +} + +inline int MPI_File_read_ordered_begin(MPI_File fh, void *buf, int count, + MPI_Datatype datatype) { + return (*MPIABI_File_read_ordered_begin_ptr)(fh, buf, count, datatype); +} + +inline int MPI_File_read_ordered_begin_c(MPI_File fh, void *buf, + MPI_Count count, + MPI_Datatype datatype) { + return (*MPIABI_File_read_ordered_begin_c_ptr)(fh, buf, count, datatype); +} + +inline int MPI_File_read_ordered_c(MPI_File fh, void *buf, MPI_Count count, + MPI_Datatype datatype, MPI_Status *status) { + return (*MPIABI_File_read_ordered_c_ptr)(fh, buf, count, datatype, status); +} + +inline int MPI_File_read_ordered_end(MPI_File fh, void *buf, + MPI_Status *status) { + return (*MPIABI_File_read_ordered_end_ptr)(fh, buf, status); +} + +inline int MPI_File_read_shared(MPI_File fh, void *buf, int count, + MPI_Datatype datatype, MPI_Status *status) { + return (*MPIABI_File_read_shared_ptr)(fh, buf, count, datatype, status); +} + +inline int MPI_File_read_shared_c(MPI_File fh, void *buf, MPI_Count count, + MPI_Datatype datatype, MPI_Status *status) { + return (*MPIABI_File_read_shared_c_ptr)(fh, buf, count, datatype, status); +} + +inline int MPI_File_seek(MPI_File fh, MPI_Offset offset, int whence) { + return (*MPIABI_File_seek_ptr)(fh, offset, whence); +} + +inline int MPI_File_seek_shared(MPI_File fh, MPI_Offset offset, int whence) { + return (*MPIABI_File_seek_shared_ptr)(fh, offset, whence); +} + +inline int MPI_File_set_atomicity(MPI_File fh, int flag) { + return (*MPIABI_File_set_atomicity_ptr)(fh, flag); +} + +inline int MPI_File_set_info(MPI_File fh, MPI_Info info) { + return (*MPIABI_File_set_info_ptr)(fh, info); +} + +inline int MPI_File_set_size(MPI_File fh, MPI_Offset size) { + return (*MPIABI_File_set_size_ptr)(fh, size); +} + +inline int MPI_File_set_view(MPI_File fh, MPI_Offset disp, MPI_Datatype etype, + MPI_Datatype filetype, const char *datarep, + MPI_Info info) { + return (*MPIABI_File_set_view_ptr)(fh, disp, etype, filetype, datarep, info); +} + +inline int MPI_File_sync(MPI_File fh) { return (*MPIABI_File_sync_ptr)(fh); } + +inline int MPI_File_write(MPI_File fh, const void *buf, int count, + MPI_Datatype datatype, MPI_Status *status) { + return (*MPIABI_File_write_ptr)(fh, buf, count, datatype, status); +} + +inline int MPI_File_write_all(MPI_File fh, const void *buf, int count, + MPI_Datatype datatype, MPI_Status *status) { + return (*MPIABI_File_write_all_ptr)(fh, buf, count, datatype, status); +} + +inline int MPI_File_write_all_begin(MPI_File fh, const void *buf, int count, + MPI_Datatype datatype) { + return (*MPIABI_File_write_all_begin_ptr)(fh, buf, count, datatype); +} + +inline int MPI_File_write_all_begin_c(MPI_File fh, const void *buf, + MPI_Count count, MPI_Datatype datatype) { + return (*MPIABI_File_write_all_begin_c_ptr)(fh, buf, count, datatype); +} + +inline int MPI_File_write_all_c(MPI_File fh, const void *buf, MPI_Count count, + MPI_Datatype datatype, MPI_Status *status) { + return (*MPIABI_File_write_all_c_ptr)(fh, buf, count, datatype, status); +} + +inline int MPI_File_write_all_end(MPI_File fh, const void *buf, + MPI_Status *status) { + return (*MPIABI_File_write_all_end_ptr)(fh, buf, status); +} + +inline int MPI_File_write_at(MPI_File fh, MPI_Offset offset, const void *buf, + int count, MPI_Datatype datatype, + MPI_Status *status) { + return (*MPIABI_File_write_at_ptr)(fh, offset, buf, count, datatype, status); +} + +inline int MPI_File_write_at_all(MPI_File fh, MPI_Offset offset, + const void *buf, int count, + MPI_Datatype datatype, MPI_Status *status) { + return (*MPIABI_File_write_at_all_ptr)(fh, offset, buf, count, datatype, + status); +} + +inline int MPI_File_write_at_all_begin(MPI_File fh, MPI_Offset offset, + const void *buf, int count, + MPI_Datatype datatype) { + return (*MPIABI_File_write_at_all_begin_ptr)(fh, offset, buf, count, + datatype); +} + +inline int MPI_File_write_at_all_begin_c(MPI_File fh, MPI_Offset offset, + const void *buf, MPI_Count count, + MPI_Datatype datatype) { + return (*MPIABI_File_write_at_all_begin_c_ptr)(fh, offset, buf, count, + datatype); +} + +inline int MPI_File_write_at_all_c(MPI_File fh, MPI_Offset offset, + const void *buf, MPI_Count count, + MPI_Datatype datatype, MPI_Status *status) { + return (*MPIABI_File_write_at_all_c_ptr)(fh, offset, buf, count, datatype, + status); +} + +inline int MPI_File_write_at_all_end(MPI_File fh, const void *buf, + MPI_Status *status) { + return (*MPIABI_File_write_at_all_end_ptr)(fh, buf, status); +} + +inline int MPI_File_write_at_c(MPI_File fh, MPI_Offset offset, const void *buf, + MPI_Count count, MPI_Datatype datatype, + MPI_Status *status) { + return (*MPIABI_File_write_at_c_ptr)(fh, offset, buf, count, datatype, + status); +} + +inline int MPI_File_write_c(MPI_File fh, const void *buf, MPI_Count count, + MPI_Datatype datatype, MPI_Status *status) { + return (*MPIABI_File_write_c_ptr)(fh, buf, count, datatype, status); +} + +inline int MPI_File_write_ordered(MPI_File fh, const void *buf, int count, + MPI_Datatype datatype, MPI_Status *status) { + return (*MPIABI_File_write_ordered_ptr)(fh, buf, count, datatype, status); +} + +inline int MPI_File_write_ordered_begin(MPI_File fh, const void *buf, int count, + MPI_Datatype datatype) { + return (*MPIABI_File_write_ordered_begin_ptr)(fh, buf, count, datatype); +} + +inline int MPI_File_write_ordered_begin_c(MPI_File fh, const void *buf, + MPI_Count count, + MPI_Datatype datatype) { + return (*MPIABI_File_write_ordered_begin_c_ptr)(fh, buf, count, datatype); +} + +inline int MPI_File_write_ordered_c(MPI_File fh, const void *buf, + MPI_Count count, MPI_Datatype datatype, + MPI_Status *status) { + return (*MPIABI_File_write_ordered_c_ptr)(fh, buf, count, datatype, status); +} + +inline int MPI_File_write_ordered_end(MPI_File fh, const void *buf, + MPI_Status *status) { + return (*MPIABI_File_write_ordered_end_ptr)(fh, buf, status); +} + +inline int MPI_File_write_shared(MPI_File fh, const void *buf, int count, + MPI_Datatype datatype, MPI_Status *status) { + return (*MPIABI_File_write_shared_ptr)(fh, buf, count, datatype, status); +} + +inline int MPI_File_write_shared_c(MPI_File fh, const void *buf, + MPI_Count count, MPI_Datatype datatype, + MPI_Status *status) { + return (*MPIABI_File_write_shared_c_ptr)(fh, buf, count, datatype, status); +} + +inline int MPI_Register_datarep( + const char *datarep, MPI_Datarep_conversion_function *read_conversion_fn, + MPI_Datarep_conversion_function *write_conversion_fn, + MPI_Datarep_extent_function *dtype_file_extent_fn, void *extra_state) { + return (*MPIABI_Register_datarep_ptr)(datarep, read_conversion_fn, + write_conversion_fn, + dtype_file_extent_fn, extra_state); +} + +inline int MPI_Register_datarep_c( + const char *datarep, MPI_Datarep_conversion_function_c *read_conversion_fn, + MPI_Datarep_conversion_function_c *write_conversion_fn, + MPI_Datarep_extent_function *dtype_file_extent_fn, void *extra_state) { + return (*MPIABI_Register_datarep_c_ptr)(datarep, read_conversion_fn, + write_conversion_fn, + dtype_file_extent_fn, extra_state); +} + +// A.3.13 Language Bindings C Bindings + +inline MPI_Fint MPI_Comm_c2f(MPI_Comm comm) { + return (*MPIABI_Comm_c2f_ptr)(comm); +} + +inline MPI_Comm MPI_Comm_f2c(MPI_Fint comm) { + return (*MPIABI_Comm_f2c_ptr)(comm); +} + +inline MPI_Fint MPI_Errhandler_c2f(MPI_Errhandler errhandler) { + return (*MPIABI_Errhandler_c2f_ptr)(errhandler); +} + +inline MPI_Errhandler MPI_Errhandler_f2c(MPI_Fint errhandler) { + return (*MPIABI_Errhandler_f2c_ptr)(errhandler); +} + +inline MPI_Fint MPI_File_c2f(MPI_File file) { + return (*MPIABI_File_c2f_ptr)(file); +} + +inline MPI_File MPI_File_f2c(MPI_Fint file) { + return (*MPIABI_File_f2c_ptr)(file); +} + +inline MPI_Fint MPI_Group_c2f(MPI_Group group) { + return (*MPIABI_Group_c2f_ptr)(group); +} + +inline MPI_Group MPI_Group_f2c(MPI_Fint group) { + return (*MPIABI_Group_f2c_ptr)(group); +} + +inline MPI_Fint MPI_Info_c2f(MPI_Info info) { + return (*MPIABI_Info_c2f_ptr)(info); +} + +inline MPI_Info MPI_Info_f2c(MPI_Fint info) { + return (*MPIABI_Info_f2c_ptr)(info); +} + +inline MPI_Fint MPI_Message_c2f(MPI_Message message) { + return (*MPIABI_Message_c2f_ptr)(message); +} + +inline MPI_Message MPI_Message_f2c(MPI_Fint message) { + return (*MPIABI_Message_f2c_ptr)(message); +} + +inline MPI_Fint MPI_Op_c2f(MPI_Op op) { return (*MPIABI_Op_c2f_ptr)(op); } + +inline MPI_Op MPI_Op_f2c(MPI_Fint op) { return (*MPIABI_Op_f2c_ptr)(op); } + +inline MPI_Fint MPI_Request_c2f(MPI_Request request) { + return (*MPIABI_Request_c2f_ptr)(request); +} + +inline MPI_Request MPI_Request_f2c(MPI_Fint request) { + return (*MPIABI_Request_f2c_ptr)(request); +} + +inline MPI_Fint MPI_Session_c2f(MPI_Session session) { + return (*MPIABI_Session_c2f_ptr)(session); +} + +inline MPI_Session MPI_Session_f2c(MPI_Fint session) { + return (*MPIABI_Session_f2c_ptr)(session); +} + +inline int MPI_Status_f082f(const MPI_F08_status *f08_status, + MPI_Fint *f_status) { + return (*MPIABI_Status_f082f_ptr)(f08_status, f_status); +} + +inline int MPI_Status_c2f(const MPI_Status *c_status, MPI_Fint *f_status) { + return (*MPIABI_Status_c2f_ptr)(c_status, f_status); +} + +inline int MPI_Status_c2f08(const MPI_Status *c_status, + MPI_F08_status *f08_status) { + return (*MPIABI_Status_c2f08_ptr)(c_status, f08_status); +} + +inline int MPI_Status_f082c(const MPI_F08_status *f08_status, + MPI_Status *c_status) { + return (*MPIABI_Status_f082c_ptr)(f08_status, c_status); +} + +inline int MPI_Status_f2c(const MPI_Fint *f_status, MPI_Status *c_status) { + return (*MPIABI_Status_f2c_ptr)(f_status, c_status); +} + +inline int MPI_Status_f2f08(const MPI_Fint *f_status, + MPI_F08_status *f08_status) { + return (*MPIABI_Status_f2f08_ptr)(f_status, f08_status); +} + +inline MPI_Fint MPI_Type_c2f(MPI_Datatype datatype) { + return (*MPIABI_Type_c2f_ptr)(datatype); +} + +inline int MPI_Type_create_f90_complex(int p, int r, MPI_Datatype *newtype) { + return (*MPIABI_Type_create_f90_complex_ptr)(p, r, newtype); +} + +inline int MPI_Type_create_f90_integer(int r, MPI_Datatype *newtype) { + return (*MPIABI_Type_create_f90_integer_ptr)(r, newtype); +} + +inline int MPI_Type_create_f90_real(int p, int r, MPI_Datatype *newtype) { + return (*MPIABI_Type_create_f90_real_ptr)(p, r, newtype); +} + +inline MPI_Datatype MPI_Type_f2c(MPI_Fint datatype) { + return (*MPIABI_Type_f2c_ptr)(datatype); +} + +inline int MPI_Type_match_size(int typeclass, int size, + MPI_Datatype *datatype) { + return (*MPIABI_Type_match_size_ptr)(typeclass, size, datatype); +} + +inline MPI_Fint MPI_Win_c2f(MPI_Win win) { return (*MPIABI_Win_c2f_ptr)(win); } + +inline MPI_Win MPI_Win_f2c(MPI_Fint win) { return (*MPIABI_Win_f2c_ptr)(win); } + +// A.3.14 Tools / Profiling Interface C Bindings + +inline int MPI_Pcontrol(const int level, ...) { + // Variadic arguments cannot be forwarded + return MPI_SUCCESS; +} + +// A.3.15 Tools / MPI Tool Information Interface C Bindings + +inline int MPI_T_category_changed(int *update_number) { + return (*MPIABI_T_category_changed_ptr)(update_number); +} + +inline int MPI_T_category_get_categories(int cat_index, int len, + int indices[]) { + return (*MPIABI_T_category_get_categories_ptr)(cat_index, len, indices); +} + +inline int MPI_T_category_get_cvars(int cat_index, int len, int indices[]) { + return (*MPIABI_T_category_get_cvars_ptr)(cat_index, len, indices); +} + +inline int MPI_T_category_get_events(int cat_index, int len, int indices[]) { + return (*MPIABI_T_category_get_events_ptr)(cat_index, len, indices); +} + +inline int MPI_T_category_get_index(const char *name, int *cat_index) { + return (*MPIABI_T_category_get_index_ptr)(name, cat_index); +} + +inline int MPI_T_category_get_info(int cat_index, char *name, int *name_len, + char *desc, int *desc_len, int *num_cvars, + int *num_pvars, int *num_categories) { + return (*MPIABI_T_category_get_info_ptr)(cat_index, name, name_len, desc, + desc_len, num_cvars, num_pvars, + num_categories); +} + +inline int MPI_T_category_get_num(int *num_cat) { + return (*MPIABI_T_category_get_num_ptr)(num_cat); +} + +inline int MPI_T_category_get_num_events(int cat_index, int *num_events) { + return (*MPIABI_T_category_get_num_events_ptr)(cat_index, num_events); +} + +inline int MPI_T_category_get_pvars(int cat_index, int len, int indices[]) { + return (*MPIABI_T_category_get_pvars_ptr)(cat_index, len, indices); +} + +inline int MPI_T_cvar_get_index(const char *name, int *cvar_index) { + return (*MPIABI_T_cvar_get_index_ptr)(name, cvar_index); +} + +inline int MPI_T_cvar_get_info(int cvar_index, char *name, int *name_len, + int *verbosity, MPI_Datatype *datatype, + MPI_T_enum *enumtype, char *desc, int *desc_len, + int *bind, int *scope) { + return (*MPIABI_T_cvar_get_info_ptr)(cvar_index, name, name_len, verbosity, + datatype, enumtype, desc, desc_len, bind, + scope); +} + +inline int MPI_T_cvar_get_num(int *num_cvar) { + return (*MPIABI_T_cvar_get_num_ptr)(num_cvar); +} + +inline int MPI_T_cvar_handle_alloc(int cvar_index, void *obj_handle, + MPI_T_cvar_handle *handle, int *count) { + return (*MPIABI_T_cvar_handle_alloc_ptr)(cvar_index, obj_handle, handle, + count); +} + +inline int MPI_T_cvar_handle_free(MPI_T_cvar_handle *handle) { + return (*MPIABI_T_cvar_handle_free_ptr)(handle); +} + +inline int MPI_T_cvar_read(MPI_T_cvar_handle handle, void *buf) { + return (*MPIABI_T_cvar_read_ptr)(handle, buf); +} + +inline int MPI_T_cvar_write(MPI_T_cvar_handle handle, const void *buf) { + return (*MPIABI_T_cvar_write_ptr)(handle, buf); +} + +inline int MPI_T_enum_get_info(MPI_T_enum enumtype, int *num, char *name, + int *name_len) { + return (*MPIABI_T_enum_get_info_ptr)(enumtype, num, name, name_len); +} + +inline int MPI_T_enum_get_item(MPI_T_enum enumtype, int index, int *value, + char *name, int *name_len) { + return (*MPIABI_T_enum_get_item_ptr)(enumtype, index, value, name, name_len); +} + +inline int +MPI_T_event_callback_get_info(MPI_T_event_registration event_registration, + MPI_T_cb_safety cb_safety, MPI_Info *info_used) { + return (*MPIABI_T_event_callback_get_info_ptr)(event_registration, cb_safety, + info_used); +} + +inline int +MPI_T_event_callback_set_info(MPI_T_event_registration event_registration, + MPI_T_cb_safety cb_safety, MPI_Info info) { + return (*MPIABI_T_event_callback_set_info_ptr)(event_registration, cb_safety, + info); +} + +inline int MPI_T_event_copy(MPI_T_event_instance event_instance, void *buffer) { + return (*MPIABI_T_event_copy_ptr)(event_instance, buffer); +} + +inline int MPI_T_event_get_index(const char *name, int *event_index) { + return (*MPIABI_T_event_get_index_ptr)(name, event_index); +} + +inline int MPI_T_event_get_info(int event_index, char *name, int *name_len, + int *verbosity, + MPI_Datatype array_of_datatypes[], + MPI_Aint array_of_displacements[], + int *num_elements, MPI_T_enum *enumtype, + MPI_Info *info, char *desc, int *desc_len, + int *bind) { + return (*MPIABI_T_event_get_info_ptr)(event_index, name, name_len, verbosity, + array_of_datatypes, + array_of_displacements, num_elements, + enumtype, info, desc, desc_len, bind); +} + +inline int MPI_T_event_get_num(int *num_events) { + return (*MPIABI_T_event_get_num_ptr)(num_events); +} + +inline int MPI_T_event_get_source(MPI_T_event_instance event_instance, + int *source_index) { + return (*MPIABI_T_event_get_source_ptr)(event_instance, source_index); +} + +inline int MPI_T_event_get_timestamp(MPI_T_event_instance event_instance, + MPI_Count *event_timestamp) { + return (*MPIABI_T_event_get_timestamp_ptr)(event_instance, event_timestamp); +} + +inline int +MPI_T_event_handle_alloc(int event_index, void *obj_handle, MPI_Info info, + MPI_T_event_registration *event_registration) { + return (*MPIABI_T_event_handle_alloc_ptr)(event_index, obj_handle, info, + event_registration); +} + +inline int +MPI_T_event_handle_free(MPI_T_event_registration event_registration, + void *user_data, + MPI_T_event_free_cb_function free_cb_function) { + return (*MPIABI_T_event_handle_free_ptr)(event_registration, user_data, + free_cb_function); +} + +inline int +MPI_T_event_handle_get_info(MPI_T_event_registration event_registration, + MPI_Info *info_used) { + return (*MPIABI_T_event_handle_get_info_ptr)(event_registration, info_used); +} + +inline int +MPI_T_event_handle_set_info(MPI_T_event_registration event_registration, + MPI_Info info) { + return (*MPIABI_T_event_handle_set_info_ptr)(event_registration, info); +} + +inline int MPI_T_event_read(MPI_T_event_instance event_instance, + int element_index, void *buffer) { + return (*MPIABI_T_event_read_ptr)(event_instance, element_index, buffer); +} + +inline int MPI_T_event_register_callback( + MPI_T_event_registration event_registration, MPI_T_cb_safety cb_safety, + MPI_Info info, void *user_data, MPI_T_event_cb_function event_cb_function) { + return (*MPIABI_T_event_register_callback_ptr)( + event_registration, cb_safety, info, user_data, event_cb_function); +} + +inline int MPI_T_event_set_dropped_handler( + MPI_T_event_registration event_registration, + MPI_T_event_dropped_cb_function dropped_cb_function) { + return (*MPIABI_T_event_set_dropped_handler_ptr)(event_registration, + dropped_cb_function); +} + +inline int MPI_T_finalize(void) { return (*MPIABI_T_finalize_ptr)(); } + +inline int MPI_T_init_thread(int required, int *provided) { + return (*MPIABI_T_init_thread_ptr)(required, provided); +} + +inline int MPI_T_pvar_get_index(const char *name, int var_class, + int *pvar_index) { + return (*MPIABI_T_pvar_get_index_ptr)(name, var_class, pvar_index); +} + +inline int MPI_T_pvar_get_info(int pvar_index, char *name, int *name_len, + int *verbosity, int *var_class, + MPI_Datatype *datatype, MPI_T_enum *enumtype, + char *desc, int *desc_len, int *bind, + int *readonly, int *continuous, int *atomic) { + return (*MPIABI_T_pvar_get_info_ptr)( + pvar_index, name, name_len, verbosity, var_class, datatype, enumtype, + desc, desc_len, bind, readonly, continuous, atomic); +} + +inline int MPI_T_pvar_get_num(int *num_pvar) { + return (*MPIABI_T_pvar_get_num_ptr)(num_pvar); +} + +inline int MPI_T_pvar_handle_alloc(MPI_T_pvar_session pe_session, + int pvar_index, void *obj_handle, + MPI_T_pvar_handle *handle, int *count) { + return (*MPIABI_T_pvar_handle_alloc_ptr)(pe_session, pvar_index, obj_handle, + handle, count); +} + +inline int MPI_T_pvar_handle_free(MPI_T_pvar_session pe_session, + MPI_T_pvar_handle *handle) { + return (*MPIABI_T_pvar_handle_free_ptr)(pe_session, handle); +} + +inline int MPI_T_pvar_read(MPI_T_pvar_session pe_session, + MPI_T_pvar_handle handle, void *buf) { + return (*MPIABI_T_pvar_read_ptr)(pe_session, handle, buf); +} + +inline int MPI_T_pvar_readreset(MPI_T_pvar_session pe_session, + MPI_T_pvar_handle handle, void *buf) { + return (*MPIABI_T_pvar_readreset_ptr)(pe_session, handle, buf); +} + +inline int MPI_T_pvar_reset(MPI_T_pvar_session pe_session, + MPI_T_pvar_handle handle) { + return (*MPIABI_T_pvar_reset_ptr)(pe_session, handle); +} + +inline int MPI_T_pvar_session_create(MPI_T_pvar_session *pe_session) { + return (*MPIABI_T_pvar_session_create_ptr)(pe_session); +} + +inline int MPI_T_pvar_session_free(MPI_T_pvar_session *pe_session) { + return (*MPIABI_T_pvar_session_free_ptr)(pe_session); +} + +inline int MPI_T_pvar_start(MPI_T_pvar_session pe_session, + MPI_T_pvar_handle handle) { + return (*MPIABI_T_pvar_start_ptr)(pe_session, handle); +} + +inline int MPI_T_pvar_stop(MPI_T_pvar_session pe_session, + MPI_T_pvar_handle handle) { + return (*MPIABI_T_pvar_stop_ptr)(pe_session, handle); +} + +inline int MPI_T_pvar_write(MPI_T_pvar_session pe_session, + MPI_T_pvar_handle handle, const void *buf) { + return (*MPIABI_T_pvar_write_ptr)(pe_session, handle, buf); +} + +inline int MPI_T_source_get_info(int source_index, char *name, int *name_len, + char *desc, int *desc_len, + MPI_T_source_order *ordering, + MPI_Count *ticks_per_second, + MPI_Count *max_ticks, MPI_Info *info) { + return (*MPIABI_T_source_get_info_ptr)(source_index, name, name_len, desc, + desc_len, ordering, ticks_per_second, + max_ticks, info); +} + +inline int MPI_T_source_get_num(int *num_sources) { + return (*MPIABI_T_source_get_num_ptr)(num_sources); +} + +inline int MPI_T_source_get_timestamp(int source_index, MPI_Count *timestamp) { + return (*MPIABI_T_source_get_timestamp_ptr)(source_index, timestamp); +} + +// A.3.16 Deprecated C Bindings + +inline int MPI_Attr_delete(MPI_Comm comm, int keyval) { + return (*MPIABI_Attr_delete_ptr)(comm, keyval); +} + +inline int MPI_Attr_get(MPI_Comm comm, int keyval, void *attribute_val, + int *flag) { + return (*MPIABI_Attr_get_ptr)(comm, keyval, attribute_val, flag); +} + +inline int MPI_Attr_put(MPI_Comm comm, int keyval, void *attribute_val) { + return (*MPIABI_Attr_put_ptr)(comm, keyval, attribute_val); +} + +inline int MPI_Get_elements_x(const MPI_Status *status, MPI_Datatype datatype, + MPI_Count *count) { + return (*MPIABI_Get_elements_x_ptr)(status, datatype, count); +} + +inline int MPI_Info_get(MPI_Info info, const char *key, int valuelen, + char *value, int *flag) { + return (*MPIABI_Info_get_ptr)(info, key, valuelen, value, flag); +} + +inline int MPI_Info_get_valuelen(MPI_Info info, const char *key, int *valuelen, + int *flag) { + return (*MPIABI_Info_get_valuelen_ptr)(info, key, valuelen, flag); +} + +inline int MPI_Keyval_create(MPI_Copy_function *copy_fn, + MPI_Delete_function *delete_fn, int *keyval, + void *extra_state) { + return (*MPIABI_Keyval_create_ptr)(copy_fn, delete_fn, keyval, extra_state); +} + +inline int MPI_Keyval_free(int *keyval) { + return (*MPIABI_Keyval_free_ptr)(keyval); +} + +inline int MPI_Status_set_elements_x(MPI_Status *status, MPI_Datatype datatype, + MPI_Count count) { + return (*MPIABI_Status_set_elements_x_ptr)(status, datatype, count); +} + +inline int MPI_Type_get_extent_x(MPI_Datatype datatype, MPI_Count *lb, + MPI_Count *extent) { + return (*MPIABI_Type_get_extent_x_ptr)(datatype, lb, extent); +} + +inline int MPI_Type_get_true_extent_x(MPI_Datatype datatype, MPI_Count *true_lb, + MPI_Count *true_extent) { + return (*MPIABI_Type_get_true_extent_x_ptr)(datatype, true_lb, true_extent); +} + +inline int MPI_Type_size_x(MPI_Datatype datatype, MPI_Count *size) { + return (*MPIABI_Type_size_x_ptr)(datatype, size); +} + +// Removed C Bindings + +inline int MPI_Address(void *location, MPI_Aint *address) { + return (*MPIABI_Address_ptr)(location, address); +} + +inline int MPI_Type_hindexed(int count, int *array_of_blocklengths, + MPI_Aint *array_of_displacements, + MPI_Datatype oldtype, MPI_Datatype *newtype) { + return (*MPIABI_Type_hindexed_ptr)(count, array_of_blocklengths, + array_of_displacements, oldtype, newtype); +} + +inline int MPI_Type_hvector(int count, int blocklength, MPI_Aint stride, + MPI_Datatype oldtype, MPI_Datatype *newtype) { + return (*MPIABI_Type_hvector_ptr)(count, blocklength, stride, oldtype, + newtype); +} + +inline int MPI_Type_struct(int count, int *array_of_blocklengths, + MPI_Aint *array_of_displacements, + MPI_Datatype *array_of_types, + MPI_Datatype *newtype) { + return (*MPIABI_Type_struct_ptr)(count, array_of_blocklengths, + array_of_displacements, array_of_types, + newtype); +} + +inline int MPI_Type_extent(MPI_Datatype datatype, MPI_Aint *extent) { + return (*MPIABI_Type_extent_ptr)(datatype, extent); +} + +inline int MPI_Type_lb(MPI_Datatype datatype, MPI_Aint *displacement) { + return (*MPIABI_Type_lb_ptr)(datatype, displacement); +} + +inline int MPI_Type_ub(MPI_Datatype datatype, MPI_Aint *displacement) { + return (*MPIABI_Type_ub_ptr)(datatype, displacement); +} + +// MPIX + +inline int MPIX_Query_cuda_support(void) { + return (*MPIXABI_Query_cuda_support_ptr)(); +} + +inline int MPIX_Query_hip_support(void) { + return (*MPIXABI_Query_hip_support_ptr)(); +} + +inline int MPIX_Query_rocm_support(void) { + return (*MPIXABI_Query_rocm_support_ptr)(); +} + +inline int MPIX_Query_ze_support(void) { + return (*MPIXABI_Query_ze_support_ptr)(); +} + +// Ensure MPItrampoline is initialized + +#ifdef __APPLE__ +#define MPITRAMPOLINE_CONSTRUCTOR_PRIORITY +#else +#define MPITRAMPOLINE_CONSTRUCTOR_PRIORITY (1000) +#endif +void mpitrampoline_init(void); +static void __attribute__((__constructor__ MPITRAMPOLINE_CONSTRUCTOR_PRIORITY)) +mpitrampoline_init_auto(void) { + mpitrampoline_init(); +} + +#ifdef __cplusplus +} +#endif + +#define MPI_FUNCTIONS_H_INCLUDED +#endif // #ifndef MPI_FUNCTIONS_H +#ifndef MPI_FUNCTIONS_H_INCLUDED +#error +#endif diff --git a/mpitrampoline/include/mpi_mpiabi_function_pointers.h b/mpitrampoline/include/mpi_mpiabi_function_pointers.h new file mode 100644 index 00000000..8c1d6cc2 --- /dev/null +++ b/mpitrampoline/include/mpi_mpiabi_function_pointers.h @@ -0,0 +1,2027 @@ +#ifndef MPI_MPIABI_FUNCTION_POINTERS_H +#define MPI_MPIABI_FUNCTION_POINTERS_H + +#include + +// Declare pointers to MPIABI functions + +// A.3 C Bindings + +// A.3.1 Point-to-Point Communication C Bindings + +extern int (*MPIABI_Bsend_ptr)(const void *buf, int count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm); +extern int (*MPIABI_Bsend_c_ptr)(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm); +extern int (*MPIABI_Bsend_init_ptr)(const void *buf, int count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *request); +extern int (*MPIABI_Bsend_init_c_ptr)(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, + int tag, MPIABI_Comm comm, + MPIABI_Request *request); +extern int (*MPIABI_Buffer_attach_ptr)(void *buffer, int size); +extern int (*MPIABI_Buffer_attach_c_ptr)(void *buffer, MPIABI_Count size); +extern int (*MPIABI_Buffer_detach_ptr)(void *buffer_addr, int *size); +extern int (*MPIABI_Buffer_detach_c_ptr)(void *buffer_addr, MPIABI_Count *size); +extern int (*MPIABI_Buffer_flush_ptr)(void); +extern int (*MPIABI_Buffer_iflush_ptr)(MPIABI_Request *request); +extern int (*MPIABI_Cancel_ptr)(MPIABI_Request *request); +extern int (*MPIABI_Comm_attach_buffer_ptr)(MPIABI_Comm comm, void *buffer, + int size); +extern int (*MPIABI_Comm_attach_buffer_c_ptr)(MPIABI_Comm comm, void *buffer, + MPIABI_Count size); +extern int (*MPIABI_Comm_detach_buffer_ptr)(MPIABI_Comm comm, void *buffer_addr, + int *size); +extern int (*MPIABI_Comm_detach_buffer_c_ptr)(MPIABI_Comm comm, + void *buffer_addr, + MPIABI_Count *size); +extern int (*MPIABI_Comm_flush_buffer_ptr)(MPIABI_Comm comm); +extern int (*MPIABI_Comm_iflush_buffer_ptr)(MPIABI_Comm comm, + MPIABI_Request *request); +extern int (*MPIABI_Get_count_ptr)(const MPIABI_Status *status, + MPIABI_Datatype datatype, int *count); +extern int (*MPIABI_Get_count_c_ptr)(const MPIABI_Status *status, + MPIABI_Datatype datatype, + MPIABI_Count *count); +extern int (*MPIABI_Ibsend_ptr)(const void *buf, int count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *request); +extern int (*MPIABI_Ibsend_c_ptr)(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *request); +extern int (*MPIABI_Improbe_ptr)(int source, int tag, MPIABI_Comm comm, + int *flag, MPIABI_Message *message, + MPIABI_Status *status); +extern int (*MPIABI_Imrecv_ptr)(void *buf, int count, MPIABI_Datatype datatype, + MPIABI_Message *message, + MPIABI_Request *request); +extern int (*MPIABI_Imrecv_c_ptr)(void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Message *message, + MPIABI_Request *request); +extern int (*MPIABI_Iprobe_ptr)(int source, int tag, MPIABI_Comm comm, + int *flag, MPIABI_Status *status); +extern int (*MPIABI_Irecv_ptr)(void *buf, int count, MPIABI_Datatype datatype, + int source, int tag, MPIABI_Comm comm, + MPIABI_Request *request); +extern int (*MPIABI_Irecv_c_ptr)(void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int source, int tag, + MPIABI_Comm comm, MPIABI_Request *request); +extern int (*MPIABI_Irsend_ptr)(const void *buf, int count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *request); +extern int (*MPIABI_Irsend_c_ptr)(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *request); +extern int (*MPIABI_Isend_ptr)(const void *buf, int count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *request); +extern int (*MPIABI_Isend_c_ptr)(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *request); +extern int (*MPIABI_Isendrecv_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, int dest, + int sendtag, void *recvbuf, int recvcount, + MPIABI_Datatype recvtype, int source, + int recvtag, MPIABI_Comm comm, + MPIABI_Request *request); +extern int (*MPIABI_Isendrecv_c_ptr)( + const void *sendbuf, MPIABI_Count sendcount, MPIABI_Datatype sendtype, + int dest, int sendtag, void *recvbuf, MPIABI_Count recvcount, + MPIABI_Datatype recvtype, int source, int recvtag, MPIABI_Comm comm, + MPIABI_Request *request); +extern int (*MPIABI_Isendrecv_replace_ptr)(void *buf, int count, + MPIABI_Datatype datatype, int dest, + int sendtag, int source, int recvtag, + MPIABI_Comm comm, + MPIABI_Request *request); +extern int (*MPIABI_Isendrecv_replace_c_ptr)(void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, + int sendtag, int source, + int recvtag, MPIABI_Comm comm, + MPIABI_Request *request); +extern int (*MPIABI_Issend_ptr)(const void *buf, int count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *request); +extern int (*MPIABI_Issend_c_ptr)(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *request); +extern int (*MPIABI_Mprobe_ptr)(int source, int tag, MPIABI_Comm comm, + MPIABI_Message *message, MPIABI_Status *status); +extern int (*MPIABI_Mrecv_ptr)(void *buf, int count, MPIABI_Datatype datatype, + MPIABI_Message *message, MPIABI_Status *status); +extern int (*MPIABI_Mrecv_c_ptr)(void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Message *message, + MPIABI_Status *status); +extern int (*MPIABI_Probe_ptr)(int source, int tag, MPIABI_Comm comm, + MPIABI_Status *status); +extern int (*MPIABI_Recv_ptr)(void *buf, int count, MPIABI_Datatype datatype, + int source, int tag, MPIABI_Comm comm, + MPIABI_Status *status); +extern int (*MPIABI_Recv_c_ptr)(void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int source, int tag, + MPIABI_Comm comm, MPIABI_Status *status); +extern int (*MPIABI_Recv_init_ptr)(void *buf, int count, + MPIABI_Datatype datatype, int source, + int tag, MPIABI_Comm comm, + MPIABI_Request *request); +extern int (*MPIABI_Recv_init_c_ptr)(void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int source, + int tag, MPIABI_Comm comm, + MPIABI_Request *request); +extern int (*MPIABI_Request_free_ptr)(MPIABI_Request *request); +extern int (*MPIABI_Request_get_status_ptr)(MPIABI_Request request, int *flag, + MPIABI_Status *status); +extern int (*MPIABI_Request_get_status_all_ptr)( + int count, const MPIABI_Request array_of_requests[], int *flag, + MPIABI_Status array_of_statuses[]); +extern int (*MPIABI_Request_get_status_any_ptr)( + int count, const MPIABI_Request array_of_requests[], int *index, int *flag, + MPIABI_Status *status); +extern int (*MPIABI_Request_get_status_some_ptr)( + int incount, const MPIABI_Request array_of_requests[], int *outcount, + int array_of_indices[], MPIABI_Status array_of_statuses[]); +extern int (*MPIABI_Rsend_ptr)(const void *buf, int count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm); +extern int (*MPIABI_Rsend_c_ptr)(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm); +extern int (*MPIABI_Rsend_init_ptr)(const void *buf, int count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *request); +extern int (*MPIABI_Rsend_init_c_ptr)(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, + int tag, MPIABI_Comm comm, + MPIABI_Request *request); +extern int (*MPIABI_Send_ptr)(const void *buf, int count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm); +extern int (*MPIABI_Send_c_ptr)(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm); +extern int (*MPIABI_Send_init_ptr)(const void *buf, int count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *request); +extern int (*MPIABI_Send_init_c_ptr)(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, + int tag, MPIABI_Comm comm, + MPIABI_Request *request); +extern int (*MPIABI_Sendrecv_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, int dest, + int sendtag, void *recvbuf, int recvcount, + MPIABI_Datatype recvtype, int source, + int recvtag, MPIABI_Comm comm, + MPIABI_Status *status); +extern int (*MPIABI_Sendrecv_c_ptr)(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, int dest, + int sendtag, void *recvbuf, + MPIABI_Count recvcount, + MPIABI_Datatype recvtype, int source, + int recvtag, MPIABI_Comm comm, + MPIABI_Status *status); +extern int (*MPIABI_Sendrecv_replace_ptr)(void *buf, int count, + MPIABI_Datatype datatype, int dest, + int sendtag, int source, int recvtag, + MPIABI_Comm comm, + MPIABI_Status *status); +extern int (*MPIABI_Sendrecv_replace_c_ptr)(void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, + int sendtag, int source, + int recvtag, MPIABI_Comm comm, + MPIABI_Status *status); +extern int (*MPIABI_Session_attach_buffer_ptr)(MPIABI_Session session, + void *buffer, int size); +extern int (*MPIABI_Session_attach_buffer_c_ptr)(MPIABI_Session session, + void *buffer, + MPIABI_Count size); +extern int (*MPIABI_Session_detach_buffer_ptr)(MPIABI_Session session, + void *buffer_addr, int *size); +extern int (*MPIABI_Session_detach_buffer_c_ptr)(MPIABI_Session session, + void *buffer_addr, + MPIABI_Count *size); +extern int (*MPIABI_Session_flush_buffer_ptr)(MPIABI_Session session); +extern int (*MPIABI_Session_iflush_buffer_ptr)(MPIABI_Session session, + MPIABI_Request *request); +extern int (*MPIABI_Ssend_ptr)(const void *buf, int count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm); +extern int (*MPIABI_Ssend_c_ptr)(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm); +extern int (*MPIABI_Ssend_init_ptr)(const void *buf, int count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *request); +extern int (*MPIABI_Ssend_init_c_ptr)(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, + int tag, MPIABI_Comm comm, + MPIABI_Request *request); +extern int (*MPIABI_Start_ptr)(MPIABI_Request *request); +extern int (*MPIABI_Startall_ptr)(int count, + MPIABI_Request array_of_requests[]); +extern int (*MPIABI_Status_get_error_ptr)(MPIABI_Status *status, int *err); +extern int (*MPIABI_Status_get_source_ptr)(MPIABI_Status *status, int *source); +extern int (*MPIABI_Status_get_tag_ptr)(MPIABI_Status *status, int *tag); +extern int (*MPIABI_Test_ptr)(MPIABI_Request *request, int *flag, + MPIABI_Status *status); +extern int (*MPIABI_Test_cancelled_ptr)(const MPIABI_Status *status, int *flag); +extern int (*MPIABI_Testall_ptr)(int count, MPIABI_Request array_of_requests[], + int *flag, MPIABI_Status array_of_statuses[]); +extern int (*MPIABI_Testany_ptr)(int count, MPIABI_Request array_of_requests[], + int *index, int *flag, MPIABI_Status *status); +extern int (*MPIABI_Testsome_ptr)(int incount, + MPIABI_Request array_of_requests[], + int *outcount, int array_of_indices[], + MPIABI_Status array_of_statuses[]); +extern int (*MPIABI_Wait_ptr)(MPIABI_Request *request, MPIABI_Status *status); +extern int (*MPIABI_Waitall_ptr)(int count, MPIABI_Request array_of_requests[], + MPIABI_Status array_of_statuses[]); +extern int (*MPIABI_Waitany_ptr)(int count, MPIABI_Request array_of_requests[], + int *index, MPIABI_Status *status); +extern int (*MPIABI_Waitsome_ptr)(int incount, + MPIABI_Request array_of_requests[], + int *outcount, int array_of_indices[], + MPIABI_Status array_of_statuses[]); + +// A.3.2 Partitioned Communication C Bindings + +extern int (*MPIABI_Parrived_ptr)(MPIABI_Request request, int partition, + int *flag); +extern int (*MPIABI_Pready_ptr)(int partition, MPIABI_Request request); +extern int (*MPIABI_Pready_list_ptr)(int length, + const int array_of_partitions[], + MPIABI_Request request); +extern int (*MPIABI_Pready_range_ptr)(int partition_low, int partition_high, + MPIABI_Request request); +extern int (*MPIABI_Precv_init_ptr)(void *buf, int partitions, + MPIABI_Count count, + MPIABI_Datatype datatype, int source, + int tag, MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +extern int (*MPIABI_Psend_init_ptr)(const void *buf, int partitions, + MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); + +// A.3.3 Datatypes C Bindings + +extern MPIABI_Aint (*MPIABI_Aint_add_ptr)(MPIABI_Aint base, MPIABI_Aint disp); +extern MPIABI_Aint (*MPIABI_Aint_diff_ptr)(MPIABI_Aint addr1, + MPIABI_Aint addr2); +extern int (*MPIABI_Get_address_ptr)(const void *location, + MPIABI_Aint *address); +extern int (*MPIABI_Get_elements_ptr)(const MPIABI_Status *status, + MPIABI_Datatype datatype, int *count); +extern int (*MPIABI_Get_elements_c_ptr)(const MPIABI_Status *status, + MPIABI_Datatype datatype, + MPIABI_Count *count); +extern int (*MPIABI_Pack_ptr)(const void *inbuf, int incount, + MPIABI_Datatype datatype, void *outbuf, + int outsize, int *position, MPIABI_Comm comm); +extern int (*MPIABI_Pack_c_ptr)(const void *inbuf, MPIABI_Count incount, + MPIABI_Datatype datatype, void *outbuf, + MPIABI_Count outsize, MPIABI_Count *position, + MPIABI_Comm comm); +extern int (*MPIABI_Pack_external_ptr)(const char datarep[], const void *inbuf, + int incount, MPIABI_Datatype datatype, + void *outbuf, MPIABI_Aint outsize, + MPIABI_Aint *position); +extern int (*MPIABI_Pack_external_c_ptr)(const char datarep[], + const void *inbuf, + MPIABI_Count incount, + MPIABI_Datatype datatype, void *outbuf, + MPIABI_Count outsize, + MPIABI_Count *position); +extern int (*MPIABI_Pack_external_size_ptr)(const char datarep[], + MPIABI_Count incount, + MPIABI_Datatype datatype, + MPIABI_Aint *size); +extern int (*MPIABI_Pack_external_size_c_ptr)(const char datarep[], + MPIABI_Count incount, + MPIABI_Datatype datatype, + MPIABI_Count *size); +extern int (*MPIABI_Pack_size_ptr)(int incount, MPIABI_Datatype datatype, + MPIABI_Comm comm, int *size); +extern int (*MPIABI_Pack_size_c_ptr)(MPIABI_Count incount, + MPIABI_Datatype datatype, MPIABI_Comm comm, + MPIABI_Count *size); +extern int (*MPIABI_Type_commit_ptr)(MPIABI_Datatype *datatype); +extern int (*MPIABI_Type_contiguous_ptr)(int count, MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +extern int (*MPIABI_Type_contiguous_c_ptr)(MPIABI_Count count, + MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +extern int (*MPIABI_Type_create_darray_ptr)(int size, int rank, int ndims, + const int array_of_gsizes[], + const int array_of_distribs[], + const int array_of_dargs[], + const int array_of_psizes[], + int order, MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +extern int (*MPIABI_Type_create_darray_c_ptr)( + int size, int rank, int ndims, const MPIABI_Count array_of_gsizes[], + const int array_of_distribs[], const int array_of_dargs[], + const int array_of_psizes[], int order, MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +extern int (*MPIABI_Type_create_hindexed_ptr)( + int count, const int array_of_blocklengths[], + const MPIABI_Aint array_of_displacements[], MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +extern int (*MPIABI_Type_create_hindexed_block_ptr)( + int count, int blocklength, const MPIABI_Aint array_of_displacements[], + MPIABI_Datatype oldtype, MPIABI_Datatype *newtype); +extern int (*MPIABI_Type_create_hindexed_block_c_ptr)( + MPIABI_Count count, MPIABI_Count blocklength, + const MPIABI_Count array_of_displacements[], MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +extern int (*MPIABI_Type_create_hindexed_c_ptr)( + MPIABI_Count count, const MPIABI_Count array_of_blocklengths[], + const MPIABI_Count array_of_displacements[], MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +extern int (*MPIABI_Type_create_hvector_ptr)(int count, int blocklength, + MPIABI_Aint stride, + MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +extern int (*MPIABI_Type_create_hvector_c_ptr)(MPIABI_Count count, + MPIABI_Count blocklength, + MPIABI_Count stride, + MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +extern int (*MPIABI_Type_create_indexed_block_ptr)( + int count, int blocklength, const int array_of_displacements[], + MPIABI_Datatype oldtype, MPIABI_Datatype *newtype); +extern int (*MPIABI_Type_create_indexed_block_c_ptr)( + MPIABI_Count count, MPIABI_Count blocklength, + const MPIABI_Count array_of_displacements[], MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +extern int (*MPIABI_Type_create_resized_ptr)(MPIABI_Datatype oldtype, + MPIABI_Aint lb, MPIABI_Aint extent, + MPIABI_Datatype *newtype); +extern int (*MPIABI_Type_create_resized_c_ptr)(MPIABI_Datatype oldtype, + MPIABI_Count lb, + MPIABI_Count extent, + MPIABI_Datatype *newtype); +extern int (*MPIABI_Type_create_struct_ptr)( + int count, const int array_of_blocklengths[], + const MPIABI_Aint array_of_displacements[], + const MPIABI_Datatype array_of_types[], MPIABI_Datatype *newtype); +extern int (*MPIABI_Type_create_struct_c_ptr)( + MPIABI_Count count, const MPIABI_Count array_of_blocklengths[], + const MPIABI_Count array_of_displacements[], + const MPIABI_Datatype array_of_types[], MPIABI_Datatype *newtype); +extern int (*MPIABI_Type_create_subarray_ptr)( + int ndims, const int array_of_sizes[], const int array_of_subsizes[], + const int array_of_starts[], int order, MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +extern int (*MPIABI_Type_create_subarray_c_ptr)( + int ndims, const MPIABI_Count array_of_sizes[], + const MPIABI_Count array_of_subsizes[], + const MPIABI_Count array_of_starts[], int order, MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +extern int (*MPIABI_Type_dup_ptr)(MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +extern int (*MPIABI_Type_free_ptr)(MPIABI_Datatype *datatype); +extern int (*MPIABI_Type_get_contents_ptr)( + MPIABI_Datatype datatype, int max_integers, int max_addresses, + int max_datatypes, int array_of_integers[], + MPIABI_Aint array_of_addresses[], MPIABI_Datatype array_of_datatypes[]); +extern int (*MPIABI_Type_get_contents_c_ptr)( + MPIABI_Datatype datatype, MPIABI_Count max_integers, + MPIABI_Count max_addresses, MPIABI_Count max_large_counts, + MPIABI_Count max_datatypes, int array_of_integers[], + MPIABI_Aint array_of_addresses[], MPIABI_Count array_of_large_counts[], + MPIABI_Datatype array_of_datatypes[]); +extern int (*MPIABI_Type_get_envelope_ptr)(MPIABI_Datatype datatype, + int *num_integers, + int *num_addresses, + int *num_datatypes, int *combiner); +extern int (*MPIABI_Type_get_envelope_c_ptr)(MPIABI_Datatype datatype, + MPIABI_Count *num_integers, + MPIABI_Count *num_addresses, + MPIABI_Count *num_large_counts, + MPIABI_Count *num_datatypes, + int *combiner); +extern int (*MPIABI_Type_get_extent_ptr)(MPIABI_Datatype datatype, + MPIABI_Aint *lb, MPIABI_Aint *extent); +extern int (*MPIABI_Type_get_extent_c_ptr)(MPIABI_Datatype datatype, + MPIABI_Count *lb, + MPIABI_Count *extent); +extern int (*MPIABI_Type_get_true_extent_ptr)(MPIABI_Datatype datatype, + MPIABI_Aint *true_lb, + MPIABI_Aint *true_extent); +extern int (*MPIABI_Type_get_true_extent_c_ptr)(MPIABI_Datatype datatype, + MPIABI_Count *true_lb, + MPIABI_Count *true_extent); +extern int (*MPIABI_Type_indexed_ptr)(int count, + const int array_of_blocklengths[], + const int array_of_displacements[], + MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +extern int (*MPIABI_Type_indexed_c_ptr)( + MPIABI_Count count, const MPIABI_Count array_of_blocklengths[], + const MPIABI_Count array_of_displacements[], MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +extern int (*MPIABI_Type_size_ptr)(MPIABI_Datatype datatype, int *size); +extern int (*MPIABI_Type_size_c_ptr)(MPIABI_Datatype datatype, + MPIABI_Count *size); +extern int (*MPIABI_Type_vector_ptr)(int count, int blocklength, int stride, + MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +extern int (*MPIABI_Type_vector_c_ptr)(MPIABI_Count count, + MPIABI_Count blocklength, + MPIABI_Count stride, + MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +extern int (*MPIABI_Unpack_ptr)(const void *inbuf, int insize, int *position, + void *outbuf, int outcount, + MPIABI_Datatype datatype, MPIABI_Comm comm); +extern int (*MPIABI_Unpack_c_ptr)(const void *inbuf, MPIABI_Count insize, + MPIABI_Count *position, void *outbuf, + MPIABI_Count outcount, + MPIABI_Datatype datatype, MPIABI_Comm comm); +extern int (*MPIABI_Unpack_external_ptr)(const char datarep[], + const void *inbuf, MPIABI_Aint insize, + MPIABI_Aint *position, void *outbuf, + int outcount, + MPIABI_Datatype datatype); +extern int (*MPIABI_Unpack_external_c_ptr)(const char datarep[], + const void *inbuf, + MPIABI_Count insize, + MPIABI_Count *position, void *outbuf, + MPIABI_Count outcount, + MPIABI_Datatype datatype); + +// A.3.4 Collective Communication C Bindings + +extern int (*MPIABI_Allgather_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm); +extern int (*MPIABI_Allgather_c_ptr)(const void *sendbuf, + MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, + MPIABI_Datatype recvtype, + MPIABI_Comm comm); +extern int (*MPIABI_Allgather_init_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +extern int (*MPIABI_Allgather_init_c_ptr)( + const void *sendbuf, MPIABI_Count sendcount, MPIABI_Datatype sendtype, + void *recvbuf, MPIABI_Count recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Info info, MPIABI_Request *request); +extern int (*MPIABI_Allgatherv_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPIABI_Datatype recvtype, MPIABI_Comm comm); +extern int (*MPIABI_Allgatherv_c_ptr)( + const void *sendbuf, MPIABI_Count sendcount, MPIABI_Datatype sendtype, + void *recvbuf, const MPIABI_Count recvcounts[], const MPIABI_Aint displs[], + MPIABI_Datatype recvtype, MPIABI_Comm comm); +extern int (*MPIABI_Allgatherv_init_ptr)( + const void *sendbuf, int sendcount, MPIABI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Info info, MPIABI_Request *request); +extern int (*MPIABI_Allgatherv_init_c_ptr)( + const void *sendbuf, MPIABI_Count sendcount, MPIABI_Datatype sendtype, + void *recvbuf, const MPIABI_Count recvcounts[], const MPIABI_Aint displs[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +extern int (*MPIABI_Allreduce_ptr)(const void *sendbuf, void *recvbuf, + int count, MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm); +extern int (*MPIABI_Allreduce_c_ptr)(const void *sendbuf, void *recvbuf, + MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm); +extern int (*MPIABI_Allreduce_init_ptr)(const void *sendbuf, void *recvbuf, + int count, MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Info info, + MPIABI_Request *request); +extern int (*MPIABI_Allreduce_init_c_ptr)(const void *sendbuf, void *recvbuf, + MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Info info, + MPIABI_Request *request); +extern int (*MPIABI_Alltoall_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm); +extern int (*MPIABI_Alltoall_c_ptr)(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, + MPIABI_Datatype recvtype, MPIABI_Comm comm); +extern int (*MPIABI_Alltoall_init_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +extern int (*MPIABI_Alltoall_init_c_ptr)( + const void *sendbuf, MPIABI_Count sendcount, MPIABI_Datatype sendtype, + void *recvbuf, MPIABI_Count recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Info info, MPIABI_Request *request); +extern int (*MPIABI_Alltoallv_ptr)(const void *sendbuf, const int sendcounts[], + const int sdispls[], + MPIABI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int rdispls[], + MPIABI_Datatype recvtype, MPIABI_Comm comm); +extern int (*MPIABI_Alltoallv_c_ptr)( + const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], const MPIABI_Aint rdispls[], + MPIABI_Datatype recvtype, MPIABI_Comm comm); +extern int (*MPIABI_Alltoallv_init_ptr)( + const void *sendbuf, const int sendcounts[], const int sdispls[], + MPIABI_Datatype sendtype, void *recvbuf, const int recvcounts[], + const int rdispls[], MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *request); +extern int (*MPIABI_Alltoallv_init_c_ptr)( + const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], const MPIABI_Aint rdispls[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +extern int (*MPIABI_Alltoallw_ptr)( + const void *sendbuf, const int sendcounts[], const int sdispls[], + const MPIABI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], + const int rdispls[], const MPIABI_Datatype recvtypes[], MPIABI_Comm comm); +extern int (*MPIABI_Alltoallw_c_ptr)( + const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], const MPIABI_Datatype sendtypes[], + void *recvbuf, const MPIABI_Count recvcounts[], const MPIABI_Aint rdispls[], + const MPIABI_Datatype recvtypes[], MPIABI_Comm comm); +extern int (*MPIABI_Alltoallw_init_ptr)( + const void *sendbuf, const int sendcounts[], const int sdispls[], + const MPIABI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], + const int rdispls[], const MPIABI_Datatype recvtypes[], MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *request); +extern int (*MPIABI_Alltoallw_init_c_ptr)( + const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], const MPIABI_Datatype sendtypes[], + void *recvbuf, const MPIABI_Count recvcounts[], const MPIABI_Aint rdispls[], + const MPIABI_Datatype recvtypes[], MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +extern int (*MPIABI_Barrier_ptr)(MPIABI_Comm comm); +extern int (*MPIABI_Barrier_init_ptr)(MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +extern int (*MPIABI_Bcast_ptr)(void *buffer, int count, + MPIABI_Datatype datatype, int root, + MPIABI_Comm comm); +extern int (*MPIABI_Bcast_c_ptr)(void *buffer, MPIABI_Count count, + MPIABI_Datatype datatype, int root, + MPIABI_Comm comm); +extern int (*MPIABI_Bcast_init_ptr)(void *buffer, int count, + MPIABI_Datatype datatype, int root, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +extern int (*MPIABI_Bcast_init_c_ptr)(void *buffer, MPIABI_Count count, + MPIABI_Datatype datatype, int root, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +extern int (*MPIABI_Exscan_ptr)(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm); +extern int (*MPIABI_Exscan_c_ptr)(const void *sendbuf, void *recvbuf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm); +extern int (*MPIABI_Exscan_init_ptr)(const void *sendbuf, void *recvbuf, + int count, MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *request); +extern int (*MPIABI_Exscan_init_c_ptr)(const void *sendbuf, void *recvbuf, + MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +extern int (*MPIABI_Gather_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, + int root, MPIABI_Comm comm); +extern int (*MPIABI_Gather_c_ptr)(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, + MPIABI_Datatype recvtype, int root, + MPIABI_Comm comm); +extern int (*MPIABI_Gather_init_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, + int root, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *request); +extern int (*MPIABI_Gather_init_c_ptr)( + const void *sendbuf, MPIABI_Count sendcount, MPIABI_Datatype sendtype, + void *recvbuf, MPIABI_Count recvcount, MPIABI_Datatype recvtype, int root, + MPIABI_Comm comm, MPIABI_Info info, MPIABI_Request *request); +extern int (*MPIABI_Gatherv_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPIABI_Datatype recvtype, int root, + MPIABI_Comm comm); +extern int (*MPIABI_Gatherv_c_ptr)(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], + const MPIABI_Aint displs[], + MPIABI_Datatype recvtype, int root, + MPIABI_Comm comm); +extern int (*MPIABI_Gatherv_init_ptr)( + const void *sendbuf, int sendcount, MPIABI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], MPIABI_Datatype recvtype, + int root, MPIABI_Comm comm, MPIABI_Info info, MPIABI_Request *request); +extern int (*MPIABI_Gatherv_init_c_ptr)( + const void *sendbuf, MPIABI_Count sendcount, MPIABI_Datatype sendtype, + void *recvbuf, const MPIABI_Count recvcounts[], const MPIABI_Aint displs[], + MPIABI_Datatype recvtype, int root, MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +extern int (*MPIABI_Iallgather_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Request *request); +extern int (*MPIABI_Iallgather_c_ptr)( + const void *sendbuf, MPIABI_Count sendcount, MPIABI_Datatype sendtype, + void *recvbuf, MPIABI_Count recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Request *request); +extern int (*MPIABI_Iallgatherv_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Request *request); +extern int (*MPIABI_Iallgatherv_c_ptr)( + const void *sendbuf, MPIABI_Count sendcount, MPIABI_Datatype sendtype, + void *recvbuf, const MPIABI_Count recvcounts[], const MPIABI_Aint displs[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, MPIABI_Request *request); +extern int (*MPIABI_Iallreduce_ptr)(const void *sendbuf, void *recvbuf, + int count, MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Request *request); +extern int (*MPIABI_Iallreduce_c_ptr)(const void *sendbuf, void *recvbuf, + MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm, + MPIABI_Request *request); +extern int (*MPIABI_Ialltoall_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Request *request); +extern int (*MPIABI_Ialltoall_c_ptr)(const void *sendbuf, + MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Request *request); +extern int (*MPIABI_Ialltoallv_ptr)(const void *sendbuf, const int sendcounts[], + const int sdispls[], + MPIABI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int rdispls[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Request *request); +extern int (*MPIABI_Ialltoallv_c_ptr)( + const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], const MPIABI_Aint rdispls[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, MPIABI_Request *request); +extern int (*MPIABI_Ialltoallw_ptr)(const void *sendbuf, const int sendcounts[], + const int sdispls[], + const MPIABI_Datatype sendtypes[], + void *recvbuf, const int recvcounts[], + const int rdispls[], + const MPIABI_Datatype recvtypes[], + MPIABI_Comm comm, MPIABI_Request *request); +extern int (*MPIABI_Ialltoallw_c_ptr)( + const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], const MPIABI_Datatype sendtypes[], + void *recvbuf, const MPIABI_Count recvcounts[], const MPIABI_Aint rdispls[], + const MPIABI_Datatype recvtypes[], MPIABI_Comm comm, + MPIABI_Request *request); +extern int (*MPIABI_Ibarrier_ptr)(MPIABI_Comm comm, MPIABI_Request *request); +extern int (*MPIABI_Ibcast_ptr)(void *buffer, int count, + MPIABI_Datatype datatype, int root, + MPIABI_Comm comm, MPIABI_Request *request); +extern int (*MPIABI_Ibcast_c_ptr)(void *buffer, MPIABI_Count count, + MPIABI_Datatype datatype, int root, + MPIABI_Comm comm, MPIABI_Request *request); +extern int (*MPIABI_Iexscan_ptr)(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm, MPIABI_Request *request); +extern int (*MPIABI_Iexscan_c_ptr)(const void *sendbuf, void *recvbuf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Request *request); +extern int (*MPIABI_Igather_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, + int root, MPIABI_Comm comm, + MPIABI_Request *request); +extern int (*MPIABI_Igather_c_ptr)(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, + MPIABI_Datatype recvtype, int root, + MPIABI_Comm comm, MPIABI_Request *request); +extern int (*MPIABI_Igatherv_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPIABI_Datatype recvtype, int root, + MPIABI_Comm comm, MPIABI_Request *request); +extern int (*MPIABI_Igatherv_c_ptr)(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], + const MPIABI_Aint displs[], + MPIABI_Datatype recvtype, int root, + MPIABI_Comm comm, MPIABI_Request *request); +extern int (*MPIABI_Ireduce_ptr)(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, + int root, MPIABI_Comm comm, + MPIABI_Request *request); +extern int (*MPIABI_Ireduce_c_ptr)(const void *sendbuf, void *recvbuf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Op op, int root, MPIABI_Comm comm, + MPIABI_Request *request); +extern int (*MPIABI_Ireduce_scatter_ptr)(const void *sendbuf, void *recvbuf, + const int recvcounts[], + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm, + MPIABI_Request *request); +extern int (*MPIABI_Ireduce_scatter_block_ptr)(const void *sendbuf, + void *recvbuf, int recvcount, + MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Request *request); +extern int (*MPIABI_Ireduce_scatter_block_c_ptr)(const void *sendbuf, + void *recvbuf, + MPIABI_Count recvcount, + MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Request *request); +extern int (*MPIABI_Ireduce_scatter_c_ptr)(const void *sendbuf, void *recvbuf, + const MPIABI_Count recvcounts[], + MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Request *request); +extern int (*MPIABI_Iscan_ptr)(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm, MPIABI_Request *request); +extern int (*MPIABI_Iscan_c_ptr)(const void *sendbuf, void *recvbuf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Request *request); +extern int (*MPIABI_Iscatter_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, + int root, MPIABI_Comm comm, + MPIABI_Request *request); +extern int (*MPIABI_Iscatter_c_ptr)(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, + MPIABI_Datatype recvtype, int root, + MPIABI_Comm comm, MPIABI_Request *request); +extern int (*MPIABI_Iscatterv_ptr)(const void *sendbuf, const int sendcounts[], + const int displs[], MPIABI_Datatype sendtype, + void *recvbuf, int recvcount, + MPIABI_Datatype recvtype, int root, + MPIABI_Comm comm, MPIABI_Request *request); +extern int (*MPIABI_Iscatterv_c_ptr)(const void *sendbuf, + const MPIABI_Count sendcounts[], + const MPIABI_Aint displs[], + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, + MPIABI_Datatype recvtype, int root, + MPIABI_Comm comm, MPIABI_Request *request); +extern int (*MPIABI_Op_commutative_ptr)(MPIABI_Op op, int *commute); +extern int (*MPIABI_Op_create_ptr)(MPIABI_User_function *user_fn, int commute, + MPIABI_Op *op); +extern int (*MPIABI_Op_create_c_ptr)(MPIABI_User_function_c *user_fn, + int commute, MPIABI_Op *op); +extern int (*MPIABI_Op_free_ptr)(MPIABI_Op *op); +extern int (*MPIABI_Reduce_ptr)(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, + int root, MPIABI_Comm comm); +extern int (*MPIABI_Reduce_c_ptr)(const void *sendbuf, void *recvbuf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Op op, int root, MPIABI_Comm comm); +extern int (*MPIABI_Reduce_init_ptr)(const void *sendbuf, void *recvbuf, + int count, MPIABI_Datatype datatype, + MPIABI_Op op, int root, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *request); +extern int (*MPIABI_Reduce_init_c_ptr)(const void *sendbuf, void *recvbuf, + MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Op op, + int root, MPIABI_Comm comm, + MPIABI_Info info, + MPIABI_Request *request); +extern int (*MPIABI_Reduce_local_ptr)(const void *inbuf, void *inoutbuf, + int count, MPIABI_Datatype datatype, + MPIABI_Op op); +extern int (*MPIABI_Reduce_local_c_ptr)(const void *inbuf, void *inoutbuf, + MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Op op); +extern int (*MPIABI_Reduce_scatter_ptr)(const void *sendbuf, void *recvbuf, + const int recvcounts[], + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm); +extern int (*MPIABI_Reduce_scatter_block_ptr)(const void *sendbuf, + void *recvbuf, int recvcount, + MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm); +extern int (*MPIABI_Reduce_scatter_block_c_ptr)(const void *sendbuf, + void *recvbuf, + MPIABI_Count recvcount, + MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm); +extern int (*MPIABI_Reduce_scatter_block_init_ptr)( + const void *sendbuf, void *recvbuf, int recvcount, MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm, MPIABI_Info info, MPIABI_Request *request); +extern int (*MPIABI_Reduce_scatter_block_init_c_ptr)( + const void *sendbuf, void *recvbuf, MPIABI_Count recvcount, + MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +extern int (*MPIABI_Reduce_scatter_c_ptr)(const void *sendbuf, void *recvbuf, + const MPIABI_Count recvcounts[], + MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm); +extern int (*MPIABI_Reduce_scatter_init_ptr)(const void *sendbuf, void *recvbuf, + const int recvcounts[], + MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Info info, + MPIABI_Request *request); +extern int (*MPIABI_Reduce_scatter_init_c_ptr)( + const void *sendbuf, void *recvbuf, const MPIABI_Count recvcounts[], + MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +extern int (*MPIABI_Scan_ptr)(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm); +extern int (*MPIABI_Scan_c_ptr)(const void *sendbuf, void *recvbuf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm); +extern int (*MPIABI_Scan_init_ptr)(const void *sendbuf, void *recvbuf, + int count, MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *request); +extern int (*MPIABI_Scan_init_c_ptr)(const void *sendbuf, void *recvbuf, + MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +extern int (*MPIABI_Scatter_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, + int root, MPIABI_Comm comm); +extern int (*MPIABI_Scatter_c_ptr)(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, + MPIABI_Datatype recvtype, int root, + MPIABI_Comm comm); +extern int (*MPIABI_Scatter_init_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, + int root, MPIABI_Comm comm, + MPIABI_Info info, + MPIABI_Request *request); +extern int (*MPIABI_Scatter_init_c_ptr)( + const void *sendbuf, MPIABI_Count sendcount, MPIABI_Datatype sendtype, + void *recvbuf, MPIABI_Count recvcount, MPIABI_Datatype recvtype, int root, + MPIABI_Comm comm, MPIABI_Info info, MPIABI_Request *request); +extern int (*MPIABI_Scatterv_ptr)(const void *sendbuf, const int sendcounts[], + const int displs[], MPIABI_Datatype sendtype, + void *recvbuf, int recvcount, + MPIABI_Datatype recvtype, int root, + MPIABI_Comm comm); +extern int (*MPIABI_Scatterv_c_ptr)(const void *sendbuf, + const MPIABI_Count sendcounts[], + const MPIABI_Aint displs[], + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, + MPIABI_Datatype recvtype, int root, + MPIABI_Comm comm); +extern int (*MPIABI_Scatterv_init_ptr)( + const void *sendbuf, const int sendcounts[], const int displs[], + MPIABI_Datatype sendtype, void *recvbuf, int recvcount, + MPIABI_Datatype recvtype, int root, MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +extern int (*MPIABI_Scatterv_init_c_ptr)( + const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint displs[], MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, MPIABI_Datatype recvtype, int root, + MPIABI_Comm comm, MPIABI_Info info, MPIABI_Request *request); +extern int (*MPIABI_Type_get_value_index_ptr)(MPIABI_Datatype value_type, + MPIABI_Datatype index_type, + MPIABI_Datatype *pair_type); + +// A.3.5 Groups, Contexts, Communicators, and Caching C Bindings + +extern int (*MPIABI_Comm_compare_ptr)(MPIABI_Comm comm1, MPIABI_Comm comm2, + int *result); +extern int (*MPIABI_Comm_create_ptr)(MPIABI_Comm comm, MPIABI_Group group, + MPIABI_Comm *newcomm); +extern int (*MPIABI_Comm_create_from_group_ptr)(MPIABI_Group group, + const char *stringtag, + MPIABI_Info info, + MPIABI_Errhandler errhandler, + MPIABI_Comm *newcomm); +extern int (*MPIABI_Comm_create_group_ptr)(MPIABI_Comm comm, MPIABI_Group group, + int tag, MPIABI_Comm *newcomm); +extern int (*MPIABI_Comm_create_keyval_ptr)( + MPIABI_Comm_copy_attr_function *comm_copy_attr_fn, + MPIABI_Comm_delete_attr_function *comm_delete_attr_fn, int *comm_keyval, + void *extra_state); +extern int (*MPIABI_Comm_delete_attr_ptr)(MPIABI_Comm comm, int comm_keyval); +extern int (*MPIABI_Comm_dup_ptr)(MPIABI_Comm comm, MPIABI_Comm *newcomm); +extern int (*MPIABI_Comm_dup_with_info_ptr)(MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Comm *newcomm); +extern int (*MPIABI_Comm_free_ptr)(MPIABI_Comm *comm); +extern int (*MPIABI_Comm_get_name_ptr)(MPIABI_Comm comm, char *comm_name, + int *resultlen); +extern int (*MPIABI_Comm_free_keyval_ptr)(int *comm_keyval); +extern int (*MPIABI_Comm_get_attr_ptr)(MPIABI_Comm comm, int comm_keyval, + void *attribute_val, int *flag); +extern int (*MPIABI_Comm_get_info_ptr)(MPIABI_Comm comm, + MPIABI_Info *info_used); +extern int (*MPIABI_Comm_group_ptr)(MPIABI_Comm comm, MPIABI_Group *group); +extern int (*MPIABI_Comm_idup_ptr)(MPIABI_Comm comm, MPIABI_Comm *newcomm, + MPIABI_Request *request); +extern int (*MPIABI_Comm_idup_with_info_ptr)(MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Comm *newcomm, + MPIABI_Request *request); +extern int (*MPIABI_Comm_rank_ptr)(MPIABI_Comm comm, int *rank); +extern int (*MPIABI_Comm_remote_group_ptr)(MPIABI_Comm comm, + MPIABI_Group *group); +extern int (*MPIABI_Comm_remote_size_ptr)(MPIABI_Comm comm, int *size); +extern int (*MPIABI_Comm_set_attr_ptr)(MPIABI_Comm comm, int comm_keyval, + void *attribute_val); +extern int (*MPIABI_Comm_set_info_ptr)(MPIABI_Comm comm, MPIABI_Info info); +extern int (*MPIABI_Comm_set_name_ptr)(MPIABI_Comm comm, const char *comm_name); +extern int (*MPIABI_Comm_size_ptr)(MPIABI_Comm comm, int *size); +extern int (*MPIABI_Comm_split_ptr)(MPIABI_Comm comm, int color, int key, + MPIABI_Comm *newcomm); +extern int (*MPIABI_Group_free_ptr)(MPIABI_Group *group); +extern int (*MPIABI_Comm_split_type_ptr)(MPIABI_Comm comm, int split_type, + int key, MPIABI_Info info, + MPIABI_Comm *newcomm); +extern int (*MPIABI_Comm_test_inter_ptr)(MPIABI_Comm comm, int *flag); +extern int (*MPIABI_Group_compare_ptr)(MPIABI_Group group1, MPIABI_Group group2, + int *result); +extern int (*MPIABI_Group_difference_ptr)(MPIABI_Group group1, + MPIABI_Group group2, + MPIABI_Group *newgroup); +extern int (*MPIABI_Group_excl_ptr)(MPIABI_Group group, int n, + const int ranks[], MPIABI_Group *newgroup); +extern int (*MPIABI_Group_from_session_pset_ptr)(MPIABI_Session session, + const char *pset_name, + MPIABI_Group *newgroup); +extern int (*MPIABI_Group_incl_ptr)(MPIABI_Group group, int n, + const int ranks[], MPIABI_Group *newgroup); +extern int (*MPIABI_Group_intersection_ptr)(MPIABI_Group group1, + MPIABI_Group group2, + MPIABI_Group *newgroup); +extern int (*MPIABI_Group_range_excl_ptr)(MPIABI_Group group, int n, + int ranges[][3], + MPIABI_Group *newgroup); +extern int (*MPIABI_Group_range_incl_ptr)(MPIABI_Group group, int n, + int ranges[][3], + MPIABI_Group *newgroup); +extern int (*MPIABI_Group_rank_ptr)(MPIABI_Group group, int *rank); +extern int (*MPIABI_Group_size_ptr)(MPIABI_Group group, int *size); +extern int (*MPIABI_Group_translate_ranks_ptr)(MPIABI_Group group1, int n, + const int ranks1[], + MPIABI_Group group2, + int ranks2[]); +extern int (*MPIABI_Group_union_ptr)(MPIABI_Group group1, MPIABI_Group group2, + MPIABI_Group *newgroup); +extern int (*MPIABI_Intercomm_create_ptr)(MPIABI_Comm local_comm, + int local_leader, + MPIABI_Comm peer_comm, + int remote_leader, int tag, + MPIABI_Comm *newintercomm); +extern int (*MPIABI_Intercomm_create_from_groups_ptr)( + MPIABI_Group local_group, int local_leader, MPIABI_Group remote_group, + int remote_leader, const char *stringtag, MPIABI_Info info, + MPIABI_Errhandler errhandler, MPIABI_Comm *newintercomm); +extern int (*MPIABI_Intercomm_merge_ptr)(MPIABI_Comm intercomm, int high, + MPIABI_Comm *newintracomm); +extern int (*MPIABI_Type_create_keyval_ptr)( + MPIABI_Type_copy_attr_function *type_copy_attr_fn, + MPIABI_Type_delete_attr_function *type_delete_attr_fn, int *type_keyval, + void *extra_state); +extern int (*MPIABI_Type_delete_attr_ptr)(MPIABI_Datatype datatype, + int type_keyval); +extern int (*MPIABI_Type_free_keyval_ptr)(int *type_keyval); +extern int (*MPIABI_Type_get_attr_ptr)(MPIABI_Datatype datatype, + int type_keyval, void *attribute_val, + int *flag); +extern int (*MPIABI_Type_get_name_ptr)(MPIABI_Datatype datatype, + char *type_name, int *resultlen); +extern int (*MPIABI_Type_set_attr_ptr)(MPIABI_Datatype datatype, + int type_keyval, void *attribute_val); +extern int (*MPIABI_Type_set_name_ptr)(MPIABI_Datatype datatype, + const char *type_name); +extern int (*MPIABI_Win_create_keyval_ptr)( + MPIABI_Win_copy_attr_function *win_copy_attr_fn, + MPIABI_Win_delete_attr_function *win_delete_attr_fn, int *win_keyval, + void *extra_state); +extern int (*MPIABI_Win_delete_attr_ptr)(MPIABI_Win win, int win_keyval); +extern int (*MPIABI_Win_free_keyval_ptr)(int *win_keyval); +extern int (*MPIABI_Win_get_attr_ptr)(MPIABI_Win win, int win_keyval, + void *attribute_val, int *flag); +extern int (*MPIABI_Win_get_name_ptr)(MPIABI_Win win, char *win_name, + int *resultlen); +extern int (*MPIABI_Win_set_attr_ptr)(MPIABI_Win win, int win_keyval, + void *attribute_val); +extern int (*MPIABI_Win_set_name_ptr)(MPIABI_Win win, const char *win_name); + +// A.3.6 Virtual Topologies for MPI Processes C Bindings + +extern int (*MPIABI_Cart_coords_ptr)(MPIABI_Comm comm, int rank, int maxdims, + int coords[]); +extern int (*MPIABI_Cart_create_ptr)(MPIABI_Comm comm_old, int ndims, + const int dims[], const int periods[], + int reorder, MPIABI_Comm *comm_cart); +extern int (*MPIABI_Cart_get_ptr)(MPIABI_Comm comm, int maxdims, int dims[], + int periods[], int coords[]); +extern int (*MPIABI_Cart_map_ptr)(MPIABI_Comm comm, int ndims, const int dims[], + const int periods[], int *newrank); +extern int (*MPIABI_Cart_rank_ptr)(MPIABI_Comm comm, const int coords[], + int *rank); +extern int (*MPIABI_Cart_shift_ptr)(MPIABI_Comm comm, int direction, int disp, + int *rank_source, int *rank_dest); +extern int (*MPIABI_Cart_sub_ptr)(MPIABI_Comm comm, const int remain_dims[], + MPIABI_Comm *newcomm); +extern int (*MPIABI_Cartdim_get_ptr)(MPIABI_Comm comm, int *ndims); +extern int (*MPIABI_Dims_create_ptr)(int nnodes, int ndims, int dims[]); +extern int (*MPIABI_Dist_graph_create_ptr)( + MPIABI_Comm comm_old, int n, const int sources[], const int degrees[], + const int destinations[], const int weights[], MPIABI_Info info, + int reorder, MPIABI_Comm *comm_dist_graph); +extern int (*MPIABI_Dist_graph_create_adjacent_ptr)( + MPIABI_Comm comm_old, int indegree, const int sources[], + const int sourceweights[], int outdegree, const int destinations[], + const int destweights[], MPIABI_Info info, int reorder, + MPIABI_Comm *comm_dist_graph); +extern int (*MPIABI_Dist_graph_neighbors_ptr)( + MPIABI_Comm comm, int maxindegree, int sources[], int sourceweights[], + int maxoutdegree, int destinations[], int destweights[]); +extern int (*MPIABI_Dist_graph_neighbors_count_ptr)(MPIABI_Comm comm, + int *indegree, + int *outdegree, + int *weighted); +extern int (*MPIABI_Graph_create_ptr)(MPIABI_Comm comm_old, int nnodes, + const int index[], const int edges[], + int reorder, MPIABI_Comm *comm_graph); +extern int (*MPIABI_Graph_get_ptr)(MPIABI_Comm comm, int maxindex, int maxedges, + int index[], int edges[]); +extern int (*MPIABI_Graph_map_ptr)(MPIABI_Comm comm, int nnodes, + const int index[], const int edges[], + int *newrank); +extern int (*MPIABI_Graph_neighbors_ptr)(MPIABI_Comm comm, int rank, + int maxneighbors, int neighbors[]); +extern int (*MPIABI_Graph_neighbors_count_ptr)(MPIABI_Comm comm, int rank, + int *nneighbors); +extern int (*MPIABI_Graphdims_get_ptr)(MPIABI_Comm comm, int *nnodes, + int *nedges); +extern int (*MPIABI_Ineighbor_allgather_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, + void *recvbuf, int recvcount, + MPIABI_Datatype recvtype, + MPIABI_Comm comm, + MPIABI_Request *request); +extern int (*MPIABI_Ineighbor_allgather_c_ptr)( + const void *sendbuf, MPIABI_Count sendcount, MPIABI_Datatype sendtype, + void *recvbuf, MPIABI_Count recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Request *request); +extern int (*MPIABI_Ineighbor_allgatherv_ptr)( + const void *sendbuf, int sendcount, MPIABI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Request *request); +extern int (*MPIABI_Ineighbor_allgatherv_c_ptr)( + const void *sendbuf, MPIABI_Count sendcount, MPIABI_Datatype sendtype, + void *recvbuf, const MPIABI_Count recvcounts[], const MPIABI_Aint displs[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, MPIABI_Request *request); +extern int (*MPIABI_Ineighbor_alltoall_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, + void *recvbuf, int recvcount, + MPIABI_Datatype recvtype, + MPIABI_Comm comm, + MPIABI_Request *request); +extern int (*MPIABI_Ineighbor_alltoall_c_ptr)( + const void *sendbuf, MPIABI_Count sendcount, MPIABI_Datatype sendtype, + void *recvbuf, MPIABI_Count recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Request *request); +extern int (*MPIABI_Ineighbor_alltoallv_ptr)( + const void *sendbuf, const int sendcounts[], const int sdispls[], + MPIABI_Datatype sendtype, void *recvbuf, const int recvcounts[], + const int rdispls[], MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Request *request); +extern int (*MPIABI_Ineighbor_alltoallv_c_ptr)( + const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], const MPIABI_Aint rdispls[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, MPIABI_Request *request); +extern int (*MPIABI_Ineighbor_alltoallw_ptr)( + const void *sendbuf, const int sendcounts[], const MPIABI_Aint sdispls[], + const MPIABI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], + const MPIABI_Aint rdispls[], const MPIABI_Datatype recvtypes[], + MPIABI_Comm comm, MPIABI_Request *request); +extern int (*MPIABI_Ineighbor_alltoallw_c_ptr)( + const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], const MPIABI_Datatype sendtypes[], + void *recvbuf, const MPIABI_Count recvcounts[], const MPIABI_Aint rdispls[], + const MPIABI_Datatype recvtypes[], MPIABI_Comm comm, + MPIABI_Request *request); +extern int (*MPIABI_Neighbor_allgather_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, + void *recvbuf, int recvcount, + MPIABI_Datatype recvtype, + MPIABI_Comm comm); +extern int (*MPIABI_Neighbor_allgather_c_ptr)( + const void *sendbuf, MPIABI_Count sendcount, MPIABI_Datatype sendtype, + void *recvbuf, MPIABI_Count recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm); +extern int (*MPIABI_Neighbor_allgather_init_ptr)( + const void *sendbuf, int sendcount, MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +extern int (*MPIABI_Neighbor_allgather_init_c_ptr)( + const void *sendbuf, MPIABI_Count sendcount, MPIABI_Datatype sendtype, + void *recvbuf, MPIABI_Count recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Info info, MPIABI_Request *request); +extern int (*MPIABI_Neighbor_allgatherv_ptr)( + const void *sendbuf, int sendcount, MPIABI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], MPIABI_Datatype recvtype, + MPIABI_Comm comm); +extern int (*MPIABI_Neighbor_allgatherv_c_ptr)( + const void *sendbuf, MPIABI_Count sendcount, MPIABI_Datatype sendtype, + void *recvbuf, const MPIABI_Count recvcounts[], const MPIABI_Aint displs[], + MPIABI_Datatype recvtype, MPIABI_Comm comm); +extern int (*MPIABI_Neighbor_allgatherv_init_ptr)( + const void *sendbuf, int sendcount, MPIABI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Info info, MPIABI_Request *request); +extern int (*MPIABI_Neighbor_allgatherv_init_c_ptr)( + const void *sendbuf, MPIABI_Count sendcount, MPIABI_Datatype sendtype, + void *recvbuf, const MPIABI_Count recvcounts[], const MPIABI_Aint displs[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +extern int (*MPIABI_Neighbor_alltoall_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, + void *recvbuf, int recvcount, + MPIABI_Datatype recvtype, + MPIABI_Comm comm); +extern int (*MPIABI_Neighbor_alltoall_c_ptr)( + const void *sendbuf, MPIABI_Count sendcount, MPIABI_Datatype sendtype, + void *recvbuf, MPIABI_Count recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm); +extern int (*MPIABI_Neighbor_alltoall_init_ptr)( + const void *sendbuf, int sendcount, MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +extern int (*MPIABI_Neighbor_alltoall_init_c_ptr)( + const void *sendbuf, MPIABI_Count sendcount, MPIABI_Datatype sendtype, + void *recvbuf, MPIABI_Count recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Info info, MPIABI_Request *request); +extern int (*MPIABI_Neighbor_alltoallv_ptr)( + const void *sendbuf, const int sendcounts[], const int sdispls[], + MPIABI_Datatype sendtype, void *recvbuf, const int recvcounts[], + const int rdispls[], MPIABI_Datatype recvtype, MPIABI_Comm comm); +extern int (*MPIABI_Neighbor_alltoallv_c_ptr)( + const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], const MPIABI_Aint rdispls[], + MPIABI_Datatype recvtype, MPIABI_Comm comm); +extern int (*MPIABI_Neighbor_alltoallv_init_ptr)( + const void *sendbuf, const int sendcounts[], const int sdispls[], + MPIABI_Datatype sendtype, void *recvbuf, const int recvcounts[], + const int rdispls[], MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *request); +extern int (*MPIABI_Neighbor_alltoallv_init_c_ptr)( + const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], const MPIABI_Aint rdispls[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +extern int (*MPIABI_Neighbor_alltoallw_ptr)( + const void *sendbuf, const int sendcounts[], const MPIABI_Aint sdispls[], + const MPIABI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], + const MPIABI_Aint rdispls[], const MPIABI_Datatype recvtypes[], + MPIABI_Comm comm); +extern int (*MPIABI_Neighbor_alltoallw_c_ptr)( + const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], const MPIABI_Datatype sendtypes[], + void *recvbuf, const MPIABI_Count recvcounts[], const MPIABI_Aint rdispls[], + const MPIABI_Datatype recvtypes[], MPIABI_Comm comm); +extern int (*MPIABI_Neighbor_alltoallw_init_ptr)( + const void *sendbuf, const int sendcounts[], const MPIABI_Aint sdispls[], + const MPIABI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], + const MPIABI_Aint rdispls[], const MPIABI_Datatype recvtypes[], + MPIABI_Comm comm, MPIABI_Info info, MPIABI_Request *request); +extern int (*MPIABI_Neighbor_alltoallw_init_c_ptr)( + const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], const MPIABI_Datatype sendtypes[], + void *recvbuf, const MPIABI_Count recvcounts[], const MPIABI_Aint rdispls[], + const MPIABI_Datatype recvtypes[], MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +extern int (*MPIABI_Topo_test_ptr)(MPIABI_Comm comm, int *status); + +// A.3.7 MPI Environmental Management C Bindings + +extern int (*MPIABI_Add_error_class_ptr)(int *errorclass); +extern int (*MPIABI_Add_error_code_ptr)(int errorclass, int *errorcode); +extern int (*MPIABI_Add_error_string_ptr)(int errorcode, const char *string); +extern int (*MPIABI_Alloc_mem_ptr)(MPIABI_Aint size, MPIABI_Info info, + void *baseptr); +extern int (*MPIABI_Comm_call_errhandler_ptr)(MPIABI_Comm comm, int errorcode); +extern int (*MPIABI_Comm_create_errhandler_ptr)( + MPIABI_Comm_errhandler_function *comm_errhandler_fn, + MPIABI_Errhandler *errhandler); +extern int (*MPIABI_Comm_get_errhandler_ptr)(MPIABI_Comm comm, + MPIABI_Errhandler *errhandler); +extern int (*MPIABI_Comm_set_errhandler_ptr)(MPIABI_Comm comm, + MPIABI_Errhandler errhandler); +extern int (*MPIABI_Errhandler_free_ptr)(MPIABI_Errhandler *errhandler); +extern int (*MPIABI_Error_class_ptr)(int errorcode, int *errorclass); +extern int (*MPIABI_Error_string_ptr)(int errorcode, char *string, + int *resultlen); +extern int (*MPIABI_File_call_errhandler_ptr)(MPIABI_File fh, int errorcode); +extern int (*MPIABI_File_create_errhandler_ptr)( + MPIABI_File_errhandler_function *file_errhandler_fn, + MPIABI_Errhandler *errhandler); +extern int (*MPIABI_File_get_errhandler_ptr)(MPIABI_File file, + MPIABI_Errhandler *errhandler); +extern int (*MPIABI_File_set_errhandler_ptr)(MPIABI_File file, + MPIABI_Errhandler errhandler); +extern int (*MPIABI_Free_mem_ptr)(void *base); +extern int (*MPIABI_Get_hw_resource_info_ptr)(MPIABI_Info *hw_info); +extern int (*MPIABI_Get_library_version_ptr)(char *version, int *resultlen); +extern int (*MPIABI_Get_processor_name_ptr)(char *name, int *resultlen); +extern int (*MPIABI_Get_version_ptr)(int *version, int *subversion); +extern int (*MPIABI_Remove_error_class_ptr)(int errorclass); +extern int (*MPIABI_Remove_error_code_ptr)(int errorcode); +extern int (*MPIABI_Remove_error_string_ptr)(int errorcode); +extern int (*MPIABI_Session_call_errhandler_ptr)(MPIABI_Session session, + int errorcode); +extern int (*MPIABI_Session_create_errhandler_ptr)( + MPIABI_Session_errhandler_function *session_errhandler_fn, + MPIABI_Errhandler *errhandler); +extern int (*MPIABI_Session_get_errhandler_ptr)(MPIABI_Session session, + MPIABI_Errhandler *errhandler); +extern int (*MPIABI_Session_set_errhandler_ptr)(MPIABI_Session session, + MPIABI_Errhandler errhandler); +extern int (*MPIABI_Win_call_errhandler_ptr)(MPIABI_Win win, int errorcode); +extern int (*MPIABI_Win_create_errhandler_ptr)( + MPIABI_Win_errhandler_function *win_errhandler_fn, + MPIABI_Errhandler *errhandler); +extern int (*MPIABI_Win_get_errhandler_ptr)(MPIABI_Win win, + MPIABI_Errhandler *errhandler); +extern int (*MPIABI_Win_set_errhandler_ptr)(MPIABI_Win win, + MPIABI_Errhandler errhandler); +extern double (*MPIABI_Wtick_ptr)(void); +extern double (*MPIABI_Wtime_ptr)(void); + +// A.3.8 The Info Object C Bindings + +extern int (*MPIABI_Info_create_ptr)(MPIABI_Info *info); +extern int (*MPIABI_Info_create_env_ptr)(int argc, char *argv[], + MPIABI_Info *info); +extern int (*MPIABI_Info_delete_ptr)(MPIABI_Info info, const char *key); +extern int (*MPIABI_Info_dup_ptr)(MPIABI_Info info, MPIABI_Info *newinfo); +extern int (*MPIABI_Info_free_ptr)(MPIABI_Info *info); +extern int (*MPIABI_Info_get_nkeys_ptr)(MPIABI_Info info, int *nkeys); +extern int (*MPIABI_Info_get_nthkey_ptr)(MPIABI_Info info, int n, char *key); +extern int (*MPIABI_Info_get_string_ptr)(MPIABI_Info info, const char *key, + int *buflen, char *value, int *flag); +extern int (*MPIABI_Info_set_ptr)(MPIABI_Info info, const char *key, + const char *value); + +// A.3.9 Process Creation and Management C Bindings + +extern int (*MPIABI_Abort_ptr)(MPIABI_Comm comm, int errorcode); +extern int (*MPIABI_Close_port_ptr)(const char *port_name); +extern int (*MPIABI_Comm_accept_ptr)(const char *port_name, MPIABI_Info info, + int root, MPIABI_Comm comm, + MPIABI_Comm *newcomm); +extern int (*MPIABI_Comm_connect_ptr)(const char *port_name, MPIABI_Info info, + int root, MPIABI_Comm comm, + MPIABI_Comm *newcomm); +extern int (*MPIABI_Comm_disconnect_ptr)(MPIABI_Comm *comm); +extern int (*MPIABI_Comm_get_parent_ptr)(MPIABI_Comm *parent); +extern int (*MPIABI_Comm_join_ptr)(int fd, MPIABI_Comm *intercomm); +extern int (*MPIABI_Comm_spawn_ptr)(const char *command, char *argv[], + int maxprocs, MPIABI_Info info, int root, + MPIABI_Comm comm, MPIABI_Comm *intercomm, + int array_of_errcodes[]); +extern int (*MPIABI_Comm_spawn_multiple_ptr)( + int count, char *array_of_commands[], char **array_of_argv[], + const int array_of_maxprocs[], const MPIABI_Info array_of_info[], int root, + MPIABI_Comm comm, MPIABI_Comm *intercomm, int array_of_errcodes[]); +extern int (*MPIABI_Finalize_ptr)(void); +extern int (*MPIABI_Finalized_ptr)(int *flag); +extern int (*MPIABI_Init_ptr)(int *argc, char ***argv); +extern int (*MPIABI_Init_thread_ptr)(int *argc, char ***argv, int required, + int *provided); +extern int (*MPIABI_Initialized_ptr)(int *flag); +extern int (*MPIABI_Is_thread_main_ptr)(int *flag); +extern int (*MPIABI_Lookup_name_ptr)(const char *service_name, MPIABI_Info info, + char *port_name); +extern int (*MPIABI_Open_port_ptr)(MPIABI_Info info, char *port_name); +extern int (*MPIABI_Publish_name_ptr)(const char *service_name, + MPIABI_Info info, const char *port_name); +extern int (*MPIABI_Query_thread_ptr)(int *provided); +extern int (*MPIABI_Session_finalize_ptr)(MPIABI_Session *session); +extern int (*MPIABI_Session_get_info_ptr)(MPIABI_Session session, + MPIABI_Info *info_used); +extern int (*MPIABI_Session_get_nth_pset_ptr)(MPIABI_Session session, + MPIABI_Info info, int n, + int *pset_len, char *pset_name); +extern int (*MPIABI_Session_get_num_psets_ptr)(MPIABI_Session session, + MPIABI_Info info, + int *npset_names); +extern int (*MPIABI_Session_get_pset_info_ptr)(MPIABI_Session session, + const char *pset_name, + MPIABI_Info *info); +extern int (*MPIABI_Session_init_ptr)(MPIABI_Info info, + MPIABI_Errhandler errhandler, + MPIABI_Session *session); +extern int (*MPIABI_Unpublish_name_ptr)(const char *service_name, + MPIABI_Info info, + const char *port_name); + +// A.3.10 One-Sided Communications C Bindings + +extern int (*MPIABI_Accumulate_ptr)(const void *origin_addr, int origin_count, + MPIABI_Datatype origin_datatype, + int target_rank, MPIABI_Aint target_disp, + int target_count, + MPIABI_Datatype target_datatype, + MPIABI_Op op, MPIABI_Win win); +extern int (*MPIABI_Accumulate_c_ptr)(const void *origin_addr, + MPIABI_Count origin_count, + MPIABI_Datatype origin_datatype, + int target_rank, MPIABI_Aint target_disp, + MPIABI_Count target_count, + MPIABI_Datatype target_datatype, + MPIABI_Op op, MPIABI_Win win); +extern int (*MPIABI_Compare_and_swap_ptr)( + const void *origin_addr, const void *compare_addr, void *result_addr, + MPIABI_Datatype datatype, int target_rank, MPIABI_Aint target_disp, + MPIABI_Win win); +extern int (*MPIABI_Fetch_and_op_ptr)(const void *origin_addr, + void *result_addr, + MPIABI_Datatype datatype, int target_rank, + MPIABI_Aint target_disp, MPIABI_Op op, + MPIABI_Win win); +extern int (*MPIABI_Get_ptr)(void *origin_addr, int origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, int target_count, + MPIABI_Datatype target_datatype, MPIABI_Win win); +extern int (*MPIABI_Get_accumulate_ptr)( + const void *origin_addr, int origin_count, MPIABI_Datatype origin_datatype, + void *result_addr, int result_count, MPIABI_Datatype result_datatype, + int target_rank, MPIABI_Aint target_disp, int target_count, + MPIABI_Datatype target_datatype, MPIABI_Op op, MPIABI_Win win); +extern int (*MPIABI_Get_accumulate_c_ptr)( + const void *origin_addr, MPIABI_Count origin_count, + MPIABI_Datatype origin_datatype, void *result_addr, + MPIABI_Count result_count, MPIABI_Datatype result_datatype, int target_rank, + MPIABI_Aint target_disp, MPIABI_Count target_count, + MPIABI_Datatype target_datatype, MPIABI_Op op, MPIABI_Win win); +extern int (*MPIABI_Get_c_ptr)(void *origin_addr, MPIABI_Count origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, + MPIABI_Count target_count, + MPIABI_Datatype target_datatype, MPIABI_Win win); +extern int (*MPIABI_Put_ptr)(const void *origin_addr, int origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, int target_count, + MPIABI_Datatype target_datatype, MPIABI_Win win); +extern int (*MPIABI_Put_c_ptr)(const void *origin_addr, + MPIABI_Count origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, + MPIABI_Count target_count, + MPIABI_Datatype target_datatype, MPIABI_Win win); +extern int (*MPIABI_Raccumulate_ptr)(const void *origin_addr, int origin_count, + MPIABI_Datatype origin_datatype, + int target_rank, MPIABI_Aint target_disp, + int target_count, + MPIABI_Datatype target_datatype, + MPIABI_Op op, MPIABI_Win win, + MPIABI_Request *request); +extern int (*MPIABI_Raccumulate_c_ptr)( + const void *origin_addr, MPIABI_Count origin_count, + MPIABI_Datatype origin_datatype, int target_rank, MPIABI_Aint target_disp, + MPIABI_Count target_count, MPIABI_Datatype target_datatype, MPIABI_Op op, + MPIABI_Win win, MPIABI_Request *request); +extern int (*MPIABI_Rget_ptr)(void *origin_addr, int origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, int target_count, + MPIABI_Datatype target_datatype, MPIABI_Win win, + MPIABI_Request *request); +extern int (*MPIABI_Rget_accumulate_ptr)( + const void *origin_addr, int origin_count, MPIABI_Datatype origin_datatype, + void *result_addr, int result_count, MPIABI_Datatype result_datatype, + int target_rank, MPIABI_Aint target_disp, int target_count, + MPIABI_Datatype target_datatype, MPIABI_Op op, MPIABI_Win win, + MPIABI_Request *request); +extern int (*MPIABI_Rget_accumulate_c_ptr)( + const void *origin_addr, MPIABI_Count origin_count, + MPIABI_Datatype origin_datatype, void *result_addr, + MPIABI_Count result_count, MPIABI_Datatype result_datatype, int target_rank, + MPIABI_Aint target_disp, MPIABI_Count target_count, + MPIABI_Datatype target_datatype, MPIABI_Op op, MPIABI_Win win, + MPIABI_Request *request); +extern int (*MPIABI_Rget_c_ptr)(void *origin_addr, MPIABI_Count origin_count, + MPIABI_Datatype origin_datatype, + int target_rank, MPIABI_Aint target_disp, + MPIABI_Count target_count, + MPIABI_Datatype target_datatype, MPIABI_Win win, + MPIABI_Request *request); +extern int (*MPIABI_Rput_ptr)(const void *origin_addr, int origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, int target_count, + MPIABI_Datatype target_datatype, MPIABI_Win win, + MPIABI_Request *request); +extern int (*MPIABI_Rput_c_ptr)(const void *origin_addr, + MPIABI_Count origin_count, + MPIABI_Datatype origin_datatype, + int target_rank, MPIABI_Aint target_disp, + MPIABI_Count target_count, + MPIABI_Datatype target_datatype, MPIABI_Win win, + MPIABI_Request *request); +extern int (*MPIABI_Win_allocate_ptr)(MPIABI_Aint size, int disp_unit, + MPIABI_Info info, MPIABI_Comm comm, + void *baseptr, MPIABI_Win *win); +extern int (*MPIABI_Win_allocate_c_ptr)(MPIABI_Aint size, MPIABI_Aint disp_unit, + MPIABI_Info info, MPIABI_Comm comm, + void *baseptr, MPIABI_Win *win); +extern int (*MPIABI_Win_allocate_shared_ptr)(MPIABI_Aint size, int disp_unit, + MPIABI_Info info, MPIABI_Comm comm, + void *baseptr, MPIABI_Win *win); +extern int (*MPIABI_Win_allocate_shared_c_ptr)(MPIABI_Aint size, + MPIABI_Aint disp_unit, + MPIABI_Info info, + MPIABI_Comm comm, void *baseptr, + MPIABI_Win *win); +extern int (*MPIABI_Win_attach_ptr)(MPIABI_Win win, void *base, + MPIABI_Aint size); +extern int (*MPIABI_Win_complete_ptr)(MPIABI_Win win); +extern int (*MPIABI_Win_create_ptr)(void *base, MPIABI_Aint size, int disp_unit, + MPIABI_Info info, MPIABI_Comm comm, + MPIABI_Win *win); +extern int (*MPIABI_Win_create_c_ptr)(void *base, MPIABI_Aint size, + MPIABI_Aint disp_unit, MPIABI_Info info, + MPIABI_Comm comm, MPIABI_Win *win); +extern int (*MPIABI_Win_create_dynamic_ptr)(MPIABI_Info info, MPIABI_Comm comm, + MPIABI_Win *win); +extern int (*MPIABI_Win_detach_ptr)(MPIABI_Win win, const void *base); +extern int (*MPIABI_Win_fence_ptr)(int assert, MPIABI_Win win); +extern int (*MPIABI_Win_flush_ptr)(int rank, MPIABI_Win win); +extern int (*MPIABI_Win_flush_all_ptr)(MPIABI_Win win); +extern int (*MPIABI_Win_flush_local_ptr)(int rank, MPIABI_Win win); +extern int (*MPIABI_Win_flush_local_all_ptr)(MPIABI_Win win); +extern int (*MPIABI_Win_free_ptr)(MPIABI_Win *win); +extern int (*MPIABI_Win_get_group_ptr)(MPIABI_Win win, MPIABI_Group *group); +extern int (*MPIABI_Win_get_info_ptr)(MPIABI_Win win, MPIABI_Info *info_used); +extern int (*MPIABI_Win_lock_ptr)(int lock_type, int rank, int assert, + MPIABI_Win win); +extern int (*MPIABI_Win_lock_all_ptr)(int assert, MPIABI_Win win); +extern int (*MPIABI_Win_post_ptr)(MPIABI_Group group, int assert, + MPIABI_Win win); +extern int (*MPIABI_Win_set_info_ptr)(MPIABI_Win win, MPIABI_Info info); +extern int (*MPIABI_Win_shared_query_ptr)(MPIABI_Win win, int rank, + MPIABI_Aint *size, int *disp_unit, + void *baseptr); +extern int (*MPIABI_Win_shared_query_c_ptr)(MPIABI_Win win, int rank, + MPIABI_Aint *size, + MPIABI_Aint *disp_unit, + void *baseptr); +extern int (*MPIABI_Win_start_ptr)(MPIABI_Group group, int assert, + MPIABI_Win win); +extern int (*MPIABI_Win_sync_ptr)(MPIABI_Win win); +extern int (*MPIABI_Win_test_ptr)(MPIABI_Win win, int *flag); +extern int (*MPIABI_Win_unlock_ptr)(int rank, MPIABI_Win win); +extern int (*MPIABI_Win_unlock_all_ptr)(MPIABI_Win win); +extern int (*MPIABI_Win_wait_ptr)(MPIABI_Win win); + +// A.3.11 External Interfaces C Bindings + +extern int (*MPIABI_Grequest_complete_ptr)(MPIABI_Request request); +extern int (*MPIABI_Grequest_start_ptr)( + MPIABI_Grequest_query_function *query_fn, + MPIABI_Grequest_free_function *free_fn, + MPIABI_Grequest_cancel_function *cancel_fn, void *extra_state, + MPIABI_Request *request); +extern int (*MPIABI_Status_set_cancelled_ptr)(MPIABI_Status *status, int flag); +extern int (*MPIABI_Status_set_elements_ptr)(MPIABI_Status *status, + MPIABI_Datatype datatype, + int count); +extern int (*MPIABI_Status_set_elements_c_ptr)(MPIABI_Status *status, + MPIABI_Datatype datatype, + MPIABI_Count count); +extern int (*MPIABI_Status_set_error_ptr)(MPIABI_Status *status, int err); +extern int (*MPIABI_Status_set_source_ptr)(MPIABI_Status *status, int source); +extern int (*MPIABI_Status_set_tag_ptr)(MPIABI_Status *status, int tag); + +// A.3.12 I/O C Bindings + +extern int (*MPIABI_File_close_ptr)(MPIABI_File *fh); +extern int (*MPIABI_File_delete_ptr)(const char *filename, MPIABI_Info info); +extern int (*MPIABI_File_get_amode_ptr)(MPIABI_File fh, int *amode); +extern int (*MPIABI_File_get_atomicity_ptr)(MPIABI_File fh, int *flag); +extern int (*MPIABI_File_get_byte_offset_ptr)(MPIABI_File fh, + MPIABI_Offset offset, + MPIABI_Offset *disp); +extern int (*MPIABI_File_get_group_ptr)(MPIABI_File fh, MPIABI_Group *group); +extern int (*MPIABI_File_get_info_ptr)(MPIABI_File fh, MPIABI_Info *info_used); +extern int (*MPIABI_File_get_position_ptr)(MPIABI_File fh, + MPIABI_Offset *offset); +extern int (*MPIABI_File_get_position_shared_ptr)(MPIABI_File fh, + MPIABI_Offset *offset); +extern int (*MPIABI_File_get_size_ptr)(MPIABI_File fh, MPIABI_Offset *size); +extern int (*MPIABI_File_get_type_extent_ptr)(MPIABI_File fh, + MPIABI_Datatype datatype, + MPIABI_Aint *extent); +extern int (*MPIABI_File_get_type_extent_c_ptr)(MPIABI_File fh, + MPIABI_Datatype datatype, + MPIABI_Count *extent); +extern int (*MPIABI_File_get_view_ptr)(MPIABI_File fh, MPIABI_Offset *disp, + MPIABI_Datatype *etype, + MPIABI_Datatype *filetype, + char *datarep); +extern int (*MPIABI_File_iread_ptr)(MPIABI_File fh, void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Request *request); +extern int (*MPIABI_File_iread_all_ptr)(MPIABI_File fh, void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Request *request); +extern int (*MPIABI_File_iread_all_c_ptr)(MPIABI_File fh, void *buf, + MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Request *request); +extern int (*MPIABI_File_iread_at_ptr)(MPIABI_File fh, MPIABI_Offset offset, + void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Request *request); +extern int (*MPIABI_File_iread_at_all_ptr)(MPIABI_File fh, MPIABI_Offset offset, + void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Request *request); +extern int (*MPIABI_File_iread_at_all_c_ptr)(MPIABI_File fh, + MPIABI_Offset offset, void *buf, + MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Request *request); +extern int (*MPIABI_File_iread_at_c_ptr)(MPIABI_File fh, MPIABI_Offset offset, + void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Request *request); +extern int (*MPIABI_File_iread_c_ptr)(MPIABI_File fh, void *buf, + MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Request *request); +extern int (*MPIABI_File_iread_shared_ptr)(MPIABI_File fh, void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Request *request); +extern int (*MPIABI_File_iread_shared_c_ptr)(MPIABI_File fh, void *buf, + MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Request *request); +extern int (*MPIABI_File_iwrite_ptr)(MPIABI_File fh, const void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Request *request); +extern int (*MPIABI_File_iwrite_all_ptr)(MPIABI_File fh, const void *buf, + int count, MPIABI_Datatype datatype, + MPIABI_Request *request); +extern int (*MPIABI_File_iwrite_all_c_ptr)(MPIABI_File fh, const void *buf, + MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Request *request); +extern int (*MPIABI_File_iwrite_at_ptr)(MPIABI_File fh, MPIABI_Offset offset, + const void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Request *request); +extern int (*MPIABI_File_iwrite_at_all_ptr)(MPIABI_File fh, + MPIABI_Offset offset, + const void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Request *request); +extern int (*MPIABI_File_iwrite_at_all_c_ptr)( + MPIABI_File fh, MPIABI_Offset offset, const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Request *request); +extern int (*MPIABI_File_iwrite_at_c_ptr)(MPIABI_File fh, MPIABI_Offset offset, + const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Request *request); +extern int (*MPIABI_File_iwrite_c_ptr)(MPIABI_File fh, const void *buf, + MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Request *request); +extern int (*MPIABI_File_iwrite_shared_ptr)(MPIABI_File fh, const void *buf, + int count, MPIABI_Datatype datatype, + MPIABI_Request *request); +extern int (*MPIABI_File_iwrite_shared_c_ptr)(MPIABI_File fh, const void *buf, + MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Request *request); +extern int (*MPIABI_File_open_ptr)(MPIABI_Comm comm, const char *filename, + int amode, MPIABI_Info info, + MPIABI_File *fh); +extern int (*MPIABI_File_preallocate_ptr)(MPIABI_File fh, MPIABI_Offset size); +extern int (*MPIABI_File_read_ptr)(MPIABI_File fh, void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Status *status); +extern int (*MPIABI_File_read_all_ptr)(MPIABI_File fh, void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Status *status); +extern int (*MPIABI_File_read_all_begin_ptr)(MPIABI_File fh, void *buf, + int count, + MPIABI_Datatype datatype); +extern int (*MPIABI_File_read_all_begin_c_ptr)(MPIABI_File fh, void *buf, + MPIABI_Count count, + MPIABI_Datatype datatype); +extern int (*MPIABI_File_read_all_c_ptr)(MPIABI_File fh, void *buf, + MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Status *status); +extern int (*MPIABI_File_read_all_end_ptr)(MPIABI_File fh, void *buf, + MPIABI_Status *status); +extern int (*MPIABI_File_read_at_ptr)(MPIABI_File fh, MPIABI_Offset offset, + void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Status *status); +extern int (*MPIABI_File_read_at_all_ptr)(MPIABI_File fh, MPIABI_Offset offset, + void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Status *status); +extern int (*MPIABI_File_read_at_all_begin_ptr)(MPIABI_File fh, + MPIABI_Offset offset, void *buf, + int count, + MPIABI_Datatype datatype); +extern int (*MPIABI_File_read_at_all_begin_c_ptr)(MPIABI_File fh, + MPIABI_Offset offset, + void *buf, MPIABI_Count count, + MPIABI_Datatype datatype); +extern int (*MPIABI_File_read_at_all_c_ptr)(MPIABI_File fh, + MPIABI_Offset offset, void *buf, + MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Status *status); +extern int (*MPIABI_File_read_at_all_end_ptr)(MPIABI_File fh, void *buf, + MPIABI_Status *status); +extern int (*MPIABI_File_read_at_c_ptr)(MPIABI_File fh, MPIABI_Offset offset, + void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Status *status); +extern int (*MPIABI_File_read_c_ptr)(MPIABI_File fh, void *buf, + MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Status *status); +extern int (*MPIABI_File_read_ordered_ptr)(MPIABI_File fh, void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Status *status); +extern int (*MPIABI_File_read_ordered_begin_ptr)(MPIABI_File fh, void *buf, + int count, + MPIABI_Datatype datatype); +extern int (*MPIABI_File_read_ordered_begin_c_ptr)(MPIABI_File fh, void *buf, + MPIABI_Count count, + MPIABI_Datatype datatype); +extern int (*MPIABI_File_read_ordered_c_ptr)(MPIABI_File fh, void *buf, + MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Status *status); +extern int (*MPIABI_File_read_ordered_end_ptr)(MPIABI_File fh, void *buf, + MPIABI_Status *status); +extern int (*MPIABI_File_read_shared_ptr)(MPIABI_File fh, void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Status *status); +extern int (*MPIABI_File_read_shared_c_ptr)(MPIABI_File fh, void *buf, + MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Status *status); +extern int (*MPIABI_File_seek_ptr)(MPIABI_File fh, MPIABI_Offset offset, + int whence); +extern int (*MPIABI_File_seek_shared_ptr)(MPIABI_File fh, MPIABI_Offset offset, + int whence); +extern int (*MPIABI_File_set_atomicity_ptr)(MPIABI_File fh, int flag); +extern int (*MPIABI_File_set_info_ptr)(MPIABI_File fh, MPIABI_Info info); +extern int (*MPIABI_File_set_size_ptr)(MPIABI_File fh, MPIABI_Offset size); +extern int (*MPIABI_File_set_view_ptr)(MPIABI_File fh, MPIABI_Offset disp, + MPIABI_Datatype etype, + MPIABI_Datatype filetype, + const char *datarep, MPIABI_Info info); +extern int (*MPIABI_File_sync_ptr)(MPIABI_File fh); +extern int (*MPIABI_File_write_ptr)(MPIABI_File fh, const void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Status *status); +extern int (*MPIABI_File_write_all_ptr)(MPIABI_File fh, const void *buf, + int count, MPIABI_Datatype datatype, + MPIABI_Status *status); +extern int (*MPIABI_File_write_all_begin_ptr)(MPIABI_File fh, const void *buf, + int count, + MPIABI_Datatype datatype); +extern int (*MPIABI_File_write_all_begin_c_ptr)(MPIABI_File fh, const void *buf, + MPIABI_Count count, + MPIABI_Datatype datatype); +extern int (*MPIABI_File_write_all_c_ptr)(MPIABI_File fh, const void *buf, + MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Status *status); +extern int (*MPIABI_File_write_all_end_ptr)(MPIABI_File fh, const void *buf, + MPIABI_Status *status); +extern int (*MPIABI_File_write_at_ptr)(MPIABI_File fh, MPIABI_Offset offset, + const void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Status *status); +extern int (*MPIABI_File_write_at_all_ptr)(MPIABI_File fh, MPIABI_Offset offset, + const void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Status *status); +extern int (*MPIABI_File_write_at_all_begin_ptr)(MPIABI_File fh, + MPIABI_Offset offset, + const void *buf, int count, + MPIABI_Datatype datatype); +extern int (*MPIABI_File_write_at_all_begin_c_ptr)(MPIABI_File fh, + MPIABI_Offset offset, + const void *buf, + MPIABI_Count count, + MPIABI_Datatype datatype); +extern int (*MPIABI_File_write_at_all_c_ptr)( + MPIABI_File fh, MPIABI_Offset offset, const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Status *status); +extern int (*MPIABI_File_write_at_all_end_ptr)(MPIABI_File fh, const void *buf, + MPIABI_Status *status); +extern int (*MPIABI_File_write_at_c_ptr)(MPIABI_File fh, MPIABI_Offset offset, + const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Status *status); +extern int (*MPIABI_File_write_c_ptr)(MPIABI_File fh, const void *buf, + MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Status *status); +extern int (*MPIABI_File_write_ordered_ptr)(MPIABI_File fh, const void *buf, + int count, MPIABI_Datatype datatype, + MPIABI_Status *status); +extern int (*MPIABI_File_write_ordered_begin_ptr)(MPIABI_File fh, + const void *buf, int count, + MPIABI_Datatype datatype); +extern int (*MPIABI_File_write_ordered_begin_c_ptr)(MPIABI_File fh, + const void *buf, + MPIABI_Count count, + MPIABI_Datatype datatype); +extern int (*MPIABI_File_write_ordered_c_ptr)(MPIABI_File fh, const void *buf, + MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Status *status); +extern int (*MPIABI_File_write_ordered_end_ptr)(MPIABI_File fh, const void *buf, + MPIABI_Status *status); +extern int (*MPIABI_File_write_shared_ptr)(MPIABI_File fh, const void *buf, + int count, MPIABI_Datatype datatype, + MPIABI_Status *status); +extern int (*MPIABI_File_write_shared_c_ptr)(MPIABI_File fh, const void *buf, + MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Status *status); +extern int (*MPIABI_Register_datarep_ptr)( + const char *datarep, MPIABI_Datarep_conversion_function *read_conversion_fn, + MPIABI_Datarep_conversion_function *write_conversion_fn, + MPIABI_Datarep_extent_function *dtype_file_extent_fn, void *extra_state); +extern int (*MPIABI_Register_datarep_c_ptr)( + const char *datarep, + MPIABI_Datarep_conversion_function_c *read_conversion_fn, + MPIABI_Datarep_conversion_function_c *write_conversion_fn, + MPIABI_Datarep_extent_function *dtype_file_extent_fn, void *extra_state); + +// A.3.13 Language Bindings C Bindings + +extern MPIABI_Fint (*MPIABI_Comm_c2f_ptr)(MPIABI_Comm comm); +extern MPIABI_Comm (*MPIABI_Comm_f2c_ptr)(MPIABI_Fint comm); +extern MPIABI_Fint (*MPIABI_Errhandler_c2f_ptr)(MPIABI_Errhandler errhandler); +extern MPIABI_Errhandler (*MPIABI_Errhandler_f2c_ptr)(MPIABI_Fint errhandler); +extern MPIABI_Fint (*MPIABI_File_c2f_ptr)(MPIABI_File file); +extern MPIABI_File (*MPIABI_File_f2c_ptr)(MPIABI_Fint file); +extern MPIABI_Fint (*MPIABI_Group_c2f_ptr)(MPIABI_Group group); +extern MPIABI_Group (*MPIABI_Group_f2c_ptr)(MPIABI_Fint group); +extern MPIABI_Fint (*MPIABI_Info_c2f_ptr)(MPIABI_Info info); +extern MPIABI_Info (*MPIABI_Info_f2c_ptr)(MPIABI_Fint info); +extern MPIABI_Fint (*MPIABI_Message_c2f_ptr)(MPIABI_Message message); +extern MPIABI_Message (*MPIABI_Message_f2c_ptr)(MPIABI_Fint message); +extern MPIABI_Fint (*MPIABI_Op_c2f_ptr)(MPIABI_Op op); +extern MPIABI_Op (*MPIABI_Op_f2c_ptr)(MPIABI_Fint op); +extern MPIABI_Fint (*MPIABI_Request_c2f_ptr)(MPIABI_Request request); +extern MPIABI_Request (*MPIABI_Request_f2c_ptr)(MPIABI_Fint request); +extern MPIABI_Fint (*MPIABI_Session_c2f_ptr)(MPIABI_Session session); +extern MPIABI_Session (*MPIABI_Session_f2c_ptr)(MPIABI_Fint session); +extern int (*MPIABI_Status_f082f_ptr)(const MPIABI_F08_status *f08_status, + MPIABI_Fint *f_status); +extern int (*MPIABI_Status_c2f_ptr)(const MPIABI_Status *c_status, + MPIABI_Fint *f_status); +extern int (*MPIABI_Status_c2f08_ptr)(const MPIABI_Status *c_status, + MPIABI_F08_status *f08_status); +extern int (*MPIABI_Status_f082c_ptr)(const MPIABI_F08_status *f08_status, + MPIABI_Status *c_status); +extern int (*MPIABI_Status_f2c_ptr)(const MPIABI_Fint *f_status, + MPIABI_Status *c_status); +extern int (*MPIABI_Status_f2f08_ptr)(const MPIABI_Fint *f_status, + MPIABI_F08_status *f08_status); +extern MPIABI_Fint (*MPIABI_Type_c2f_ptr)(MPIABI_Datatype datatype); +extern int (*MPIABI_Type_create_f90_complex_ptr)(int p, int r, + MPIABI_Datatype *newtype); +extern int (*MPIABI_Type_create_f90_integer_ptr)(int r, + MPIABI_Datatype *newtype); +extern int (*MPIABI_Type_create_f90_real_ptr)(int p, int r, + MPIABI_Datatype *newtype); +extern MPIABI_Datatype (*MPIABI_Type_f2c_ptr)(MPIABI_Fint datatype); +extern int (*MPIABI_Type_match_size_ptr)(int typeclass, int size, + MPIABI_Datatype *datatype); +extern MPIABI_Fint (*MPIABI_Win_c2f_ptr)(MPIABI_Win win); +extern MPIABI_Win (*MPIABI_Win_f2c_ptr)(MPIABI_Fint win); + +// A.3.14 Tools / Profiling Interface C Bindings + +extern int (*MPIABI_Pcontrol_ptr)(const int level, ...); + +// A.3.15 Tools / MPI Tool Information Interface C Bindings + +extern int (*MPIABI_T_category_changed_ptr)(int *update_number); +extern int (*MPIABI_T_category_get_categories_ptr)(int cat_index, int len, + int indices[]); +extern int (*MPIABI_T_category_get_cvars_ptr)(int cat_index, int len, + int indices[]); +extern int (*MPIABI_T_category_get_events_ptr)(int cat_index, int len, + int indices[]); +extern int (*MPIABI_T_category_get_index_ptr)(const char *name, int *cat_index); +extern int (*MPIABI_T_category_get_info_ptr)(int cat_index, char *name, + int *name_len, char *desc, + int *desc_len, int *num_cvars, + int *num_pvars, + int *num_categories); +extern int (*MPIABI_T_category_get_num_ptr)(int *num_cat); +extern int (*MPIABI_T_category_get_num_events_ptr)(int cat_index, + int *num_events); +extern int (*MPIABI_T_category_get_pvars_ptr)(int cat_index, int len, + int indices[]); +extern int (*MPIABI_T_cvar_get_index_ptr)(const char *name, int *cvar_index); +extern int (*MPIABI_T_cvar_get_info_ptr)(int cvar_index, char *name, + int *name_len, int *verbosity, + MPIABI_Datatype *datatype, + MPIABI_T_enum *enumtype, char *desc, + int *desc_len, int *bind, int *scope); +extern int (*MPIABI_T_cvar_get_num_ptr)(int *num_cvar); +extern int (*MPIABI_T_cvar_handle_alloc_ptr)(int cvar_index, void *obj_handle, + MPIABI_T_cvar_handle *handle, + int *count); +extern int (*MPIABI_T_cvar_handle_free_ptr)(MPIABI_T_cvar_handle *handle); +extern int (*MPIABI_T_cvar_read_ptr)(MPIABI_T_cvar_handle handle, void *buf); +extern int (*MPIABI_T_cvar_write_ptr)(MPIABI_T_cvar_handle handle, + const void *buf); +extern int (*MPIABI_T_enum_get_info_ptr)(MPIABI_T_enum enumtype, int *num, + char *name, int *name_len); +extern int (*MPIABI_T_enum_get_item_ptr)(MPIABI_T_enum enumtype, int index, + int *value, char *name, int *name_len); +extern int (*MPIABI_T_event_callback_get_info_ptr)( + MPIABI_T_event_registration event_registration, + MPIABI_T_cb_safety cb_safety, MPIABI_Info *info_used); +extern int (*MPIABI_T_event_callback_set_info_ptr)( + MPIABI_T_event_registration event_registration, + MPIABI_T_cb_safety cb_safety, MPIABI_Info info); +extern int (*MPIABI_T_event_copy_ptr)(MPIABI_T_event_instance event_instance, + void *buffer); +extern int (*MPIABI_T_event_get_index_ptr)(const char *name, int *event_index); +extern int (*MPIABI_T_event_get_info_ptr)( + int event_index, char *name, int *name_len, int *verbosity, + MPIABI_Datatype array_of_datatypes[], MPIABI_Aint array_of_displacements[], + int *num_elements, MPIABI_T_enum *enumtype, MPIABI_Info *info, char *desc, + int *desc_len, int *bind); +extern int (*MPIABI_T_event_get_num_ptr)(int *num_events); +extern int (*MPIABI_T_event_get_source_ptr)( + MPIABI_T_event_instance event_instance, int *source_index); +extern int (*MPIABI_T_event_get_timestamp_ptr)( + MPIABI_T_event_instance event_instance, MPIABI_Count *event_timestamp); +extern int (*MPIABI_T_event_handle_alloc_ptr)( + int event_index, void *obj_handle, MPIABI_Info info, + MPIABI_T_event_registration *event_registration); +extern int (*MPIABI_T_event_handle_free_ptr)( + MPIABI_T_event_registration event_registration, void *user_data, + MPIABI_T_event_free_cb_function free_cb_function); +extern int (*MPIABI_T_event_handle_get_info_ptr)( + MPIABI_T_event_registration event_registration, MPIABI_Info *info_used); +extern int (*MPIABI_T_event_handle_set_info_ptr)( + MPIABI_T_event_registration event_registration, MPIABI_Info info); +extern int (*MPIABI_T_event_read_ptr)(MPIABI_T_event_instance event_instance, + int element_index, void *buffer); +extern int (*MPIABI_T_event_register_callback_ptr)( + MPIABI_T_event_registration event_registration, + MPIABI_T_cb_safety cb_safety, MPIABI_Info info, void *user_data, + MPIABI_T_event_cb_function event_cb_function); +extern int (*MPIABI_T_event_set_dropped_handler_ptr)( + MPIABI_T_event_registration event_registration, + MPIABI_T_event_dropped_cb_function dropped_cb_function); +extern int (*MPIABI_T_finalize_ptr)(void); +extern int (*MPIABI_T_init_thread_ptr)(int required, int *provided); +extern int (*MPIABI_T_pvar_get_index_ptr)(const char *name, int var_class, + int *pvar_index); +extern int (*MPIABI_T_pvar_get_info_ptr)( + int pvar_index, char *name, int *name_len, int *verbosity, int *var_class, + MPIABI_Datatype *datatype, MPIABI_T_enum *enumtype, char *desc, + int *desc_len, int *bind, int *readonly, int *continuous, int *atomic); +extern int (*MPIABI_T_pvar_get_num_ptr)(int *num_pvar); +extern int (*MPIABI_T_pvar_handle_alloc_ptr)(MPIABI_T_pvar_session pe_session, + int pvar_index, void *obj_handle, + MPIABI_T_pvar_handle *handle, + int *count); +extern int (*MPIABI_T_pvar_handle_free_ptr)(MPIABI_T_pvar_session pe_session, + MPIABI_T_pvar_handle *handle); +extern int (*MPIABI_T_pvar_read_ptr)(MPIABI_T_pvar_session pe_session, + MPIABI_T_pvar_handle handle, void *buf); +extern int (*MPIABI_T_pvar_readreset_ptr)(MPIABI_T_pvar_session pe_session, + MPIABI_T_pvar_handle handle, + void *buf); +extern int (*MPIABI_T_pvar_reset_ptr)(MPIABI_T_pvar_session pe_session, + MPIABI_T_pvar_handle handle); +extern int (*MPIABI_T_pvar_session_create_ptr)( + MPIABI_T_pvar_session *pe_session); +extern int (*MPIABI_T_pvar_session_free_ptr)(MPIABI_T_pvar_session *pe_session); +extern int (*MPIABI_T_pvar_start_ptr)(MPIABI_T_pvar_session pe_session, + MPIABI_T_pvar_handle handle); +extern int (*MPIABI_T_pvar_stop_ptr)(MPIABI_T_pvar_session pe_session, + MPIABI_T_pvar_handle handle); +extern int (*MPIABI_T_pvar_write_ptr)(MPIABI_T_pvar_session pe_session, + MPIABI_T_pvar_handle handle, + const void *buf); +extern int (*MPIABI_T_source_get_info_ptr)( + int source_index, char *name, int *name_len, char *desc, int *desc_len, + MPIABI_T_source_order *ordering, MPIABI_Count *ticks_per_second, + MPIABI_Count *max_ticks, MPIABI_Info *info); +extern int (*MPIABI_T_source_get_num_ptr)(int *num_sources); +extern int (*MPIABI_T_source_get_timestamp_ptr)(int source_index, + MPIABI_Count *timestamp); + +// A.3.16 Deprecated C Bindings + +extern int (*MPIABI_Attr_delete_ptr)(MPIABI_Comm comm, int keyval); +extern int (*MPIABI_Attr_get_ptr)(MPIABI_Comm comm, int keyval, + void *attribute_val, int *flag); +extern int (*MPIABI_Attr_put_ptr)(MPIABI_Comm comm, int keyval, + void *attribute_val); +extern int (*MPIABI_Get_elements_x_ptr)(const MPIABI_Status *status, + MPIABI_Datatype datatype, + MPIABI_Count *count); +extern int (*MPIABI_Info_get_ptr)(MPIABI_Info info, const char *key, + int valuelen, char *value, int *flag); +extern int (*MPIABI_Info_get_valuelen_ptr)(MPIABI_Info info, const char *key, + int *valuelen, int *flag); +extern int (*MPIABI_Keyval_create_ptr)(MPIABI_Copy_function *copy_fn, + MPIABI_Delete_function *delete_fn, + int *keyval, void *extra_state); +extern int (*MPIABI_Keyval_free_ptr)(int *keyval); +extern int (*MPIABI_Status_set_elements_x_ptr)(MPIABI_Status *status, + MPIABI_Datatype datatype, + MPIABI_Count count); +extern int (*MPIABI_Type_get_extent_x_ptr)(MPIABI_Datatype datatype, + MPIABI_Count *lb, + MPIABI_Count *extent); +extern int (*MPIABI_Type_get_true_extent_x_ptr)(MPIABI_Datatype datatype, + MPIABI_Count *true_lb, + MPIABI_Count *true_extent); +extern int (*MPIABI_Type_size_x_ptr)(MPIABI_Datatype datatype, + MPIABI_Count *size); + +// Removed C Bindings + +extern int (*MPIABI_Address_ptr)(void *location, MPIABI_Aint *address); +extern int (*MPIABI_Type_hindexed_ptr)(int count, int *array_of_blocklengths, + MPIABI_Aint *array_of_displacements, + MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +extern int (*MPIABI_Type_hvector_ptr)(int count, int blocklength, + MPIABI_Aint stride, + MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +extern int (*MPIABI_Type_struct_ptr)(int count, int *array_of_blocklengths, + MPIABI_Aint *array_of_displacements, + MPIABI_Datatype *array_of_types, + MPIABI_Datatype *newtype); +extern int (*MPIABI_Type_extent_ptr)(MPIABI_Datatype datatype, + MPIABI_Aint *extent); +extern int (*MPIABI_Type_lb_ptr)(MPIABI_Datatype datatype, + MPIABI_Aint *displacement); +extern int (*MPIABI_Type_ub_ptr)(MPIABI_Datatype datatype, + MPIABI_Aint *displacement); + +// MPIX + +extern int (*MPIXABI_Query_cuda_support_ptr)(void); +extern int (*MPIXABI_Query_hip_support_ptr)(void); +extern int (*MPIXABI_Query_rocm_support_ptr)(void); +extern int (*MPIXABI_Query_ze_support_ptr)(void); + +#define MPI_MPIABI_FUNCTION_POINTERS_H_INCLUDED +#endif // #ifndef MPI_MPIABI_FUNCTION_POINTERS_H +#ifndef MPI_MPIABI_FUNCTION_POINTERS_H_INCLUDED +#error +#endif diff --git a/mpitrampoline/include/mpi_mpiabi_function_pointers_fortran.h b/mpitrampoline/include/mpi_mpiabi_function_pointers_fortran.h new file mode 100644 index 00000000..ff7d4c4d --- /dev/null +++ b/mpitrampoline/include/mpi_mpiabi_function_pointers_fortran.h @@ -0,0 +1,3575 @@ +// MPIABI Fortran function pointers + +// This file has been generated automatically +// by `mpitrampoline/generate_trampoline.jl`. +// Do not modify this file, changes will be overwritten. + +#include +#include + +extern void (*mpiabi_bsend_ptr)( + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *dest, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_bsend_init_ptr)( + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *dest, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_buffer_attach_ptr)( + void *buffer, + const MPIABI_Fint *size, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_buffer_detach_ptr)( + MPIABI_Aint *buffer_addr, + MPIABI_Fint *size, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_buffer_flush_ptr)( + MPIABI_Fint *ierror +); + +extern void (*mpiabi_buffer_iflush_ptr)( + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_cancel_ptr)( + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_attach_buffer_ptr)( + const MPIABI_Fint *comm, + const void *buffer, + const MPIABI_Fint *size, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_detach_buffer_ptr)( + const MPIABI_Fint *comm, + MPIABI_Aint *buffer_addr, + MPIABI_Fint *size, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_flush_buffer_ptr)( + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_iflush_buffer_ptr)( + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_get_count_ptr)( + const MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + const MPIABI_Fint *datatype, + MPIABI_Fint *count, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_ibsend_ptr)( + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *dest, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_improbe_ptr)( + const MPIABI_Fint *source, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + MPIABI_Fint *flag, + MPIABI_Fint *message, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +extern void (*mpiabi_imrecv_ptr)( + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *message, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_iprobe_ptr)( + const MPIABI_Fint *source, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + MPIABI_Fint *flag, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +extern void (*mpiabi_irecv_ptr)( + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *source, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_irsend_ptr)( + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *dest, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_isend_ptr)( + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *dest, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_isendrecv_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + const MPIABI_Fint *dest, + const MPIABI_Fint *sendtag, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *source, + const MPIABI_Fint *recvtag, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_isendrecv_replace_ptr)( + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *dest, + const MPIABI_Fint *sendtag, + const MPIABI_Fint *source, + const MPIABI_Fint *recvtag, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_issend_ptr)( + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *dest, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_mprobe_ptr)( + const MPIABI_Fint *source, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + MPIABI_Fint *message, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +extern void (*mpiabi_mrecv_ptr)( + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *message, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +extern void (*mpiabi_probe_ptr)( + const MPIABI_Fint *source, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +extern void (*mpiabi_recv_ptr)( + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *source, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +extern void (*mpiabi_recv_init_ptr)( + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *source, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_request_free_ptr)( + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_request_get_status_ptr)( + const MPIABI_Fint *request, + MPIABI_Fint *flag, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +extern void (*mpiabi_request_get_status_all_ptr)( + const MPIABI_Fint *count, + const MPIABI_Fint *array_of_requests, + MPIABI_Fint *flag, + MPIABI_Fint *array_of_statuses[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +extern void (*mpiabi_request_get_status_any_ptr)( + const MPIABI_Fint *count, + const MPIABI_Fint *array_of_requests, + MPIABI_Fint *index, + MPIABI_Fint *flag, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +extern void (*mpiabi_request_get_status_some_ptr)( + const MPIABI_Fint *incount, + const MPIABI_Fint *array_of_requests, + MPIABI_Fint *outcount, + MPIABI_Fint *array_of_indices, + MPIABI_Fint *array_of_statuses[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +extern void (*mpiabi_rsend_ptr)( + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *dest, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_rsend_init_ptr)( + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *dest, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_send_ptr)( + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *dest, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_send_init_ptr)( + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *dest, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_sendrecv_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + const MPIABI_Fint *dest, + const MPIABI_Fint *sendtag, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *source, + const MPIABI_Fint *recvtag, + const MPIABI_Fint *comm, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +extern void (*mpiabi_sendrecv_replace_ptr)( + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *dest, + const MPIABI_Fint *sendtag, + const MPIABI_Fint *source, + const MPIABI_Fint *recvtag, + const MPIABI_Fint *comm, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +extern void (*mpiabi_session_attach_buffer_ptr)( + const MPIABI_Fint *session, + const void *buffer, + const MPIABI_Fint *size, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_session_detach_buffer_ptr)( + const MPIABI_Fint *session, + MPIABI_Aint *buffer_addr, + MPIABI_Fint *size, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_session_flush_buffer_ptr)( + const MPIABI_Fint *session, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_session_iflush_buffer_ptr)( + const MPIABI_Fint *session, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_ssend_ptr)( + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *dest, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_ssend_init_ptr)( + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *dest, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_start_ptr)( + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_startall_ptr)( + const MPIABI_Fint *count, + MPIABI_Fint *array_of_requests, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_status_get_error_ptr)( + const MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *err, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_status_get_source_ptr)( + const MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *source, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_status_get_tag_ptr)( + const MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *tag, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_test_ptr)( + MPIABI_Fint *request, + MPIABI_Fint *flag, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +extern void (*mpiabi_test_cancelled_ptr)( + const MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *flag, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_testall_ptr)( + const MPIABI_Fint *count, + MPIABI_Fint *array_of_requests, + MPIABI_Fint *flag, + MPIABI_Fint *array_of_statuses[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +extern void (*mpiabi_testany_ptr)( + const MPIABI_Fint *count, + MPIABI_Fint *array_of_requests, + MPIABI_Fint *index, + MPIABI_Fint *flag, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +extern void (*mpiabi_testsome_ptr)( + const MPIABI_Fint *incount, + MPIABI_Fint *array_of_requests, + MPIABI_Fint *outcount, + MPIABI_Fint *array_of_indices, + MPIABI_Fint *array_of_statuses[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +extern void (*mpiabi_wait_ptr)( + MPIABI_Fint *request, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +extern void (*mpiabi_waitall_ptr)( + const MPIABI_Fint *count, + MPIABI_Fint *array_of_requests, + MPIABI_Fint *array_of_statuses[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +extern void (*mpiabi_waitany_ptr)( + const MPIABI_Fint *count, + MPIABI_Fint *array_of_requests, + MPIABI_Fint *index, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +extern void (*mpiabi_waitsome_ptr)( + const MPIABI_Fint *incount, + MPIABI_Fint *array_of_requests, + MPIABI_Fint *outcount, + MPIABI_Fint *array_of_indices, + MPIABI_Fint *array_of_statuses[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +extern void (*mpiabi_parrived_ptr)( + const MPIABI_Fint *request, + const MPIABI_Fint *partition, + MPIABI_Fint *flag, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_pready_ptr)( + const MPIABI_Fint *partition, + const MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_pready_list_ptr)( + const MPIABI_Fint *length, + const MPIABI_Fint *array_of_partitions, + const MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_pready_range_ptr)( + const MPIABI_Fint *partition_low, + const MPIABI_Fint *partition_high, + const MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_precv_init_ptr)( + void *buf, + const MPIABI_Fint *partitions, + const MPIABI_Count *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *source, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_psend_init_ptr)( + void *buf, + const MPIABI_Fint *partitions, + const MPIABI_Count *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *source, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern MPIABI_Aint (*mpiabi_aint_add_ptr)( + const MPIABI_Aint *base, + const MPIABI_Aint *disp +); + +extern MPIABI_Aint (*mpiabi_aint_diff_ptr)( + const MPIABI_Aint *addr1, + const MPIABI_Aint *addr2 +); + +extern void (*mpiabi_get_address_ptr)( + const void *location, + MPIABI_Aint *address, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_get_elements_ptr)( + const MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + const MPIABI_Fint *datatype, + MPIABI_Fint *count, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_pack_ptr)( + const void *inbuf, + const MPIABI_Fint *incount, + const MPIABI_Fint *datatype, + void *outbuf, + const MPIABI_Fint *outsize, + MPIABI_Fint *position, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_pack_external_ptr)( + const char **datarep, + const void *inbuf, + const MPIABI_Fint *incount, + const MPIABI_Fint *datatype, + void *outbuf, + const MPIABI_Aint *outsize, + MPIABI_Aint *position, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_pack_external_size_ptr)( + const char **datarep, + const MPIABI_Count *incount, + const MPIABI_Fint *datatype, + MPIABI_Aint *size, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_pack_size_ptr)( + const MPIABI_Fint *incount, + const MPIABI_Fint *datatype, + const MPIABI_Fint *comm, + MPIABI_Fint *size, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_commit_ptr)( + MPIABI_Fint *datatype, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_contiguous_ptr)( + const MPIABI_Fint *count, + const MPIABI_Fint *oldtype, + MPIABI_Fint *newtype, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_create_darray_ptr)( + const MPIABI_Fint *size, + const MPIABI_Fint *rank, + const MPIABI_Fint *ndims, + const MPIABI_Fint *array_of_gsizes, + const MPIABI_Fint *array_of_distribs, + const MPIABI_Fint *array_of_dargs, + const MPIABI_Fint *array_of_psizes, + const MPIABI_Fint *order, + const MPIABI_Fint *oldtype, + MPIABI_Fint *newtype, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_create_hindexed_ptr)( + const MPIABI_Fint *count, + const MPIABI_Fint *array_of_blocklengths, + const MPIABI_Aint *array_of_displacements, + const MPIABI_Fint *oldtype, + MPIABI_Fint *newtype, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_create_hindexed_block_ptr)( + const MPIABI_Fint *count, + const MPIABI_Fint *blocklength, + const MPIABI_Aint *array_of_displacements, + const MPIABI_Fint *oldtype, + MPIABI_Fint *newtype, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_create_hvector_ptr)( + const MPIABI_Fint *count, + const MPIABI_Fint *blocklength, + const MPIABI_Aint *stride, + const MPIABI_Fint *oldtype, + MPIABI_Fint *newtype, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_create_indexed_block_ptr)( + const MPIABI_Fint *count, + const MPIABI_Fint *blocklength, + const MPIABI_Fint *array_of_displacements, + const MPIABI_Fint *oldtype, + MPIABI_Fint *newtype, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_create_resized_ptr)( + const MPIABI_Fint *oldtype, + const MPIABI_Aint *lb, + const MPIABI_Aint *extent, + MPIABI_Fint *newtype, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_create_struct_ptr)( + const MPIABI_Fint *count, + const MPIABI_Fint *array_of_blocklengths, + const MPIABI_Aint *array_of_displacements, + const MPIABI_Fint *array_of_types, + MPIABI_Fint *newtype, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_create_subarray_ptr)( + const MPIABI_Fint *ndims, + const MPIABI_Fint *array_of_sizes, + const MPIABI_Fint *array_of_subsizes, + const MPIABI_Fint *array_of_starts, + const MPIABI_Fint *order, + const MPIABI_Fint *oldtype, + MPIABI_Fint *newtype, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_dup_ptr)( + const MPIABI_Fint *oldtype, + MPIABI_Fint *newtype, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_free_ptr)( + MPIABI_Fint *datatype, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_get_contents_ptr)( + const MPIABI_Fint *datatype, + const MPIABI_Fint *max_integers, + const MPIABI_Fint *max_addresses, + const MPIABI_Fint *max_datatypes, + MPIABI_Fint *array_of_integers, + MPIABI_Aint *array_of_addresses, + MPIABI_Fint *array_of_datatypes, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_get_envelope_ptr)( + const MPIABI_Fint *datatype, + MPIABI_Fint *num_integers, + MPIABI_Fint *num_addresses, + MPIABI_Fint *num_datatypes, + MPIABI_Fint *combiner, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_get_extent_ptr)( + const MPIABI_Fint *datatype, + MPIABI_Aint *lb, + MPIABI_Aint *extent, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_get_true_extent_ptr)( + const MPIABI_Fint *datatype, + MPIABI_Aint *true_lb, + MPIABI_Aint *true_extent, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_indexed_ptr)( + const MPIABI_Fint *count, + const MPIABI_Fint *array_of_blocklengths, + const MPIABI_Fint *array_of_displacements, + const MPIABI_Fint *oldtype, + MPIABI_Fint *newtype, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_size_ptr)( + const MPIABI_Fint *datatype, + MPIABI_Fint *size, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_vector_ptr)( + const MPIABI_Fint *count, + const MPIABI_Fint *blocklength, + const MPIABI_Fint *stride, + const MPIABI_Fint *oldtype, + MPIABI_Fint *newtype, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_unpack_ptr)( + const void *inbuf, + const MPIABI_Fint *insize, + MPIABI_Fint *position, + void *outbuf, + const MPIABI_Fint *outcount, + const MPIABI_Fint *datatype, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_unpack_external_ptr)( + const char **datarep, + const void *inbuf, + const MPIABI_Aint *insize, + MPIABI_Aint *position, + void *outbuf, + const MPIABI_Fint *outcount, + const MPIABI_Fint *datatype, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_allgather_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_allgather_init_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_allgatherv_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Fint *displs, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_allgatherv_init_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Fint *displs, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_allreduce_ptr)( + const void *sendbuf, + void *recvbuf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_allreduce_init_ptr)( + const void *sendbuf, + void *recvbuf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_alltoall_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_alltoall_init_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_alltoallv_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcounts, + const MPIABI_Fint *sdispls, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Fint *rdispls, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_alltoallv_init_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcounts, + const MPIABI_Fint *sdispls, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Fint *rdispls, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_alltoallw_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcounts, + const MPIABI_Fint *sdispls, + const MPIABI_Fint *sendtypes, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Fint *rdispls, + const MPIABI_Fint *recvtypes, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_alltoallw_init_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcounts, + const MPIABI_Fint *sdispls, + const MPIABI_Fint *sendtypes, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Fint *rdispls, + const MPIABI_Fint *recvtypes, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_barrier_ptr)( + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_barrier_init_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_bcast_ptr)( + void *buffer, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_bcast_init_ptr)( + void *buffer, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_exscan_ptr)( + const void *sendbuf, + void *recvbuf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_exscan_init_ptr)( + const void *sendbuf, + void *recvbuf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_gather_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_gather_init_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_gatherv_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Fint *displs, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_gatherv_init_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Fint *displs, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_iallgather_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_iallgatherv_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Fint *displs, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_iallreduce_ptr)( + const void *sendbuf, + void *recvbuf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_ialltoall_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_ialltoallv_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcounts, + const MPIABI_Fint *sdispls, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Fint *rdispls, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_ialltoallw_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcounts, + const MPIABI_Fint *sdispls, + const MPIABI_Fint *sendtypes, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Fint *rdispls, + const MPIABI_Fint *recvtypes, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_ibarrier_ptr)( + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_ibcast_ptr)( + void *buffer, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_iexscan_ptr)( + const void *sendbuf, + void *recvbuf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_igather_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_igatherv_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Fint *displs, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_ireduce_ptr)( + const void *sendbuf, + void *recvbuf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_ireduce_scatter_ptr)( + const void *sendbuf, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Fint *datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_ireduce_scatter_block_ptr)( + const void *sendbuf, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_iscan_ptr)( + const void *sendbuf, + void *recvbuf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_iscatter_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_iscatterv_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcounts, + const MPIABI_Fint *sdispls, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_op_commutative_ptr)( + const MPIABI_Fint *op, + MPIABI_Fint *commute, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_op_create_ptr)( + const void (**user_fn)(void), + const MPIABI_Fint *commute, + MPIABI_Fint *op, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_op_free_ptr)( + MPIABI_Fint *op, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_reduce_ptr)( + const void *sendbuf, + void *recvbuf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_reduce_init_ptr)( + const void *sendbuf, + void *recvbuf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_reduce_local_ptr)( + const void *inbuf, + void *inoutbuf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *op, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_reduce_scatter_ptr)( + const void *sendbuf, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Fint *datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_reduce_scatter_block_ptr)( + const void *sendbuf, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_reduce_scatter_block_init_ptr)( + const void *sendbuf, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_reduce_scatter_init_ptr)( + const void *sendbuf, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Fint *datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_scan_ptr)( + const void *sendbuf, + void *recvbuf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_scan_init_ptr)( + const void *sendbuf, + void *recvbuf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_scatter_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_scatter_init_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_scatterv_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcounts, + const MPIABI_Fint *displs, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_scatterv_init_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcounts, + const MPIABI_Fint *displs, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_get_value_index_ptr)( + const MPIABI_Fint *value_type, + const MPIABI_Fint *index_type, + MPIABI_Fint *pair_type, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_compare_ptr)( + const MPIABI_Fint *comm1, + const MPIABI_Fint *comm2, + MPIABI_Fint *result, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_create_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *group, + MPIABI_Fint *newcomm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_create_from_group_ptr)( + const MPIABI_Fint *group, + const char **stringtag, + const MPIABI_Fint *info, + const MPIABI_Fint *errhandler, + MPIABI_Fint *newcomm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_create_group_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *group, + const MPIABI_Fint *tag, + MPIABI_Fint *newcomm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_create_keyval_ptr)( + const void (**comm_copy_attr_fn)(void), + const void (**comm_delete_attr_fn)(void), + MPIABI_Fint *comm_keyval, + void *extra_state, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_delete_attr_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *comm_keyval, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_dup_ptr)( + const MPIABI_Fint *comm, + MPIABI_Fint *newcomm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_dup_with_info_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *newcomm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_free_ptr)( + MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_get_name_ptr)( + const MPIABI_Fint *comm, + char **comm_name, + MPIABI_Fint *resultlen, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_free_keyval_ptr)( + MPIABI_Fint *comm_keyval, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_get_attr_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *comm_keyval, + void *attribute_val, + MPIABI_Fint *flag, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_get_info_ptr)( + const MPIABI_Fint *comm, + MPIABI_Fint *info_used, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_group_ptr)( + const MPIABI_Fint *comm, + MPIABI_Fint *group, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_idup_ptr)( + const MPIABI_Fint *comm, + MPIABI_Fint *newcomm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_idup_with_info_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *newcomm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_rank_ptr)( + const MPIABI_Fint *comm, + MPIABI_Fint *rank, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_remote_group_ptr)( + const MPIABI_Fint *comm, + MPIABI_Fint *group, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_remote_size_ptr)( + const MPIABI_Fint *comm, + MPIABI_Fint *size, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_set_attr_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *comm_keyval, + void *attribute_val, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_set_info_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_set_name_ptr)( + const MPIABI_Fint *comm, + const char **comm_name, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_size_ptr)( + const MPIABI_Fint *comm, + MPIABI_Fint *size, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_split_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *color, + const MPIABI_Fint *key, + MPIABI_Fint *newcomm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_group_free_ptr)( + MPIABI_Fint *group, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_split_type_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *split_type, + const MPIABI_Fint *key, + const MPIABI_Fint *info, + MPIABI_Fint *newcomm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_test_inter_ptr)( + const MPIABI_Fint *comm, + MPIABI_Fint *flag, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_group_compare_ptr)( + const MPIABI_Fint *group1, + const MPIABI_Fint *group2, + MPIABI_Fint *result, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_group_difference_ptr)( + const MPIABI_Fint *group1, + const MPIABI_Fint *group2, + MPIABI_Fint *newgroup, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_group_excl_ptr)( + const MPIABI_Fint *group, + const MPIABI_Fint *n, + const MPIABI_Fint *ranks, + MPIABI_Fint *newgroup, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_group_from_session_pset_ptr)( + const MPIABI_Fint *session, + const char **pset_name, + MPIABI_Fint *newgroup, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_group_incl_ptr)( + const MPIABI_Fint *group, + const MPIABI_Fint *n, + const MPIABI_Fint *ranks, + MPIABI_Fint *newgroup, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_group_intersection_ptr)( + const MPIABI_Fint *group1, + const MPIABI_Fint *group2, + MPIABI_Fint *newgroup, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_group_range_excl_ptr)( + const MPIABI_Fint *group, + const MPIABI_Fint *n, + const MPIABI_Fint *ranges, + MPIABI_Fint *newgroup, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_group_range_incl_ptr)( + const MPIABI_Fint *group, + const MPIABI_Fint *n, + const MPIABI_Fint *ranges, + MPIABI_Fint *newgroup, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_group_rank_ptr)( + const MPIABI_Fint *group, + MPIABI_Fint *rank, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_group_size_ptr)( + const MPIABI_Fint *group, + MPIABI_Fint *size, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_group_translate_ranks_ptr)( + const MPIABI_Fint *group1, + const MPIABI_Fint *n, + const MPIABI_Fint *ranks1, + const MPIABI_Fint *group2, + const MPIABI_Fint *ranks2, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_group_union_ptr)( + const MPIABI_Fint *group1, + const MPIABI_Fint *group2, + MPIABI_Fint *newgroup, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_intercomm_create_ptr)( + const MPIABI_Fint *local_comm, + const MPIABI_Fint *local_leader, + const MPIABI_Fint *peer_comm, + const MPIABI_Fint *remote_leader, + const MPIABI_Fint *tag, + MPIABI_Fint *newintercomm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_intercomm_create_from_groups_ptr)( + const MPIABI_Fint *local_group, + const MPIABI_Fint *local_leader, + const MPIABI_Fint *remote_group, + const MPIABI_Fint *remote_leader, + const char **stringtag, + const MPIABI_Fint *info, + const MPIABI_Fint *errhandler, + MPIABI_Fint *newintercomm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_intercomm_merge_ptr)( + const MPIABI_Fint *intercomm, + const MPIABI_Fint *high, + MPIABI_Fint *newintracomm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_create_keyval_ptr)( + const void (**type_copy_attr_fn)(void), + const void (**type_delete_attr_fn)(void), + MPIABI_Fint *type_keyval, + void *extra_state, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_delete_attr_ptr)( + const MPIABI_Fint *datatype, + const MPIABI_Fint *type_keyval, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_free_keyval_ptr)( + MPIABI_Fint *type_keyval, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_get_attr_ptr)( + const MPIABI_Fint *datatype, + const MPIABI_Fint *type_keyval, + void *attribute_val, + MPIABI_Fint *flag, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_get_name_ptr)( + const MPIABI_Fint *datatype, + char **type_name, + MPIABI_Fint *resultlen, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_set_attr_ptr)( + const MPIABI_Fint *datatype, + const MPIABI_Fint *type_keyval, + void *attribute_val, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_set_name_ptr)( + const MPIABI_Fint *datatype, + const char **type_name, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_win_create_keyval_ptr)( + const void (**win_copy_attr_fn)(void), + const void (**win_delete_attr_fn)(void), + MPIABI_Fint *win_keyval, + void *extra_state, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_win_delete_attr_ptr)( + const MPIABI_Fint *win, + const MPIABI_Fint *win_keyval, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_win_free_keyval_ptr)( + MPIABI_Fint *win_keyval, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_win_get_attr_ptr)( + const MPIABI_Fint *win, + const MPIABI_Fint *win_keyval, + void *attribute_val, + MPIABI_Fint *flag, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_win_get_name_ptr)( + const MPIABI_Fint *win, + char **win_name, + MPIABI_Fint *resultlen, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_win_set_attr_ptr)( + const MPIABI_Fint *win, + const MPIABI_Fint *win_keyval, + void *attribute_val, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_win_set_name_ptr)( + const MPIABI_Fint *win, + const char **win_name, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_cart_coords_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *rank, + const MPIABI_Fint *maxdims, + MPIABI_Fint *coords, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_cart_create_ptr)( + const MPIABI_Fint *comm_old, + const MPIABI_Fint *ndims, + const MPIABI_Fint *dims, + const MPIABI_Fint *periods, + const MPIABI_Fint *reorder, + MPIABI_Fint *comm_cart, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_cart_get_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *maxdims, + MPIABI_Fint *dims, + MPIABI_Fint *periods, + MPIABI_Fint *coords, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_cart_map_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *ndims, + const MPIABI_Fint *dims, + const MPIABI_Fint *periods, + MPIABI_Fint *newrank, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_cart_rank_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *coords, + MPIABI_Fint *rank, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_cart_shift_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *direction, + const MPIABI_Fint *disp, + MPIABI_Fint *rank_source, + MPIABI_Fint *rank_dest, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_cart_sub_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *remain_dims, + MPIABI_Fint *newcomm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_cartdim_get_ptr)( + const MPIABI_Fint *comm, + MPIABI_Fint *ndims, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_dims_create_ptr)( + const MPIABI_Fint *nnodes, + const MPIABI_Fint *ndims, + const MPIABI_Fint *dims, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_dist_graph_create_ptr)( + const MPIABI_Fint *comm_old, + const MPIABI_Fint *n, + const MPIABI_Fint *sources, + const MPIABI_Fint *degrees, + const MPIABI_Fint *destinations, + const MPIABI_Fint *weights, + const MPIABI_Fint *info, + const MPIABI_Fint *reorder, + MPIABI_Fint *comm_dist_graph, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_dist_graph_create_adjacent_ptr)( + const MPIABI_Fint *comm_old, + const MPIABI_Fint *indegree, + const MPIABI_Fint *sources, + const MPIABI_Fint *sourceweights, + const MPIABI_Fint *outdegree, + const MPIABI_Fint *destinations, + const MPIABI_Fint *destweights, + const MPIABI_Fint *info, + const MPIABI_Fint *reorder, + MPIABI_Fint *comm_dist_graph, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_dist_graph_neighbors_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *maxindegree, + MPIABI_Fint *sources, + MPIABI_Fint *sourceweights, + const MPIABI_Fint *maxoutdegree, + MPIABI_Fint *destinations, + MPIABI_Fint *destweights, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_dist_graph_neighbors_count_ptr)( + const MPIABI_Fint *comm, + MPIABI_Fint *indegree, + MPIABI_Fint *outdegree, + MPIABI_Fint *weighted, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_graph_create_ptr)( + const MPIABI_Fint *comm_old, + const MPIABI_Fint *nnodes, + const MPIABI_Fint *index, + const MPIABI_Fint *edges, + const MPIABI_Fint *reorder, + MPIABI_Fint *comm_graph, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_graph_get_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *maxindex, + const MPIABI_Fint *maxedges, + MPIABI_Fint *index, + MPIABI_Fint *edges, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_graph_map_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *nnodes, + const MPIABI_Fint *index, + const MPIABI_Fint *edges, + MPIABI_Fint *newrank, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_graph_neighbors_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *rank, + const MPIABI_Fint *maxneighbors, + MPIABI_Fint *neighbors, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_graph_neighbors_count_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *rank, + MPIABI_Fint *nneighbors, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_graphdims_get_ptr)( + const MPIABI_Fint *comm, + MPIABI_Fint *nnodes, + MPIABI_Fint *nedges, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_ineighbor_allgather_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_ineighbor_allgatherv_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Fint *displs, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_ineighbor_alltoall_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_ineighbor_alltoallv_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcounts, + const MPIABI_Fint *sdispls, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Fint *rdispls, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_ineighbor_alltoallw_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcounts, + const MPIABI_Aint *sdispls, + const MPIABI_Fint *sendtypes, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Aint *rdispls, + const MPIABI_Fint *recvtypes, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_neighbor_allgather_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_neighbor_allgather_init_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_neighbor_allgatherv_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Aint *displs, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_neighbor_allgatherv_init_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Aint *displs, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_neighbor_alltoall_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_neighbor_alltoall_init_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_neighbor_alltoallv_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcounts, + const MPIABI_Fint *sdispls, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Fint *rdispls, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_neighbor_alltoallv_init_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcounts, + const MPIABI_Fint *sdispls, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Fint *rdispls, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_neighbor_alltoallw_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcounts, + const MPIABI_Aint *sdispls, + const MPIABI_Fint *sendtypes, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Aint *rdispls, + const MPIABI_Fint *recvtypes, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_neighbor_alltoallw_init_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcounts, + const MPIABI_Aint *sdispls, + const MPIABI_Fint *sendtypes, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Aint *rdispls, + const MPIABI_Fint *recvtypes, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_topo_test_ptr)( + const MPIABI_Fint *comm, + MPIABI_Fint *status, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_add_error_class_ptr)( + MPIABI_Fint *errorclass, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_add_error_code_ptr)( + const MPIABI_Fint *errorclass, + MPIABI_Fint *errorcode, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_add_error_string_ptr)( + const MPIABI_Fint *errorcode, + const char **string, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_alloc_mem_ptr)( + const MPIABI_Aint *size, + const MPIABI_Fint *info, + void *baseptr, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_call_errhandler_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *errorcode, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_create_errhandler_ptr)( + const void (**comm_errhandler_fn)(void), + MPIABI_Fint *errhandler, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_get_errhandler_ptr)( + const MPIABI_Fint *comm, + MPIABI_Fint *errhandler, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_set_errhandler_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *errhandler, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_errhandler_free_ptr)( + MPIABI_Fint *errhandler, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_error_class_ptr)( + const MPIABI_Fint *errorcode, + MPIABI_Fint *errorclass, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_error_string_ptr)( + const MPIABI_Fint *errorcode, + char **string, + MPIABI_Fint *resultlen, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_call_errhandler_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Fint *errorcode, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_create_errhandler_ptr)( + const void (**file_errhandler_fn)(void), + MPIABI_Fint *errhandler, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_get_errhandler_ptr)( + const MPIABI_Fint *file, + MPIABI_Fint *errhandler, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_set_errhandler_ptr)( + const MPIABI_Fint *file, + const MPIABI_Fint *errhandler, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_free_mem_ptr)( + void *base, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_get_hw_resource_info_ptr)( + MPIABI_Fint *hw_info, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_get_library_version_ptr)( + char **version, + MPIABI_Fint *resultlen, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_get_processor_name_ptr)( + char **name, + MPIABI_Fint *resultlen, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_get_version_ptr)( + MPIABI_Fint *version, + MPIABI_Fint *subversion, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_remove_error_class_ptr)( + const MPIABI_Fint *errorclass, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_remove_error_code_ptr)( + const MPIABI_Fint *errorcode, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_remove_error_string_ptr)( + const MPIABI_Fint *errorcode, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_session_call_errhandler_ptr)( + const MPIABI_Fint *session, + const MPIABI_Fint *errorcode, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_session_create_errhandler_ptr)( + const void (**session_errhandler_fn)(void), + MPIABI_Fint *errhandler, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_session_get_errhandler_ptr)( + const MPIABI_Fint *session, + MPIABI_Fint *errhandler, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_session_set_errhandler_ptr)( + const MPIABI_Fint *session, + const MPIABI_Fint *errhandler, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_win_call_errhandler_ptr)( + const MPIABI_Fint *win, + const MPIABI_Fint *errorcode, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_win_create_errhandler_ptr)( + const void (**win_errhandler_fn)(void), + MPIABI_Fint *errhandler, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_win_get_errhandler_ptr)( + const MPIABI_Fint *win, + MPIABI_Fint *errhandler, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_win_set_errhandler_ptr)( + const MPIABI_Fint *win, + const MPIABI_Fint *errhandler, + MPIABI_Fint *ierror +); + +extern double (*mpiabi_wtick_ptr)( +); + +extern double (*mpiabi_wtime_ptr)( +); + +extern void (*mpiabi_info_create_ptr)( + MPIABI_Fint *info, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_info_create_env_ptr)( + MPIABI_Fint *info, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_info_delete_ptr)( + const MPIABI_Fint *info, + const char **key, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_info_dup_ptr)( + const MPIABI_Fint *info, + MPIABI_Fint *newinfo, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_info_free_ptr)( + MPIABI_Fint *info, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_info_get_nkeys_ptr)( + const MPIABI_Fint *info, + MPIABI_Fint *nkeys, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_info_get_nthkey_ptr)( + const MPIABI_Fint *info, + const MPIABI_Fint *n, + char **key, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_info_get_string_ptr)( + const MPIABI_Fint *info, + const char **key, + MPIABI_Fint *buflen, + char **value, + MPIABI_Fint *flag, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_info_set_ptr)( + const MPIABI_Fint *info, + const char **key, + const char **value, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_abort_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *errorcode, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_close_port_ptr)( + const char **port_name, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_accept_ptr)( + const char **port_name, + const MPIABI_Fint *info, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + MPIABI_Fint *newcomm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_connect_ptr)( + const char **port_name, + const MPIABI_Fint *info, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + MPIABI_Fint *newcomm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_disconnect_ptr)( + MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_get_parent_ptr)( + MPIABI_Fint *parent, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_join_ptr)( + const MPIABI_Fint *fd, + MPIABI_Fint *intercomm, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_spawn_ptr)( + const char **command, + const char **argv, + const MPIABI_Fint *maxprocs, + const MPIABI_Fint *info, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + MPIABI_Fint *intercomm, + MPIABI_Fint *array_of_errcodes, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_comm_spawn_multiple_ptr)( + const MPIABI_Fint *count, + const char **array_of_commands, + const char **array_of_argv, + const MPIABI_Fint *array_of_maxprocs, + const MPIABI_Fint *array_of_info, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + MPIABI_Fint *intercomm, + MPIABI_Fint *array_of_errcodes, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_finalize_ptr)( + MPIABI_Fint *ierror +); + +extern void (*mpiabi_finalized_ptr)( + MPIABI_Fint *flag, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_init_ptr)( + MPIABI_Fint *ierror +); + +extern void (*mpiabi_init_thread_ptr)( + const MPIABI_Fint *required, + MPIABI_Fint *provided, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_initialized_ptr)( + MPIABI_Fint *flag, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_is_thread_main_ptr)( + MPIABI_Fint *flag, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_lookup_name_ptr)( + const char **service_name, + const MPIABI_Fint *info, + char **port_name, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_open_port_ptr)( + const MPIABI_Fint *info, + char **port_name, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_publish_name_ptr)( + const char **service_name, + const MPIABI_Fint *info, + const char **port_name, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_query_thread_ptr)( + MPIABI_Fint *provided, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_session_finalize_ptr)( + MPIABI_Fint *session, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_session_get_info_ptr)( + const MPIABI_Fint *session, + MPIABI_Fint *info_used, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_session_get_nth_pset_ptr)( + const MPIABI_Fint *session, + const MPIABI_Fint *info, + const MPIABI_Fint *n, + MPIABI_Fint *pset_len, + char **pset_name, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_session_get_num_psets_ptr)( + const MPIABI_Fint *session, + const MPIABI_Fint *info, + MPIABI_Fint *npset_names, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_session_get_pset_info_ptr)( + const MPIABI_Fint *session, + const char **pset_name, + MPIABI_Fint *info, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_session_init_ptr)( + const MPIABI_Fint *info, + const MPIABI_Fint *errhandler, + MPIABI_Fint *session, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_unpublish_name_ptr)( + const char **service_name, + const MPIABI_Fint *info, + const char **port_name, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_accumulate_ptr)( + const void *origin_addr, + const MPIABI_Fint *origin_count, + const MPIABI_Fint *origin_datatype, + const MPIABI_Fint *target_rank, + const MPIABI_Aint *target_disp, + const MPIABI_Fint *target_count, + const MPIABI_Fint *target_datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_compare_and_swap_ptr)( + const void *origin_addr, + const void *compare_addr, + void *result_addr, + const MPIABI_Fint *datatype, + const MPIABI_Fint *target_rank, + const MPIABI_Aint *target_disp, + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_fetch_and_op_ptr)( + const void *origin_addr, + void *result_addr, + const MPIABI_Fint *datatype, + const MPIABI_Fint *target_rank, + const MPIABI_Aint *target_disp, + const MPIABI_Fint *op, + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_get_ptr)( + void *origin_addr, + const MPIABI_Fint *origin_count, + const MPIABI_Fint *origin_datatype, + const MPIABI_Fint *target_rank, + const MPIABI_Aint *target_disp, + const MPIABI_Fint *target_count, + const MPIABI_Fint *target_datatype, + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_get_accumulate_ptr)( + const void *origin_addr, + const MPIABI_Fint *origin_count, + const MPIABI_Fint *origin_datatype, + void *result_addr, + const MPIABI_Fint *result_count, + const MPIABI_Fint *result_datatype, + const MPIABI_Fint *target_rank, + const MPIABI_Aint *target_disp, + const MPIABI_Fint *target_count, + const MPIABI_Fint *target_datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_put_ptr)( + const void *origin_addr, + const MPIABI_Fint *origin_count, + const MPIABI_Fint *origin_datatype, + const MPIABI_Fint *target_rank, + const MPIABI_Aint *target_disp, + const MPIABI_Fint *target_count, + const MPIABI_Fint *target_datatype, + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_raccumulate_ptr)( + const void *origin_addr, + const MPIABI_Fint *origin_count, + const MPIABI_Fint *origin_datatype, + const MPIABI_Fint *target_rank, + const MPIABI_Aint *target_disp, + const MPIABI_Fint *target_count, + const MPIABI_Fint *target_datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *win, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_rget_ptr)( + void *origin_addr, + const MPIABI_Fint *origin_count, + const MPIABI_Fint *origin_datatype, + const MPIABI_Fint *target_rank, + const MPIABI_Aint *target_disp, + const MPIABI_Fint *target_count, + const MPIABI_Fint *target_datatype, + const MPIABI_Fint *win, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_rget_accumulate_ptr)( + const void *origin_addr, + const MPIABI_Fint *origin_count, + const MPIABI_Fint *origin_datatype, + void *result_addr, + const MPIABI_Fint *result_count, + const MPIABI_Fint *result_datatype, + const MPIABI_Fint *target_rank, + const MPIABI_Aint *target_disp, + const MPIABI_Fint *target_count, + const MPIABI_Fint *target_datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *win, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_rput_ptr)( + const void *origin_addr, + const MPIABI_Fint *origin_count, + const MPIABI_Fint *origin_datatype, + const MPIABI_Fint *target_rank, + const MPIABI_Aint *target_disp, + const MPIABI_Fint *target_count, + const MPIABI_Fint *target_datatype, + const MPIABI_Fint *win, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_win_allocate_ptr)( + const MPIABI_Aint *size, + const MPIABI_Fint *disp_unit, + const MPIABI_Fint *info, + const MPIABI_Fint *comm, + void *baseptr, + MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_win_allocate_shared_ptr)( + const MPIABI_Aint *size, + const MPIABI_Fint *disp_unit, + const MPIABI_Fint *info, + const MPIABI_Fint *comm, + void *baseptr, + MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_win_attach_ptr)( + const MPIABI_Fint *win, + void *base, + const MPIABI_Aint *size, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_win_complete_ptr)( + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_win_create_ptr)( + void *base, + const MPIABI_Aint *size, + const MPIABI_Fint *disp_unit, + const MPIABI_Fint *info, + const MPIABI_Fint *comm, + MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_win_create_dynamic_ptr)( + const MPIABI_Fint *info, + const MPIABI_Fint *comm, + MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_win_detach_ptr)( + const MPIABI_Fint *win, + const void *base, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_win_fence_ptr)( + const MPIABI_Fint *assert, + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_win_flush_ptr)( + const MPIABI_Fint *rank, + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_win_flush_all_ptr)( + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_win_flush_local_ptr)( + const MPIABI_Fint *rank, + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_win_flush_local_all_ptr)( + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_win_free_ptr)( + MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_win_get_group_ptr)( + const MPIABI_Fint *win, + MPIABI_Fint *group, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_win_get_info_ptr)( + const MPIABI_Fint *win, + MPIABI_Fint *info_used, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_win_lock_ptr)( + const MPIABI_Fint *lock_type, + const MPIABI_Fint *rank, + const MPIABI_Fint *assert, + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_win_lock_all_ptr)( + const MPIABI_Fint *assert, + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_win_post_ptr)( + const MPIABI_Fint *group, + const MPIABI_Fint *assert, + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_win_set_info_ptr)( + const MPIABI_Fint *win, + const MPIABI_Fint *info, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_win_shared_query_ptr)( + const MPIABI_Fint *win, + const MPIABI_Fint *rank, + MPIABI_Aint *size, + MPIABI_Fint *disp_unit, + void *baseptr, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_win_start_ptr)( + const MPIABI_Fint *group, + const MPIABI_Fint *assert, + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_win_sync_ptr)( + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_win_test_ptr)( + const MPIABI_Fint *win, + MPIABI_Fint *flag, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_win_unlock_ptr)( + const MPIABI_Fint *rank, + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_win_unlock_all_ptr)( + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_win_wait_ptr)( + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_grequest_complete_ptr)( + const MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_grequest_start_ptr)( + const void (**query_fn)(void), + const void (**free_fn)(void), + const void (**cancel_fn)(void), + void *extra_state, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_status_set_cancelled_ptr)( + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + const MPIABI_Fint *flag, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_status_set_elements_ptr)( + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + const MPIABI_Fint *datatype, + const MPIABI_Fint *count, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_status_set_error_ptr)( + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + const MPIABI_Fint *err, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_status_set_source_ptr)( + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + const MPIABI_Fint *source, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_status_set_tag_ptr)( + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + const MPIABI_Fint *tag, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_close_ptr)( + MPIABI_Fint *fh, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_delete_ptr)( + const char **filename, + const MPIABI_Fint *info, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_get_amode_ptr)( + const MPIABI_Fint *fh, + MPIABI_Fint *amode, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_get_atomicity_ptr)( + const MPIABI_Fint *fh, + MPIABI_Fint *flag, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_get_byte_offset_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Offset *offset, + MPIABI_Offset *disp, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_get_group_ptr)( + const MPIABI_Fint *fh, + MPIABI_Fint *group, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_get_info_ptr)( + const MPIABI_Fint *fh, + MPIABI_Fint *info_used, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_get_position_ptr)( + const MPIABI_Fint *fh, + MPIABI_Offset *offset, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_get_position_shared_ptr)( + const MPIABI_Fint *fh, + MPIABI_Offset *offset, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_get_size_ptr)( + const MPIABI_Fint *fh, + MPIABI_Offset *size, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_get_type_extent_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Fint *datatype, + MPIABI_Aint *extent, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_get_view_ptr)( + const MPIABI_Fint *fh, + MPIABI_Offset *disp, + MPIABI_Fint *etype, + MPIABI_Fint *filetype, + char **datarep, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_iread_ptr)( + const MPIABI_Fint *fh, + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_iread_all_ptr)( + const MPIABI_Fint *fh, + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_iread_at_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Offset *offset, + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_iread_at_all_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Offset *offset, + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_iread_shared_ptr)( + const MPIABI_Fint *fh, + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_iwrite_ptr)( + const MPIABI_Fint *fh, + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_iwrite_all_ptr)( + const MPIABI_Fint *fh, + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_iwrite_at_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Offset *offset, + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_iwrite_at_all_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Offset *offset, + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_iwrite_shared_ptr)( + const MPIABI_Fint *fh, + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_open_ptr)( + const MPIABI_Fint *comm, + const char **filename, + const MPIABI_Fint *amode, + const MPIABI_Fint *info, + MPIABI_Fint *fh, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_preallocate_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Offset *size, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_read_ptr)( + const MPIABI_Fint *fh, + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_read_all_ptr)( + const MPIABI_Fint *fh, + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_read_all_begin_ptr)( + const MPIABI_Fint *fh, + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_read_all_end_ptr)( + const MPIABI_Fint *fh, + void *buf, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_read_at_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Offset *offset, + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_read_at_all_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Offset *offset, + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_read_at_all_begin_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Offset *offset, + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_read_at_all_end_ptr)( + const MPIABI_Fint *fh, + void *buf, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_read_ordered_ptr)( + const MPIABI_Fint *fh, + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_read_ordered_begin_ptr)( + const MPIABI_Fint *fh, + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_read_ordered_end_ptr)( + const MPIABI_Fint *fh, + void *buf, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_read_shared_ptr)( + const MPIABI_Fint *fh, + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_seek_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Offset *offset, + const MPIABI_Fint *whence, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_seek_shared_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Offset *offset, + const MPIABI_Fint *whence, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_set_atomicity_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Fint *flag, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_set_info_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Fint *info, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_set_size_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Offset *size, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_set_view_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Offset *disp, + const MPIABI_Fint *etype, + const MPIABI_Fint *filetype, + const char **datarep, + const MPIABI_Fint *info, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_sync_ptr)( + const MPIABI_Fint *fh, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_write_ptr)( + const MPIABI_Fint *fh, + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_write_all_ptr)( + const MPIABI_Fint *fh, + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_write_all_begin_ptr)( + const MPIABI_Fint *fh, + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_write_all_end_ptr)( + const MPIABI_Fint *fh, + const void *buf, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_write_at_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Offset *offset, + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_write_at_all_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Offset *offset, + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_write_at_all_begin_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Offset *offset, + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_write_at_all_end_ptr)( + const MPIABI_Fint *fh, + const void *buf, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_write_ordered_ptr)( + const MPIABI_Fint *fh, + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_write_ordered_begin_ptr)( + const MPIABI_Fint *fh, + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_write_ordered_end_ptr)( + const MPIABI_Fint *fh, + const void *buf, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +extern void (*mpiabi_file_write_shared_ptr)( + const MPIABI_Fint *fh, + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +extern void (*mpiabi_register_datarep_ptr)( + const char **datarep, + const void (**read_conversion_fn)(void), + const void (**write_conversion_fn)(void), + const void (**dtype_file_extent_fn)(void), + void *extra_state, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_f_sync_reg_ptr)( + void *buf +); + +extern void (*mpiabi_type_create_f90_complex_ptr)( + const MPIABI_Fint *p, + const MPIABI_Fint *r, + MPIABI_Fint *newtype, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_create_f90_integer_ptr)( + const MPIABI_Fint *r, + MPIABI_Fint *newtype, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_create_f90_real_ptr)( + const MPIABI_Fint *p, + const MPIABI_Fint *r, + MPIABI_Fint *newtype, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_match_size_ptr)( + const MPIABI_Fint *typeclass, + const MPIABI_Fint *size, + MPIABI_Fint *newtype, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_pcontrol_ptr)( + const MPIABI_Fint *level +); + +extern void (*mpiabi_attr_delete_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *keyval, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_attr_get_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *keyval, + void *attribute_val, + MPIABI_Fint *flag, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_attr_put_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *keyval, + void *attribute_val, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_get_elements_x_ptr)( + const MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + const MPIABI_Fint *datatype, + MPIABI_Count *count, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_info_get_ptr)( + const MPIABI_Fint *info, + const char **key, + const MPIABI_Fint *valuelen, + char **value, + MPIABI_Fint *flag, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_info_get_valuelen_ptr)( + const MPIABI_Fint *info, + const char **key, + MPIABI_Fint *valuelen, + MPIABI_Fint *flag, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_keyval_create_ptr)( + const void (**copy_fn)(void), + const void (**delete_fn)(void), + MPIABI_Fint *keyval, + void *extra_state, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_keyval_free_ptr)( + MPIABI_Fint *keyval, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_status_set_elements_x_ptr)( + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + const MPIABI_Fint *datatype, + const MPIABI_Count *count, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_get_extent_x_ptr)( + const MPIABI_Fint *datatype, + MPIABI_Count *lb, + MPIABI_Count *extent, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_get_true_extent_x_ptr)( + const MPIABI_Fint *datatype, + MPIABI_Count *true_lb, + MPIABI_Count *true_extent, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_size_x_ptr)( + const MPIABI_Fint *datatype, + MPIABI_Count *size, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_address_ptr)( + void *location, + MPIABI_Aint *address, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_hindexed_ptr)( + const MPIABI_Fint *count, + MPIABI_Fint *array_of_blocklengths, + MPIABI_Aint *array_of_displacements, + const MPIABI_Fint *oldtype, + MPIABI_Fint *newtype, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_hvector_ptr)( + const MPIABI_Fint *count, + const MPIABI_Fint *blocklength, + const MPIABI_Aint *stride, + const MPIABI_Fint *oldtype, + MPIABI_Fint *newtype, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_struct_ptr)( + const MPIABI_Fint *count, + MPIABI_Fint *array_of_blocklengths, + MPIABI_Aint *array_of_displacements, + MPIABI_Fint *array_of_types, + MPIABI_Fint *newtype, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_extent_ptr)( + const MPIABI_Fint *datatype, + MPIABI_Aint *extent, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_lb_ptr)( + const MPIABI_Fint *datatype, + MPIABI_Aint *displacement, + MPIABI_Fint *ierror +); + +extern void (*mpiabi_type_ub_ptr)( + const MPIABI_Fint *datatype, + MPIABI_Aint *displacement, + MPIABI_Fint *ierror +); + diff --git a/mpitrampoline/include/mpi_mpitrampoline.h b/mpitrampoline/include/mpi_mpitrampoline.h new file mode 100644 index 00000000..43ccc2b2 --- /dev/null +++ b/mpitrampoline/include/mpi_mpitrampoline.h @@ -0,0 +1,14 @@ +#ifndef MPI_MPITRAMPOLINE_H +#define MPI_MPITRAMPOLINE_H + +extern const int mpitrampoline_version_major; +extern const int mpitrampoline_version_minor; +extern const int mpitrampoline_version_patch; + +extern const char * const mpitrampoline_version; + +#define MPI_MPITRAMPOLINE_H_INCLUDED +#endif // #ifndef MPI_MPITRAMPOLINE_H +#ifndef MPI_MPITRAMPOLINE_H_INCLUDED +#error +#endif diff --git a/mpitrampoline/include/mpi_types.h b/mpitrampoline/include/mpi_types.h new file mode 100644 index 00000000..1385f28e --- /dev/null +++ b/mpitrampoline/include/mpi_types.h @@ -0,0 +1,88 @@ +#ifndef MPI_TYPES_H +#define MPI_TYPES_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +// Define MPI types + +// A.1.2 Types + +// C opaque types + +typedef MPIABI_Aint MPI_Aint; +typedef MPIABI_Count MPI_Count; +typedef MPIABI_Fint MPI_Fint; +typedef MPIABI_Offset MPI_Offset; + +typedef MPIABI_Status MPI_Status; +typedef MPIABI_Status MPI_F08_status; + +// C handles to assorted structures + +typedef MPIABI_Comm MPI_Comm; +typedef MPIABI_Datatype MPI_Datatype; +typedef MPIABI_Errhandler MPI_Errhandler; +typedef MPIABI_File MPI_File; +typedef MPIABI_Group MPI_Group; +typedef MPIABI_Info MPI_Info; +typedef MPIABI_Message MPI_Message; +typedef MPIABI_Op MPI_Op; +typedef MPIABI_Request MPI_Request; +typedef MPIABI_Session MPI_Session; +typedef MPIABI_Win MPI_Win; + +// Types for the MPI_T interface + +typedef MPIABI_T_enum MPI_T_enum; +typedef MPIABI_T_cvar_handle MPI_T_cvar_handle; +typedef MPIABI_T_pvar_handle MPI_T_pvar_handle; +typedef MPIABI_T_pvar_session MPI_T_pvar_session; +typedef MPIABI_T_event_instance MPI_T_event_instance; +typedef MPIABI_T_event_registration MPI_T_event_registration; +typedef MPIABI_T_source_order MPI_T_source_order; +typedef MPIABI_T_cb_safety MPI_T_cb_safety; + +// Callback function types + +// A.1.3 Prototype Definitions + +typedef MPIABI_User_function MPI_User_function; +typedef MPIABI_User_function_c MPI_User_function_c; +typedef MPIABI_Comm_copy_attr_function MPI_Comm_copy_attr_function; +typedef MPIABI_Comm_delete_attr_function MPI_Comm_delete_attr_function; +typedef MPIABI_Win_copy_attr_function MPI_Win_copy_attr_function; +typedef MPIABI_Win_delete_attr_function MPI_Win_delete_attr_function; +typedef MPIABI_Type_copy_attr_function MPI_Type_copy_attr_function; +typedef MPIABI_Type_delete_attr_function MPI_Type_delete_attr_function; +typedef MPIABI_Comm_errhandler_function MPI_Comm_errhandler_function; +typedef MPIABI_Win_errhandler_function MPI_Win_errhandler_function; +typedef MPIABI_File_errhandler_function MPI_File_errhandler_function; +typedef MPIABI_Session_errhandler_function MPI_Session_errhandler_function; +typedef MPIABI_Grequest_query_function MPI_Grequest_query_function; +typedef MPIABI_Grequest_free_function MPI_Grequest_free_function; +typedef MPIABI_Grequest_cancel_function MPI_Grequest_cancel_function; +typedef MPIABI_Datarep_extent_function MPI_Datarep_extent_function; +typedef MPIABI_Datarep_conversion_function MPI_Datarep_conversion_function; +typedef MPIABI_Datarep_conversion_function_c MPI_Datarep_conversion_function_c; +typedef MPIABI_T_event_cb_function MPI_T_event_cb_function; +typedef MPIABI_T_event_free_cb_function MPI_T_event_free_cb_function; +typedef MPIABI_T_event_dropped_cb_function MPI_T_event_dropped_cb_function; + +// A.1.4 Deprecated Prototype Definitions + +typedef MPIABI_Copy_function MPI_Copy_function; +typedef MPIABI_Delete_function MPI_Delete_function; + +#ifdef __cplusplus +} +#endif + +#define MPI_TYPES_H_INCLUDED +#endif // #ifndef MPI_TYPES_H +#ifndef MPI_TYPES_H_INCLUDED +#error +#endif diff --git a/mpitrampoline/include/mpif.h b/mpitrampoline/include/mpif.h new file mode 100644 index 00000000..13eb5724 --- /dev/null +++ b/mpitrampoline/include/mpif.h @@ -0,0 +1,5 @@ + include "mpif_types.h" + include "mpif_constants.h" + include "mpif_functions.h" + + include "mpitrampolinef.h" diff --git a/mpitrampoline/include/mpif_constants.h b/mpitrampoline/include/mpif_constants.h new file mode 100644 index 00000000..67088248 --- /dev/null +++ b/mpitrampoline/include/mpif_constants.h @@ -0,0 +1,780 @@ + include "mpiabif_constants.h" + +! Define MPI constants + +! A.1.1 Defined Constants + +! Variable Address Size +! Define these first because they are used in other definitions. + + integer MPI_ADDRESS_KIND + parameter (MPI_ADDRESS_KIND = MPIABI_ADDRESS_KIND) + integer MPI_COUNT_KIND + parameter (MPI_COUNT_KIND = MPIABI_COUNT_KIND) + integer MPI_INTEGER_KIND + parameter (MPI_INTEGER_KIND = MPIABI_INTEGER_KIND) + integer MPI_OFFSET_KIND + parameter (MPI_OFFSET_KIND = MPIABI_OFFSET_KIND) + +! Error classes + + integer MPI_SUCCESS + parameter (MPI_SUCCESS = MPIABI_SUCCESS) + integer MPI_ERR_BUFFER + parameter (MPI_ERR_BUFFER = MPIABI_ERR_BUFFER) + integer MPI_ERR_COUNT + parameter (MPI_ERR_COUNT = MPIABI_ERR_COUNT) + integer MPI_ERR_TYPE + parameter (MPI_ERR_TYPE = MPIABI_ERR_TYPE) + integer MPI_ERR_TAG + parameter (MPI_ERR_TAG = MPIABI_ERR_TAG) + integer MPI_ERR_COMM + parameter (MPI_ERR_COMM = MPIABI_ERR_COMM) + integer MPI_ERR_RANK + parameter (MPI_ERR_RANK = MPIABI_ERR_RANK) + integer MPI_ERR_REQUEST + parameter (MPI_ERR_REQUEST = MPIABI_ERR_REQUEST) + integer MPI_ERR_ROOT + parameter (MPI_ERR_ROOT = MPIABI_ERR_ROOT) + integer MPI_ERR_GROUP + parameter (MPI_ERR_GROUP = MPIABI_ERR_GROUP) + integer MPI_ERR_OP + parameter (MPI_ERR_OP = MPIABI_ERR_OP) + integer MPI_ERR_TOPOLOGY + parameter (MPI_ERR_TOPOLOGY = MPIABI_ERR_TOPOLOGY) + integer MPI_ERR_DIMS + parameter (MPI_ERR_DIMS = MPIABI_ERR_DIMS) + integer MPI_ERR_ARG + parameter (MPI_ERR_ARG = MPIABI_ERR_ARG) + integer MPI_ERR_UNKNOWN + parameter (MPI_ERR_UNKNOWN = MPIABI_ERR_UNKNOWN) + integer MPI_ERR_TRUNCATE + parameter (MPI_ERR_TRUNCATE = MPIABI_ERR_TRUNCATE) + integer MPI_ERR_OTHER + parameter (MPI_ERR_OTHER = MPIABI_ERR_OTHER) + integer MPI_ERR_INTERN + parameter (MPI_ERR_INTERN = MPIABI_ERR_INTERN) + integer MPI_ERR_PENDING + parameter (MPI_ERR_PENDING = MPIABI_ERR_PENDING) + integer MPI_ERR_IN_STATUS + parameter (MPI_ERR_IN_STATUS = MPIABI_ERR_IN_STATUS) + integer MPI_ERR_ACCESS + parameter (MPI_ERR_ACCESS = MPIABI_ERR_ACCESS) + integer MPI_ERR_AMODE + parameter (MPI_ERR_AMODE = MPIABI_ERR_AMODE) + integer MPI_ERR_ASSERT + parameter (MPI_ERR_ASSERT = MPIABI_ERR_ASSERT) + integer MPI_ERR_BAD_FILE + parameter (MPI_ERR_BAD_FILE = MPIABI_ERR_BAD_FILE) + integer MPI_ERR_BASE + parameter (MPI_ERR_BASE = MPIABI_ERR_BASE) + integer MPI_ERR_CONVERSION + parameter (MPI_ERR_CONVERSION = MPIABI_ERR_CONVERSION) + integer MPI_ERR_DISP + parameter (MPI_ERR_DISP = MPIABI_ERR_DISP) + integer MPI_ERR_DUP_DATAREP + parameter (MPI_ERR_DUP_DATAREP = MPIABI_ERR_DUP_DATAREP) + integer MPI_ERR_FILE_EXISTS + parameter (MPI_ERR_FILE_EXISTS = MPIABI_ERR_FILE_EXISTS) + integer MPI_ERR_FILE_IN_USE + parameter (MPI_ERR_FILE_IN_USE = MPIABI_ERR_FILE_IN_USE) + integer MPI_ERR_FILE + parameter (MPI_ERR_FILE = MPIABI_ERR_FILE) + integer MPI_ERR_INFO_KEY + parameter (MPI_ERR_INFO_KEY = MPIABI_ERR_INFO_KEY) + integer MPI_ERR_INFO_NOKEY + parameter (MPI_ERR_INFO_NOKEY = MPIABI_ERR_INFO_NOKEY) + integer MPI_ERR_INFO_VALUE + parameter (MPI_ERR_INFO_VALUE = MPIABI_ERR_INFO_VALUE) + integer MPI_ERR_INFO + parameter (MPI_ERR_INFO = MPIABI_ERR_INFO) + integer MPI_ERR_IO + parameter (MPI_ERR_IO = MPIABI_ERR_IO) + integer MPI_ERR_KEYVAL + parameter (MPI_ERR_KEYVAL = MPIABI_ERR_KEYVAL) + integer MPI_ERR_LOCKTYPE + parameter (MPI_ERR_LOCKTYPE = MPIABI_ERR_LOCKTYPE) + integer MPI_ERR_NAME + parameter (MPI_ERR_NAME = MPIABI_ERR_NAME) + integer MPI_ERR_NO_MEM + parameter (MPI_ERR_NO_MEM = MPIABI_ERR_NO_MEM) + integer MPI_ERR_NOT_SAME + parameter (MPI_ERR_NOT_SAME = MPIABI_ERR_NOT_SAME) + integer MPI_ERR_NO_SPACE + parameter (MPI_ERR_NO_SPACE = MPIABI_ERR_NO_SPACE) + integer MPI_ERR_NO_SUCH_FILE + parameter (MPI_ERR_NO_SUCH_FILE = MPIABI_ERR_NO_SUCH_FILE) + integer MPI_ERR_PORT + parameter (MPI_ERR_PORT = MPIABI_ERR_PORT) + integer MPI_ERR_PROC_ABORTED + parameter (MPI_ERR_PROC_ABORTED = MPIABI_ERR_PROC_ABORTED) + integer MPI_ERR_QUOTA + parameter (MPI_ERR_QUOTA = MPIABI_ERR_QUOTA) + integer MPI_ERR_READ_ONLY + parameter (MPI_ERR_READ_ONLY = MPIABI_ERR_READ_ONLY) + integer MPI_ERR_RMA_ATTACH + parameter (MPI_ERR_RMA_ATTACH = MPIABI_ERR_RMA_ATTACH) + integer MPI_ERR_RMA_CONFLICT + parameter (MPI_ERR_RMA_CONFLICT = MPIABI_ERR_RMA_CONFLICT) + integer MPI_ERR_RMA_RANGE + parameter (MPI_ERR_RMA_RANGE = MPIABI_ERR_RMA_RANGE) + integer MPI_ERR_RMA_SHARED + parameter (MPI_ERR_RMA_SHARED = MPIABI_ERR_RMA_SHARED) + integer MPI_ERR_RMA_SYNC + parameter (MPI_ERR_RMA_SYNC = MPIABI_ERR_RMA_SYNC) + integer MPI_ERR_RMA_FLAVOR + parameter (MPI_ERR_RMA_FLAVOR = MPIABI_ERR_RMA_FLAVOR) + integer MPI_ERR_SERVICE + parameter (MPI_ERR_SERVICE = MPIABI_ERR_SERVICE) + integer MPI_ERR_SESSION + parameter (MPI_ERR_SESSION = MPIABI_ERR_SESSION) + integer MPI_ERR_SIZE + parameter (MPI_ERR_SIZE = MPIABI_ERR_SIZE) + integer MPI_ERR_SPAWN + parameter (MPI_ERR_SPAWN = MPIABI_ERR_SPAWN) + integer MPI_ERR_UNSUPPORTED_DATAREP + parameter (MPI_ERR_UNSUPPORTED_DATAREP = & + & MPIABI_ERR_UNSUPPORTED_DATAREP) + integer MPI_ERR_UNSUPPORTED_OPERATION + parameter (MPI_ERR_UNSUPPORTED_OPERATION = & + & MPIABI_ERR_UNSUPPORTED_OPERATION) + integer MPI_ERR_VALUE_TOO_LARGE + parameter (MPI_ERR_VALUE_TOO_LARGE = MPIABI_ERR_VALUE_TOO_LARGE) + integer MPI_ERR_WIN + parameter (MPI_ERR_WIN = MPIABI_ERR_WIN) + integer MPI_ERR_ERRHANDLER + parameter (MPI_ERR_ERRHANDLER = MPIABI_ERR_ERRHANDLER) + integer MPI_T_ERR_CANNOT_INIT + parameter (MPI_T_ERR_CANNOT_INIT = MPIABI_T_ERR_CANNOT_INIT) + integer MPI_T_ERR_NOT_ACCESSIBLE + parameter (MPI_T_ERR_NOT_ACCESSIBLE = MPIABI_T_ERR_NOT_ACCESSIBLE) + integer MPI_T_ERR_NOT_INITIALIZED + parameter (MPI_T_ERR_NOT_INITIALIZED = & + & MPIABI_T_ERR_NOT_INITIALIZED) + integer MPI_T_ERR_NOT_SUPPORTED + parameter (MPI_T_ERR_NOT_SUPPORTED = MPIABI_T_ERR_NOT_SUPPORTED) + integer MPI_T_ERR_MEMORY + parameter (MPI_T_ERR_MEMORY = MPIABI_T_ERR_MEMORY) + integer MPI_T_ERR_INVALID + parameter (MPI_T_ERR_INVALID = MPIABI_T_ERR_INVALID) + integer MPI_T_ERR_INVALID_INDEX + parameter (MPI_T_ERR_INVALID_INDEX = MPIABI_T_ERR_INVALID_INDEX) + integer MPI_T_ERR_INVALID_ITEM + parameter (MPI_T_ERR_INVALID_ITEM = MPIABI_T_ERR_INVALID_ITEM) + integer MPI_T_ERR_INVALID_SESSION + parameter (MPI_T_ERR_INVALID_SESSION = & + & MPIABI_T_ERR_INVALID_SESSION) + integer MPI_T_ERR_INVALID_HANDLE + parameter (MPI_T_ERR_INVALID_HANDLE = MPIABI_T_ERR_INVALID_HANDLE) + integer MPI_T_ERR_INVALID_NAME + parameter (MPI_T_ERR_INVALID_NAME = MPIABI_T_ERR_INVALID_NAME) + integer MPI_T_ERR_OUT_OF_HANDLES + parameter (MPI_T_ERR_OUT_OF_HANDLES = MPIABI_T_ERR_OUT_OF_HANDLES) + integer MPI_T_ERR_OUT_OF_SESSIONS + parameter (MPI_T_ERR_OUT_OF_SESSIONS = & + & MPIABI_T_ERR_OUT_OF_SESSIONS) + integer MPI_T_ERR_CVAR_SET_NOT_NOW + parameter (MPI_T_ERR_CVAR_SET_NOT_NOW = & + & MPIABI_T_ERR_CVAR_SET_NOT_NOW) + integer MPI_T_ERR_CVAR_SET_NEVER + parameter (MPI_T_ERR_CVAR_SET_NEVER = MPIABI_T_ERR_CVAR_SET_NEVER) + integer MPI_T_ERR_PVAR_NO_WRITE + parameter (MPI_T_ERR_PVAR_NO_WRITE = MPIABI_T_ERR_PVAR_NO_WRITE) + integer MPI_T_ERR_PVAR_NO_STARTSTOP + parameter (MPI_T_ERR_PVAR_NO_STARTSTOP = & + & MPIABI_T_ERR_PVAR_NO_STARTSTOP) + integer MPI_T_ERR_PVAR_NO_ATOMIC + parameter (MPI_T_ERR_PVAR_NO_ATOMIC = MPIABI_T_ERR_PVAR_NO_ATOMIC) + integer MPI_ERR_LASTCODE + parameter (MPI_ERR_LASTCODE = MPIABI_ERR_LASTCODE) + +! Buffer Address Constants + + integer MPI_BOTTOM(1) + pointer (MPIABI_BOTTOM_PTR, MPI_BOTTOM) + integer MPI_BUFFER_AUTOMATIC(1) + pointer (MPIABI_BUFFER_AUTOMATIC_PTR, MPI_BUFFER_AUTOMATIC) + integer MPI_IN_PLACE(1) + pointer (MPIABI_IN_PLACE_PTR, MPI_IN_PLACE) + +! Assorted Constants + + integer MPI_PROC_NULL + parameter (MPI_PROC_NULL = MPIABI_PROC_NULL) + integer MPI_ANY_SOURCE + parameter (MPI_ANY_SOURCE = MPIABI_ANY_SOURCE) + integer MPI_ANY_TAG + parameter (MPI_ANY_TAG = MPIABI_ANY_TAG) + integer MPI_UNDEFINED + parameter (MPI_UNDEFINED = MPIABI_UNDEFINED) + integer MPI_BSEND_OVERHEAD + parameter (MPI_BSEND_OVERHEAD = MPIABI_BSEND_OVERHEAD) + integer MPI_KEYVAL_INVALID + parameter (MPI_KEYVAL_INVALID = MPIABI_KEYVAL_INVALID) + integer MPI_LOCK_EXCLUSIVE + parameter (MPI_LOCK_EXCLUSIVE = MPIABI_LOCK_EXCLUSIVE) + integer MPI_LOCK_SHARED + parameter (MPI_LOCK_SHARED = MPIABI_LOCK_SHARED) + integer MPI_ROOT + parameter (MPI_ROOT = MPIABI_ROOT) + +! No Process Message Handle + + integer MPI_MESSAGE_NO_PROC + parameter (MPI_MESSAGE_NO_PROC = MPIABI_MESSAGE_NO_PROC) + +! Fortran Support Method Specific Constants + + logical MPI_SUBARRAYS_SUPPORTED + parameter (MPI_SUBARRAYS_SUPPORTED = MPIABI_SUBARRAYS_SUPPORTED) + logical MPI_ASYNC_PROTECTS_NONBLOCKING + parameter (MPI_ASYNC_PROTECTS_NONBLOCKING = & + & MPIABI_ASYNC_PROTECTS_NONBLOCKING) + +! Status array size and reserved index values + + integer MPI_STATUS_SIZE + parameter (MPI_STATUS_SIZE = MPIABI_STATUS_SIZE) + integer MPI_SOURCE + parameter (MPI_SOURCE = MPIABI_SOURCE) + integer MPI_TAG + parameter (MPI_TAG = MPIABI_TAG) + integer MPI_ERROR + parameter (MPI_ERROR = MPIABI_ERROR) + +! Fortran status array size and reserved index values + +! Variable Address Size +! These have already been defined above. + +! Error-handling specifiers + + integer MPI_ERRORS_ARE_FATAL + parameter (MPI_ERRORS_ARE_FATAL = MPIABI_ERRORS_ARE_FATAL) + integer MPI_ERRORS_ABORT + parameter (MPI_ERRORS_ABORT = MPIABI_ERRORS_ABORT) + integer MPI_ERRORS_RETURN + parameter (MPI_ERRORS_RETURN = MPIABI_ERRORS_RETURN) + +! Maximum Sizes for Strings + + integer MPI_MAX_DATAREP_STRING + parameter (MPI_MAX_DATAREP_STRING = MPIABI_MAX_DATAREP_STRING) + integer MPI_MAX_ERROR_STRING + parameter (MPI_MAX_ERROR_STRING = MPIABI_MAX_ERROR_STRING) + integer MPI_MAX_INFO_KEY + parameter (MPI_MAX_INFO_KEY = MPIABI_MAX_INFO_KEY) + integer MPI_MAX_INFO_VAL + parameter (MPI_MAX_INFO_VAL = MPIABI_MAX_INFO_VAL) + integer MPI_MAX_LIBRARY_VERSION_STRING + parameter (MPI_MAX_LIBRARY_VERSION_STRING = & + & MPIABI_MAX_LIBRARY_VERSION_STRING) + integer MPI_MAX_OBJECT_NAME + parameter (MPI_MAX_OBJECT_NAME = MPIABI_MAX_OBJECT_NAME) + integer MPI_MAX_PORT_NAME + parameter (MPI_MAX_PORT_NAME = MPIABI_MAX_PORT_NAME) + integer MPI_MAX_PROCESSOR_NAME + parameter (MPI_MAX_PROCESSOR_NAME = MPIABI_MAX_PROCESSOR_NAME) + integer MPI_MAX_PSET_NAME_LEN + parameter (MPI_MAX_PSET_NAME_LEN = MPIABI_MAX_PSET_NAME_LEN) + integer MPI_MAX_STRINGTAG_LEN + parameter (MPI_MAX_STRINGTAG_LEN = MPIABI_MAX_STRINGTAG_LEN) + +! Named Predefined Datatypes + +! [C types] + + integer MPI_CHAR + parameter (MPI_CHAR = MPIABI_CHAR) + integer MPI_SHORT + parameter (MPI_SHORT = MPIABI_SHORT) + integer MPI_INT + parameter (MPI_INT = MPIABI_INT) + integer MPI_LONG + parameter (MPI_LONG = MPIABI_LONG) + integer MPI_LONG_LONG_INT + parameter (MPI_LONG_LONG_INT = MPIABI_LONG_LONG_INT) + integer MPI_LONG_LONG + parameter (MPI_LONG_LONG = MPIABI_LONG_LONG) + integer MPI_SIGNED_CHAR + parameter (MPI_SIGNED_CHAR = MPIABI_SIGNED_CHAR) + integer MPI_UNSIGNED_CHAR + parameter (MPI_UNSIGNED_CHAR = MPIABI_UNSIGNED_CHAR) + integer MPI_UNSIGNED_SHORT + parameter (MPI_UNSIGNED_SHORT = MPIABI_UNSIGNED_SHORT) + integer MPI_UNSIGNED + parameter (MPI_UNSIGNED = MPIABI_UNSIGNED) + integer MPI_UNSIGNED_LONG + parameter (MPI_UNSIGNED_LONG = MPIABI_UNSIGNED_LONG) + integer MPI_UNSIGNED_LONG_LONG + parameter (MPI_UNSIGNED_LONG_LONG = MPIABI_UNSIGNED_LONG_LONG) + integer MPI_FLOAT + parameter (MPI_FLOAT = MPIABI_FLOAT) + integer MPI_DOUBLE + parameter (MPI_DOUBLE = MPIABI_DOUBLE) + integer MPI_LONG_DOUBLE + parameter (MPI_LONG_DOUBLE = MPIABI_LONG_DOUBLE) + integer MPI_WCHAR + parameter (MPI_WCHAR = MPIABI_WCHAR) + integer MPI_C_BOOL + parameter (MPI_C_BOOL = MPIABI_C_BOOL) + integer MPI_INT8_T + parameter (MPI_INT8_T = MPIABI_INT8_T) + integer MPI_INT16_T + parameter (MPI_INT16_T = MPIABI_INT16_T) + integer MPI_INT32_T + parameter (MPI_INT32_T = MPIABI_INT32_T) + integer MPI_INT64_T + parameter (MPI_INT64_T = MPIABI_INT64_T) + integer MPI_UINT8_T + parameter (MPI_UINT8_T = MPIABI_UINT8_T) + integer MPI_UINT16_T + parameter (MPI_UINT16_T = MPIABI_UINT16_T) + integer MPI_UINT32_T + parameter (MPI_UINT32_T = MPIABI_UINT32_T) + integer MPI_UINT64_T + parameter (MPI_UINT64_T = MPIABI_UINT64_T) + integer MPI_AINT + parameter (MPI_AINT = MPIABI_AINT) + integer MPI_COUNT + parameter (MPI_COUNT = MPIABI_COUNT) + integer MPI_OFFSET + parameter (MPI_OFFSET = MPIABI_OFFSET) + integer MPI_C_COMPLEX + parameter (MPI_C_COMPLEX = MPIABI_C_COMPLEX) + integer MPI_C_FLOAT_COMPLEX + parameter (MPI_C_FLOAT_COMPLEX = MPIABI_C_FLOAT_COMPLEX) + integer MPI_C_DOUBLE_COMPLEX + parameter (MPI_C_DOUBLE_COMPLEX = MPIABI_C_DOUBLE_COMPLEX) + integer MPI_C_LONG_DOUBLE_COMPLEX + parameter (MPI_C_LONG_DOUBLE_COMPLEX = & + & MPIABI_C_LONG_DOUBLE_COMPLEX) + integer MPI_BYTE + parameter (MPI_BYTE = MPIABI_BYTE) + integer MPI_PACKED + parameter (MPI_PACKED = MPIABI_PACKED) + +! [Fortran types] + + integer MPI_INTEGER + parameter (MPI_INTEGER = MPIABI_INTEGER) + integer MPI_REAL + parameter (MPI_REAL = MPIABI_REAL) + integer MPI_DOUBLE_PRECISION + parameter (MPI_DOUBLE_PRECISION = MPIABI_DOUBLE_PRECISION) + integer MPI_COMPLEX + parameter (MPI_COMPLEX = MPIABI_COMPLEX) + integer MPI_LOGICAL + parameter (MPI_LOGICAL = MPIABI_LOGICAL) + integer MPI_CHARACTER + parameter (MPI_CHARACTER = MPIABI_CHARACTER) + +! [C++ types] + + integer MPI_CXX_BOOL + parameter (MPI_CXX_BOOL = MPIABI_CXX_BOOL) + integer MPI_CXX_FLOAT_COMPLEX + parameter (MPI_CXX_FLOAT_COMPLEX = MPIABI_CXX_FLOAT_COMPLEX) + integer MPI_CXX_DOUBLE_COMPLEX + parameter (MPI_CXX_DOUBLE_COMPLEX = MPIABI_CXX_DOUBLE_COMPLEX) + integer MPI_CXX_LONG_DOUBLE_COMPLEX + parameter (MPI_CXX_LONG_DOUBLE_COMPLEX = & + & MPIABI_CXX_LONG_DOUBLE_COMPLEX) + +! [Optional datatypes (Fortran)] + + integer MPI_DOUBLE_COMPLEX + parameter (MPI_DOUBLE_COMPLEX = MPIABI_DOUBLE_COMPLEX) + integer MPI_INTEGER1 + parameter (MPI_INTEGER1 = MPIABI_INTEGER1) + integer MPI_INTEGER2 + parameter (MPI_INTEGER2 = MPIABI_INTEGER2) + integer MPI_INTEGER4 + parameter (MPI_INTEGER4 = MPIABI_INTEGER4) + integer MPI_INTEGER8 + parameter (MPI_INTEGER8 = MPIABI_INTEGER8) + integer MPI_INTEGER16 + parameter (MPI_INTEGER16 = MPIABI_INTEGER16) + integer MPI_REAL2 + parameter (MPI_REAL2 = MPIABI_REAL2) + integer MPI_REAL4 + parameter (MPI_REAL4 = MPIABI_REAL4) + integer MPI_REAL8 + parameter (MPI_REAL8 = MPIABI_REAL8) + integer MPI_REAL16 + parameter (MPI_REAL16 = MPIABI_REAL16) + integer MPI_COMPLEX4 + parameter (MPI_COMPLEX4 = MPIABI_COMPLEX4) + integer MPI_COMPLEX8 + parameter (MPI_COMPLEX8 = MPIABI_COMPLEX8) + integer MPI_COMPLEX16 + parameter (MPI_COMPLEX16 = MPIABI_COMPLEX16) + integer MPI_COMPLEX32 + parameter (MPI_COMPLEX32 = MPIABI_COMPLEX32) + +! [Extensions] + + integer MPI_REAL1 + parameter (MPI_REAL1 = MPIABI_REAL1) + integer MPI_COMPLEX2 + parameter (MPI_COMPLEX2 = MPIABI_COMPLEX2) + integer MPI_LOGICAL1 + parameter (MPI_LOGICAL1 = MPIABI_LOGICAL1) + integer MPI_LOGICAL2 + parameter (MPI_LOGICAL2 = MPIABI_LOGICAL2) + integer MPI_LOGICAL4 + parameter (MPI_LOGICAL4 = MPIABI_LOGICAL4) + integer MPI_LOGICAL8 + parameter (MPI_LOGICAL8 = MPIABI_LOGICAL8) + integer MPI_LOGICAL16 + parameter (MPI_LOGICAL16 = MPIABI_LOGICAL16) + +! [Datatypes for reduction functions (C)] + + integer MPI_FLOAT_INT + parameter (MPI_FLOAT_INT = MPIABI_FLOAT_INT) + integer MPI_DOUBLE_INT + parameter (MPI_DOUBLE_INT = MPIABI_DOUBLE_INT) + integer MPI_LONG_INT + parameter (MPI_LONG_INT = MPIABI_LONG_INT) + integer MPI_2INT + parameter (MPI_2INT = MPIABI_2INT) + integer MPI_SHORT_INT + parameter (MPI_SHORT_INT = MPIABI_SHORT_INT) + integer MPI_LONG_DOUBLE_INT + parameter (MPI_LONG_DOUBLE_INT = MPIABI_LONG_DOUBLE_INT) + +! [Datatypes for reduction functions (Fortran)] + + integer MPI_2REAL + parameter (MPI_2REAL = MPIABI_2REAL) + integer MPI_2DOUBLE_PRECISION + parameter (MPI_2DOUBLE_PRECISION = MPIABI_2DOUBLE_PRECISION) + integer MPI_2INTEGER + parameter (MPI_2integer = MPIABI_2integer) + +! [Removed constructs] + +! [nonstandard] + integer MPI_LB + parameter (MPI_LB = MPIABI_LB) +! [nonstandard] + integer MPI_UB + parameter (MPI_UB = MPIABI_UB) + +! Reserved communicators + + integer MPI_COMM_WORLD + parameter (MPI_COMM_WORLD = MPIABI_COMM_WORLD) + integer MPI_COMM_SELF + parameter (MPI_COMM_SELF = MPIABI_COMM_SELF) + +! Communicator split type constants + + integer MPI_COMM_TYPE_SHARED + parameter (MPI_COMM_TYPE_SHARED = MPIABI_COMM_TYPE_SHARED) + integer MPI_COMM_TYPE_HW_UNGUIDED + parameter (MPI_COMM_TYPE_HW_UNGUIDED = & + & MPIABI_COMM_TYPE_HW_UNGUIDED) + integer MPI_COMM_TYPE_HW_GUIDED + parameter (MPI_COMM_TYPE_HW_GUIDED = MPIABI_COMM_TYPE_HW_GUIDED) + integer MPI_COMM_TYPE_RESOURCE_GUIDED + parameter (MPI_COMM_TYPE_RESOURCE_GUIDED = & + & MPIABI_COMM_TYPE_RESOURCE_GUIDED) + +! Results of communicator and group comparisons + + integer MPI_IDENT + parameter (MPI_IDENT = MPIABI_IDENT) + integer MPI_CONGRUENT + parameter (MPI_CONGRUENT = MPIABI_CONGRUENT) + integer MPI_SIMILAR + parameter (MPI_SIMILAR = MPIABI_SIMILAR) + integer MPI_UNEQUAL + parameter (MPI_UNEQUAL = MPIABI_UNEQUAL) + +! Environmental inquiry info key + + integer MPI_INFO_ENV + parameter (MPI_INFO_ENV = MPIABI_INFO_ENV) + +! Environmental inquiry keys + + integer MPI_TAG_UB + parameter (MPI_TAG_UB = MPIABI_TAG_UB) + integer MPI_IO + parameter (MPI_IO = MPIABI_IO) + integer MPI_HOST + parameter (MPI_HOST = MPIABI_HOST) + integer MPI_WTIME_IS_GLOBAL + parameter (MPI_WTIME_IS_GLOBAL = MPIABI_WTIME_IS_GLOBAL) + +! Collective Operations + + integer MPI_MAX + parameter (MPI_MAX = MPIABI_MAX) + integer MPI_MIN + parameter (MPI_MIN = MPIABI_MIN) + integer MPI_SUM + parameter (MPI_SUM = MPIABI_SUM) + integer MPI_PROD + parameter (MPI_PROD = MPIABI_PROD) + integer MPI_MAXLOC + parameter (MPI_MAXLOC = MPIABI_MAXLOC) + integer MPI_MINLOC + parameter (MPI_MINLOC = MPIABI_MINLOC) + integer MPI_BAND + parameter (MPI_BAND = MPIABI_BAND) + integer MPI_BOR + parameter (MPI_BOR = MPIABI_BOR) + integer MPI_BXOR + parameter (MPI_BXOR = MPIABI_BXOR) + integer MPI_LAND + parameter (MPI_LAND = MPIABI_LAND) + integer MPI_LOR + parameter (MPI_LOR = MPIABI_LOR) + integer MPI_LXOR + parameter (MPI_LXOR = MPIABI_LXOR) + integer MPI_REPLACE + parameter (MPI_REPLACE = MPIABI_REPLACE) + integer MPI_NO_OP + parameter (MPI_NO_OP = MPIABI_NO_OP) + +! Null Handles + + integer MPI_GROUP_NULL + parameter (MPI_GROUP_NULL = MPIABI_GROUP_NULL) + integer MPI_COMM_NULL + parameter (MPI_COMM_NULL = MPIABI_COMM_NULL) + integer MPI_DATATYPE_NULL + parameter (MPI_DATATYPE_NULL = MPIABI_DATATYPE_NULL) + integer MPI_REQUEST_NULL + parameter (MPI_REQUEST_NULL = MPIABI_REQUEST_NULL) + integer MPI_OP_NULL + parameter (MPI_OP_NULL = MPIABI_OP_NULL) + integer MPI_ERRHANDLER_NULL + parameter (MPI_ERRHANDLER_NULL = MPIABI_ERRHANDLER_NULL) + integer MPI_FILE_NULL + parameter (MPI_FILE_NULL = MPIABI_FILE_NULL) + integer MPI_INFO_NULL + parameter (MPI_INFO_NULL = MPIABI_INFO_NULL) + integer MPI_SESSION_NULL + parameter (MPI_SESSION_NULL = MPIABI_SESSION_NULL) + integer MPI_WIN_NULL + parameter (MPI_WIN_NULL = MPIABI_WIN_NULL) + integer MPI_MESSAGE_NULL + parameter (MPI_MESSAGE_NULL = MPIABI_MESSAGE_NULL) + +! Empty group + + integer MPI_GROUP_EMPTY + parameter (MPI_GROUP_EMPTY = MPIABI_GROUP_EMPTY) + +! Topologies + + integer MPI_GRAPH + parameter (MPI_GRAPH = MPIABI_GRAPH) + integer MPI_CART + parameter (MPI_CART = MPIABI_CART) + integer MPI_DIST_GRAPH + parameter (MPI_DIST_GRAPH = MPIABI_DIST_GRAPH) + +! Predefined functions + +! MPI_COMM_NULL_COPY_FN +! MPI_COMM_DUP_FN +! MPI_COMM_NULL_DELETE_FN + +! MPIABI_WIN_NULL_COPY_FN +! MPIABI_WIN_DUP_FN +! MPIABI_WIN_NULL_DELETE_FN +! +! MPIABI_TYPE_NULL_COPY_FN +! MPIABI_TYPE_DUP_FN +! MPIABI_TYPE_NULL_DELETE_FN +! +! MPIABI_CONVERSION_FN_NULL +! MPIABI_CONVERSION_FN_NULL_C + +! Deprecated predefined functions +! +! MPIABI_NULL_COPY_FN +! MPIABI_DUP_FN +! MPIABI_NULL_DELETE_FN + +! Predefined Attribute Keys + + integer MPI_APPNUM + parameter (MPI_APPNUM = MPIABI_APPNUM) + integer MPI_LASTUSEDCODE + parameter (MPI_LASTUSEDCODE = MPIABI_LASTUSEDCODE) + integer MPI_UNIVERSE_SIZE + parameter (MPI_UNIVERSE_SIZE = MPIABI_UNIVERSE_SIZE) + integer MPI_WIN_BASE + parameter (MPI_WIN_BASE = MPIABI_WIN_BASE) + integer MPI_WIN_DISP_UNIT + parameter (MPI_WIN_DISP_UNIT = MPIABI_WIN_DISP_UNIT) + integer MPI_WIN_SIZE + parameter (MPI_WIN_SIZE = MPIABI_WIN_SIZE) + integer MPI_WIN_CREATE_FLAVOR + parameter (MPI_WIN_CREATE_FLAVOR = MPIABI_WIN_CREATE_FLAVOR) + integer MPI_WIN_MODEL + parameter (MPI_WIN_MODEL = MPIABI_WIN_MODEL) + +! MPI Window Create Flavors + + integer MPI_WIN_FLAVOR_CREATE + parameter (MPI_WIN_FLAVOR_CREATE = MPIABI_WIN_FLAVOR_CREATE) + integer MPI_WIN_FLAVOR_ALLOCATE + parameter (MPI_WIN_FLAVOR_ALLOCATE = MPIABI_WIN_FLAVOR_ALLOCATE) + integer MPI_WIN_FLAVOR_DYNAMIC + parameter (MPI_WIN_FLAVOR_DYNAMIC = MPIABI_WIN_FLAVOR_DYNAMIC) + integer MPI_WIN_FLAVOR_SHARED + parameter (MPI_WIN_FLAVOR_SHARED = MPIABI_WIN_FLAVOR_SHARED) + +! MPI Window Models + + integer MPI_WIN_SEPARATE + parameter (MPI_WIN_SEPARATE = MPIABI_WIN_SEPARATE) + integer MPI_WIN_UNIFIED + parameter (MPI_WIN_UNIFIED = MPIABI_WIN_UNIFIED) + +! Mode Constants + + integer MPI_MODE_APPEND + parameter (MPI_MODE_APPEND = MPIABI_MODE_APPEND) + integer MPI_MODE_CREATE + parameter (MPI_MODE_CREATE = MPIABI_MODE_CREATE) + integer MPI_MODE_DELETE_ON_CLOSE + parameter (MPI_MODE_DELETE_ON_CLOSE = MPIABI_MODE_DELETE_ON_CLOSE) + integer MPI_MODE_EXCL + parameter (MPI_MODE_EXCL = MPIABI_MODE_EXCL) + integer MPI_MODE_NOCHECK + parameter (MPI_MODE_NOCHECK = MPIABI_MODE_NOCHECK) + integer MPI_MODE_NOPRECEDE + parameter (MPI_MODE_NOPRECEDE = MPIABI_MODE_NOPRECEDE) + integer MPI_MODE_NOPUT + parameter (MPI_MODE_NOPUT = MPIABI_MODE_NOPUT) + integer MPI_MODE_NOSTORE + parameter (MPI_MODE_NOSTORE = MPIABI_MODE_NOSTORE) + integer MPI_MODE_NOSUCCEED + parameter (MPI_MODE_NOSUCCEED = MPIABI_MODE_NOSUCCEED) + integer MPI_MODE_RDONLY + parameter (MPI_MODE_RDONLY = MPIABI_MODE_RDONLY) + integer MPI_MODE_RDWR + parameter (MPI_MODE_RDWR = MPIABI_MODE_RDWR) + integer MPI_MODE_SEQUENTIAL + parameter (MPI_MODE_SEQUENTIAL = MPIABI_MODE_SEQUENTIAL) + integer MPI_MODE_UNIQUE_OPEN + parameter (MPI_MODE_UNIQUE_OPEN = MPIABI_MODE_UNIQUE_OPEN) + integer MPI_MODE_WRONLY + parameter (MPI_MODE_WRONLY = MPIABI_MODE_WRONLY) + +! Datatype Decoding Constants + + integer MPI_COMBINER_CONTIGUOUS + parameter (MPI_COMBINER_CONTIGUOUS = MPIABI_COMBINER_CONTIGUOUS) + integer MPI_COMBINER_DARRAY + parameter (MPI_COMBINER_DARRAY = MPIABI_COMBINER_DARRAY) + integer MPI_COMBINER_DUP + parameter (MPI_COMBINER_DUP = MPIABI_COMBINER_DUP) + integer MPI_COMBINER_F90_COMPLEX + parameter (MPI_COMBINER_F90_COMPLEX = MPIABI_COMBINER_F90_COMPLEX) + integer MPI_COMBINER_F90_INTEGER + parameter (MPI_COMBINER_F90_INTEGER = MPIABI_COMBINER_F90_INTEGER) + integer MPI_COMBINER_F90_REAL + parameter (MPI_COMBINER_F90_REAL = MPIABI_COMBINER_F90_REAL) + integer MPI_COMBINER_HINDEXED + parameter (MPI_COMBINER_HINDEXED = MPIABI_COMBINER_HINDEXED) + integer MPI_COMBINER_HVECTOR + parameter (MPI_COMBINER_HVECTOR = MPIABI_COMBINER_HVECTOR) + integer MPI_COMBINER_INDEXED_BLOCK + parameter (MPI_COMBINER_INDEXED_BLOCK = & + & MPIABI_COMBINER_INDEXED_BLOCK) + integer MPI_COMBINER_HINDEXED_BLOCK + parameter (MPI_COMBINER_HINDEXED_BLOCK = & + & MPIABI_COMBINER_HINDEXED_BLOCK) + integer MPI_COMBINER_INDEXED + parameter (MPI_COMBINER_INDEXED = MPIABI_COMBINER_INDEXED) + integer MPI_COMBINER_NAMED + parameter (MPI_COMBINER_NAMED = MPIABI_COMBINER_NAMED) + integer MPI_COMBINER_RESIZED + parameter (MPI_COMBINER_RESIZED = MPIABI_COMBINER_RESIZED) + integer MPI_COMBINER_STRUCT + parameter (MPI_COMBINER_STRUCT = MPIABI_COMBINER_STRUCT) + integer MPI_COMBINER_SUBARRAY + parameter (MPI_COMBINER_SUBARRAY = MPIABI_COMBINER_SUBARRAY) + integer MPI_COMBINER_VECTOR + parameter (MPI_COMBINER_VECTOR = MPIABI_COMBINER_VECTOR) + +! Threads Constants + + integer MPI_THREAD_FUNNELED + parameter (MPI_THREAD_FUNNELED = MPIABI_THREAD_FUNNELED) + integer MPI_THREAD_MULTIPLE + parameter (MPI_THREAD_MULTIPLE = MPIABI_THREAD_MULTIPLE) + integer MPI_THREAD_SERIALIZED + parameter (MPI_THREAD_SERIALIZED = MPIABI_THREAD_SERIALIZED) + integer MPI_THREAD_SINGLE + parameter (MPI_THREAD_SINGLE = MPIABI_THREAD_SINGLE) + +! File Operation Constants, Part 1 + + integer MPI_DISPLACEMENT_CURRENT + parameter (MPI_DISPLACEMENT_CURRENT = MPIABI_DISPLACEMENT_CURRENT) + +! File Operation Constants, Part 2 + + integer MPI_DISTRIBUTE_BLOCK + parameter (MPI_DISTRIBUTE_BLOCK = MPIABI_DISTRIBUTE_BLOCK) + integer MPI_DISTRIBUTE_CYCLIC + parameter (MPI_DISTRIBUTE_CYCLIC = MPIABI_DISTRIBUTE_CYCLIC) + integer MPI_DISTRIBUTE_DFLT_DARG + parameter (MPI_DISTRIBUTE_DFLT_DARG = MPIABI_DISTRIBUTE_DFLT_DARG) + integer MPI_DISTRIBUTE_NONE + parameter (MPI_DISTRIBUTE_NONE = MPIABI_DISTRIBUTE_NONE) + integer MPI_ORDER_C + parameter (MPI_ORDER_C = MPIABI_ORDER_C) + integer MPI_ORDER_FORTRAN + parameter (MPI_ORDER_FORTRAN = MPIABI_ORDER_FORTRAN) + integer MPI_SEEK_CUR + parameter (MPI_SEEK_CUR = MPIABI_SEEK_CUR) + integer MPI_SEEK_END + parameter (MPI_SEEK_END = MPIABI_SEEK_END) + integer MPI_SEEK_SET + parameter (MPI_SEEK_SET = MPIABI_SEEK_SET) + +! F90 Datatype Matching Constants + + integer MPI_TYPECLASS_COMPLEX + parameter (MPI_TYPECLASS_COMPLEX = MPIABI_TYPECLASS_COMPLEX) + integer MPI_TYPECLASS_INTEGER + parameter (MPI_TYPECLASS_INTEGER = MPIABI_TYPECLASS_INTEGER) + integer MPI_TYPECLASS_REAL + parameter (MPI_TYPECLASS_REAL = MPIABI_TYPECLASS_REAL) + +! Constants Specifying Empty or Ignored Input + + integer MPI_ARGVS_NULL + pointer (MPIABI_ARGVS_NULL_PTR, MPI_ARGVS_NULL) + integer MPI_ARGV_NULL + pointer (MPIABI_ARGV_NULL_PTR, MPI_ARGV_NULL) + integer MPI_ERRCODES_IGNORE + pointer (MPIABI_ERRCODES_IGNORE_PTR, MPI_ERRCODES_IGNORE) + integer MPI_STATUSES_IGNORE(MPI_STATUS_SIZE) + pointer (MPIABI_STATUSES_IGNORE_PTR, MPI_STATUSES_IGNORE) + integer MPI_STATUS_IGNORE(MPI_STATUS_SIZE) + pointer (MPIABI_STATUS_IGNORE_PTR, MPI_STATUS_IGNORE) + integer MPI_UNWEIGHTED + pointer (MPIABI_UNWEIGHTED_PTR, MPI_UNWEIGHTED) + integer MPI_WEIGHTS_EMPTY + pointer (MPIABI_WEIGHTS_EMPTY_PTR, MPI_WEIGHTS_EMPTY) + +! C Constants Specifying Ignored Input (no Fortran) + +! C preprocessor Constants and Fortran Parameters + + integer MPI_SUBVERSION + parameter (MPI_SUBVERSION = MPIABI_SUBVERSION) + integer MPI_VERSION + parameter (MPI_VERSION = MPIABI_VERSION) diff --git a/mpitrampoline/include/mpif_functions.h.in b/mpitrampoline/include/mpif_functions.h.in new file mode 100644 index 00000000..865bb942 --- /dev/null +++ b/mpitrampoline/include/mpif_functions.h.in @@ -0,0 +1,7626 @@ +! MPI Fortran function bindings + +! This file has been generated automatically +! by `mpitrampoline/generate_trampoline.jl`. +! Do not modify this file, changes will be overwritten. + + interface + + subroutine MPI_Bsend( & + & buf, & + & count, & + & datatype, & + & dest, & + & tag, & + & comm, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Bsend + + subroutine MPI_Bsend_init( & + & buf, & + & count, & + & datatype, & + & dest, & + & tag, & + & comm, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Bsend_init + + subroutine MPI_Buffer_attach( & + & buffer, & + & size, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buffer +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buffer + integer :: buffer(*) + integer, intent(in) :: size + integer, intent(out) :: ierror + end subroutine MPI_Buffer_attach + + subroutine MPI_Buffer_detach( & + & buffer_addr, & + & size, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer(MPI_ADDRESS_KIND), intent(out) :: buffer_addr + integer, intent(out) :: size + integer, intent(out) :: ierror + end subroutine MPI_Buffer_detach + + subroutine MPI_Buffer_flush( & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(out) :: ierror + end subroutine MPI_Buffer_flush + + subroutine MPI_Buffer_iflush( & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Buffer_iflush + + subroutine MPI_Cancel( & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Cancel + + subroutine MPI_Comm_attach_buffer( & + & comm, & + & buffer, & + & size, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buffer +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buffer + integer, intent(in) :: buffer(*) + integer, intent(in) :: size + integer, intent(out) :: ierror + end subroutine MPI_Comm_attach_buffer + + subroutine MPI_Comm_detach_buffer( & + & comm, & + & buffer_addr, & + & size, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer(MPI_ADDRESS_KIND), intent(out) :: buffer_addr + integer, intent(out) :: size + integer, intent(out) :: ierror + end subroutine MPI_Comm_detach_buffer + + subroutine MPI_Comm_flush_buffer( & + & comm, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Comm_flush_buffer + + subroutine MPI_Comm_iflush_buffer( & + & comm, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Comm_iflush_buffer + + subroutine MPI_Get_count( & + & status, & + & datatype, & + & count, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: status(MPI_STATUS_SIZE) + integer, intent(in) :: datatype + integer, intent(out) :: count + integer, intent(out) :: ierror + end subroutine MPI_Get_count + + subroutine MPI_Ibsend( & + & buf, & + & count, & + & datatype, & + & dest, & + & tag, & + & comm, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Ibsend + + subroutine MPI_Improbe( & + & source, & + & tag, & + & comm, & + & flag, & + & message, & + & status, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: source + integer, intent(in) :: tag + integer, intent(in) :: comm + logical, intent(out) :: flag + integer, intent(out) :: message + integer, intent(out) :: status(MPI_STATUS_SIZE) + integer, intent(out) :: ierror + end subroutine MPI_Improbe + + subroutine MPI_Imrecv( & + & buf, & + & count, & + & datatype, & + & message, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: message + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Imrecv + + subroutine MPI_Iprobe( & + & source, & + & tag, & + & comm, & + & flag, & + & status, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: source + integer, intent(in) :: tag + integer, intent(in) :: comm + logical, intent(out) :: flag + integer, intent(out) :: status(MPI_STATUS_SIZE) + integer, intent(out) :: ierror + end subroutine MPI_Iprobe + + subroutine MPI_Irecv( & + & buf, & + & count, & + & datatype, & + & source, & + & tag, & + & comm, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: source + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Irecv + + subroutine MPI_Irsend( & + & buf, & + & count, & + & datatype, & + & dest, & + & tag, & + & comm, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Irsend + + subroutine MPI_Isend( & + & buf, & + & count, & + & datatype, & + & dest, & + & tag, & + & comm, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Isend + + subroutine MPI_Isendrecv( & + & sendbuf, & + & sendcount, & + & sendtype, & + & dest, & + & sendtag, & + & recvbuf, & + & recvcount, & + & recvtype, & + & source, & + & recvtag, & + & comm, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype + integer, intent(in) :: dest + integer, intent(in) :: sendtag +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: source + integer, intent(in) :: recvtag + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Isendrecv + + subroutine MPI_Isendrecv_replace( & + & buf, & + & count, & + & datatype, & + & dest, & + & sendtag, & + & source, & + & recvtag, & + & comm, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(inout) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: sendtag + integer, intent(in) :: source + integer, intent(in) :: recvtag + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Isendrecv_replace + + subroutine MPI_Issend( & + & buf, & + & count, & + & datatype, & + & dest, & + & tag, & + & comm, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Issend + + subroutine MPI_Mprobe( & + & source, & + & tag, & + & comm, & + & message, & + & status, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: source + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: message + integer, intent(out) :: status(MPI_STATUS_SIZE) + integer, intent(out) :: ierror + end subroutine MPI_Mprobe + + subroutine MPI_Mrecv( & + & buf, & + & count, & + & datatype, & + & message, & + & status, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: message + integer, intent(out) :: status(MPI_STATUS_SIZE) + integer, intent(out) :: ierror + end subroutine MPI_Mrecv + + subroutine MPI_Probe( & + & source, & + & tag, & + & comm, & + & status, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: source + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: status(MPI_STATUS_SIZE) + integer, intent(out) :: ierror + end subroutine MPI_Probe + + subroutine MPI_Recv( & + & buf, & + & count, & + & datatype, & + & source, & + & tag, & + & comm, & + & status, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: source + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: status(MPI_STATUS_SIZE) + integer, intent(out) :: ierror + end subroutine MPI_Recv + + subroutine MPI_Recv_init( & + & buf, & + & count, & + & datatype, & + & source, & + & tag, & + & comm, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: source + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Recv_init + + subroutine MPI_Request_free( & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(inout) :: request + integer, intent(out) :: ierror + end subroutine MPI_Request_free + + subroutine MPI_Request_get_status( & + & request, & + & flag, & + & status, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: request + logical, intent(out) :: flag + integer, intent(out) :: status(MPI_STATUS_SIZE) + integer, intent(out) :: ierror + end subroutine MPI_Request_get_status + + subroutine MPI_Request_get_status_all( & + & count, & + & array_of_requests, & + & flag, & + & array_of_statuses, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: count + integer, intent(in) :: array_of_requests(count) + logical, intent(out) :: flag + integer, intent(out) :: & + & array_of_statuses(MPI_STATUS_SIZE, count) + integer, intent(out) :: ierror + end subroutine MPI_Request_get_status_all + + subroutine MPI_Request_get_status_any( & + & count, & + & array_of_requests, & + & index, & + & flag, & + & status, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: count + integer, intent(in) :: array_of_requests(count) + integer, intent(out) :: index + logical, intent(out) :: flag + integer, intent(out) :: status(MPI_STATUS_SIZE) + integer, intent(out) :: ierror + end subroutine MPI_Request_get_status_any + + subroutine MPI_Request_get_status_some( & + & incount, & + & array_of_requests, & + & outcount, & + & array_of_indices, & + & array_of_statuses, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: incount + integer, intent(in) :: array_of_requests(incount) + integer, intent(out) :: outcount + integer, intent(out) :: array_of_indices(incount) + integer, intent(out) :: & + & array_of_statuses(MPI_STATUS_SIZE, incount) + integer, intent(out) :: ierror + end subroutine MPI_Request_get_status_some + + subroutine MPI_Rsend( & + & buf, & + & count, & + & datatype, & + & dest, & + & tag, & + & comm, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Rsend + + subroutine MPI_Rsend_init( & + & buf, & + & count, & + & datatype, & + & dest, & + & tag, & + & comm, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Rsend_init + + subroutine MPI_Send( & + & buf, & + & count, & + & datatype, & + & dest, & + & tag, & + & comm, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Send + + subroutine MPI_Send_init( & + & buf, & + & count, & + & datatype, & + & dest, & + & tag, & + & comm, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Send_init + + subroutine MPI_Sendrecv( & + & sendbuf, & + & sendcount, & + & sendtype, & + & dest, & + & sendtag, & + & recvbuf, & + & recvcount, & + & recvtype, & + & source, & + & recvtag, & + & comm, & + & status, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype + integer, intent(in) :: dest + integer, intent(in) :: sendtag +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: source + integer, intent(in) :: recvtag + integer, intent(in) :: comm + integer, intent(out) :: status(MPI_STATUS_SIZE) + integer, intent(out) :: ierror + end subroutine MPI_Sendrecv + + subroutine MPI_Sendrecv_replace( & + & buf, & + & count, & + & datatype, & + & dest, & + & sendtag, & + & source, & + & recvtag, & + & comm, & + & status, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(inout) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: sendtag + integer, intent(in) :: source + integer, intent(in) :: recvtag + integer, intent(in) :: comm + integer, intent(out) :: status(MPI_STATUS_SIZE) + integer, intent(out) :: ierror + end subroutine MPI_Sendrecv_replace + + subroutine MPI_Session_attach_buffer( & + & session, & + & buffer, & + & size, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: session +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buffer +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buffer + integer, intent(in) :: buffer(*) + integer, intent(in) :: size + integer, intent(out) :: ierror + end subroutine MPI_Session_attach_buffer + + subroutine MPI_Session_detach_buffer( & + & session, & + & buffer_addr, & + & size, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: session + integer(MPI_ADDRESS_KIND), intent(out) :: buffer_addr + integer, intent(out) :: size + integer, intent(out) :: ierror + end subroutine MPI_Session_detach_buffer + + subroutine MPI_Session_flush_buffer( & + & session, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: session + integer, intent(out) :: ierror + end subroutine MPI_Session_flush_buffer + + subroutine MPI_Session_iflush_buffer( & + & session, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: session + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Session_iflush_buffer + + subroutine MPI_Ssend( & + & buf, & + & count, & + & datatype, & + & dest, & + & tag, & + & comm, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Ssend + + subroutine MPI_Ssend_init( & + & buf, & + & count, & + & datatype, & + & dest, & + & tag, & + & comm, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Ssend_init + + subroutine MPI_Start( & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(inout) :: request + integer, intent(out) :: ierror + end subroutine MPI_Start + + subroutine MPI_Startall( & + & count, & + & array_of_requests, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: count + integer, intent(inout) :: array_of_requests(count) + integer, intent(out) :: ierror + end subroutine MPI_Startall + + subroutine MPI_Status_get_error( & + & status, & + & err, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: status(MPI_STATUS_SIZE) + integer, intent(out) :: err + integer, intent(out) :: ierror + end subroutine MPI_Status_get_error + + subroutine MPI_Status_get_source( & + & status, & + & source, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: status(MPI_STATUS_SIZE) + integer, intent(out) :: source + integer, intent(out) :: ierror + end subroutine MPI_Status_get_source + + subroutine MPI_Status_get_tag( & + & status, & + & tag, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: status(MPI_STATUS_SIZE) + integer, intent(out) :: tag + integer, intent(out) :: ierror + end subroutine MPI_Status_get_tag + + subroutine MPI_Test( & + & request, & + & flag, & + & status, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(inout) :: request + logical, intent(out) :: flag + integer, intent(out) :: status(MPI_STATUS_SIZE) + integer, intent(out) :: ierror + end subroutine MPI_Test + + subroutine MPI_Test_cancelled( & + & status, & + & flag, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: status(MPI_STATUS_SIZE) + logical, intent(out) :: flag + integer, intent(out) :: ierror + end subroutine MPI_Test_cancelled + + subroutine MPI_Testall( & + & count, & + & array_of_requests, & + & flag, & + & array_of_statuses, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: count + integer, intent(inout) :: array_of_requests(count) + logical, intent(out) :: flag + integer, intent(out) :: & + & array_of_statuses(MPI_STATUS_SIZE, count) + integer, intent(out) :: ierror + end subroutine MPI_Testall + + subroutine MPI_Testany( & + & count, & + & array_of_requests, & + & index, & + & flag, & + & status, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: count + integer, intent(inout) :: array_of_requests(count) + integer, intent(out) :: index + logical, intent(out) :: flag + integer, intent(out) :: status(MPI_STATUS_SIZE) + integer, intent(out) :: ierror + end subroutine MPI_Testany + + subroutine MPI_Testsome( & + & incount, & + & array_of_requests, & + & outcount, & + & array_of_indices, & + & array_of_statuses, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: incount + integer, intent(inout) :: array_of_requests(incount) + integer, intent(out) :: outcount + integer, intent(out) :: array_of_indices(incount) + integer, intent(out) :: & + & array_of_statuses(MPI_STATUS_SIZE, incount) + integer, intent(out) :: ierror + end subroutine MPI_Testsome + + subroutine MPI_Wait( & + & request, & + & status, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(inout) :: request + integer, intent(out) :: status(MPI_STATUS_SIZE) + integer, intent(out) :: ierror + end subroutine MPI_Wait + + subroutine MPI_Waitall( & + & count, & + & array_of_requests, & + & array_of_statuses, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: count + integer, intent(inout) :: array_of_requests(count) + integer, intent(out) :: & + & array_of_statuses(MPI_STATUS_SIZE, count) + integer, intent(out) :: ierror + end subroutine MPI_Waitall + + subroutine MPI_Waitany( & + & count, & + & array_of_requests, & + & index, & + & status, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: count + integer, intent(inout) :: array_of_requests(count) + integer, intent(out) :: index + integer, intent(out) :: status(MPI_STATUS_SIZE) + integer, intent(out) :: ierror + end subroutine MPI_Waitany + + subroutine MPI_Waitsome( & + & incount, & + & array_of_requests, & + & outcount, & + & array_of_indices, & + & array_of_statuses, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: incount + integer, intent(inout) :: array_of_requests(incount) + integer, intent(out) :: outcount + integer, intent(out) :: array_of_indices(incount) + integer, intent(out) :: & + & array_of_statuses(MPI_STATUS_SIZE, incount) + integer, intent(out) :: ierror + end subroutine MPI_Waitsome + + subroutine MPI_Parrived( & + & request, & + & partition, & + & flag, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: request + integer, intent(in) :: partition + logical, intent(out) :: flag + integer, intent(out) :: ierror + end subroutine MPI_Parrived + + subroutine MPI_Pready( & + & partition, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: partition + integer, intent(in) :: request + integer, intent(out) :: ierror + end subroutine MPI_Pready + + subroutine MPI_Pready_list( & + & length, & + & array_of_partitions, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: length + integer, intent(in) :: array_of_partitions(length) + integer, intent(in) :: request + integer, intent(out) :: ierror + end subroutine MPI_Pready_list + + subroutine MPI_Pready_range( & + & partition_low, & + & partition_high, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: partition_low + integer, intent(in) :: partition_high + integer, intent(in) :: request + integer, intent(out) :: ierror + end subroutine MPI_Pready_range + + subroutine MPI_Precv_init( & + & buf, & + & partitions, & + & count, & + & datatype, & + & source, & + & tag, & + & comm, & + & info, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: partitions + integer(MPI_COUNT_KIND), intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: source + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Precv_init + + subroutine MPI_Psend_init( & + & buf, & + & partitions, & + & count, & + & datatype, & + & source, & + & tag, & + & comm, & + & info, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: partitions + integer(MPI_COUNT_KIND), intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: source + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Psend_init + + function MPI_Aint_add( & + & base, & + & disp & + &) result(result) + implicit none + include "mpif_constants.h" + integer(MPI_ADDRESS_KIND), intent(in) :: base + integer(MPI_ADDRESS_KIND), intent(in) :: disp + integer(MPI_ADDRESS_KIND) :: result + end function MPI_Aint_add + + function MPI_Aint_diff( & + & addr1, & + & addr2 & + &) result(result) + implicit none + include "mpif_constants.h" + integer(MPI_ADDRESS_KIND), intent(in) :: addr1 + integer(MPI_ADDRESS_KIND), intent(in) :: addr2 + integer(MPI_ADDRESS_KIND) :: result + end function MPI_Aint_diff + + subroutine MPI_Get_address( & + & location, & + & address, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) location +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: location + integer, intent(in) :: location(*) + integer(MPI_ADDRESS_KIND), intent(out) :: address + integer, intent(out) :: ierror + end subroutine MPI_Get_address + + subroutine MPI_Get_elements( & + & status, & + & datatype, & + & count, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: status(MPI_STATUS_SIZE) + integer, intent(in) :: datatype + integer, intent(out) :: count + integer, intent(out) :: ierror + end subroutine MPI_Get_elements + + subroutine MPI_Pack( & + & inbuf, & + & incount, & + & datatype, & + & outbuf, & + & outsize, & + & position, & + & comm, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) inbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: inbuf + integer, intent(in) :: inbuf(*) + integer, intent(in) :: incount + integer, intent(in) :: datatype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) outbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: outbuf + integer :: outbuf(*) + integer, intent(in) :: outsize + integer, intent(out) :: position + integer, intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Pack + + subroutine MPI_Pack_external( & + & datarep, & + & inbuf, & + & incount, & + & datatype, & + & outbuf, & + & outsize, & + & position, & + & ierror & + &) + implicit none + include "mpif_constants.h" + character(*), intent(in) :: datarep +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) inbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: inbuf + integer, intent(in) :: inbuf(*) + integer, intent(in) :: incount + integer, intent(in) :: datatype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) outbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: outbuf + integer :: outbuf(*) + integer(MPI_ADDRESS_KIND), intent(in) :: outsize + integer(MPI_ADDRESS_KIND), intent(out) :: position + integer, intent(out) :: ierror + end subroutine MPI_Pack_external + + subroutine MPI_Pack_external_size( & + & datarep, & + & incount, & + & datatype, & + & size, & + & ierror & + &) + implicit none + include "mpif_constants.h" + character(*), intent(in) :: datarep + integer(MPI_COUNT_KIND), intent(in) :: incount + integer, intent(in) :: datatype + integer(MPI_ADDRESS_KIND), intent(out) :: size + integer, intent(out) :: ierror + end subroutine MPI_Pack_external_size + + subroutine MPI_Pack_size( & + & incount, & + & datatype, & + & comm, & + & size, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: incount + integer, intent(in) :: datatype + integer, intent(in) :: comm + integer, intent(out) :: size + integer, intent(out) :: ierror + end subroutine MPI_Pack_size + + subroutine MPI_Type_commit( & + & datatype, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(out) :: datatype + integer, intent(out) :: ierror + end subroutine MPI_Type_commit + + subroutine MPI_Type_contiguous( & + & count, & + & oldtype, & + & newtype, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: count + integer, intent(in) :: oldtype + integer, intent(out) :: newtype + integer, intent(out) :: ierror + end subroutine MPI_Type_contiguous + + subroutine MPI_Type_create_darray( & + & size, & + & rank, & + & ndims, & + & array_of_gsizes, & + & array_of_distribs, & + & array_of_dargs, & + & array_of_psizes, & + & order, & + & oldtype, & + & newtype, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: size + integer, intent(in) :: rank + integer, intent(in) :: ndims + integer, intent(in) :: array_of_gsizes(ndims) + integer, intent(in) :: array_of_distribs(ndims) + integer, intent(in) :: array_of_dargs(ndims) + integer, intent(in) :: array_of_psizes(ndims) + integer, intent(in) :: order + integer, intent(in) :: oldtype + integer, intent(out) :: newtype + integer, intent(out) :: ierror + end subroutine MPI_Type_create_darray + + subroutine MPI_Type_create_hindexed( & + & count, & + & array_of_blocklengths, & + & array_of_displacements, & + & oldtype, & + & newtype, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: count + integer, intent(in) :: array_of_blocklengths(count) + integer(MPI_ADDRESS_KIND), intent(in) :: & + & array_of_displacements(count) + integer, intent(in) :: oldtype + integer, intent(out) :: newtype + integer, intent(out) :: ierror + end subroutine MPI_Type_create_hindexed + + subroutine MPI_Type_create_hindexed_block( & + & count, & + & blocklength, & + & array_of_displacements, & + & oldtype, & + & newtype, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: count + integer, intent(in) :: blocklength + integer(MPI_ADDRESS_KIND), intent(in) :: & + & array_of_displacements(count) + integer, intent(in) :: oldtype + integer, intent(out) :: newtype + integer, intent(out) :: ierror + end subroutine MPI_Type_create_hindexed_block + + subroutine MPI_Type_create_hvector( & + & count, & + & blocklength, & + & stride, & + & oldtype, & + & newtype, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: count + integer, intent(in) :: blocklength + integer(MPI_ADDRESS_KIND), intent(in) :: stride + integer, intent(in) :: oldtype + integer, intent(out) :: newtype + integer, intent(out) :: ierror + end subroutine MPI_Type_create_hvector + + subroutine MPI_Type_create_indexed_block( & + & count, & + & blocklength, & + & array_of_displacements, & + & oldtype, & + & newtype, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: count + integer, intent(in) :: blocklength + integer, intent(in) :: array_of_displacements(count) + integer, intent(in) :: oldtype + integer, intent(out) :: newtype + integer, intent(out) :: ierror + end subroutine MPI_Type_create_indexed_block + + subroutine MPI_Type_create_resized( & + & oldtype, & + & lb, & + & extent, & + & newtype, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: oldtype + integer(MPI_ADDRESS_KIND), intent(in) :: lb + integer(MPI_ADDRESS_KIND), intent(in) :: extent + integer, intent(out) :: newtype + integer, intent(out) :: ierror + end subroutine MPI_Type_create_resized + + subroutine MPI_Type_create_struct( & + & count, & + & array_of_blocklengths, & + & array_of_displacements, & + & array_of_types, & + & newtype, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: count + integer, intent(in) :: array_of_blocklengths(count) + integer(MPI_ADDRESS_KIND), intent(in) :: & + & array_of_displacements(count) + integer, intent(in) :: array_of_types(count) + integer, intent(out) :: newtype + integer, intent(out) :: ierror + end subroutine MPI_Type_create_struct + + subroutine MPI_Type_create_subarray( & + & ndims, & + & array_of_sizes, & + & array_of_subsizes, & + & array_of_starts, & + & order, & + & oldtype, & + & newtype, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: ndims + integer, intent(in) :: array_of_sizes(ndims) + integer, intent(in) :: array_of_subsizes(ndims) + integer, intent(in) :: array_of_starts(ndims) + integer, intent(in) :: order + integer, intent(in) :: oldtype + integer, intent(out) :: newtype + integer, intent(out) :: ierror + end subroutine MPI_Type_create_subarray + + subroutine MPI_Type_dup( & + & oldtype, & + & newtype, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: oldtype + integer, intent(out) :: newtype + integer, intent(out) :: ierror + end subroutine MPI_Type_dup + + subroutine MPI_Type_free( & + & datatype, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(out) :: datatype + integer, intent(out) :: ierror + end subroutine MPI_Type_free + + subroutine MPI_Type_get_contents( & + & datatype, & + & max_integers, & + & max_addresses, & + & max_datatypes, & + & array_of_integers, & + & array_of_addresses, & + & array_of_datatypes, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: datatype + integer, intent(in) :: max_integers + integer, intent(in) :: max_addresses + integer, intent(in) :: max_datatypes + integer, intent(out) :: array_of_integers + integer(MPI_ADDRESS_KIND), intent(out) :: array_of_addresses + integer, intent(out) :: array_of_datatypes + integer, intent(out) :: ierror + end subroutine MPI_Type_get_contents + + subroutine MPI_Type_get_envelope( & + & datatype, & + & num_integers, & + & num_addresses, & + & num_datatypes, & + & combiner, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: datatype + integer, intent(out) :: num_integers + integer, intent(out) :: num_addresses + integer, intent(out) :: num_datatypes + integer, intent(out) :: combiner + integer, intent(out) :: ierror + end subroutine MPI_Type_get_envelope + + subroutine MPI_Type_get_extent( & + & datatype, & + & lb, & + & extent, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: datatype + integer(MPI_ADDRESS_KIND), intent(out) :: lb + integer(MPI_ADDRESS_KIND), intent(out) :: extent + integer, intent(out) :: ierror + end subroutine MPI_Type_get_extent + + subroutine MPI_Type_get_true_extent( & + & datatype, & + & true_lb, & + & true_extent, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: datatype + integer(MPI_ADDRESS_KIND), intent(out) :: true_lb + integer(MPI_ADDRESS_KIND), intent(out) :: true_extent + integer, intent(out) :: ierror + end subroutine MPI_Type_get_true_extent + + subroutine MPI_Type_indexed( & + & count, & + & array_of_blocklengths, & + & array_of_displacements, & + & oldtype, & + & newtype, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: count + integer, intent(in) :: array_of_blocklengths(count) + integer, intent(in) :: array_of_displacements(count) + integer, intent(in) :: oldtype + integer, intent(out) :: newtype + integer, intent(out) :: ierror + end subroutine MPI_Type_indexed + + subroutine MPI_Type_size( & + & datatype, & + & size, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: datatype + integer, intent(out) :: size + integer, intent(out) :: ierror + end subroutine MPI_Type_size + + subroutine MPI_Type_vector( & + & count, & + & blocklength, & + & stride, & + & oldtype, & + & newtype, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: count + integer, intent(in) :: blocklength + integer, intent(in) :: stride + integer, intent(in) :: oldtype + integer, intent(out) :: newtype + integer, intent(out) :: ierror + end subroutine MPI_Type_vector + + subroutine MPI_Unpack( & + & inbuf, & + & insize, & + & position, & + & outbuf, & + & outcount, & + & datatype, & + & comm, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) inbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: inbuf + integer, intent(in) :: inbuf(*) + integer, intent(in) :: insize + integer, intent(out) :: position +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) outbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: outbuf + integer :: outbuf(*) + integer, intent(in) :: outcount + integer, intent(in) :: datatype + integer, intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Unpack + + subroutine MPI_Unpack_external( & + & datarep, & + & inbuf, & + & insize, & + & position, & + & outbuf, & + & outcount, & + & datatype, & + & ierror & + &) + implicit none + include "mpif_constants.h" + character(*), intent(in) :: datarep +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) inbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: inbuf + integer, intent(in) :: inbuf(*) + integer(MPI_ADDRESS_KIND), intent(in) :: insize + integer(MPI_ADDRESS_KIND), intent(out) :: position +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) outbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: outbuf + integer :: outbuf(*) + integer, intent(in) :: outcount + integer, intent(in) :: datatype + integer, intent(out) :: ierror + end subroutine MPI_Unpack_external + + subroutine MPI_Allgather( & + & sendbuf, & + & sendcount, & + & sendtype, & + & recvbuf, & + & recvcount, & + & recvtype, & + & comm, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Allgather + + subroutine MPI_Allgather_init( & + & sendbuf, & + & sendcount, & + & sendtype, & + & recvbuf, & + & recvcount, & + & recvtype, & + & comm, & + & info, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Allgather_init + + subroutine MPI_Allgatherv( & + & sendbuf, & + & sendcount, & + & sendtype, & + & recvbuf, & + & recvcounts, & + & displs, & + & recvtype, & + & comm, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: displs(*) + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Allgatherv + + subroutine MPI_Allgatherv_init( & + & sendbuf, & + & sendcount, & + & sendtype, & + & recvbuf, & + & recvcounts, & + & displs, & + & recvtype, & + & comm, & + & info, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: displs(*) + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Allgatherv_init + + subroutine MPI_Allreduce( & + & sendbuf, & + & recvbuf, & + & count, & + & datatype, & + & op, & + & comm, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: op + integer, intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Allreduce + + subroutine MPI_Allreduce_init( & + & sendbuf, & + & recvbuf, & + & count, & + & datatype, & + & op, & + & comm, & + & info, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: op + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Allreduce_init + + subroutine MPI_Alltoall( & + & sendbuf, & + & sendcount, & + & sendtype, & + & recvbuf, & + & recvcount, & + & recvtype, & + & comm, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Alltoall + + subroutine MPI_Alltoall_init( & + & sendbuf, & + & sendcount, & + & sendtype, & + & recvbuf, & + & recvcount, & + & recvtype, & + & comm, & + & info, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Alltoall_init + + subroutine MPI_Alltoallv( & + & sendbuf, & + & sendcounts, & + & sdispls, & + & sendtype, & + & recvbuf, & + & recvcounts, & + & rdispls, & + & recvtype, & + & comm, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + integer, intent(in) :: sendtype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: rdispls(*) + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Alltoallv + + subroutine MPI_Alltoallv_init( & + & sendbuf, & + & sendcounts, & + & sdispls, & + & sendtype, & + & recvbuf, & + & recvcounts, & + & rdispls, & + & recvtype, & + & comm, & + & info, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + integer, intent(in) :: sendtype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: rdispls(*) + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Alltoallv_init + + subroutine MPI_Alltoallw( & + & sendbuf, & + & sendcounts, & + & sdispls, & + & sendtypes, & + & recvbuf, & + & recvcounts, & + & rdispls, & + & recvtypes, & + & comm, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + integer, intent(in) :: sendtypes(*) +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: rdispls(*) + integer, intent(in) :: recvtypes(*) + integer, intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Alltoallw + + subroutine MPI_Alltoallw_init( & + & sendbuf, & + & sendcounts, & + & sdispls, & + & sendtypes, & + & recvbuf, & + & recvcounts, & + & rdispls, & + & recvtypes, & + & comm, & + & info, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + integer, intent(in) :: sendtypes(*) +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: rdispls(*) + integer, intent(in) :: recvtypes(*) + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Alltoallw_init + + subroutine MPI_Barrier( & + & comm, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Barrier + + subroutine MPI_Barrier_init( & + & comm, & + & info, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Barrier_init + + subroutine MPI_Bcast( & + & buffer, & + & count, & + & datatype, & + & root, & + & comm, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buffer +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buffer + integer :: buffer(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Bcast + + subroutine MPI_Bcast_init( & + & buffer, & + & count, & + & datatype, & + & root, & + & comm, & + & info, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buffer +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buffer + integer :: buffer(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Bcast_init + + subroutine MPI_Exscan( & + & sendbuf, & + & recvbuf, & + & count, & + & datatype, & + & op, & + & comm, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: op + integer, intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Exscan + + subroutine MPI_Exscan_init( & + & sendbuf, & + & recvbuf, & + & count, & + & datatype, & + & op, & + & comm, & + & info, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: op + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Exscan_init + + subroutine MPI_Gather( & + & sendbuf, & + & sendcount, & + & sendtype, & + & recvbuf, & + & recvcount, & + & recvtype, & + & root, & + & comm, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Gather + + subroutine MPI_Gather_init( & + & sendbuf, & + & sendcount, & + & sendtype, & + & recvbuf, & + & recvcount, & + & recvtype, & + & root, & + & comm, & + & info, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Gather_init + + subroutine MPI_Gatherv( & + & sendbuf, & + & sendcount, & + & sendtype, & + & recvbuf, & + & recvcounts, & + & displs, & + & recvtype, & + & root, & + & comm, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: displs(*) + integer, intent(in) :: recvtype + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Gatherv + + subroutine MPI_Gatherv_init( & + & sendbuf, & + & sendcount, & + & sendtype, & + & recvbuf, & + & recvcounts, & + & displs, & + & recvtype, & + & root, & + & comm, & + & info, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: displs(*) + integer, intent(in) :: recvtype + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Gatherv_init + + subroutine MPI_Iallgather( & + & sendbuf, & + & sendcount, & + & sendtype, & + & recvbuf, & + & recvcount, & + & recvtype, & + & comm, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Iallgather + + subroutine MPI_Iallgatherv( & + & sendbuf, & + & sendcount, & + & sendtype, & + & recvbuf, & + & recvcounts, & + & displs, & + & recvtype, & + & comm, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: displs(*) + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Iallgatherv + + subroutine MPI_Iallreduce( & + & sendbuf, & + & recvbuf, & + & count, & + & datatype, & + & op, & + & comm, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: op + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Iallreduce + + subroutine MPI_Ialltoall( & + & sendbuf, & + & sendcount, & + & sendtype, & + & recvbuf, & + & recvcount, & + & recvtype, & + & comm, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Ialltoall + + subroutine MPI_Ialltoallv( & + & sendbuf, & + & sendcounts, & + & sdispls, & + & sendtype, & + & recvbuf, & + & recvcounts, & + & rdispls, & + & recvtype, & + & comm, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + integer, intent(in) :: sendtype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: rdispls(*) + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Ialltoallv + + subroutine MPI_Ialltoallw( & + & sendbuf, & + & sendcounts, & + & sdispls, & + & sendtypes, & + & recvbuf, & + & recvcounts, & + & rdispls, & + & recvtypes, & + & comm, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + integer, intent(in) :: sendtypes(*) +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: rdispls(*) + integer, intent(in) :: recvtypes(*) + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Ialltoallw + + subroutine MPI_Ibarrier( & + & comm, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Ibarrier + + subroutine MPI_Ibcast( & + & buffer, & + & count, & + & datatype, & + & root, & + & comm, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buffer +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buffer + integer :: buffer(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Ibcast + + subroutine MPI_Iexscan( & + & sendbuf, & + & recvbuf, & + & count, & + & datatype, & + & op, & + & comm, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: op + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Iexscan + + subroutine MPI_Igather( & + & sendbuf, & + & sendcount, & + & sendtype, & + & recvbuf, & + & recvcount, & + & recvtype, & + & root, & + & comm, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Igather + + subroutine MPI_Igatherv( & + & sendbuf, & + & sendcount, & + & sendtype, & + & recvbuf, & + & recvcounts, & + & displs, & + & recvtype, & + & root, & + & comm, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: displs(*) + integer, intent(in) :: recvtype + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Igatherv + + subroutine MPI_Ireduce( & + & sendbuf, & + & recvbuf, & + & count, & + & datatype, & + & op, & + & root, & + & comm, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: op + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Ireduce + + subroutine MPI_Ireduce_scatter( & + & sendbuf, & + & recvbuf, & + & recvcounts, & + & datatype, & + & op, & + & comm, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: datatype + integer, intent(in) :: op + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Ireduce_scatter + + subroutine MPI_Ireduce_scatter_block( & + & sendbuf, & + & recvbuf, & + & recvcount, & + & datatype, & + & op, & + & comm, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: datatype + integer, intent(in) :: op + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Ireduce_scatter_block + + subroutine MPI_Iscan( & + & sendbuf, & + & recvbuf, & + & count, & + & datatype, & + & op, & + & comm, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: op + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Iscan + + subroutine MPI_Iscatter( & + & sendbuf, & + & sendcount, & + & sendtype, & + & recvbuf, & + & recvcount, & + & recvtype, & + & root, & + & comm, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Iscatter + + subroutine MPI_Iscatterv( & + & sendbuf, & + & sendcounts, & + & sdispls, & + & sendtype, & + & recvbuf, & + & recvcount, & + & recvtype, & + & root, & + & comm, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + integer, intent(in) :: sendtype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Iscatterv + + subroutine MPI_Op_commutative( & + & op, & + & commute, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: op + logical, intent(out) :: commute + integer, intent(out) :: ierror + end subroutine MPI_Op_commutative + + subroutine MPI_Op_create( & + & user_fn, & + & commute, & + & op, & + & ierror & + &) + implicit none + include "mpif_constants.h" + external :: user_fn + logical, intent(in) :: commute + integer, intent(out) :: op + integer, intent(out) :: ierror + end subroutine MPI_Op_create + + subroutine MPI_Op_free( & + & op, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(out) :: op + integer, intent(out) :: ierror + end subroutine MPI_Op_free + + subroutine MPI_Reduce( & + & sendbuf, & + & recvbuf, & + & count, & + & datatype, & + & op, & + & root, & + & comm, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: op + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Reduce + + subroutine MPI_Reduce_init( & + & sendbuf, & + & recvbuf, & + & count, & + & datatype, & + & op, & + & root, & + & comm, & + & info, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: op + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Reduce_init + + subroutine MPI_Reduce_local( & + & inbuf, & + & inoutbuf, & + & count, & + & datatype, & + & op, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) inbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: inbuf + integer, intent(in) :: inbuf(*) +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) inoutbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: inoutbuf + integer :: inoutbuf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: op + integer, intent(out) :: ierror + end subroutine MPI_Reduce_local + + subroutine MPI_Reduce_scatter( & + & sendbuf, & + & recvbuf, & + & recvcounts, & + & datatype, & + & op, & + & comm, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: datatype + integer, intent(in) :: op + integer, intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Reduce_scatter + + subroutine MPI_Reduce_scatter_block( & + & sendbuf, & + & recvbuf, & + & recvcount, & + & datatype, & + & op, & + & comm, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: datatype + integer, intent(in) :: op + integer, intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Reduce_scatter_block + + subroutine MPI_Reduce_scatter_block_init( & + & sendbuf, & + & recvbuf, & + & recvcount, & + & datatype, & + & op, & + & comm, & + & info, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: datatype + integer, intent(in) :: op + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Reduce_scatter_block_init + + subroutine MPI_Reduce_scatter_init( & + & sendbuf, & + & recvbuf, & + & recvcounts, & + & datatype, & + & op, & + & comm, & + & info, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: datatype + integer, intent(in) :: op + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Reduce_scatter_init + + subroutine MPI_Scan( & + & sendbuf, & + & recvbuf, & + & count, & + & datatype, & + & op, & + & comm, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: op + integer, intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Scan + + subroutine MPI_Scan_init( & + & sendbuf, & + & recvbuf, & + & count, & + & datatype, & + & op, & + & comm, & + & info, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: op + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Scan_init + + subroutine MPI_Scatter( & + & sendbuf, & + & sendcount, & + & sendtype, & + & recvbuf, & + & recvcount, & + & recvtype, & + & root, & + & comm, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Scatter + + subroutine MPI_Scatter_init( & + & sendbuf, & + & sendcount, & + & sendtype, & + & recvbuf, & + & recvcount, & + & recvtype, & + & root, & + & comm, & + & info, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Scatter_init + + subroutine MPI_Scatterv( & + & sendbuf, & + & sendcounts, & + & displs, & + & sendtype, & + & recvbuf, & + & recvcount, & + & recvtype, & + & root, & + & comm, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: displs(*) + integer, intent(in) :: sendtype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Scatterv + + subroutine MPI_Scatterv_init( & + & sendbuf, & + & sendcounts, & + & displs, & + & sendtype, & + & recvbuf, & + & recvcount, & + & recvtype, & + & root, & + & comm, & + & info, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: displs(*) + integer, intent(in) :: sendtype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Scatterv_init + + subroutine MPI_Type_get_value_index( & + & value_type, & + & index_type, & + & pair_type, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: value_type + integer, intent(in) :: index_type + integer, intent(out) :: pair_type + integer, intent(out) :: ierror + end subroutine MPI_Type_get_value_index + + subroutine MPI_Comm_compare( & + & comm1, & + & comm2, & + & result, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm1 + integer, intent(in) :: comm2 + integer, intent(out) :: result + integer, intent(out) :: ierror + end subroutine MPI_Comm_compare + + subroutine MPI_Comm_create( & + & comm, & + & group, & + & newcomm, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(in) :: group + integer, intent(out) :: newcomm + integer, intent(out) :: ierror + end subroutine MPI_Comm_create + + subroutine MPI_Comm_create_from_group( & + & group, & + & stringtag, & + & info, & + & errhandler, & + & newcomm, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: group + character(*), intent(in) :: stringtag + integer, intent(in) :: info + integer, intent(in) :: errhandler + integer, intent(out) :: newcomm + integer, intent(out) :: ierror + end subroutine MPI_Comm_create_from_group + + subroutine MPI_Comm_create_group( & + & comm, & + & group, & + & tag, & + & newcomm, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(in) :: group + integer, intent(in) :: tag + integer, intent(out) :: newcomm + integer, intent(out) :: ierror + end subroutine MPI_Comm_create_group + + subroutine MPI_Comm_create_keyval( & + & comm_copy_attr_fn, & + & comm_delete_attr_fn, & + & comm_keyval, & + & extra_state, & + & ierror & + &) + implicit none + include "mpif_constants.h" + external :: comm_copy_attr_fn + external :: comm_delete_attr_fn + integer, intent(out) :: comm_keyval +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) extra_state +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: extra_state + integer :: extra_state(*) + integer, intent(out) :: ierror + end subroutine MPI_Comm_create_keyval + + subroutine MPI_Comm_delete_attr( & + & comm, & + & comm_keyval, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(in) :: comm_keyval + integer, intent(out) :: ierror + end subroutine MPI_Comm_delete_attr + + subroutine MPI_Comm_dup( & + & comm, & + & newcomm, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(out) :: newcomm + integer, intent(out) :: ierror + end subroutine MPI_Comm_dup + + subroutine MPI_Comm_dup_with_info( & + & comm, & + & info, & + & newcomm, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: newcomm + integer, intent(out) :: ierror + end subroutine MPI_Comm_dup_with_info + + subroutine MPI_Comm_free( & + & comm, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(out) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Comm_free + + subroutine MPI_Comm_get_name( & + & comm, & + & comm_name, & + & resultlen, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + character(*), intent(out) :: comm_name + integer, intent(out) :: resultlen + integer, intent(out) :: ierror + end subroutine MPI_Comm_get_name + + subroutine MPI_Comm_free_keyval( & + & comm_keyval, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(out) :: comm_keyval + integer, intent(out) :: ierror + end subroutine MPI_Comm_free_keyval + + subroutine MPI_Comm_get_attr( & + & comm, & + & comm_keyval, & + & attribute_val, & + & flag, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(in) :: comm_keyval +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) attribute_val +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: attribute_val + integer :: attribute_val(*) + logical, intent(out) :: flag + integer, intent(out) :: ierror + end subroutine MPI_Comm_get_attr + + subroutine MPI_Comm_get_info( & + & comm, & + & info_used, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(out) :: info_used + integer, intent(out) :: ierror + end subroutine MPI_Comm_get_info + + subroutine MPI_Comm_group( & + & comm, & + & group, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(out) :: group + integer, intent(out) :: ierror + end subroutine MPI_Comm_group + + subroutine MPI_Comm_idup( & + & comm, & + & newcomm, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(out) :: newcomm + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Comm_idup + + subroutine MPI_Comm_idup_with_info( & + & comm, & + & info, & + & newcomm, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: newcomm + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Comm_idup_with_info + + subroutine MPI_Comm_rank( & + & comm, & + & rank, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(out) :: rank + integer, intent(out) :: ierror + end subroutine MPI_Comm_rank + + subroutine MPI_Comm_remote_group( & + & comm, & + & group, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(out) :: group + integer, intent(out) :: ierror + end subroutine MPI_Comm_remote_group + + subroutine MPI_Comm_remote_size( & + & comm, & + & size, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(out) :: size + integer, intent(out) :: ierror + end subroutine MPI_Comm_remote_size + + subroutine MPI_Comm_set_attr( & + & comm, & + & comm_keyval, & + & attribute_val, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(in) :: comm_keyval +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) attribute_val +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: attribute_val + integer :: attribute_val(*) + integer, intent(out) :: ierror + end subroutine MPI_Comm_set_attr + + subroutine MPI_Comm_set_info( & + & comm, & + & info, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: ierror + end subroutine MPI_Comm_set_info + + subroutine MPI_Comm_set_name( & + & comm, & + & comm_name, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + character(*), intent(in) :: comm_name + integer, intent(out) :: ierror + end subroutine MPI_Comm_set_name + + subroutine MPI_Comm_size( & + & comm, & + & size, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(out) :: size + integer, intent(out) :: ierror + end subroutine MPI_Comm_size + + subroutine MPI_Comm_split( & + & comm, & + & color, & + & key, & + & newcomm, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(in) :: color + integer, intent(in) :: key + integer, intent(out) :: newcomm + integer, intent(out) :: ierror + end subroutine MPI_Comm_split + + subroutine MPI_Group_free( & + & group, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(out) :: group + integer, intent(out) :: ierror + end subroutine MPI_Group_free + + subroutine MPI_Comm_split_type( & + & comm, & + & split_type, & + & key, & + & info, & + & newcomm, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(in) :: split_type + integer, intent(in) :: key + integer, intent(in) :: info + integer, intent(out) :: newcomm + integer, intent(out) :: ierror + end subroutine MPI_Comm_split_type + + subroutine MPI_Comm_test_inter( & + & comm, & + & flag, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + logical, intent(out) :: flag + integer, intent(out) :: ierror + end subroutine MPI_Comm_test_inter + + subroutine MPI_Group_compare( & + & group1, & + & group2, & + & result, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: group1 + integer, intent(in) :: group2 + integer, intent(out) :: result + integer, intent(out) :: ierror + end subroutine MPI_Group_compare + + subroutine MPI_Group_difference( & + & group1, & + & group2, & + & newgroup, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: group1 + integer, intent(in) :: group2 + integer, intent(out) :: newgroup + integer, intent(out) :: ierror + end subroutine MPI_Group_difference + + subroutine MPI_Group_excl( & + & group, & + & n, & + & ranks, & + & newgroup, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: group + integer, intent(in) :: n + integer, intent(in) :: ranks(n) + integer, intent(out) :: newgroup + integer, intent(out) :: ierror + end subroutine MPI_Group_excl + + subroutine MPI_Group_from_session_pset( & + & session, & + & pset_name, & + & newgroup, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: session + character(*), intent(in) :: pset_name + integer, intent(out) :: newgroup + integer, intent(out) :: ierror + end subroutine MPI_Group_from_session_pset + + subroutine MPI_Group_incl( & + & group, & + & n, & + & ranks, & + & newgroup, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: group + integer, intent(in) :: n + integer, intent(in) :: ranks(n) + integer, intent(out) :: newgroup + integer, intent(out) :: ierror + end subroutine MPI_Group_incl + + subroutine MPI_Group_intersection( & + & group1, & + & group2, & + & newgroup, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: group1 + integer, intent(in) :: group2 + integer, intent(out) :: newgroup + integer, intent(out) :: ierror + end subroutine MPI_Group_intersection + + subroutine MPI_Group_range_excl( & + & group, & + & n, & + & ranges, & + & newgroup, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: group + integer, intent(in) :: n + integer, intent(in) :: ranges(n) + integer, intent(out) :: newgroup + integer, intent(out) :: ierror + end subroutine MPI_Group_range_excl + + subroutine MPI_Group_range_incl( & + & group, & + & n, & + & ranges, & + & newgroup, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: group + integer, intent(in) :: n + integer, intent(in) :: ranges(n) + integer, intent(out) :: newgroup + integer, intent(out) :: ierror + end subroutine MPI_Group_range_incl + + subroutine MPI_Group_rank( & + & group, & + & rank, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: group + integer, intent(out) :: rank + integer, intent(out) :: ierror + end subroutine MPI_Group_rank + + subroutine MPI_Group_size( & + & group, & + & size, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: group + integer, intent(out) :: size + integer, intent(out) :: ierror + end subroutine MPI_Group_size + + subroutine MPI_Group_translate_ranks( & + & group1, & + & n, & + & ranks1, & + & group2, & + & ranks2, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: group1 + integer, intent(in) :: n + integer, intent(in) :: ranks1(n) + integer, intent(in) :: group2 + integer, intent(in) :: ranks2(n) + integer, intent(out) :: ierror + end subroutine MPI_Group_translate_ranks + + subroutine MPI_Group_union( & + & group1, & + & group2, & + & newgroup, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: group1 + integer, intent(in) :: group2 + integer, intent(out) :: newgroup + integer, intent(out) :: ierror + end subroutine MPI_Group_union + + subroutine MPI_Intercomm_create( & + & local_comm, & + & local_leader, & + & peer_comm, & + & remote_leader, & + & tag, & + & newintercomm, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: local_comm + integer, intent(in) :: local_leader + integer, intent(in) :: peer_comm + integer, intent(in) :: remote_leader + integer, intent(in) :: tag + integer, intent(out) :: newintercomm + integer, intent(out) :: ierror + end subroutine MPI_Intercomm_create + + subroutine MPI_Intercomm_create_from_groups( & + & local_group, & + & local_leader, & + & remote_group, & + & remote_leader, & + & stringtag, & + & info, & + & errhandler, & + & newintercomm, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: local_group + integer, intent(in) :: local_leader + integer, intent(in) :: remote_group + integer, intent(in) :: remote_leader + character(*), intent(in) :: stringtag + integer, intent(in) :: info + integer, intent(in) :: errhandler + integer, intent(out) :: newintercomm + integer, intent(out) :: ierror + end subroutine MPI_Intercomm_create_from_groups + + subroutine MPI_Intercomm_merge( & + & intercomm, & + & high, & + & newintracomm, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: intercomm + integer, intent(in) :: high + integer, intent(out) :: newintracomm + integer, intent(out) :: ierror + end subroutine MPI_Intercomm_merge + + subroutine MPI_Type_create_keyval( & + & type_copy_attr_fn, & + & type_delete_attr_fn, & + & type_keyval, & + & extra_state, & + & ierror & + &) + implicit none + include "mpif_constants.h" + external :: type_copy_attr_fn + external :: type_delete_attr_fn + integer, intent(out) :: type_keyval +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) extra_state +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: extra_state + integer :: extra_state(*) + integer, intent(out) :: ierror + end subroutine MPI_Type_create_keyval + + subroutine MPI_Type_delete_attr( & + & datatype, & + & type_keyval, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: datatype + integer, intent(in) :: type_keyval + integer, intent(out) :: ierror + end subroutine MPI_Type_delete_attr + + subroutine MPI_Type_free_keyval( & + & type_keyval, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(out) :: type_keyval + integer, intent(out) :: ierror + end subroutine MPI_Type_free_keyval + + subroutine MPI_Type_get_attr( & + & datatype, & + & type_keyval, & + & attribute_val, & + & flag, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: datatype + integer, intent(in) :: type_keyval +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) attribute_val +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: attribute_val + integer :: attribute_val(*) + logical, intent(out) :: flag + integer, intent(out) :: ierror + end subroutine MPI_Type_get_attr + + subroutine MPI_Type_get_name( & + & datatype, & + & type_name, & + & resultlen, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: datatype + character(*), intent(out) :: type_name + integer, intent(out) :: resultlen + integer, intent(out) :: ierror + end subroutine MPI_Type_get_name + + subroutine MPI_Type_set_attr( & + & datatype, & + & type_keyval, & + & attribute_val, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: datatype + integer, intent(in) :: type_keyval +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) attribute_val +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: attribute_val + integer :: attribute_val(*) + integer, intent(out) :: ierror + end subroutine MPI_Type_set_attr + + subroutine MPI_Type_set_name( & + & datatype, & + & type_name, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: datatype + character(*), intent(in) :: type_name + integer, intent(out) :: ierror + end subroutine MPI_Type_set_name + + subroutine MPI_Win_create_keyval( & + & win_copy_attr_fn, & + & win_delete_attr_fn, & + & win_keyval, & + & extra_state, & + & ierror & + &) + implicit none + include "mpif_constants.h" + external :: win_copy_attr_fn + external :: win_delete_attr_fn + integer, intent(out) :: win_keyval +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) extra_state +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: extra_state + integer :: extra_state(*) + integer, intent(out) :: ierror + end subroutine MPI_Win_create_keyval + + subroutine MPI_Win_delete_attr( & + & win, & + & win_keyval, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: win + integer, intent(in) :: win_keyval + integer, intent(out) :: ierror + end subroutine MPI_Win_delete_attr + + subroutine MPI_Win_free_keyval( & + & win_keyval, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(out) :: win_keyval + integer, intent(out) :: ierror + end subroutine MPI_Win_free_keyval + + subroutine MPI_Win_get_attr( & + & win, & + & win_keyval, & + & attribute_val, & + & flag, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: win + integer, intent(in) :: win_keyval +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) attribute_val +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: attribute_val + integer :: attribute_val(*) + logical, intent(out) :: flag + integer, intent(out) :: ierror + end subroutine MPI_Win_get_attr + + subroutine MPI_Win_get_name( & + & win, & + & win_name, & + & resultlen, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: win + character(*), intent(out) :: win_name + integer, intent(out) :: resultlen + integer, intent(out) :: ierror + end subroutine MPI_Win_get_name + + subroutine MPI_Win_set_attr( & + & win, & + & win_keyval, & + & attribute_val, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: win + integer, intent(in) :: win_keyval +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) attribute_val +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: attribute_val + integer :: attribute_val(*) + integer, intent(out) :: ierror + end subroutine MPI_Win_set_attr + + subroutine MPI_Win_set_name( & + & win, & + & win_name, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: win + character(*), intent(in) :: win_name + integer, intent(out) :: ierror + end subroutine MPI_Win_set_name + + subroutine MPI_Cart_coords( & + & comm, & + & rank, & + & maxdims, & + & coords, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(in) :: rank + integer, intent(in) :: maxdims + integer, intent(out) :: coords(maxdims) + integer, intent(out) :: ierror + end subroutine MPI_Cart_coords + + subroutine MPI_Cart_create( & + & comm_old, & + & ndims, & + & dims, & + & periods, & + & reorder, & + & comm_cart, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm_old + integer, intent(in) :: ndims + integer, intent(in) :: dims(ndims) + logical, intent(in) :: periods(ndims) + logical, intent(in) :: reorder + integer, intent(out) :: comm_cart + integer, intent(out) :: ierror + end subroutine MPI_Cart_create + + subroutine MPI_Cart_get( & + & comm, & + & maxdims, & + & dims, & + & periods, & + & coords, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(in) :: maxdims + integer, intent(out) :: dims(maxdims) + integer, intent(out) :: periods(maxdims) + integer, intent(out) :: coords(maxdims) + integer, intent(out) :: ierror + end subroutine MPI_Cart_get + + subroutine MPI_Cart_map( & + & comm, & + & ndims, & + & dims, & + & periods, & + & newrank, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(in) :: ndims + integer, intent(in) :: dims(ndims) + integer, intent(in) :: periods(ndims) + integer, intent(out) :: newrank + integer, intent(out) :: ierror + end subroutine MPI_Cart_map + + subroutine MPI_Cart_rank( & + & comm, & + & coords, & + & rank, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(in) :: coords(*) + integer, intent(out) :: rank + integer, intent(out) :: ierror + end subroutine MPI_Cart_rank + + subroutine MPI_Cart_shift( & + & comm, & + & direction, & + & disp, & + & rank_source, & + & rank_dest, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(in) :: direction + integer, intent(in) :: disp + integer, intent(out) :: rank_source + integer, intent(out) :: rank_dest + integer, intent(out) :: ierror + end subroutine MPI_Cart_shift + + subroutine MPI_Cart_sub( & + & comm, & + & remain_dims, & + & newcomm, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + logical, intent(in) :: remain_dims(*) + integer, intent(out) :: newcomm + integer, intent(out) :: ierror + end subroutine MPI_Cart_sub + + subroutine MPI_Cartdim_get( & + & comm, & + & ndims, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(out) :: ndims + integer, intent(out) :: ierror + end subroutine MPI_Cartdim_get + + subroutine MPI_Dims_create( & + & nnodes, & + & ndims, & + & dims, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: nnodes + integer, intent(in) :: ndims + integer, intent(in) :: dims(ndims) + integer, intent(out) :: ierror + end subroutine MPI_Dims_create + + subroutine MPI_Dist_graph_create( & + & comm_old, & + & n, & + & sources, & + & degrees, & + & destinations, & + & weights, & + & info, & + & reorder, & + & comm_dist_graph, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm_old + integer, intent(in) :: n + integer, intent(in) :: sources(n) + integer, intent(in) :: degrees(n) + integer, intent(in) :: destinations(*) + integer, intent(in) :: weights(*) + integer, intent(in) :: info + logical, intent(in) :: reorder + integer, intent(out) :: comm_dist_graph + integer, intent(out) :: ierror + end subroutine MPI_Dist_graph_create + + subroutine MPI_Dist_graph_create_adjacent( & + & comm_old, & + & indegree, & + & sources, & + & sourceweights, & + & outdegree, & + & destinations, & + & destweights, & + & info, & + & reorder, & + & comm_dist_graph, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm_old + integer, intent(in) :: indegree + integer, intent(in) :: sources(indegree) + integer, intent(in) :: sourceweights(*) + integer, intent(in) :: outdegree + integer, intent(in) :: destinations(outdegree) + integer, intent(in) :: destweights(*) + integer, intent(in) :: info + integer, intent(in) :: reorder + integer, intent(out) :: comm_dist_graph + integer, intent(out) :: ierror + end subroutine MPI_Dist_graph_create_adjacent + + subroutine MPI_Dist_graph_neighbors( & + & comm, & + & maxindegree, & + & sources, & + & sourceweights, & + & maxoutdegree, & + & destinations, & + & destweights, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(in) :: maxindegree + integer, intent(out) :: sources(maxindegree) + integer, intent(out) :: sourceweights(*) + integer, intent(in) :: maxoutdegree + integer, intent(out) :: destinations(maxoutdegree) + integer, intent(out) :: destweights(*) + integer, intent(out) :: ierror + end subroutine MPI_Dist_graph_neighbors + + subroutine MPI_Dist_graph_neighbors_count( & + & comm, & + & indegree, & + & outdegree, & + & weighted, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(out) :: indegree + integer, intent(out) :: outdegree + integer, intent(out) :: weighted + integer, intent(out) :: ierror + end subroutine MPI_Dist_graph_neighbors_count + + subroutine MPI_Graph_create( & + & comm_old, & + & nnodes, & + & index, & + & edges, & + & reorder, & + & comm_graph, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm_old + integer, intent(in) :: nnodes + integer, intent(in) :: index(nnodes) + integer, intent(in) :: edges(nnodes) + integer, intent(in) :: reorder + integer, intent(out) :: comm_graph + integer, intent(out) :: ierror + end subroutine MPI_Graph_create + + subroutine MPI_Graph_get( & + & comm, & + & maxindex, & + & maxedges, & + & index, & + & edges, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(in) :: maxindex + integer, intent(in) :: maxedges + integer, intent(out) :: index(maxindex) + integer, intent(out) :: edges(maxedges) + integer, intent(out) :: ierror + end subroutine MPI_Graph_get + + subroutine MPI_Graph_map( & + & comm, & + & nnodes, & + & index, & + & edges, & + & newrank, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(in) :: nnodes + integer, intent(in) :: index(nnodes) + integer, intent(in) :: edges(nnodes) + integer, intent(out) :: newrank + integer, intent(out) :: ierror + end subroutine MPI_Graph_map + + subroutine MPI_Graph_neighbors( & + & comm, & + & rank, & + & maxneighbors, & + & neighbors, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(in) :: rank + integer, intent(in) :: maxneighbors + integer, intent(out) :: neighbors(maxneighbors) + integer, intent(out) :: ierror + end subroutine MPI_Graph_neighbors + + subroutine MPI_Graph_neighbors_count( & + & comm, & + & rank, & + & nneighbors, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(in) :: rank + integer, intent(out) :: nneighbors + integer, intent(out) :: ierror + end subroutine MPI_Graph_neighbors_count + + subroutine MPI_Graphdims_get( & + & comm, & + & nnodes, & + & nedges, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(out) :: nnodes + integer, intent(out) :: nedges + integer, intent(out) :: ierror + end subroutine MPI_Graphdims_get + + subroutine MPI_Ineighbor_allgather( & + & sendbuf, & + & sendcount, & + & sendtype, & + & recvbuf, & + & recvcount, & + & recvtype, & + & comm, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Ineighbor_allgather + + subroutine MPI_Ineighbor_allgatherv( & + & sendbuf, & + & sendcount, & + & sendtype, & + & recvbuf, & + & recvcounts, & + & displs, & + & recvtype, & + & comm, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: displs(*) + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Ineighbor_allgatherv + + subroutine MPI_Ineighbor_alltoall( & + & sendbuf, & + & sendcount, & + & sendtype, & + & recvbuf, & + & recvcount, & + & recvtype, & + & comm, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Ineighbor_alltoall + + subroutine MPI_Ineighbor_alltoallv( & + & sendbuf, & + & sendcounts, & + & sdispls, & + & sendtype, & + & recvbuf, & + & recvcounts, & + & rdispls, & + & recvtype, & + & comm, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + integer, intent(in) :: sendtype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: rdispls(*) + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Ineighbor_alltoallv + + subroutine MPI_Ineighbor_alltoallw( & + & sendbuf, & + & sendcounts, & + & sdispls, & + & sendtypes, & + & recvbuf, & + & recvcounts, & + & rdispls, & + & recvtypes, & + & comm, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer(MPI_ADDRESS_KIND), intent(in) :: sdispls(*) + integer, intent(in) :: sendtypes(*) +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer(MPI_ADDRESS_KIND), intent(in) :: rdispls(*) + integer, intent(in) :: recvtypes(*) + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Ineighbor_alltoallw + + subroutine MPI_Neighbor_allgather( & + & sendbuf, & + & sendcount, & + & sendtype, & + & recvbuf, & + & recvcount, & + & recvtype, & + & comm, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Neighbor_allgather + + subroutine MPI_Neighbor_allgather_init( & + & sendbuf, & + & sendcount, & + & sendtype, & + & recvbuf, & + & recvcount, & + & recvtype, & + & comm, & + & info, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Neighbor_allgather_init + + subroutine MPI_Neighbor_allgatherv( & + & sendbuf, & + & sendcount, & + & sendtype, & + & recvbuf, & + & recvcounts, & + & displs, & + & recvtype, & + & comm, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer(MPI_ADDRESS_KIND), intent(in) :: displs(*) + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Neighbor_allgatherv + + subroutine MPI_Neighbor_allgatherv_init( & + & sendbuf, & + & sendcount, & + & sendtype, & + & recvbuf, & + & recvcounts, & + & displs, & + & recvtype, & + & comm, & + & info, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer(MPI_ADDRESS_KIND), intent(in) :: displs(*) + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Neighbor_allgatherv_init + + subroutine MPI_Neighbor_alltoall( & + & sendbuf, & + & sendcount, & + & sendtype, & + & recvbuf, & + & recvcount, & + & recvtype, & + & comm, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Neighbor_alltoall + + subroutine MPI_Neighbor_alltoall_init( & + & sendbuf, & + & sendcount, & + & sendtype, & + & recvbuf, & + & recvcount, & + & recvtype, & + & comm, & + & info, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Neighbor_alltoall_init + + subroutine MPI_Neighbor_alltoallv( & + & sendbuf, & + & sendcounts, & + & sdispls, & + & sendtype, & + & recvbuf, & + & recvcounts, & + & rdispls, & + & recvtype, & + & comm, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + integer, intent(in) :: sendtype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: rdispls(*) + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Neighbor_alltoallv + + subroutine MPI_Neighbor_alltoallv_init( & + & sendbuf, & + & sendcounts, & + & sdispls, & + & sendtype, & + & recvbuf, & + & recvcounts, & + & rdispls, & + & recvtype, & + & comm, & + & info, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + integer, intent(in) :: sendtype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: rdispls(*) + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Neighbor_alltoallv_init + + subroutine MPI_Neighbor_alltoallw( & + & sendbuf, & + & sendcounts, & + & sdispls, & + & sendtypes, & + & recvbuf, & + & recvcounts, & + & rdispls, & + & recvtypes, & + & comm, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer(MPI_ADDRESS_KIND), intent(in) :: sdispls(*) + integer, intent(in) :: sendtypes(*) +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer(MPI_ADDRESS_KIND), intent(in) :: rdispls(*) + integer, intent(in) :: recvtypes(*) + integer, intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Neighbor_alltoallw + + subroutine MPI_Neighbor_alltoallw_init( & + & sendbuf, & + & sendcounts, & + & sdispls, & + & sendtypes, & + & recvbuf, & + & recvcounts, & + & rdispls, & + & recvtypes, & + & comm, & + & info, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer(MPI_ADDRESS_KIND), intent(in) :: sdispls(*) + integer, intent(in) :: sendtypes(*) +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer(MPI_ADDRESS_KIND), intent(in) :: rdispls(*) + integer, intent(in) :: recvtypes(*) + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Neighbor_alltoallw_init + + subroutine MPI_Topo_test( & + & comm, & + & status, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(out) :: status + integer, intent(out) :: ierror + end subroutine MPI_Topo_test + + subroutine MPI_Add_error_class( & + & errorclass, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(out) :: errorclass + integer, intent(out) :: ierror + end subroutine MPI_Add_error_class + + subroutine MPI_Add_error_code( & + & errorclass, & + & errorcode, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: errorclass + integer, intent(out) :: errorcode + integer, intent(out) :: ierror + end subroutine MPI_Add_error_code + + subroutine MPI_Add_error_string( & + & errorcode, & + & string, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: errorcode + character(*), intent(in) :: string + integer, intent(out) :: ierror + end subroutine MPI_Add_error_string + + subroutine MPI_Alloc_mem( & + & size, & + & info, & + & baseptr, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer(MPI_ADDRESS_KIND), intent(in) :: size + integer, intent(in) :: info +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) baseptr +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: baseptr + integer :: baseptr(*) + integer, intent(out) :: ierror + end subroutine MPI_Alloc_mem + + subroutine MPI_Comm_call_errhandler( & + & comm, & + & errorcode, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(in) :: errorcode + integer, intent(out) :: ierror + end subroutine MPI_Comm_call_errhandler + + subroutine MPI_Comm_create_errhandler( & + & comm_errhandler_fn, & + & errhandler, & + & ierror & + &) + implicit none + include "mpif_constants.h" + external :: comm_errhandler_fn + integer, intent(out) :: errhandler + integer, intent(out) :: ierror + end subroutine MPI_Comm_create_errhandler + + subroutine MPI_Comm_get_errhandler( & + & comm, & + & errhandler, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(out) :: errhandler + integer, intent(out) :: ierror + end subroutine MPI_Comm_get_errhandler + + subroutine MPI_Comm_set_errhandler( & + & comm, & + & errhandler, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(in) :: errhandler + integer, intent(out) :: ierror + end subroutine MPI_Comm_set_errhandler + + subroutine MPI_Errhandler_free( & + & errhandler, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(out) :: errhandler + integer, intent(out) :: ierror + end subroutine MPI_Errhandler_free + + subroutine MPI_Error_class( & + & errorcode, & + & errorclass, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: errorcode + integer, intent(out) :: errorclass + integer, intent(out) :: ierror + end subroutine MPI_Error_class + + subroutine MPI_Error_string( & + & errorcode, & + & string, & + & resultlen, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: errorcode + character(*), intent(out) :: string + integer, intent(out) :: resultlen + integer, intent(out) :: ierror + end subroutine MPI_Error_string + + subroutine MPI_File_call_errhandler( & + & fh, & + & errorcode, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh + integer, intent(in) :: errorcode + integer, intent(out) :: ierror + end subroutine MPI_File_call_errhandler + + subroutine MPI_File_create_errhandler( & + & file_errhandler_fn, & + & errhandler, & + & ierror & + &) + implicit none + include "mpif_constants.h" + external :: file_errhandler_fn + integer, intent(out) :: errhandler + integer, intent(out) :: ierror + end subroutine MPI_File_create_errhandler + + subroutine MPI_File_get_errhandler( & + & file, & + & errhandler, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: file + integer, intent(out) :: errhandler + integer, intent(out) :: ierror + end subroutine MPI_File_get_errhandler + + subroutine MPI_File_set_errhandler( & + & file, & + & errhandler, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: file + integer, intent(in) :: errhandler + integer, intent(out) :: ierror + end subroutine MPI_File_set_errhandler + + subroutine MPI_Free_mem( & + & base, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) base +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: base + integer :: base(*) + integer, intent(out) :: ierror + end subroutine MPI_Free_mem + + subroutine MPI_Get_hw_resource_info( & + & hw_info, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(out) :: hw_info + integer, intent(out) :: ierror + end subroutine MPI_Get_hw_resource_info + + subroutine MPI_Get_library_version( & + & version, & + & resultlen, & + & ierror & + &) + implicit none + include "mpif_constants.h" + character(*), intent(out) :: version + integer, intent(out) :: resultlen + integer, intent(out) :: ierror + end subroutine MPI_Get_library_version + + subroutine MPI_Get_processor_name( & + & name, & + & resultlen, & + & ierror & + &) + implicit none + include "mpif_constants.h" + character(*), intent(out) :: name + integer, intent(out) :: resultlen + integer, intent(out) :: ierror + end subroutine MPI_Get_processor_name + + subroutine MPI_Get_version( & + & version, & + & subversion, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(out) :: version + integer, intent(out) :: subversion + integer, intent(out) :: ierror + end subroutine MPI_Get_version + + subroutine MPI_Remove_error_class( & + & errorclass, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: errorclass + integer, intent(out) :: ierror + end subroutine MPI_Remove_error_class + + subroutine MPI_Remove_error_code( & + & errorcode, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: errorcode + integer, intent(out) :: ierror + end subroutine MPI_Remove_error_code + + subroutine MPI_Remove_error_string( & + & errorcode, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: errorcode + integer, intent(out) :: ierror + end subroutine MPI_Remove_error_string + + subroutine MPI_Session_call_errhandler( & + & session, & + & errorcode, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: session + integer, intent(in) :: errorcode + integer, intent(out) :: ierror + end subroutine MPI_Session_call_errhandler + + subroutine MPI_Session_create_errhandler( & + & session_errhandler_fn, & + & errhandler, & + & ierror & + &) + implicit none + include "mpif_constants.h" + external :: session_errhandler_fn + integer, intent(out) :: errhandler + integer, intent(out) :: ierror + end subroutine MPI_Session_create_errhandler + + subroutine MPI_Session_get_errhandler( & + & session, & + & errhandler, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: session + integer, intent(out) :: errhandler + integer, intent(out) :: ierror + end subroutine MPI_Session_get_errhandler + + subroutine MPI_Session_set_errhandler( & + & session, & + & errhandler, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: session + integer, intent(in) :: errhandler + integer, intent(out) :: ierror + end subroutine MPI_Session_set_errhandler + + subroutine MPI_Win_call_errhandler( & + & win, & + & errorcode, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: win + integer, intent(in) :: errorcode + integer, intent(out) :: ierror + end subroutine MPI_Win_call_errhandler + + subroutine MPI_Win_create_errhandler( & + & win_errhandler_fn, & + & errhandler, & + & ierror & + &) + implicit none + include "mpif_constants.h" + external :: win_errhandler_fn + integer, intent(out) :: errhandler + integer, intent(out) :: ierror + end subroutine MPI_Win_create_errhandler + + subroutine MPI_Win_get_errhandler( & + & win, & + & errhandler, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: win + integer, intent(out) :: errhandler + integer, intent(out) :: ierror + end subroutine MPI_Win_get_errhandler + + subroutine MPI_Win_set_errhandler( & + & win, & + & errhandler, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: win + integer, intent(in) :: errhandler + integer, intent(out) :: ierror + end subroutine MPI_Win_set_errhandler + + function MPI_Wtick( & + &) result(result) + implicit none + include "mpif_constants.h" + double precision :: result + end function MPI_Wtick + + function MPI_Wtime( & + &) result(result) + implicit none + include "mpif_constants.h" + double precision :: result + end function MPI_Wtime + + subroutine MPI_Info_create( & + & info, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(out) :: info + integer, intent(out) :: ierror + end subroutine MPI_Info_create + + subroutine MPI_Info_create_env( & + & info, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(out) :: info + integer, intent(out) :: ierror + end subroutine MPI_Info_create_env + + subroutine MPI_Info_delete( & + & info, & + & key, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: info + character(*), intent(in) :: key + integer, intent(out) :: ierror + end subroutine MPI_Info_delete + + subroutine MPI_Info_dup( & + & info, & + & newinfo, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: info + integer, intent(out) :: newinfo + integer, intent(out) :: ierror + end subroutine MPI_Info_dup + + subroutine MPI_Info_free( & + & info, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(out) :: info + integer, intent(out) :: ierror + end subroutine MPI_Info_free + + subroutine MPI_Info_get_nkeys( & + & info, & + & nkeys, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: info + integer, intent(out) :: nkeys + integer, intent(out) :: ierror + end subroutine MPI_Info_get_nkeys + + subroutine MPI_Info_get_nthkey( & + & info, & + & n, & + & key, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: info + integer, intent(in) :: n + character(*), intent(out) :: key + integer, intent(out) :: ierror + end subroutine MPI_Info_get_nthkey + + subroutine MPI_Info_get_string( & + & info, & + & key, & + & buflen, & + & value, & + & flag, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: info + character(*), intent(in) :: key + integer, intent(out) :: buflen + character(*), intent(out) :: value + logical, intent(out) :: flag + integer, intent(out) :: ierror + end subroutine MPI_Info_get_string + + subroutine MPI_Info_set( & + & info, & + & key, & + & value, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: info + character(*), intent(in) :: key + character(*), intent(in) :: value + integer, intent(out) :: ierror + end subroutine MPI_Info_set + + subroutine MPI_Abort( & + & comm, & + & errorcode, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(in) :: errorcode + integer, intent(out) :: ierror + end subroutine MPI_Abort + + subroutine MPI_Close_port( & + & port_name, & + & ierror & + &) + implicit none + include "mpif_constants.h" + character(*), intent(in) :: port_name + integer, intent(out) :: ierror + end subroutine MPI_Close_port + + subroutine MPI_Comm_accept( & + & port_name, & + & info, & + & root, & + & comm, & + & newcomm, & + & ierror & + &) + implicit none + include "mpif_constants.h" + character(*), intent(in) :: port_name + integer, intent(in) :: info + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(out) :: newcomm + integer, intent(out) :: ierror + end subroutine MPI_Comm_accept + + subroutine MPI_Comm_connect( & + & port_name, & + & info, & + & root, & + & comm, & + & newcomm, & + & ierror & + &) + implicit none + include "mpif_constants.h" + character(*), intent(in) :: port_name + integer, intent(in) :: info + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(out) :: newcomm + integer, intent(out) :: ierror + end subroutine MPI_Comm_connect + + subroutine MPI_Comm_disconnect( & + & comm, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(out) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Comm_disconnect + + subroutine MPI_Comm_get_parent( & + & parent, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(out) :: parent + integer, intent(out) :: ierror + end subroutine MPI_Comm_get_parent + + subroutine MPI_Comm_join( & + & fd, & + & intercomm, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fd + integer, intent(out) :: intercomm + integer, intent(out) :: ierror + end subroutine MPI_Comm_join + + subroutine MPI_Comm_spawn( & + & command, & + & argv, & + & maxprocs, & + & info, & + & root, & + & comm, & + & intercomm, & + & array_of_errcodes, & + & ierror & + &) + implicit none + include "mpif_constants.h" + character(*), intent(in) :: command + character(*), intent(in) :: argv(*) + integer, intent(in) :: maxprocs + integer, intent(in) :: info + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(out) :: intercomm + integer, intent(out) :: array_of_errcodes(maxprocs) + integer, intent(out) :: ierror + end subroutine MPI_Comm_spawn + + subroutine MPI_Comm_spawn_multiple( & + & count, & + & array_of_commands, & + & array_of_argv, & + & array_of_maxprocs, & + & array_of_info, & + & root, & + & comm, & + & intercomm, & + & array_of_errcodes, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: count + character(*), intent(in) :: array_of_commands(count) + character(*), intent(in) :: array_of_argv(count, *) + integer, intent(in) :: array_of_maxprocs(count) + integer, intent(in) :: array_of_info(count) + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(out) :: intercomm + integer, intent(out) :: array_of_errcodes(*) + integer, intent(out) :: ierror + end subroutine MPI_Comm_spawn_multiple + + subroutine MPI_Finalize( & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(out) :: ierror + end subroutine MPI_Finalize + + subroutine MPI_Finalized( & + & flag, & + & ierror & + &) + implicit none + include "mpif_constants.h" + logical, intent(out) :: flag + integer, intent(out) :: ierror + end subroutine MPI_Finalized + + subroutine MPI_Init( & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(out) :: ierror + end subroutine MPI_Init + + subroutine MPI_Init_thread( & + & required, & + & provided, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: required + integer, intent(out) :: provided + integer, intent(out) :: ierror + end subroutine MPI_Init_thread + + subroutine MPI_Initialized( & + & flag, & + & ierror & + &) + implicit none + include "mpif_constants.h" + logical, intent(out) :: flag + integer, intent(out) :: ierror + end subroutine MPI_Initialized + + subroutine MPI_Is_thread_main( & + & flag, & + & ierror & + &) + implicit none + include "mpif_constants.h" + logical, intent(out) :: flag + integer, intent(out) :: ierror + end subroutine MPI_Is_thread_main + + subroutine MPI_Lookup_name( & + & service_name, & + & info, & + & port_name, & + & ierror & + &) + implicit none + include "mpif_constants.h" + character(*), intent(in) :: service_name + integer, intent(in) :: info + character(*), intent(out) :: port_name + integer, intent(out) :: ierror + end subroutine MPI_Lookup_name + + subroutine MPI_Open_port( & + & info, & + & port_name, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: info + character(*), intent(out) :: port_name + integer, intent(out) :: ierror + end subroutine MPI_Open_port + + subroutine MPI_Publish_name( & + & service_name, & + & info, & + & port_name, & + & ierror & + &) + implicit none + include "mpif_constants.h" + character(*), intent(in) :: service_name + integer, intent(in) :: info + character(*), intent(in) :: port_name + integer, intent(out) :: ierror + end subroutine MPI_Publish_name + + subroutine MPI_Query_thread( & + & provided, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(out) :: provided + integer, intent(out) :: ierror + end subroutine MPI_Query_thread + + subroutine MPI_Session_finalize( & + & session, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(out) :: session + integer, intent(out) :: ierror + end subroutine MPI_Session_finalize + + subroutine MPI_Session_get_info( & + & session, & + & info_used, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: session + integer, intent(out) :: info_used + integer, intent(out) :: ierror + end subroutine MPI_Session_get_info + + subroutine MPI_Session_get_nth_pset( & + & session, & + & info, & + & n, & + & pset_len, & + & pset_name, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: session + integer, intent(in) :: info + integer, intent(in) :: n + integer, intent(out) :: pset_len + character(*), intent(out) :: pset_name + integer, intent(out) :: ierror + end subroutine MPI_Session_get_nth_pset + + subroutine MPI_Session_get_num_psets( & + & session, & + & info, & + & npset_names, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: session + integer, intent(in) :: info + integer, intent(out) :: npset_names + integer, intent(out) :: ierror + end subroutine MPI_Session_get_num_psets + + subroutine MPI_Session_get_pset_info( & + & session, & + & pset_name, & + & info, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: session + character(*), intent(in) :: pset_name + integer, intent(out) :: info + integer, intent(out) :: ierror + end subroutine MPI_Session_get_pset_info + + subroutine MPI_Session_init( & + & info, & + & errhandler, & + & session, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: info + integer, intent(in) :: errhandler + integer, intent(out) :: session + integer, intent(out) :: ierror + end subroutine MPI_Session_init + + subroutine MPI_Unpublish_name( & + & service_name, & + & info, & + & port_name, & + & ierror & + &) + implicit none + include "mpif_constants.h" + character(*), intent(in) :: service_name + integer, intent(in) :: info + character(*), intent(in) :: port_name + integer, intent(out) :: ierror + end subroutine MPI_Unpublish_name + + subroutine MPI_Accumulate( & + & origin_addr, & + & origin_count, & + & origin_datatype, & + & target_rank, & + & target_disp, & + & target_count, & + & target_datatype, & + & op, & + & win, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) origin_addr +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: origin_addr + integer, intent(in) :: origin_addr(*) + integer, intent(in) :: origin_count + integer, intent(in) :: origin_datatype + integer, intent(in) :: target_rank + integer(MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + integer, intent(in) :: target_datatype + integer, intent(in) :: op + integer, intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Accumulate + + subroutine MPI_Compare_and_swap( & + & origin_addr, & + & compare_addr, & + & result_addr, & + & datatype, & + & target_rank, & + & target_disp, & + & win, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) origin_addr +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: origin_addr + integer, intent(in) :: origin_addr(*) +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) compare_addr +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: compare_addr + integer, intent(in) :: compare_addr(*) +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) result_addr +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: result_addr + integer :: result_addr(*) + integer, intent(in) :: datatype + integer, intent(in) :: target_rank + integer(MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Compare_and_swap + + subroutine MPI_Fetch_and_op( & + & origin_addr, & + & result_addr, & + & datatype, & + & target_rank, & + & target_disp, & + & op, & + & win, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) origin_addr +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: origin_addr + integer, intent(in) :: origin_addr(*) +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) result_addr +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: result_addr + integer :: result_addr(*) + integer, intent(in) :: datatype + integer, intent(in) :: target_rank + integer(MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: op + integer, intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Fetch_and_op + + subroutine MPI_Get( & + & origin_addr, & + & origin_count, & + & origin_datatype, & + & target_rank, & + & target_disp, & + & target_count, & + & target_datatype, & + & win, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) origin_addr +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: origin_addr + integer :: origin_addr(*) + integer, intent(in) :: origin_count + integer, intent(in) :: origin_datatype + integer, intent(in) :: target_rank + integer(MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + integer, intent(in) :: target_datatype + integer, intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Get + + subroutine 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, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) origin_addr +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: origin_addr + integer, intent(in) :: origin_addr(*) + integer, intent(in) :: origin_count + integer, intent(in) :: origin_datatype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) result_addr +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: result_addr + integer :: result_addr(*) + integer, intent(in) :: result_count + integer, intent(in) :: result_datatype + integer, intent(in) :: target_rank + integer(MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + integer, intent(in) :: target_datatype + integer, intent(in) :: op + integer, intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Get_accumulate + + subroutine MPI_Put( & + & origin_addr, & + & origin_count, & + & origin_datatype, & + & target_rank, & + & target_disp, & + & target_count, & + & target_datatype, & + & win, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) origin_addr +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: origin_addr + integer, intent(in) :: origin_addr(*) + integer, intent(in) :: origin_count + integer, intent(in) :: origin_datatype + integer, intent(in) :: target_rank + integer(MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + integer, intent(in) :: target_datatype + integer, intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Put + + subroutine MPI_Raccumulate( & + & origin_addr, & + & origin_count, & + & origin_datatype, & + & target_rank, & + & target_disp, & + & target_count, & + & target_datatype, & + & op, & + & win, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) origin_addr +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: origin_addr + integer, intent(in) :: origin_addr(*) + integer, intent(in) :: origin_count + integer, intent(in) :: origin_datatype + integer, intent(in) :: target_rank + integer(MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + integer, intent(in) :: target_datatype + integer, intent(in) :: op + integer, intent(in) :: win + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Raccumulate + + subroutine MPI_Rget( & + & origin_addr, & + & origin_count, & + & origin_datatype, & + & target_rank, & + & target_disp, & + & target_count, & + & target_datatype, & + & win, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) origin_addr +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: origin_addr + integer :: origin_addr(*) + integer, intent(in) :: origin_count + integer, intent(in) :: origin_datatype + integer, intent(in) :: target_rank + integer(MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + integer, intent(in) :: target_datatype + integer, intent(in) :: win + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Rget + + subroutine 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, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) origin_addr +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: origin_addr + integer, intent(in) :: origin_addr(*) + integer, intent(in) :: origin_count + integer, intent(in) :: origin_datatype +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) result_addr +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: result_addr + integer :: result_addr(*) + integer, intent(in) :: result_count + integer, intent(in) :: result_datatype + integer, intent(in) :: target_rank + integer(MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + integer, intent(in) :: target_datatype + integer, intent(in) :: op + integer, intent(in) :: win + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Rget_accumulate + + subroutine MPI_Rput( & + & origin_addr, & + & origin_count, & + & origin_datatype, & + & target_rank, & + & target_disp, & + & target_count, & + & target_datatype, & + & win, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) origin_addr +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: origin_addr + integer, intent(in) :: origin_addr(*) + integer, intent(in) :: origin_count + integer, intent(in) :: origin_datatype + integer, intent(in) :: target_rank + integer(MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + integer, intent(in) :: target_datatype + integer, intent(in) :: win + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Rput + + subroutine MPI_Win_allocate( & + & size, & + & disp_unit, & + & info, & + & comm, & + & baseptr, & + & win, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer(MPI_ADDRESS_KIND), intent(in) :: size + integer, intent(in) :: disp_unit + integer, intent(in) :: info + integer, intent(in) :: comm +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) baseptr +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: baseptr + integer :: baseptr(*) + integer, intent(out) :: win + integer, intent(out) :: ierror + end subroutine MPI_Win_allocate + + subroutine MPI_Win_allocate_shared( & + & size, & + & disp_unit, & + & info, & + & comm, & + & baseptr, & + & win, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer(MPI_ADDRESS_KIND), intent(in) :: size + integer, intent(in) :: disp_unit + integer, intent(in) :: info + integer, intent(in) :: comm +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) baseptr +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: baseptr + integer :: baseptr(*) + integer, intent(out) :: win + integer, intent(out) :: ierror + end subroutine MPI_Win_allocate_shared + + subroutine MPI_Win_attach( & + & win, & + & base, & + & size, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: win +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) base +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: base + integer :: base(*) + integer(MPI_ADDRESS_KIND), intent(in) :: size + integer, intent(out) :: ierror + end subroutine MPI_Win_attach + + subroutine MPI_Win_complete( & + & win, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Win_complete + + subroutine MPI_Win_create( & + & base, & + & size, & + & disp_unit, & + & info, & + & comm, & + & win, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) base +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: base + integer :: base(*) + integer(MPI_ADDRESS_KIND), intent(in) :: size + integer, intent(in) :: disp_unit + integer, intent(in) :: info + integer, intent(in) :: comm + integer, intent(out) :: win + integer, intent(out) :: ierror + end subroutine MPI_Win_create + + subroutine MPI_Win_create_dynamic( & + & info, & + & comm, & + & win, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: info + integer, intent(in) :: comm + integer, intent(out) :: win + integer, intent(out) :: ierror + end subroutine MPI_Win_create_dynamic + + subroutine MPI_Win_detach( & + & win, & + & base, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: win +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) base +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: base + integer, intent(in) :: base(*) + integer, intent(out) :: ierror + end subroutine MPI_Win_detach + + subroutine MPI_Win_fence( & + & assert, & + & win, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: assert + integer, intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Win_fence + + subroutine MPI_Win_flush( & + & rank, & + & win, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: rank + integer, intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Win_flush + + subroutine MPI_Win_flush_all( & + & win, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Win_flush_all + + subroutine MPI_Win_flush_local( & + & rank, & + & win, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: rank + integer, intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Win_flush_local + + subroutine MPI_Win_flush_local_all( & + & win, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Win_flush_local_all + + subroutine MPI_Win_free( & + & win, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(out) :: win + integer, intent(out) :: ierror + end subroutine MPI_Win_free + + subroutine MPI_Win_get_group( & + & win, & + & group, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: win + integer, intent(out) :: group + integer, intent(out) :: ierror + end subroutine MPI_Win_get_group + + subroutine MPI_Win_get_info( & + & win, & + & info_used, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: win + integer, intent(out) :: info_used + integer, intent(out) :: ierror + end subroutine MPI_Win_get_info + + subroutine MPI_Win_lock( & + & lock_type, & + & rank, & + & assert, & + & win, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: lock_type + integer, intent(in) :: rank + integer, intent(in) :: assert + integer, intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Win_lock + + subroutine MPI_Win_lock_all( & + & assert, & + & win, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: assert + integer, intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Win_lock_all + + subroutine MPI_Win_post( & + & group, & + & assert, & + & win, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: group + integer, intent(in) :: assert + integer, intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Win_post + + subroutine MPI_Win_set_info( & + & win, & + & info, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: win + integer, intent(in) :: info + integer, intent(out) :: ierror + end subroutine MPI_Win_set_info + + subroutine MPI_Win_shared_query( & + & win, & + & rank, & + & size, & + & disp_unit, & + & baseptr, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: win + integer, intent(in) :: rank + integer(MPI_ADDRESS_KIND), intent(out) :: size + integer, intent(out) :: disp_unit +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) baseptr +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: baseptr + integer :: baseptr(*) + integer, intent(out) :: ierror + end subroutine MPI_Win_shared_query + + subroutine MPI_Win_start( & + & group, & + & assert, & + & win, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: group + integer, intent(in) :: assert + integer, intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Win_start + + subroutine MPI_Win_sync( & + & win, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Win_sync + + subroutine MPI_Win_test( & + & win, & + & flag, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: win + logical, intent(out) :: flag + integer, intent(out) :: ierror + end subroutine MPI_Win_test + + subroutine MPI_Win_unlock( & + & rank, & + & win, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: rank + integer, intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Win_unlock + + subroutine MPI_Win_unlock_all( & + & win, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Win_unlock_all + + subroutine MPI_Win_wait( & + & win, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Win_wait + + subroutine MPI_Grequest_complete( & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: request + integer, intent(out) :: ierror + end subroutine MPI_Grequest_complete + + subroutine MPI_Grequest_start( & + & query_fn, & + & free_fn, & + & cancel_fn, & + & extra_state, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" + external :: query_fn + external :: free_fn + external :: cancel_fn +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) extra_state +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: extra_state + integer :: extra_state(*) + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Grequest_start + + subroutine MPI_Status_set_cancelled( & + & status, & + & flag, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(out) :: status(MPI_STATUS_SIZE) + logical, intent(in) :: flag + integer, intent(out) :: ierror + end subroutine MPI_Status_set_cancelled + + subroutine MPI_Status_set_elements( & + & status, & + & datatype, & + & count, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(out) :: status(MPI_STATUS_SIZE) + integer, intent(in) :: datatype + integer, intent(in) :: count + integer, intent(out) :: ierror + end subroutine MPI_Status_set_elements + + subroutine MPI_Status_set_error( & + & status, & + & err, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(out) :: status(MPI_STATUS_SIZE) + integer, intent(in) :: err + integer, intent(out) :: ierror + end subroutine MPI_Status_set_error + + subroutine MPI_Status_set_source( & + & status, & + & source, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(out) :: status(MPI_STATUS_SIZE) + integer, intent(in) :: source + integer, intent(out) :: ierror + end subroutine MPI_Status_set_source + + subroutine MPI_Status_set_tag( & + & status, & + & tag, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(out) :: status(MPI_STATUS_SIZE) + integer, intent(in) :: tag + integer, intent(out) :: ierror + end subroutine MPI_Status_set_tag + + subroutine MPI_File_close( & + & fh, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(out) :: fh + integer, intent(out) :: ierror + end subroutine MPI_File_close + + subroutine MPI_File_delete( & + & filename, & + & info, & + & ierror & + &) + implicit none + include "mpif_constants.h" + character(*), intent(in) :: filename + integer, intent(in) :: info + integer, intent(out) :: ierror + end subroutine MPI_File_delete + + subroutine MPI_File_get_amode( & + & fh, & + & amode, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh + integer, intent(out) :: amode + integer, intent(out) :: ierror + end subroutine MPI_File_get_amode + + subroutine MPI_File_get_atomicity( & + & fh, & + & flag, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh + logical, intent(out) :: flag + integer, intent(out) :: ierror + end subroutine MPI_File_get_atomicity + + subroutine MPI_File_get_byte_offset( & + & fh, & + & offset, & + & disp, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset + integer(MPI_OFFSET_KIND), intent(out) :: disp + integer, intent(out) :: ierror + end subroutine MPI_File_get_byte_offset + + subroutine MPI_File_get_group( & + & fh, & + & group, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh + integer, intent(out) :: group + integer, intent(out) :: ierror + end subroutine MPI_File_get_group + + subroutine MPI_File_get_info( & + & fh, & + & info_used, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh + integer, intent(out) :: info_used + integer, intent(out) :: ierror + end subroutine MPI_File_get_info + + subroutine MPI_File_get_position( & + & fh, & + & offset, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(out) :: offset + integer, intent(out) :: ierror + end subroutine MPI_File_get_position + + subroutine MPI_File_get_position_shared( & + & fh, & + & offset, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(out) :: offset + integer, intent(out) :: ierror + end subroutine MPI_File_get_position_shared + + subroutine MPI_File_get_size( & + & fh, & + & size, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(out) :: size + integer, intent(out) :: ierror + end subroutine MPI_File_get_size + + subroutine MPI_File_get_type_extent( & + & fh, & + & datatype, & + & extent, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh + integer, intent(in) :: datatype + integer(MPI_ADDRESS_KIND), intent(out) :: extent + integer, intent(out) :: ierror + end subroutine MPI_File_get_type_extent + + subroutine MPI_File_get_view( & + & fh, & + & disp, & + & etype, & + & filetype, & + & datarep, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(out) :: disp + integer, intent(out) :: etype + integer, intent(out) :: filetype + character(*), intent(out) :: datarep + integer, intent(out) :: ierror + end subroutine MPI_File_get_view + + subroutine MPI_File_iread( & + & fh, & + & buf, & + & count, & + & datatype, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_File_iread + + subroutine MPI_File_iread_all( & + & fh, & + & buf, & + & count, & + & datatype, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_File_iread_all + + subroutine MPI_File_iread_at( & + & fh, & + & offset, & + & buf, & + & count, & + & datatype, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_File_iread_at + + subroutine MPI_File_iread_at_all( & + & fh, & + & offset, & + & buf, & + & count, & + & datatype, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_File_iread_at_all + + subroutine MPI_File_iread_shared( & + & fh, & + & buf, & + & count, & + & datatype, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_File_iread_shared + + subroutine MPI_File_iwrite( & + & fh, & + & buf, & + & count, & + & datatype, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_File_iwrite + + subroutine MPI_File_iwrite_all( & + & fh, & + & buf, & + & count, & + & datatype, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_File_iwrite_all + + subroutine MPI_File_iwrite_at( & + & fh, & + & offset, & + & buf, & + & count, & + & datatype, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_File_iwrite_at + + subroutine MPI_File_iwrite_at_all( & + & fh, & + & offset, & + & buf, & + & count, & + & datatype, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_File_iwrite_at_all + + subroutine MPI_File_iwrite_shared( & + & fh, & + & buf, & + & count, & + & datatype, & + & request, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_File_iwrite_shared + + subroutine MPI_File_open( & + & comm, & + & filename, & + & amode, & + & info, & + & fh, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + character(*), intent(in) :: filename + integer, intent(in) :: amode + integer, intent(in) :: info + integer, intent(out) :: fh + integer, intent(out) :: ierror + end subroutine MPI_File_open + + subroutine MPI_File_preallocate( & + & fh, & + & size, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: size + integer, intent(out) :: ierror + end subroutine MPI_File_preallocate + + subroutine MPI_File_read( & + & fh, & + & buf, & + & count, & + & datatype, & + & status, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: status(MPI_STATUS_SIZE) + integer, intent(out) :: ierror + end subroutine MPI_File_read + + subroutine MPI_File_read_all( & + & fh, & + & buf, & + & count, & + & datatype, & + & status, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: status(MPI_STATUS_SIZE) + integer, intent(out) :: ierror + end subroutine MPI_File_read_all + + subroutine MPI_File_read_all_begin( & + & fh, & + & buf, & + & count, & + & datatype, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: ierror + end subroutine MPI_File_read_all_begin + + subroutine MPI_File_read_all_end( & + & fh, & + & buf, & + & status, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(out) :: status(MPI_STATUS_SIZE) + integer, intent(out) :: ierror + end subroutine MPI_File_read_all_end + + subroutine MPI_File_read_at( & + & fh, & + & offset, & + & buf, & + & count, & + & datatype, & + & status, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: status(MPI_STATUS_SIZE) + integer, intent(out) :: ierror + end subroutine MPI_File_read_at + + subroutine MPI_File_read_at_all( & + & fh, & + & offset, & + & buf, & + & count, & + & datatype, & + & status, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: status(MPI_STATUS_SIZE) + integer, intent(out) :: ierror + end subroutine MPI_File_read_at_all + + subroutine MPI_File_read_at_all_begin( & + & fh, & + & offset, & + & buf, & + & count, & + & datatype, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: ierror + end subroutine MPI_File_read_at_all_begin + + subroutine MPI_File_read_at_all_end( & + & fh, & + & buf, & + & status, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(out) :: status(MPI_STATUS_SIZE) + integer, intent(out) :: ierror + end subroutine MPI_File_read_at_all_end + + subroutine MPI_File_read_ordered( & + & fh, & + & buf, & + & count, & + & datatype, & + & status, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: status(MPI_STATUS_SIZE) + integer, intent(out) :: ierror + end subroutine MPI_File_read_ordered + + subroutine MPI_File_read_ordered_begin( & + & fh, & + & buf, & + & count, & + & datatype, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: ierror + end subroutine MPI_File_read_ordered_begin + + subroutine MPI_File_read_ordered_end( & + & fh, & + & buf, & + & status, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(out) :: status(MPI_STATUS_SIZE) + integer, intent(out) :: ierror + end subroutine MPI_File_read_ordered_end + + subroutine MPI_File_read_shared( & + & fh, & + & buf, & + & count, & + & datatype, & + & status, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: status(MPI_STATUS_SIZE) + integer, intent(out) :: ierror + end subroutine MPI_File_read_shared + + subroutine MPI_File_seek( & + & fh, & + & offset, & + & whence, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset + integer, intent(in) :: whence + integer, intent(out) :: ierror + end subroutine MPI_File_seek + + subroutine MPI_File_seek_shared( & + & fh, & + & offset, & + & whence, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset + integer, intent(in) :: whence + integer, intent(out) :: ierror + end subroutine MPI_File_seek_shared + + subroutine MPI_File_set_atomicity( & + & fh, & + & flag, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh + logical, intent(in) :: flag + integer, intent(out) :: ierror + end subroutine MPI_File_set_atomicity + + subroutine MPI_File_set_info( & + & fh, & + & info, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh + integer, intent(in) :: info + integer, intent(out) :: ierror + end subroutine MPI_File_set_info + + subroutine MPI_File_set_size( & + & fh, & + & size, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: size + integer, intent(out) :: ierror + end subroutine MPI_File_set_size + + subroutine MPI_File_set_view( & + & fh, & + & disp, & + & etype, & + & filetype, & + & datarep, & + & info, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: disp + integer, intent(in) :: etype + integer, intent(in) :: filetype + character(*), intent(in) :: datarep + integer, intent(in) :: info + integer, intent(out) :: ierror + end subroutine MPI_File_set_view + + subroutine MPI_File_sync( & + & fh, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh + integer, intent(out) :: ierror + end subroutine MPI_File_sync + + subroutine MPI_File_write( & + & fh, & + & buf, & + & count, & + & datatype, & + & status, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: status(MPI_STATUS_SIZE) + integer, intent(out) :: ierror + end subroutine MPI_File_write + + subroutine MPI_File_write_all( & + & fh, & + & buf, & + & count, & + & datatype, & + & status, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: status(MPI_STATUS_SIZE) + integer, intent(out) :: ierror + end subroutine MPI_File_write_all + + subroutine MPI_File_write_all_begin( & + & fh, & + & buf, & + & count, & + & datatype, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: ierror + end subroutine MPI_File_write_all_begin + + subroutine MPI_File_write_all_end( & + & fh, & + & buf, & + & status, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(out) :: status(MPI_STATUS_SIZE) + integer, intent(out) :: ierror + end subroutine MPI_File_write_all_end + + subroutine MPI_File_write_at( & + & fh, & + & offset, & + & buf, & + & count, & + & datatype, & + & status, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: status(MPI_STATUS_SIZE) + integer, intent(out) :: ierror + end subroutine MPI_File_write_at + + subroutine MPI_File_write_at_all( & + & fh, & + & offset, & + & buf, & + & count, & + & datatype, & + & status, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: status(MPI_STATUS_SIZE) + integer, intent(out) :: ierror + end subroutine MPI_File_write_at_all + + subroutine MPI_File_write_at_all_begin( & + & fh, & + & offset, & + & buf, & + & count, & + & datatype, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: ierror + end subroutine MPI_File_write_at_all_begin + + subroutine MPI_File_write_at_all_end( & + & fh, & + & buf, & + & status, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(out) :: status(MPI_STATUS_SIZE) + integer, intent(out) :: ierror + end subroutine MPI_File_write_at_all_end + + subroutine MPI_File_write_ordered( & + & fh, & + & buf, & + & count, & + & datatype, & + & status, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: status(MPI_STATUS_SIZE) + integer, intent(out) :: ierror + end subroutine MPI_File_write_ordered + + subroutine MPI_File_write_ordered_begin( & + & fh, & + & buf, & + & count, & + & datatype, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: ierror + end subroutine MPI_File_write_ordered_begin + + subroutine MPI_File_write_ordered_end( & + & fh, & + & buf, & + & status, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(out) :: status(MPI_STATUS_SIZE) + integer, intent(out) :: ierror + end subroutine MPI_File_write_ordered_end + + subroutine MPI_File_write_shared( & + & fh, & + & buf, & + & count, & + & datatype, & + & status, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: fh +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: status(MPI_STATUS_SIZE) + integer, intent(out) :: ierror + end subroutine MPI_File_write_shared + + subroutine MPI_Register_datarep( & + & datarep, & + & read_conversion_fn, & + & write_conversion_fn, & + & dtype_file_extent_fn, & + & extra_state, & + & ierror & + &) + implicit none + include "mpif_constants.h" + character(*), intent(in) :: datarep + external :: read_conversion_fn + external :: write_conversion_fn + external :: dtype_file_extent_fn +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) extra_state +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: extra_state + integer :: extra_state(*) + integer, intent(out) :: ierror + end subroutine MPI_Register_datarep + + subroutine MPI_F_sync_reg( & + & buf & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + end subroutine MPI_F_sync_reg + + subroutine MPI_Type_create_f90_complex( & + & p, & + & r, & + & newtype, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: p + integer, intent(in) :: r + integer, intent(out) :: newtype + integer, intent(out) :: ierror + end subroutine MPI_Type_create_f90_complex + + subroutine MPI_Type_create_f90_integer( & + & r, & + & newtype, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: r + integer, intent(out) :: newtype + integer, intent(out) :: ierror + end subroutine MPI_Type_create_f90_integer + + subroutine MPI_Type_create_f90_real( & + & p, & + & r, & + & newtype, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: p + integer, intent(in) :: r + integer, intent(out) :: newtype + integer, intent(out) :: ierror + end subroutine MPI_Type_create_f90_real + + subroutine MPI_Type_match_size( & + & typeclass, & + & size, & + & newtype, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: typeclass + integer, intent(in) :: size + integer, intent(out) :: newtype + integer, intent(out) :: ierror + end subroutine MPI_Type_match_size + + subroutine MPI_Pcontrol( & + & level & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: level + end subroutine MPI_Pcontrol + + subroutine MPI_Attr_delete( & + & comm, & + & keyval, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(in) :: keyval + integer, intent(out) :: ierror + end subroutine MPI_Attr_delete + + subroutine MPI_Attr_get( & + & comm, & + & keyval, & + & attribute_val, & + & flag, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(in) :: keyval +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) attribute_val +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: attribute_val + integer :: attribute_val(*) + logical, intent(out) :: flag + integer, intent(out) :: ierror + end subroutine MPI_Attr_get + + subroutine MPI_Attr_put( & + & comm, & + & keyval, & + & attribute_val, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: comm + integer, intent(in) :: keyval +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) attribute_val +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: attribute_val + integer :: attribute_val(*) + integer, intent(out) :: ierror + end subroutine MPI_Attr_put + + subroutine MPI_Get_elements_x( & + & status, & + & datatype, & + & count, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: status(MPI_STATUS_SIZE) + integer, intent(in) :: datatype + integer(MPI_COUNT_KIND), intent(out) :: count + integer, intent(out) :: ierror + end subroutine MPI_Get_elements_x + + subroutine MPI_Info_get( & + & info, & + & key, & + & valuelen, & + & value, & + & flag, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: info + character(*), intent(in) :: key + integer, intent(in) :: valuelen + character(*), intent(out) :: value + logical, intent(out) :: flag + integer, intent(out) :: ierror + end subroutine MPI_Info_get + + subroutine MPI_Info_get_valuelen( & + & info, & + & key, & + & valuelen, & + & flag, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: info + character(*), intent(in) :: key + integer, intent(out) :: valuelen + logical, intent(out) :: flag + integer, intent(out) :: ierror + end subroutine MPI_Info_get_valuelen + + subroutine MPI_Keyval_create( & + & copy_fn, & + & delete_fn, & + & keyval, & + & extra_state, & + & ierror & + &) + implicit none + include "mpif_constants.h" + external :: copy_fn + external :: delete_fn + integer, intent(out) :: keyval +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) extra_state +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: extra_state + integer :: extra_state(*) + integer, intent(out) :: ierror + end subroutine MPI_Keyval_create + + subroutine MPI_Keyval_free( & + & keyval, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(out) :: keyval + integer, intent(out) :: ierror + end subroutine MPI_Keyval_free + + subroutine MPI_Status_set_elements_x( & + & status, & + & datatype, & + & count, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(out) :: status(MPI_STATUS_SIZE) + integer, intent(in) :: datatype + integer(MPI_COUNT_KIND), intent(in) :: count + integer, intent(out) :: ierror + end subroutine MPI_Status_set_elements_x + + subroutine MPI_Type_get_extent_x( & + & datatype, & + & lb, & + & extent, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: datatype + integer(MPI_COUNT_KIND), intent(out) :: lb + integer(MPI_COUNT_KIND), intent(out) :: extent + integer, intent(out) :: ierror + end subroutine MPI_Type_get_extent_x + + subroutine MPI_Type_get_true_extent_x( & + & datatype, & + & true_lb, & + & true_extent, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: datatype + integer(MPI_COUNT_KIND), intent(out) :: true_lb + integer(MPI_COUNT_KIND), intent(out) :: true_extent + integer, intent(out) :: ierror + end subroutine MPI_Type_get_true_extent_x + + subroutine MPI_Type_size_x( & + & datatype, & + & size, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: datatype + integer(MPI_COUNT_KIND), intent(out) :: size + integer, intent(out) :: ierror + end subroutine MPI_Type_size_x + + subroutine MPI_Address( & + & location, & + & address, & + & ierror & + &) + implicit none + include "mpif_constants.h" +@DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) location +@GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: location + integer :: location(*) + integer(MPI_ADDRESS_KIND), intent(out) :: address + integer, intent(out) :: ierror + end subroutine MPI_Address + + subroutine MPI_Type_hindexed( & + & count, & + & array_of_blocklengths, & + & array_of_displacements, & + & oldtype, & + & newtype, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: count + integer, intent(out) :: array_of_blocklengths + integer(MPI_ADDRESS_KIND), intent(out) :: & + & array_of_displacements + integer, intent(in) :: oldtype + integer, intent(out) :: newtype + integer, intent(out) :: ierror + end subroutine MPI_Type_hindexed + + subroutine MPI_Type_hvector( & + & count, & + & blocklength, & + & stride, & + & oldtype, & + & newtype, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: count + integer, intent(in) :: blocklength + integer(MPI_ADDRESS_KIND), intent(in) :: stride + integer, intent(in) :: oldtype + integer, intent(out) :: newtype + integer, intent(out) :: ierror + end subroutine MPI_Type_hvector + + subroutine MPI_Type_struct( & + & count, & + & array_of_blocklengths, & + & array_of_displacements, & + & array_of_types, & + & newtype, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: count + integer, intent(out) :: array_of_blocklengths + integer(MPI_ADDRESS_KIND), intent(out) :: & + & array_of_displacements + integer, intent(out) :: array_of_types + integer, intent(out) :: newtype + integer, intent(out) :: ierror + end subroutine MPI_Type_struct + + subroutine MPI_Type_extent( & + & datatype, & + & extent, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: datatype + integer(MPI_ADDRESS_KIND), intent(out) :: extent + integer, intent(out) :: ierror + end subroutine MPI_Type_extent + + subroutine MPI_Type_lb( & + & datatype, & + & displacement, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: datatype + integer(MPI_ADDRESS_KIND), intent(out) :: displacement + integer, intent(out) :: ierror + end subroutine MPI_Type_lb + + subroutine MPI_Type_ub( & + & datatype, & + & displacement, & + & ierror & + &) + implicit none + include "mpif_constants.h" + integer, intent(in) :: datatype + integer(MPI_ADDRESS_KIND), intent(out) :: displacement + integer, intent(out) :: ierror + end subroutine MPI_Type_ub + + end interface diff --git a/mpitrampoline/include/mpif_types.h b/mpitrampoline/include/mpif_types.h new file mode 100644 index 00000000..45467cb3 --- /dev/null +++ b/mpitrampoline/include/mpif_types.h @@ -0,0 +1 @@ + include "mpiabif_types.h" diff --git a/include/mpi_version.h.in b/mpitrampoline/include/mpitrampoline.h.in similarity index 66% rename from include/mpi_version.h.in rename to mpitrampoline/include/mpitrampoline.h.in index 1449300a..ac01bbb7 100644 --- a/include/mpi_version.h.in +++ b/mpitrampoline/include/mpitrampoline.h.in @@ -1,9 +1,10 @@ -#ifndef MPITRAMPOLINE_MPI_VERSION_H -#define MPITRAMPOLINE_MPI_VERSION_H +#ifndef MPITRAMPOLINE_H +#define MPITRAMPOLINE_H -#define MPITRAMPOLINE_VERSION "@PROJECT_VERSION@" #define MPITRAMPOLINE_VERSION_MAJOR @PROJECT_VERSION_MAJOR@ #define MPITRAMPOLINE_VERSION_MINOR @PROJECT_VERSION_MINOR@ #define MPITRAMPOLINE_VERSION_PATCH @PROJECT_VERSION_PATCH@ -#endif // #ifndef MPITRAMPOLINE_MPI_VERSION_H +#define MPITRAMPOLINE_VERSION "@PROJECT_VERSION@" + +#endif // #ifndef MPITRAMPOLINE_H diff --git a/include/mpif_version.h.in b/mpitrampoline/include/mpitrampolinef.h.in similarity index 100% rename from include/mpif_version.h.in rename to mpitrampoline/include/mpitrampolinef.h.in index f0a6a19a..1332038b 100644 --- a/include/mpif_version.h.in +++ b/mpitrampoline/include/mpitrampolinef.h.in @@ -1,8 +1,8 @@ - character*(*) MPITRAMPOLINE_VERSION - parameter (MPITRAMPOLINE_VERSION = "@PROJECT_VERSION@") integer MPITRAMPOLINE_VERSION_MAJOR - parameter (MPITRAMPOLINE_VERSION_MAJOR = @PROJECT_VERSION_MAJOR@) integer MPITRAMPOLINE_VERSION_MINOR - parameter (MPITRAMPOLINE_VERSION_MINOR = @PROJECT_VERSION_MINOR@) integer MPITRAMPOLINE_VERSION_PATCH + character*(*) MPITRAMPOLINE_VERSION + parameter (MPITRAMPOLINE_VERSION_MAJOR = @PROJECT_VERSION_MAJOR@) + parameter (MPITRAMPOLINE_VERSION_MINOR = @PROJECT_VERSION_MINOR@) parameter (MPITRAMPOLINE_VERSION_PATCH = @PROJECT_VERSION_PATCH@) + parameter (MPITRAMPOLINE_VERSION = "@PROJECT_VERSION@") diff --git a/MPItrampoline.pc.in b/mpitrampoline/pkgconfig/MPItrampoline.pc.in similarity index 100% rename from MPItrampoline.pc.in rename to mpitrampoline/pkgconfig/MPItrampoline.pc.in diff --git a/mpi-c.pc.in b/mpitrampoline/pkgconfig/mpi-c.pc.in similarity index 100% rename from mpi-c.pc.in rename to mpitrampoline/pkgconfig/mpi-c.pc.in diff --git a/mpi-cxx.pc.in b/mpitrampoline/pkgconfig/mpi-cxx.pc.in similarity index 100% rename from mpi-cxx.pc.in rename to mpitrampoline/pkgconfig/mpi-cxx.pc.in diff --git a/mpi-fort.pc.in b/mpitrampoline/pkgconfig/mpi-fort.pc.in similarity index 100% rename from mpi-fort.pc.in rename to mpitrampoline/pkgconfig/mpi-fort.pc.in diff --git a/mpitrampoline/src/mpi.F90 b/mpitrampoline/src/mpi.F90 new file mode 100644 index 00000000..8a940278 --- /dev/null +++ b/mpitrampoline/src/mpi.F90 @@ -0,0 +1,7 @@ +module mpi + implicit none + public + save + + include "mpif.h" +end module mpi diff --git a/mpitrampoline/src/mpi_f08.F90 b/mpitrampoline/src/mpi_f08.F90 new file mode 100644 index 00000000..0349dc1c --- /dev/null +++ b/mpitrampoline/src/mpi_f08.F90 @@ -0,0 +1,9 @@ +module mpi_f08 + use mpi_f08_types + use mpi_f08_constants + use mpi_f08_functions + + implicit none + public + save +end module mpi_f08 diff --git a/mpitrampoline/src/mpi_f08_constants.F90 b/mpitrampoline/src/mpi_f08_constants.F90 new file mode 100644 index 00000000..0bad55e9 --- /dev/null +++ b/mpitrampoline/src/mpi_f08_constants.F90 @@ -0,0 +1,763 @@ +module mpi_f08_constants + use mpi_f08_types + + use mpi, only: & + ! + ! Variable Address Size + MPI_ADDRESS_KIND, & + MPI_COUNT_KIND, & + MPI_INTEGER_KIND, & + MPI_OFFSET_KIND, & + ! Error classes + MPI_SUCCESS, & + MPI_ERR_BUFFER, & + MPI_ERR_COUNT, & + MPI_ERR_TYPE, & + MPI_ERR_TAG, & + MPI_ERR_COMM, & + MPI_ERR_RANK, & + MPI_ERR_REQUEST, & + MPI_ERR_ROOT, & + MPI_ERR_GROUP, & + MPI_ERR_OP, & + MPI_ERR_TOPOLOGY, & + MPI_ERR_DIMS, & + MPI_ERR_ARG, & + MPI_ERR_UNKNOWN, & + MPI_ERR_TRUNCATE, & + MPI_ERR_OTHER, & + MPI_ERR_INTERN, & + MPI_ERR_PENDING, & + MPI_ERR_IN_STATUS, & + MPI_ERR_ACCESS, & + MPI_ERR_AMODE, & + MPI_ERR_ASSERT, & + MPI_ERR_BAD_FILE, & + MPI_ERR_BASE, & + MPI_ERR_CONVERSION, & + MPI_ERR_DISP, & + MPI_ERR_DUP_DATAREP, & + MPI_ERR_FILE_EXISTS, & + MPI_ERR_FILE_IN_USE, & + MPI_ERR_FILE, & + MPI_ERR_INFO_KEY, & + MPI_ERR_INFO_NOKEY, & + MPI_ERR_INFO_VALUE, & + MPI_ERR_INFO, & + MPI_ERR_IO, & + MPI_ERR_KEYVAL, & + MPI_ERR_LOCKTYPE, & + MPI_ERR_NAME, & + MPI_ERR_NO_MEM, & + MPI_ERR_NOT_SAME, & + MPI_ERR_NO_SPACE, & + MPI_ERR_NO_SUCH_FILE, & + MPI_ERR_PORT, & + MPI_ERR_PROC_ABORTED, & + MPI_ERR_QUOTA, & + MPI_ERR_READ_ONLY, & + MPI_ERR_RMA_ATTACH, & + MPI_ERR_RMA_CONFLICT, & + MPI_ERR_RMA_RANGE, & + MPI_ERR_RMA_SHARED, & + MPI_ERR_RMA_SYNC, & + MPI_ERR_RMA_FLAVOR, & + MPI_ERR_SERVICE, & + MPI_ERR_SESSION, & + MPI_ERR_SIZE, & + MPI_ERR_SPAWN, & + MPI_ERR_UNSUPPORTED_DATAREP, & + MPI_ERR_UNSUPPORTED_OPERATION, & + MPI_ERR_VALUE_TOO_LARGE, & + MPI_ERR_WIN, & + MPI_ERR_ERRHANDLER, & + MPI_T_ERR_CANNOT_INIT, & + MPI_T_ERR_NOT_ACCESSIBLE, & + MPI_T_ERR_NOT_INITIALIZED, & + MPI_T_ERR_NOT_SUPPORTED, & + MPI_T_ERR_MEMORY, & + MPI_T_ERR_INVALID, & + MPI_T_ERR_INVALID_INDEX, & + MPI_T_ERR_INVALID_ITEM, & + MPI_T_ERR_INVALID_SESSION, & + MPI_T_ERR_INVALID_HANDLE, & + MPI_T_ERR_INVALID_NAME, & + MPI_T_ERR_OUT_OF_HANDLES, & + MPI_T_ERR_OUT_OF_SESSIONS, & + MPI_T_ERR_CVAR_SET_NOT_NOW, & + MPI_T_ERR_CVAR_SET_NEVER, & + MPI_T_ERR_PVAR_NO_WRITE, & + MPI_T_ERR_PVAR_NO_STARTSTOP, & + MPI_T_ERR_PVAR_NO_ATOMIC, & + MPI_ERR_LASTCODE, & + ! Buffer Address Constants + MPI_BOTTOM, & + MPI_BUFFER_AUTOMATIC, & + MPI_IN_PLACE, & + ! Assorted Constants + MPI_PROC_NULL, & + MPI_ANY_SOURCE, & + MPI_ANY_TAG, & + MPI_UNDEFINED, & + MPI_BSEND_OVERHEAD, & + MPI_KEYVAL_INVALID, & + MPI_LOCK_EXCLUSIVE, & + MPI_LOCK_SHARED, & + MPI_ROOT, & + ! Fortran Support Method Specific Constants + MPI_SUBARRAYS_SUPPORTED, & + MPI_ASYNC_PROTECTS_NONBLOCKING, & + ! Status array size and reserved index values + MPI_STATUS_SIZE, & + MPI_SOURCE, & + MPI_TAG, & + MPI_ERROR, & + ! Fortran status array size and reserved index values + ! Maximum Sizes for Strings + MPI_MAX_DATAREP_STRING, & + MPI_MAX_ERROR_STRING, & + MPI_MAX_INFO_KEY, & + MPI_MAX_INFO_VAL, & + MPI_MAX_LIBRARY_VERSION_STRING, & + MPI_MAX_OBJECT_NAME, & + MPI_MAX_PORT_NAME, & + MPI_MAX_PROCESSOR_NAME, & + MPI_MAX_PSET_NAME_LEN, & + MPI_MAX_STRINGTAG_LEN, & + ! Communicator split type constants + MPI_COMM_TYPE_SHARED, & + MPI_COMM_TYPE_HW_UNGUIDED, & + MPI_COMM_TYPE_HW_GUIDED, & + MPI_COMM_TYPE_RESOURCE_GUIDED, & + ! Results of communicator and group comparisons + MPI_IDENT, & + MPI_CONGRUENT, & + MPI_SIMILAR, & + MPI_UNEQUAL, & + ! Environmental inquiry keys + MPI_TAG_UB, & + MPI_IO, & + MPI_HOST, & + MPI_WTIME_IS_GLOBAL, & + ! Topologies + MPI_GRAPH, & + MPI_CART, & + MPI_DIST_GRAPH, & + ! Predefined Attribute Keys + MPI_APPNUM, & + MPI_LASTUSEDCODE, & + MPI_UNIVERSE_SIZE, & + MPI_WIN_BASE, & + MPI_WIN_DISP_UNIT, & + MPI_WIN_SIZE, & + MPI_WIN_CREATE_FLAVOR, & + MPI_WIN_MODEL, & + ! MPI Window Create Flavors + MPI_WIN_FLAVOR_CREATE, & + MPI_WIN_FLAVOR_ALLOCATE, & + MPI_WIN_FLAVOR_DYNAMIC, & + MPI_WIN_FLAVOR_SHARED, & + ! MPI Window Models + MPI_WIN_SEPARATE, & + MPI_WIN_UNIFIED, & + ! Mode Constants + MPI_MODE_APPEND, & + MPI_MODE_CREATE, & + MPI_MODE_DELETE_ON_CLOSE, & + MPI_MODE_EXCL, & + MPI_MODE_NOCHECK, & + MPI_MODE_NOPRECEDE, & + MPI_MODE_NOPUT, & + MPI_MODE_NOSTORE, & + MPI_MODE_NOSUCCEED, & + MPI_MODE_RDONLY, & + MPI_MODE_RDWR, & + MPI_MODE_SEQUENTIAL, & + MPI_MODE_UNIQUE_OPEN, & + MPI_MODE_WRONLY, & + ! Datatype Decoding Constants + MPI_COMBINER_CONTIGUOUS, & + MPI_COMBINER_DARRAY, & + MPI_COMBINER_DUP, & + MPI_COMBINER_F90_COMPLEX, & + MPI_COMBINER_F90_INTEGER, & + MPI_COMBINER_F90_REAL, & + MPI_COMBINER_HINDEXED, & + MPI_COMBINER_HVECTOR, & + MPI_COMBINER_INDEXED_BLOCK, & + MPI_COMBINER_HINDEXED_BLOCK, & + MPI_COMBINER_INDEXED, & + MPI_COMBINER_NAMED, & + MPI_COMBINER_RESIZED, & + MPI_COMBINER_STRUCT, & + MPI_COMBINER_SUBARRAY, & + MPI_COMBINER_VECTOR, & + ! Threads Constants + MPI_THREAD_FUNNELED, & + MPI_THREAD_MULTIPLE, & + MPI_THREAD_SERIALIZED, & + MPI_THREAD_SINGLE, & + ! File Operation Constants, Part 1 + MPI_DISPLACEMENT_CURRENT, & + ! File Operation Constants, Part 2 + MPI_DISTRIBUTE_BLOCK, & + MPI_DISTRIBUTE_CYCLIC, & + MPI_DISTRIBUTE_DFLT_DARG, & + MPI_DISTRIBUTE_NONE, & + MPI_ORDER_C, & + MPI_ORDER_FORTRAN, & + MPI_SEEK_CUR, & + MPI_SEEK_END, & + MPI_SEEK_SET, & + ! F90 Datatype Matching Constants + MPI_TYPECLASS_COMPLEX, & + MPI_TYPECLASS_INTEGER, & + MPI_TYPECLASS_REAL, & + ! Constants Specifying Empty or Ignored Input + MPI_ARGVS_NULL, & + MPI_ARGV_NULL, & + MPI_ERRCODES_IGNORE, & + ! MPI_STATUSES_IGNORE + ! MPI_STATUS_IGNORE + MPI_UNWEIGHTED, & + MPI_WEIGHTS_EMPTY, & + ! C Constants Specifying Ignored Input (no Fortran) + ! C preprocessor Constants and Fortran Parameters + MPI_SUBVERSION, & + MPI_VERSION, & + ! MPItrampoline version + MPITRAMPOLINE_VERSION_MAJOR, & + MPITRAMPOLINE_VERSION_MINOR, & + MPITRAMPOLINE_VERSION_PATCH, & + ! + ! Comm + wrapped_MPI_COMM_NULL => MPI_COMM_NULL, & + wrapped_MPI_COMM_SELF => MPI_COMM_SELF, & + wrapped_MPI_COMM_WORLD => MPI_COMM_WORLD, & + ! Datatype + wrapped_MPI_DATATYPE_NULL => MPI_DATATYPE_NULL, & + wrapped_MPI_CHAR => MPI_CHAR, & + wrapped_MPI_SHORT => MPI_SHORT, & + wrapped_MPI_INT => MPI_INT, & + wrapped_MPI_LONG => MPI_LONG, & + wrapped_MPI_LONG_LONG_INT => MPI_LONG_LONG_INT, & + wrapped_MPI_LONG_LONG => MPI_LONG_LONG, & + wrapped_MPI_SIGNED_CHAR => MPI_SIGNED_CHAR, & + wrapped_MPI_UNSIGNED_CHAR => MPI_UNSIGNED_CHAR, & + wrapped_MPI_UNSIGNED_SHORT => MPI_UNSIGNED_SHORT, & + wrapped_MPI_UNSIGNED => MPI_UNSIGNED, & + wrapped_MPI_UNSIGNED_LONG => MPI_UNSIGNED_LONG, & + wrapped_MPI_UNSIGNED_LONG_LONG => MPI_UNSIGNED_LONG_LONG, & + wrapped_MPI_FLOAT => MPI_FLOAT, & + wrapped_MPI_DOUBLE => MPI_DOUBLE, & + wrapped_MPI_LONG_DOUBLE => MPI_LONG_DOUBLE, & + wrapped_MPI_WCHAR => MPI_WCHAR, & + wrapped_MPI_C_BOOL => MPI_C_BOOL, & + wrapped_MPI_INT8_T => MPI_INT8_T, & + wrapped_MPI_INT16_T => MPI_INT16_T, & + wrapped_MPI_INT32_T => MPI_INT32_T, & + wrapped_MPI_INT64_T => MPI_INT64_T, & + wrapped_MPI_UINT8_T => MPI_UINT8_T, & + wrapped_MPI_UINT16_T => MPI_UINT16_T, & + wrapped_MPI_UINT32_T => MPI_UINT32_T, & + wrapped_MPI_UINT64_T => MPI_UINT64_T, & + wrapped_MPI_AINT => MPI_AINT, & + wrapped_MPI_COUNT => MPI_COUNT, & + wrapped_MPI_OFFSET => MPI_OFFSET, & + wrapped_MPI_C_COMPLEX => MPI_C_COMPLEX, & + wrapped_MPI_C_FLOAT_COMPLEX => MPI_C_FLOAT_COMPLEX, & + wrapped_MPI_C_DOUBLE_COMPLEX => MPI_C_DOUBLE_COMPLEX, & + wrapped_MPI_C_LONG_DOUBLE_COMPLEX => MPI_C_LONG_DOUBLE_COMPLEX, & + wrapped_MPI_BYTE => MPI_BYTE, & + wrapped_MPI_PACKED => MPI_PACKED, & + wrapped_MPI_INTEGER => MPI_INTEGER, & + wrapped_MPI_REAL => MPI_REAL, & + wrapped_MPI_DOUBLE_PRECISION => MPI_DOUBLE_PRECISION, & + wrapped_MPI_COMPLEX => MPI_COMPLEX, & + wrapped_MPI_LOGICAL => MPI_LOGICAL, & + wrapped_MPI_CHARACTER => MPI_CHARACTER, & + wrapped_MPI_CXX_BOOL => MPI_CXX_BOOL, & + wrapped_MPI_CXX_FLOAT_COMPLEX => MPI_CXX_FLOAT_COMPLEX, & + wrapped_MPI_CXX_DOUBLE_COMPLEX => MPI_CXX_DOUBLE_COMPLEX, & + wrapped_MPI_CXX_LONG_DOUBLE_COMPLEX => MPI_CXX_LONG_DOUBLE_COMPLEX, & + wrapped_MPI_DOUBLE_COMPLEX => MPI_DOUBLE_COMPLEX, & + wrapped_MPI_INTEGER1 => MPI_INTEGER1, & + wrapped_MPI_INTEGER2 => MPI_INTEGER2, & + wrapped_MPI_INTEGER4 => MPI_INTEGER4, & + wrapped_MPI_INTEGER8 => MPI_INTEGER8, & + wrapped_MPI_INTEGER16 => MPI_INTEGER16, & + wrapped_MPI_REAL2 => MPI_REAL2, & + wrapped_MPI_REAL4 => MPI_REAL4, & + wrapped_MPI_REAL8 => MPI_REAL8, & + wrapped_MPI_REAL16 => MPI_REAL16, & + wrapped_MPI_COMPLEX2 => MPI_COMPLEX2, & + wrapped_MPI_COMPLEX4 => MPI_COMPLEX4, & + wrapped_MPI_COMPLEX8 => MPI_COMPLEX8, & + wrapped_MPI_COMPLEX16 => MPI_COMPLEX16, & + wrapped_MPI_COMPLEX32 => MPI_COMPLEX32, & + wrapped_MPI_REAL1 => MPI_REAL1, & + wrapped_MPI_LOGICAL1 => MPI_LOGICAL1, & + wrapped_MPI_LOGICAL2 => MPI_LOGICAL2, & + wrapped_MPI_LOGICAL4 => MPI_LOGICAL4, & + wrapped_MPI_LOGICAL8 => MPI_LOGICAL8, & + wrapped_MPI_FLOAT_INT => MPI_FLOAT_INT, & + wrapped_MPI_DOUBLE_INT => MPI_DOUBLE_INT, & + wrapped_MPI_LONG_INT => MPI_LONG_INT, & + wrapped_MPI_2INT => MPI_2INT, & + wrapped_MPI_SHORT_INT => MPI_SHORT_INT, & + wrapped_MPI_LONG_DOUBLE_INT => MPI_LONG_DOUBLE_INT, & + wrapped_MPI_2REAL => MPI_2REAL, & + wrapped_MPI_2DOUBLE_PRECISION => MPI_2DOUBLE_PRECISION, & + wrapped_MPI_2INTEGER => MPI_2INTEGER, & + wrapped_MPI_LB => MPI_LB, & + wrapped_MPI_UB => MPI_UB, & + ! Errhandler + wrapped_MPI_ERRHANDLER_NULL => MPI_ERRHANDLER_NULL, & + wrapped_MPI_ERRORS_ABORT => MPI_ERRORS_ABORT, & + wrapped_MPI_ERRORS_ARE_FATAL => MPI_ERRORS_ARE_FATAL, & + wrapped_MPI_ERRORS_RETURN => MPI_ERRORS_RETURN, & + ! File + wrapped_MPI_FILE_NULL => MPI_FILE_NULL, & + ! Group + wrapped_MPI_GROUP_EMPTY => MPI_GROUP_EMPTY, & + wrapped_MPI_GROUP_NULL => MPI_GROUP_NULL, & + ! Info + wrapped_MPI_INFO_ENV => MPI_INFO_ENV, & + wrapped_MPI_INFO_NULL => MPI_INFO_NULL, & + ! Message + wrapped_MPI_MESSAGE_NO_PROC => MPI_MESSAGE_NO_PROC, & + wrapped_MPI_MESSAGE_NULL => MPI_MESSAGE_NULL, & + ! Op + wrapped_MPI_OP_NULL => MPI_OP_NULL, & + wrapped_MPI_MAX => MPI_MAX, & + wrapped_MPI_MIN => MPI_MIN, & + wrapped_MPI_SUM => MPI_SUM, & + wrapped_MPI_PROD => MPI_PROD, & + wrapped_MPI_MAXLOC => MPI_MAXLOC, & + wrapped_MPI_MINLOC => MPI_MINLOC, & + wrapped_MPI_BAND => MPI_BAND, & + wrapped_MPI_BOR => MPI_BOR, & + wrapped_MPI_BXOR => MPI_BXOR, & + wrapped_MPI_LAND => MPI_LAND, & + wrapped_MPI_LOR => MPI_LOR, & + wrapped_MPI_LXOR => MPI_LXOR, & + wrapped_MPI_REPLACE => MPI_REPLACE, & + wrapped_MPI_NO_OP => MPI_NO_OP, & + ! Request + wrapped_MPI_REQUEST_NULL => MPI_REQUEST_NULL, & + ! Session + wrapped_MPI_SESSION_NULL => MPI_SESSION_NULL, & + ! Win + wrapped_MPI_WIN_NULL => MPI_WIN_NULL + + implicit none + private + save + + ! Variable Address Size + + public :: MPI_ADDRESS_KIND + public :: MPI_COUNT_KIND + public :: MPI_INTEGER_KIND + public :: MPI_OFFSET_KIND + + ! Error classes + + public :: MPI_SUCCESS + public :: MPI_ERR_BUFFER + public :: MPI_ERR_COUNT + public :: MPI_ERR_TYPE + public :: MPI_ERR_TAG + public :: MPI_ERR_COMM + public :: MPI_ERR_RANK + public :: MPI_ERR_REQUEST + public :: MPI_ERR_ROOT + public :: MPI_ERR_GROUP + public :: MPI_ERR_OP + public :: MPI_ERR_TOPOLOGY + public :: MPI_ERR_DIMS + public :: MPI_ERR_ARG + public :: MPI_ERR_UNKNOWN + public :: MPI_ERR_TRUNCATE + public :: MPI_ERR_OTHER + public :: MPI_ERR_INTERN + public :: MPI_ERR_PENDING + public :: MPI_ERR_IN_STATUS + public :: MPI_ERR_ACCESS + public :: MPI_ERR_AMODE + public :: MPI_ERR_ASSERT + public :: MPI_ERR_BAD_FILE + public :: MPI_ERR_BASE + public :: MPI_ERR_CONVERSION + public :: MPI_ERR_DISP + public :: MPI_ERR_DUP_DATAREP + public :: MPI_ERR_FILE_EXISTS + public :: MPI_ERR_FILE_IN_USE + public :: MPI_ERR_FILE + public :: MPI_ERR_INFO_KEY + public :: MPI_ERR_INFO_NOKEY + public :: MPI_ERR_INFO_VALUE + public :: MPI_ERR_INFO + public :: MPI_ERR_IO + public :: MPI_ERR_KEYVAL + public :: MPI_ERR_LOCKTYPE + public :: MPI_ERR_NAME + public :: MPI_ERR_NO_MEM + public :: MPI_ERR_NOT_SAME + public :: MPI_ERR_NO_SPACE + public :: MPI_ERR_NO_SUCH_FILE + public :: MPI_ERR_PORT + public :: MPI_ERR_PROC_ABORTED + public :: MPI_ERR_QUOTA + public :: MPI_ERR_READ_ONLY + public :: MPI_ERR_RMA_ATTACH + public :: MPI_ERR_RMA_CONFLICT + public :: MPI_ERR_RMA_RANGE + public :: MPI_ERR_RMA_SHARED + public :: MPI_ERR_RMA_SYNC + public :: MPI_ERR_RMA_FLAVOR + public :: MPI_ERR_SERVICE + public :: MPI_ERR_SESSION + public :: MPI_ERR_SIZE + public :: MPI_ERR_SPAWN + public :: MPI_ERR_UNSUPPORTED_DATAREP + public :: MPI_ERR_UNSUPPORTED_OPERATION + public :: MPI_ERR_VALUE_TOO_LARGE + public :: MPI_ERR_WIN + public :: MPI_ERR_ERRHANDLER + public :: MPI_T_ERR_CANNOT_INIT + public :: MPI_T_ERR_NOT_ACCESSIBLE + public :: MPI_T_ERR_NOT_INITIALIZED + public :: MPI_T_ERR_NOT_SUPPORTED + public :: MPI_T_ERR_MEMORY + public :: MPI_T_ERR_INVALID + public :: MPI_T_ERR_INVALID_INDEX + public :: MPI_T_ERR_INVALID_ITEM + public :: MPI_T_ERR_INVALID_SESSION + public :: MPI_T_ERR_INVALID_HANDLE + public :: MPI_T_ERR_INVALID_NAME + public :: MPI_T_ERR_OUT_OF_HANDLES + public :: MPI_T_ERR_OUT_OF_SESSIONS + public :: MPI_T_ERR_CVAR_SET_NOT_NOW + public :: MPI_T_ERR_CVAR_SET_NEVER + public :: MPI_T_ERR_PVAR_NO_WRITE + public :: MPI_T_ERR_PVAR_NO_STARTSTOP + public :: MPI_T_ERR_PVAR_NO_ATOMIC + public :: MPI_ERR_LASTCODE + + ! Buffer Address Constants + public :: MPI_BOTTOM + public :: MPI_BUFFER_AUTOMATIC + public :: MPI_IN_PLACE + + ! Assorted Constants + public :: MPI_PROC_NULL + public :: MPI_ANY_SOURCE + public :: MPI_ANY_TAG + public :: MPI_UNDEFINED + public :: MPI_BSEND_OVERHEAD + public :: MPI_KEYVAL_INVALID + public :: MPI_LOCK_EXCLUSIVE + public :: MPI_LOCK_SHARED + public :: MPI_ROOT + + ! Fortran Support Method Specific Constants + public :: MPI_SUBARRAYS_SUPPORTED + public :: MPI_ASYNC_PROTECTS_NONBLOCKING + + ! Status array size and reserved index values + public :: MPI_STATUS_SIZE + public :: MPI_SOURCE + public :: MPI_TAG + public :: MPI_ERROR + + ! Fortran status array size and reserved index values + + ! Variable Address Size + ! These have already been defined above. + + ! Maximum Sizes for Strings + public :: MPI_MAX_DATAREP_STRING + public :: MPI_MAX_ERROR_STRING + public :: MPI_MAX_INFO_KEY + public :: MPI_MAX_INFO_VAL + public :: MPI_MAX_LIBRARY_VERSION_STRING + public :: MPI_MAX_OBJECT_NAME + public :: MPI_MAX_PORT_NAME + public :: MPI_MAX_PROCESSOR_NAME + public :: MPI_MAX_PSET_NAME_LEN + public :: MPI_MAX_STRINGTAG_LEN + + ! Communicator split type constants + public :: MPI_COMM_TYPE_SHARED + public :: MPI_COMM_TYPE_HW_UNGUIDED + public :: MPI_COMM_TYPE_HW_GUIDED + public :: MPI_COMM_TYPE_RESOURCE_GUIDED + + ! Results of communicator and group comparisons + public :: MPI_IDENT + public :: MPI_CONGRUENT + public :: MPI_SIMILAR + public :: MPI_UNEQUAL + + ! Environmental inquiry keys + public :: MPI_TAG_UB + public :: MPI_IO + public :: MPI_HOST + public :: MPI_WTIME_IS_GLOBAL + + ! Topologies + public :: MPI_GRAPH + public :: MPI_CART + public :: MPI_DIST_GRAPH + + ! Predefined Attribute Keys + public :: MPI_APPNUM + public :: MPI_LASTUSEDCODE + public :: MPI_UNIVERSE_SIZE + public :: MPI_WIN_BASE + public :: MPI_WIN_DISP_UNIT + public :: MPI_WIN_SIZE + public :: MPI_WIN_CREATE_FLAVOR + public :: MPI_WIN_MODEL + + ! MPI Window Create Flavors + public :: MPI_WIN_FLAVOR_CREATE + public :: MPI_WIN_FLAVOR_ALLOCATE + public :: MPI_WIN_FLAVOR_DYNAMIC + public :: MPI_WIN_FLAVOR_SHARED + + ! MPI Window Models + public :: MPI_WIN_SEPARATE + public :: MPI_WIN_UNIFIED + + ! Mode Constants + public :: MPI_MODE_APPEND + public :: MPI_MODE_CREATE + public :: MPI_MODE_DELETE_ON_CLOSE + public :: MPI_MODE_EXCL + public :: MPI_MODE_NOCHECK + public :: MPI_MODE_NOPRECEDE + public :: MPI_MODE_NOPUT + public :: MPI_MODE_NOSTORE + public :: MPI_MODE_NOSUCCEED + public :: MPI_MODE_RDONLY + public :: MPI_MODE_RDWR + public :: MPI_MODE_SEQUENTIAL + public :: MPI_MODE_UNIQUE_OPEN + public :: MPI_MODE_WRONLY + + ! Datatype Decoding Constants + public :: MPI_COMBINER_CONTIGUOUS + public :: MPI_COMBINER_DARRAY + public :: MPI_COMBINER_DUP + public :: MPI_COMBINER_F90_COMPLEX + public :: MPI_COMBINER_F90_INTEGER + public :: MPI_COMBINER_F90_REAL + public :: MPI_COMBINER_HINDEXED + public :: MPI_COMBINER_HVECTOR + public :: MPI_COMBINER_INDEXED_BLOCK + public :: MPI_COMBINER_HINDEXED_BLOCK + public :: MPI_COMBINER_INDEXED + public :: MPI_COMBINER_NAMED + public :: MPI_COMBINER_RESIZED + public :: MPI_COMBINER_STRUCT + public :: MPI_COMBINER_SUBARRAY + public :: MPI_COMBINER_VECTOR + + ! Threads Constants + public :: MPI_THREAD_FUNNELED + public :: MPI_THREAD_MULTIPLE + public :: MPI_THREAD_SERIALIZED + public :: MPI_THREAD_SINGLE + + ! File Operation Constants, Part 1 + public :: MPI_DISPLACEMENT_CURRENT + + ! File Operation Constants, Part 2 + public :: MPI_DISTRIBUTE_BLOCK + public :: MPI_DISTRIBUTE_CYCLIC + public :: MPI_DISTRIBUTE_DFLT_DARG + public :: MPI_DISTRIBUTE_NONE + public :: MPI_ORDER_C + public :: MPI_ORDER_FORTRAN + public :: MPI_SEEK_CUR + public :: MPI_SEEK_END + public :: MPI_SEEK_SET + + ! F90 Datatype Matching Constants + public :: MPI_TYPECLASS_COMPLEX + public :: MPI_TYPECLASS_INTEGER + public :: MPI_TYPECLASS_REAL + + ! Constants Specifying Empty or Ignored Input + public :: MPI_ARGVS_NULL + public :: MPI_ARGV_NULL + public :: MPI_ERRCODES_IGNORE + ! public :: MPI_STATUSES_IGNORE + ! public :: MPI_STATUS_IGNORE + public :: MPI_UNWEIGHTED + public :: MPI_WEIGHTS_EMPTY + + ! C Constants Specifying Ignored Input (no Fortran) + + ! C preprocessor Constants and Fortran Parameters + public :: MPI_SUBVERSION + public :: MPI_VERSION + + ! MPItrampoline version + public :: MPITRAMPOLINE_VERSION_MAJOR + public :: MPITRAMPOLINE_VERSION_MINOR + public :: MPITRAMPOLINE_VERSION_PATCH + + ! Comm + + type(MPI_Comm), parameter, public :: MPI_COMM_NULL = MPI_Comm(wrapped_MPI_COMM_NULL) + type(MPI_Comm), parameter, public :: MPI_COMM_SELF = MPI_Comm(wrapped_MPI_COMM_SELF) + type(MPI_Comm), parameter, public :: MPI_COMM_WORLD = MPI_Comm(wrapped_MPI_COMM_WORLD) + + ! Datatype + + type(MPI_Datatype), parameter, public :: MPI_DATATYPE_NULL = MPI_Datatype(wrapped_MPI_DATATYPE_NULL) + type(MPI_Datatype), parameter, public :: MPI_CHAR = MPI_Datatype(wrapped_MPI_CHAR) + type(MPI_Datatype), parameter, public :: MPI_SHORT = MPI_Datatype(wrapped_MPI_SHORT) + type(MPI_Datatype), parameter, public :: MPI_INT = MPI_Datatype(wrapped_MPI_INT) + type(MPI_Datatype), parameter, public :: MPI_LONG = MPI_Datatype(wrapped_MPI_LONG) + type(MPI_Datatype), parameter, public :: MPI_LONG_LONG_INT = MPI_Datatype(wrapped_MPI_LONG_LONG_INT) + type(MPI_Datatype), parameter, public :: MPI_LONG_LONG = MPI_Datatype(wrapped_MPI_LONG_LONG) + type(MPI_Datatype), parameter, public :: MPI_SIGNED_CHAR = MPI_Datatype(wrapped_MPI_SIGNED_CHAR) + type(MPI_Datatype), parameter, public :: MPI_UNSIGNED_CHAR = MPI_Datatype(wrapped_MPI_UNSIGNED_CHAR) + type(MPI_Datatype), parameter, public :: MPI_UNSIGNED_SHORT = MPI_Datatype(wrapped_MPI_UNSIGNED_SHORT) + type(MPI_Datatype), parameter, public :: MPI_UNSIGNED = MPI_Datatype(wrapped_MPI_UNSIGNED) + type(MPI_Datatype), parameter, public :: MPI_UNSIGNED_LONG = MPI_Datatype(wrapped_MPI_UNSIGNED_LONG) + type(MPI_Datatype), parameter, public :: MPI_UNSIGNED_LONG_LONG = MPI_Datatype(wrapped_MPI_UNSIGNED_LONG_LONG) + type(MPI_Datatype), parameter, public :: MPI_FLOAT = MPI_Datatype(wrapped_MPI_FLOAT) + type(MPI_Datatype), parameter, public :: MPI_DOUBLE = MPI_Datatype(wrapped_MPI_DOUBLE) + type(MPI_Datatype), parameter, public :: MPI_LONG_DOUBLE = MPI_Datatype(wrapped_MPI_LONG_DOUBLE) + type(MPI_Datatype), parameter, public :: MPI_WCHAR = MPI_Datatype(wrapped_MPI_WCHAR) + type(MPI_Datatype), parameter, public :: MPI_C_BOOL = MPI_Datatype(wrapped_MPI_C_BOOL) + type(MPI_Datatype), parameter, public :: MPI_INT8_T = MPI_Datatype(wrapped_MPI_INT8_T) + type(MPI_Datatype), parameter, public :: MPI_INT16_T = MPI_Datatype(wrapped_MPI_INT16_T) + type(MPI_Datatype), parameter, public :: MPI_INT32_T = MPI_Datatype(wrapped_MPI_INT32_T) + type(MPI_Datatype), parameter, public :: MPI_INT64_T = MPI_Datatype(wrapped_MPI_INT64_T) + type(MPI_Datatype), parameter, public :: MPI_UINT8_T = MPI_Datatype(wrapped_MPI_UINT8_T) + type(MPI_Datatype), parameter, public :: MPI_UINT16_T = MPI_Datatype(wrapped_MPI_UINT16_T) + type(MPI_Datatype), parameter, public :: MPI_UINT32_T = MPI_Datatype(wrapped_MPI_UINT32_T) + type(MPI_Datatype), parameter, public :: MPI_UINT64_T = MPI_Datatype(wrapped_MPI_UINT64_T) + type(MPI_Datatype), parameter, public :: MPI_AINT = MPI_Datatype(wrapped_MPI_AINT) + type(MPI_Datatype), parameter, public :: MPI_COUNT = MPI_Datatype(wrapped_MPI_COUNT) + type(MPI_Datatype), parameter, public :: MPI_OFFSET = MPI_Datatype(wrapped_MPI_OFFSET) + type(MPI_Datatype), parameter, public :: MPI_C_COMPLEX = MPI_Datatype(wrapped_MPI_C_COMPLEX) + type(MPI_Datatype), parameter, public :: MPI_C_FLOAT_COMPLEX = MPI_Datatype(wrapped_MPI_C_FLOAT_COMPLEX) + type(MPI_Datatype), parameter, public :: MPI_C_DOUBLE_COMPLEX = MPI_Datatype(wrapped_MPI_C_DOUBLE_COMPLEX) + type(MPI_Datatype), parameter, public :: MPI_C_LONG_DOUBLE_COMPLEX = MPI_Datatype(wrapped_MPI_C_LONG_DOUBLE_COMPLEX) + type(MPI_Datatype), parameter, public :: MPI_BYTE = MPI_Datatype(wrapped_MPI_BYTE) + type(MPI_Datatype), parameter, public :: MPI_PACKED = MPI_Datatype(wrapped_MPI_PACKED) + type(MPI_Datatype), parameter, public :: MPI_INTEGER = MPI_Datatype(wrapped_MPI_INTEGER) + type(MPI_Datatype), parameter, public :: MPI_REAL = MPI_Datatype(wrapped_MPI_REAL) + type(MPI_Datatype), parameter, public :: MPI_DOUBLE_PRECISION = MPI_Datatype(wrapped_MPI_DOUBLE_PRECISION) + type(MPI_Datatype), parameter, public :: MPI_COMPLEX = MPI_Datatype(wrapped_MPI_COMPLEX) + type(MPI_Datatype), parameter, public :: MPI_LOGICAL = MPI_Datatype(wrapped_MPI_LOGICAL) + type(MPI_Datatype), parameter, public :: MPI_CHARACTER = MPI_Datatype(wrapped_MPI_CHARACTER) + type(MPI_Datatype), parameter, public :: MPI_CXX_BOOL = MPI_Datatype(wrapped_MPI_CXX_BOOL) + type(MPI_Datatype), parameter, public :: MPI_CXX_FLOAT_COMPLEX = MPI_Datatype(wrapped_MPI_CXX_FLOAT_COMPLEX) + type(MPI_Datatype), parameter, public :: MPI_CXX_DOUBLE_COMPLEX = MPI_Datatype(wrapped_MPI_CXX_DOUBLE_COMPLEX) + type(MPI_Datatype), parameter, public :: MPI_CXX_LONG_DOUBLE_COMPLEX = MPI_Datatype(wrapped_MPI_CXX_LONG_DOUBLE_COMPLEX) + type(MPI_Datatype), parameter, public :: MPI_DOUBLE_COMPLEX = MPI_Datatype(wrapped_MPI_DOUBLE_COMPLEX) + type(MPI_Datatype), parameter, public :: MPI_INTEGER1 = MPI_Datatype(wrapped_MPI_INTEGER1) + type(MPI_Datatype), parameter, public :: MPI_INTEGER2 = MPI_Datatype(wrapped_MPI_INTEGER2) + type(MPI_Datatype), parameter, public :: MPI_INTEGER4 = MPI_Datatype(wrapped_MPI_INTEGER4) + type(MPI_Datatype), parameter, public :: MPI_INTEGER8 = MPI_Datatype(wrapped_MPI_INTEGER8) + type(MPI_Datatype), parameter, public :: MPI_INTEGER16 = MPI_Datatype(wrapped_MPI_INTEGER16) + type(MPI_Datatype), parameter, public :: MPI_REAL2 = MPI_Datatype(wrapped_MPI_REAL2) + type(MPI_Datatype), parameter, public :: MPI_REAL4 = MPI_Datatype(wrapped_MPI_REAL4) + type(MPI_Datatype), parameter, public :: MPI_REAL8 = MPI_Datatype(wrapped_MPI_REAL8) + type(MPI_Datatype), parameter, public :: MPI_REAL16 = MPI_Datatype(wrapped_MPI_REAL16) + type(MPI_Datatype), parameter, public :: MPI_COMPLEX2 = MPI_Datatype(wrapped_MPI_COMPLEX2) + type(MPI_Datatype), parameter, public :: MPI_COMPLEX4 = MPI_Datatype(wrapped_MPI_COMPLEX4) + type(MPI_Datatype), parameter, public :: MPI_COMPLEX8 = MPI_Datatype(wrapped_MPI_COMPLEX8) + type(MPI_Datatype), parameter, public :: MPI_COMPLEX16 = MPI_Datatype(wrapped_MPI_COMPLEX16) + type(MPI_Datatype), parameter, public :: MPI_COMPLEX32 = MPI_Datatype(wrapped_MPI_COMPLEX32) + type(MPI_Datatype), parameter, public :: MPI_REAL1 = MPI_Datatype(wrapped_MPI_REAL1) + type(MPI_Datatype), parameter, public :: MPI_LOGICAL1 = MPI_Datatype(wrapped_MPI_LOGICAL1) + type(MPI_Datatype), parameter, public :: MPI_LOGICAL2 = MPI_Datatype(wrapped_MPI_LOGICAL2) + type(MPI_Datatype), parameter, public :: MPI_LOGICAL4 = MPI_Datatype(wrapped_MPI_LOGICAL4) + type(MPI_Datatype), parameter, public :: MPI_LOGICAL8 = MPI_Datatype(wrapped_MPI_LOGICAL8) + type(MPI_Datatype), parameter, public :: MPI_FLOAT_INT = MPI_Datatype(wrapped_MPI_FLOAT_INT) + type(MPI_Datatype), parameter, public :: MPI_DOUBLE_INT = MPI_Datatype(wrapped_MPI_DOUBLE_INT) + type(MPI_Datatype), parameter, public :: MPI_LONG_INT = MPI_Datatype(wrapped_MPI_LONG_INT) + type(MPI_Datatype), parameter, public :: MPI_2INT = MPI_Datatype(wrapped_MPI_2INT) + type(MPI_Datatype), parameter, public :: MPI_SHORT_INT = MPI_Datatype(wrapped_MPI_SHORT_INT) + type(MPI_Datatype), parameter, public :: MPI_LONG_DOUBLE_INT = MPI_Datatype(wrapped_MPI_LONG_DOUBLE_INT) + type(MPI_Datatype), parameter, public :: MPI_2REAL = MPI_Datatype(wrapped_MPI_2REAL) + type(MPI_Datatype), parameter, public :: MPI_2DOUBLE_PRECISION = MPI_Datatype(wrapped_MPI_2DOUBLE_PRECISION) + type(MPI_Datatype), parameter, public :: MPI_2INTEGER = MPI_Datatype(wrapped_MPI_2INTEGER) + type(MPI_Datatype), parameter, public :: MPI_LB = MPI_Datatype(wrapped_MPI_LB) + type(MPI_Datatype), parameter, public :: MPI_UB = MPI_Datatype(wrapped_MPI_UB) + + ! Errhandler + + type(MPI_Errhandler), parameter, public :: MPI_ERRHANDLER_NULL = MPI_Errhandler(wrapped_MPI_ERRHANDLER_NULL) + type(MPI_Errhandler), parameter, public :: MPI_ERRORS_ABORT = MPI_Errhandler(wrapped_MPI_ERRORS_ABORT) + type(MPI_Errhandler), parameter, public :: MPI_ERRORS_ARE_FATAL = MPI_Errhandler(wrapped_MPI_ERRORS_ARE_FATAL) + type(MPI_Errhandler), parameter, public :: MPI_ERRORS_RETURN = MPI_Errhandler(wrapped_MPI_ERRORS_RETURN) + + ! File + + type(MPI_File), parameter, public :: MPI_FILE_NULL = MPI_File(wrapped_MPI_FILE_NULL) + + ! Group + + type(MPI_Group), parameter, public :: MPI_GROUP_EMPTY = MPI_Group(wrapped_MPI_GROUP_EMPTY) + type(MPI_Group), parameter, public :: MPI_GROUP_NULL = MPI_Group(wrapped_MPI_GROUP_NULL) + + ! Info + + type(MPI_Info), parameter, public :: MPI_INFO_ENV = MPI_Info(wrapped_MPI_INFO_ENV) + type(MPI_Info), parameter, public :: MPI_INFO_NULL = MPI_Info(wrapped_MPI_INFO_NULL) + + ! Message + + type(MPI_Message), parameter, public :: MPI_MESSAGE_NO_PROC = MPI_Message(wrapped_MPI_MESSAGE_NO_PROC) + type(MPI_Message), parameter, public :: MPI_MESSAGE_NULL = MPI_Message(wrapped_MPI_MESSAGE_NULL) + + ! Op + + type(MPI_Op), parameter, public :: MPI_OP_NULL = MPI_Op(wrapped_MPI_OP_NULL) + type(MPI_Op), parameter, public :: MPI_MAX = MPI_Op(wrapped_MPI_MAX) + type(MPI_Op), parameter, public :: MPI_MIN = MPI_Op(wrapped_MPI_MIN) + type(MPI_Op), parameter, public :: MPI_SUM = MPI_Op(wrapped_MPI_SUM) + type(MPI_Op), parameter, public :: MPI_PROD = MPI_Op(wrapped_MPI_PROD) + type(MPI_Op), parameter, public :: MPI_MAXLOC = MPI_Op(wrapped_MPI_MAXLOC) + type(MPI_Op), parameter, public :: MPI_MINLOC = MPI_Op(wrapped_MPI_MINLOC) + type(MPI_Op), parameter, public :: MPI_BAND = MPI_Op(wrapped_MPI_BAND) + type(MPI_Op), parameter, public :: MPI_BOR = MPI_Op(wrapped_MPI_BOR) + type(MPI_Op), parameter, public :: MPI_BXOR = MPI_Op(wrapped_MPI_BXOR) + type(MPI_Op), parameter, public :: MPI_LAND = MPI_Op(wrapped_MPI_LAND) + type(MPI_Op), parameter, public :: MPI_LOR = MPI_Op(wrapped_MPI_LOR) + type(MPI_Op), parameter, public :: MPI_LXOR = MPI_Op(wrapped_MPI_LXOR) + type(MPI_Op), parameter, public :: MPI_REPLACE = MPI_Op(wrapped_MPI_REPLACE) + type(MPI_Op), parameter, public :: MPI_NO_OP = MPI_Op(wrapped_MPI_NO_OP) + + ! Request + + type(MPI_Request), parameter, public :: MPI_REQUEST_NULL = MPI_Request(wrapped_MPI_REQUEST_NULL) + + ! Session + + type(MPI_Session), parameter, public :: MPI_SESSION_NULL = MPI_Session(wrapped_MPI_SESSION_NULL) + + ! Win + + type(MPI_Win), parameter, public :: MPI_WIN_NULL = MPI_Win(wrapped_MPI_WIN_NULL) + + ! Status + + public :: MPI_STATUS_IGNORE + type(MPI_Status) :: MPI_STATUS_IGNORE + pointer (MPIABI_STATUS_IGNORE_PTR, MPI_STATUS_IGNORE) + public :: MPI_STATUSES_IGNORE + type(MPI_Status) :: MPI_STATUSES_IGNORE(1) + pointer (MPIABI_STATUSES_IGNORE_PTR, MPI_STATUSES_IGNORE) + +end module mpi_f08_constants diff --git a/mpitrampoline/src/mpi_f08_functions.F90.in b/mpitrampoline/src/mpi_f08_functions.F90.in new file mode 100644 index 00000000..2250b299 --- /dev/null +++ b/mpitrampoline/src/mpi_f08_functions.F90.in @@ -0,0 +1,19666 @@ +! MPI Fortran 2008 function bindings + +! This file has been generated automatically +! by `mpitrampoline/generate_trampoline.jl`. +! Do not modify this file, changes will be overwritten. + +#include + +module mpi_f08_functions_internal + use mpi_f08_types + use mpi_f08_constants + + implicit none + public + save + + interface + + subroutine MPI_Bsend( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Bsend + + subroutine MPI_Bsend_init( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Bsend_init + + subroutine MPI_Buffer_attach( & + buffer, & + size, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buffer + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buffer + integer :: buffer(*) + integer, intent(in) :: size + integer, intent(out) :: ierror + end subroutine MPI_Buffer_attach + + subroutine MPI_Buffer_detach( & + buffer_addr, & + size, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer(MPI_ADDRESS_KIND), intent(out) :: buffer_addr + integer, intent(out) :: size + integer, intent(out) :: ierror + end subroutine MPI_Buffer_detach + + subroutine MPI_Buffer_flush( & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(out) :: ierror + end subroutine MPI_Buffer_flush + + subroutine MPI_Buffer_iflush( & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Buffer_iflush + + subroutine MPI_Cancel( & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Cancel + + subroutine MPI_Comm_attach_buffer( & + comm, & + buffer, & + size, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buffer + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buffer + integer, intent(in) :: buffer(*) + integer, intent(in) :: size + integer, intent(out) :: ierror + end subroutine MPI_Comm_attach_buffer + + subroutine MPI_Comm_detach_buffer( & + comm, & + buffer_addr, & + size, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + integer(MPI_ADDRESS_KIND), intent(out) :: buffer_addr + integer, intent(out) :: size + integer, intent(out) :: ierror + end subroutine MPI_Comm_detach_buffer + + subroutine MPI_Comm_flush_buffer( & + comm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Comm_flush_buffer + + subroutine MPI_Comm_iflush_buffer( & + comm, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Comm_iflush_buffer + + subroutine MPI_Get_count( & + status, & + datatype, & + count, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Status), intent(in) :: status + type(MPI_Datatype), intent(in) :: datatype + integer, intent(out) :: count + integer, intent(out) :: ierror + end subroutine MPI_Get_count + + subroutine MPI_Ibsend( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Ibsend + + subroutine MPI_Improbe( & + source, & + tag, & + comm, & + flag, & + message, & + status, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: source + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + logical, intent(out) :: flag + type(MPI_Message), intent(out) :: message + type(MPI_Status), intent(out) :: status + integer, intent(out) :: ierror + end subroutine MPI_Improbe + + subroutine MPI_Imrecv( & + buf, & + count, & + datatype, & + message, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Message), intent(out) :: message + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Imrecv + + subroutine MPI_Iprobe( & + source, & + tag, & + comm, & + flag, & + status, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: source + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + logical, intent(out) :: flag + type(MPI_Status), intent(out) :: status + integer, intent(out) :: ierror + end subroutine MPI_Iprobe + + subroutine MPI_Irecv( & + buf, & + count, & + datatype, & + source, & + tag, & + comm, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: source + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Irecv + + subroutine MPI_Irsend( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Irsend + + subroutine MPI_Isend( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Isend + + subroutine MPI_Isendrecv( & + sendbuf, & + sendcount, & + sendtype, & + dest, & + sendtag, & + recvbuf, & + recvcount, & + recvtype, & + source, & + recvtag, & + comm, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + integer, intent(in) :: dest + integer, intent(in) :: sendtag + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + integer, intent(in) :: source + integer, intent(in) :: recvtag + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Isendrecv + + subroutine MPI_Isendrecv_replace( & + buf, & + count, & + datatype, & + dest, & + sendtag, & + source, & + recvtag, & + comm, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(inout) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: sendtag + integer, intent(in) :: source + integer, intent(in) :: recvtag + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Isendrecv_replace + + subroutine MPI_Issend( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Issend + + subroutine MPI_Mprobe( & + source, & + tag, & + comm, & + message, & + status, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: source + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + type(MPI_Message), intent(out) :: message + type(MPI_Status), intent(out) :: status + integer, intent(out) :: ierror + end subroutine MPI_Mprobe + + subroutine MPI_Mrecv( & + buf, & + count, & + datatype, & + message, & + status, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Message), intent(out) :: message + type(MPI_Status), intent(out) :: status + integer, intent(out) :: ierror + end subroutine MPI_Mrecv + + subroutine MPI_Probe( & + source, & + tag, & + comm, & + status, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: source + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + type(MPI_Status), intent(out) :: status + integer, intent(out) :: ierror + end subroutine MPI_Probe + + subroutine MPI_Recv( & + buf, & + count, & + datatype, & + source, & + tag, & + comm, & + status, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: source + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + type(MPI_Status), intent(out) :: status + integer, intent(out) :: ierror + end subroutine MPI_Recv + + subroutine MPI_Recv_init( & + buf, & + count, & + datatype, & + source, & + tag, & + comm, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: source + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Recv_init + + subroutine MPI_Request_free( & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Request), intent(inout) :: request + integer, intent(out) :: ierror + end subroutine MPI_Request_free + + subroutine MPI_Request_get_status( & + request, & + flag, & + status, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Request), intent(in) :: request + logical, intent(out) :: flag + type(MPI_Status), intent(out) :: status + integer, intent(out) :: ierror + end subroutine MPI_Request_get_status + + subroutine MPI_Request_get_status_all( & + count, & + array_of_requests, & + flag, & + array_of_statuses, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: count + type(MPI_Request), intent(in) :: array_of_requests(count) + logical, intent(out) :: flag + type(MPI_Status), intent(out) :: array_of_statuses(count) + integer, intent(out) :: ierror + end subroutine MPI_Request_get_status_all + + subroutine MPI_Request_get_status_any( & + count, & + array_of_requests, & + index, & + flag, & + status, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: count + type(MPI_Request), intent(in) :: array_of_requests(count) + integer, intent(out) :: index + logical, intent(out) :: flag + type(MPI_Status), intent(out) :: status + integer, intent(out) :: ierror + end subroutine MPI_Request_get_status_any + + subroutine MPI_Request_get_status_some( & + incount, & + array_of_requests, & + outcount, & + array_of_indices, & + array_of_statuses, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: incount + type(MPI_Request), intent(in) :: array_of_requests(incount) + integer, intent(out) :: outcount + integer, intent(out) :: array_of_indices(incount) + type(MPI_Status), intent(out) :: array_of_statuses(incount) + integer, intent(out) :: ierror + end subroutine MPI_Request_get_status_some + + subroutine MPI_Rsend( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Rsend + + subroutine MPI_Rsend_init( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Rsend_init + + subroutine MPI_Send( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Send + + subroutine MPI_Send_init( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Send_init + + subroutine MPI_Sendrecv( & + sendbuf, & + sendcount, & + sendtype, & + dest, & + sendtag, & + recvbuf, & + recvcount, & + recvtype, & + source, & + recvtag, & + comm, & + status, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + integer, intent(in) :: dest + integer, intent(in) :: sendtag + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + integer, intent(in) :: source + integer, intent(in) :: recvtag + type(MPI_Comm), intent(in) :: comm + type(MPI_Status), intent(out) :: status + integer, intent(out) :: ierror + end subroutine MPI_Sendrecv + + subroutine MPI_Sendrecv_replace( & + buf, & + count, & + datatype, & + dest, & + sendtag, & + source, & + recvtag, & + comm, & + status, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(inout) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: sendtag + integer, intent(in) :: source + integer, intent(in) :: recvtag + type(MPI_Comm), intent(in) :: comm + type(MPI_Status), intent(out) :: status + integer, intent(out) :: ierror + end subroutine MPI_Sendrecv_replace + + subroutine MPI_Session_attach_buffer( & + session, & + buffer, & + size, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Session), intent(in) :: session + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buffer + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buffer + integer, intent(in) :: buffer(*) + integer, intent(in) :: size + integer, intent(out) :: ierror + end subroutine MPI_Session_attach_buffer + + subroutine MPI_Session_detach_buffer( & + session, & + buffer_addr, & + size, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Session), intent(in) :: session + integer(MPI_ADDRESS_KIND), intent(out) :: buffer_addr + integer, intent(out) :: size + integer, intent(out) :: ierror + end subroutine MPI_Session_detach_buffer + + subroutine MPI_Session_flush_buffer( & + session, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Session), intent(in) :: session + integer, intent(out) :: ierror + end subroutine MPI_Session_flush_buffer + + subroutine MPI_Session_iflush_buffer( & + session, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Session), intent(in) :: session + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Session_iflush_buffer + + subroutine MPI_Ssend( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Ssend + + subroutine MPI_Ssend_init( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Ssend_init + + subroutine MPI_Start( & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Request), intent(inout) :: request + integer, intent(out) :: ierror + end subroutine MPI_Start + + subroutine MPI_Startall( & + count, & + array_of_requests, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: count + type(MPI_Request), intent(inout) :: array_of_requests(count) + integer, intent(out) :: ierror + end subroutine MPI_Startall + + subroutine MPI_Status_get_error( & + status, & + err, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Status), intent(in) :: status + integer, intent(out) :: err + integer, intent(out) :: ierror + end subroutine MPI_Status_get_error + + subroutine MPI_Status_get_source( & + status, & + source, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Status), intent(in) :: status + integer, intent(out) :: source + integer, intent(out) :: ierror + end subroutine MPI_Status_get_source + + subroutine MPI_Status_get_tag( & + status, & + tag, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Status), intent(in) :: status + integer, intent(out) :: tag + integer, intent(out) :: ierror + end subroutine MPI_Status_get_tag + + subroutine MPI_Test( & + request, & + flag, & + status, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Request), intent(inout) :: request + logical, intent(out) :: flag + type(MPI_Status), intent(out) :: status + integer, intent(out) :: ierror + end subroutine MPI_Test + + subroutine MPI_Test_cancelled( & + status, & + flag, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Status), intent(in) :: status + logical, intent(out) :: flag + integer, intent(out) :: ierror + end subroutine MPI_Test_cancelled + + subroutine MPI_Testall( & + count, & + array_of_requests, & + flag, & + array_of_statuses, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: count + type(MPI_Request), intent(inout) :: array_of_requests(count) + logical, intent(out) :: flag + type(MPI_Status), intent(out) :: array_of_statuses(count) + integer, intent(out) :: ierror + end subroutine MPI_Testall + + subroutine MPI_Testany( & + count, & + array_of_requests, & + index, & + flag, & + status, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: count + type(MPI_Request), intent(inout) :: array_of_requests(count) + integer, intent(out) :: index + logical, intent(out) :: flag + type(MPI_Status), intent(out) :: status + integer, intent(out) :: ierror + end subroutine MPI_Testany + + subroutine MPI_Testsome( & + incount, & + array_of_requests, & + outcount, & + array_of_indices, & + array_of_statuses, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: incount + type(MPI_Request), intent(inout) :: array_of_requests(incount) + integer, intent(out) :: outcount + integer, intent(out) :: array_of_indices(incount) + type(MPI_Status), intent(out) :: array_of_statuses(incount) + integer, intent(out) :: ierror + end subroutine MPI_Testsome + + subroutine MPI_Wait( & + request, & + status, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Request), intent(inout) :: request + type(MPI_Status), intent(out) :: status + integer, intent(out) :: ierror + end subroutine MPI_Wait + + subroutine MPI_Waitall( & + count, & + array_of_requests, & + array_of_statuses, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: count + type(MPI_Request), intent(inout) :: array_of_requests(count) + type(MPI_Status), intent(out) :: array_of_statuses(count) + integer, intent(out) :: ierror + end subroutine MPI_Waitall + + subroutine MPI_Waitany( & + count, & + array_of_requests, & + index, & + status, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: count + type(MPI_Request), intent(inout) :: array_of_requests(count) + integer, intent(out) :: index + type(MPI_Status), intent(out) :: status + integer, intent(out) :: ierror + end subroutine MPI_Waitany + + subroutine MPI_Waitsome( & + incount, & + array_of_requests, & + outcount, & + array_of_indices, & + array_of_statuses, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: incount + type(MPI_Request), intent(inout) :: array_of_requests(incount) + integer, intent(out) :: outcount + integer, intent(out) :: array_of_indices(incount) + type(MPI_Status), intent(out) :: array_of_statuses(incount) + integer, intent(out) :: ierror + end subroutine MPI_Waitsome + + subroutine MPI_Parrived( & + request, & + partition, & + flag, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Request), intent(in) :: request + integer, intent(in) :: partition + logical, intent(out) :: flag + integer, intent(out) :: ierror + end subroutine MPI_Parrived + + subroutine MPI_Pready( & + partition, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: partition + type(MPI_Request), intent(in) :: request + integer, intent(out) :: ierror + end subroutine MPI_Pready + + subroutine MPI_Pready_list( & + length, & + array_of_partitions, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: length + integer, intent(in) :: array_of_partitions(length) + type(MPI_Request), intent(in) :: request + integer, intent(out) :: ierror + end subroutine MPI_Pready_list + + subroutine MPI_Pready_range( & + partition_low, & + partition_high, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: partition_low + integer, intent(in) :: partition_high + type(MPI_Request), intent(in) :: request + integer, intent(out) :: ierror + end subroutine MPI_Pready_range + + subroutine MPI_Precv_init( & + buf, & + partitions, & + count, & + datatype, & + source, & + tag, & + comm, & + info, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: partitions + integer(MPI_COUNT_KIND), intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: source + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Precv_init + + subroutine MPI_Psend_init( & + buf, & + partitions, & + count, & + datatype, & + source, & + tag, & + comm, & + info, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: partitions + integer(MPI_COUNT_KIND), intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: source + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Psend_init + + function MPI_Aint_add( & + base, & + disp & + ) result(result) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer(MPI_ADDRESS_KIND), intent(in) :: base + integer(MPI_ADDRESS_KIND), intent(in) :: disp + integer(MPI_ADDRESS_KIND) :: result + end function MPI_Aint_add + + function MPI_Aint_diff( & + addr1, & + addr2 & + ) result(result) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer(MPI_ADDRESS_KIND), intent(in) :: addr1 + integer(MPI_ADDRESS_KIND), intent(in) :: addr2 + integer(MPI_ADDRESS_KIND) :: result + end function MPI_Aint_diff + + subroutine MPI_Get_address( & + location, & + address, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) location + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: location + integer, intent(in) :: location(*) + integer(MPI_ADDRESS_KIND), intent(out) :: address + integer, intent(out) :: ierror + end subroutine MPI_Get_address + + subroutine MPI_Get_elements( & + status, & + datatype, & + count, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Status), intent(in) :: status + type(MPI_Datatype), intent(in) :: datatype + integer, intent(out) :: count + integer, intent(out) :: ierror + end subroutine MPI_Get_elements + + subroutine MPI_Pack( & + inbuf, & + incount, & + datatype, & + outbuf, & + outsize, & + position, & + comm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) inbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: inbuf + integer, intent(in) :: inbuf(*) + integer, intent(in) :: incount + type(MPI_Datatype), intent(in) :: datatype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) outbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: outbuf + integer :: outbuf(*) + integer, intent(in) :: outsize + integer, intent(out) :: position + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Pack + + subroutine MPI_Pack_external( & + datarep, & + inbuf, & + incount, & + datatype, & + outbuf, & + outsize, & + position, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + character(*), intent(in) :: datarep + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) inbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: inbuf + integer, intent(in) :: inbuf(*) + integer, intent(in) :: incount + type(MPI_Datatype), intent(in) :: datatype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) outbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: outbuf + integer :: outbuf(*) + integer(MPI_ADDRESS_KIND), intent(in) :: outsize + integer(MPI_ADDRESS_KIND), intent(out) :: position + integer, intent(out) :: ierror + end subroutine MPI_Pack_external + + subroutine MPI_Pack_external_size( & + datarep, & + incount, & + datatype, & + size, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + character(*), intent(in) :: datarep + integer(MPI_COUNT_KIND), intent(in) :: incount + type(MPI_Datatype), intent(in) :: datatype + integer(MPI_ADDRESS_KIND), intent(out) :: size + integer, intent(out) :: ierror + end subroutine MPI_Pack_external_size + + subroutine MPI_Pack_size( & + incount, & + datatype, & + comm, & + size, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: incount + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: size + integer, intent(out) :: ierror + end subroutine MPI_Pack_size + + subroutine MPI_Type_commit( & + datatype, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Datatype), intent(out) :: datatype + integer, intent(out) :: ierror + end subroutine MPI_Type_commit + + subroutine MPI_Type_contiguous( & + count, & + oldtype, & + newtype, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: oldtype + type(MPI_Datatype), intent(out) :: newtype + integer, intent(out) :: ierror + end subroutine MPI_Type_contiguous + + subroutine MPI_Type_create_darray( & + size, & + rank, & + ndims, & + array_of_gsizes, & + array_of_distribs, & + array_of_dargs, & + array_of_psizes, & + order, & + oldtype, & + newtype, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: size + integer, intent(in) :: rank + integer, intent(in) :: ndims + integer, intent(in) :: array_of_gsizes(ndims) + integer, intent(in) :: array_of_distribs(ndims) + integer, intent(in) :: array_of_dargs(ndims) + integer, intent(in) :: array_of_psizes(ndims) + integer, intent(in) :: order + type(MPI_Datatype), intent(in) :: oldtype + type(MPI_Datatype), intent(out) :: newtype + integer, intent(out) :: ierror + end subroutine MPI_Type_create_darray + + subroutine MPI_Type_create_hindexed( & + count, & + array_of_blocklengths, & + array_of_displacements, & + oldtype, & + newtype, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: count + integer, intent(in) :: array_of_blocklengths(count) + integer(MPI_ADDRESS_KIND), intent(in) :: array_of_displacements(count) + type(MPI_Datatype), intent(in) :: oldtype + type(MPI_Datatype), intent(out) :: newtype + integer, intent(out) :: ierror + end subroutine MPI_Type_create_hindexed + + subroutine MPI_Type_create_hindexed_block( & + count, & + blocklength, & + array_of_displacements, & + oldtype, & + newtype, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: count + integer, intent(in) :: blocklength + integer(MPI_ADDRESS_KIND), intent(in) :: array_of_displacements(count) + type(MPI_Datatype), intent(in) :: oldtype + type(MPI_Datatype), intent(out) :: newtype + integer, intent(out) :: ierror + end subroutine MPI_Type_create_hindexed_block + + subroutine MPI_Type_create_hvector( & + count, & + blocklength, & + stride, & + oldtype, & + newtype, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: count + integer, intent(in) :: blocklength + integer(MPI_ADDRESS_KIND), intent(in) :: stride + type(MPI_Datatype), intent(in) :: oldtype + type(MPI_Datatype), intent(out) :: newtype + integer, intent(out) :: ierror + end subroutine MPI_Type_create_hvector + + subroutine MPI_Type_create_indexed_block( & + count, & + blocklength, & + array_of_displacements, & + oldtype, & + newtype, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: count + integer, intent(in) :: blocklength + integer, intent(in) :: array_of_displacements(count) + type(MPI_Datatype), intent(in) :: oldtype + type(MPI_Datatype), intent(out) :: newtype + integer, intent(out) :: ierror + end subroutine MPI_Type_create_indexed_block + + subroutine MPI_Type_create_resized( & + oldtype, & + lb, & + extent, & + newtype, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Datatype), intent(in) :: oldtype + integer(MPI_ADDRESS_KIND), intent(in) :: lb + integer(MPI_ADDRESS_KIND), intent(in) :: extent + type(MPI_Datatype), intent(out) :: newtype + integer, intent(out) :: ierror + end subroutine MPI_Type_create_resized + + subroutine MPI_Type_create_struct( & + count, & + array_of_blocklengths, & + array_of_displacements, & + array_of_types, & + newtype, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: count + integer, intent(in) :: array_of_blocklengths(count) + integer(MPI_ADDRESS_KIND), intent(in) :: array_of_displacements(count) + type(MPI_Datatype), intent(in) :: array_of_types(count) + type(MPI_Datatype), intent(out) :: newtype + integer, intent(out) :: ierror + end subroutine MPI_Type_create_struct + + subroutine MPI_Type_create_subarray( & + ndims, & + array_of_sizes, & + array_of_subsizes, & + array_of_starts, & + order, & + oldtype, & + newtype, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: ndims + integer, intent(in) :: array_of_sizes(ndims) + integer, intent(in) :: array_of_subsizes(ndims) + integer, intent(in) :: array_of_starts(ndims) + integer, intent(in) :: order + type(MPI_Datatype), intent(in) :: oldtype + type(MPI_Datatype), intent(out) :: newtype + integer, intent(out) :: ierror + end subroutine MPI_Type_create_subarray + + subroutine MPI_Type_dup( & + oldtype, & + newtype, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Datatype), intent(in) :: oldtype + type(MPI_Datatype), intent(out) :: newtype + integer, intent(out) :: ierror + end subroutine MPI_Type_dup + + subroutine MPI_Type_free( & + datatype, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Datatype), intent(out) :: datatype + integer, intent(out) :: ierror + end subroutine MPI_Type_free + + subroutine MPI_Type_get_contents( & + datatype, & + max_integers, & + max_addresses, & + max_datatypes, & + array_of_integers, & + array_of_addresses, & + array_of_datatypes, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: max_integers + integer, intent(in) :: max_addresses + integer, intent(in) :: max_datatypes + integer, intent(out) :: array_of_integers + integer(MPI_ADDRESS_KIND), intent(out) :: array_of_addresses + type(MPI_Datatype), intent(out) :: array_of_datatypes + integer, intent(out) :: ierror + end subroutine MPI_Type_get_contents + + subroutine MPI_Type_get_envelope( & + datatype, & + num_integers, & + num_addresses, & + num_datatypes, & + combiner, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Datatype), intent(in) :: datatype + integer, intent(out) :: num_integers + integer, intent(out) :: num_addresses + integer, intent(out) :: num_datatypes + integer, intent(out) :: combiner + integer, intent(out) :: ierror + end subroutine MPI_Type_get_envelope + + subroutine MPI_Type_get_extent( & + datatype, & + lb, & + extent, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Datatype), intent(in) :: datatype + integer(MPI_ADDRESS_KIND), intent(out) :: lb + integer(MPI_ADDRESS_KIND), intent(out) :: extent + integer, intent(out) :: ierror + end subroutine MPI_Type_get_extent + + subroutine MPI_Type_get_true_extent( & + datatype, & + true_lb, & + true_extent, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Datatype), intent(in) :: datatype + integer(MPI_ADDRESS_KIND), intent(out) :: true_lb + integer(MPI_ADDRESS_KIND), intent(out) :: true_extent + integer, intent(out) :: ierror + end subroutine MPI_Type_get_true_extent + + subroutine MPI_Type_indexed( & + count, & + array_of_blocklengths, & + array_of_displacements, & + oldtype, & + newtype, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: count + integer, intent(in) :: array_of_blocklengths(count) + integer, intent(in) :: array_of_displacements(count) + type(MPI_Datatype), intent(in) :: oldtype + type(MPI_Datatype), intent(out) :: newtype + integer, intent(out) :: ierror + end subroutine MPI_Type_indexed + + subroutine MPI_Type_size( & + datatype, & + size, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Datatype), intent(in) :: datatype + integer, intent(out) :: size + integer, intent(out) :: ierror + end subroutine MPI_Type_size + + subroutine MPI_Type_vector( & + count, & + blocklength, & + stride, & + oldtype, & + newtype, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: count + integer, intent(in) :: blocklength + integer, intent(in) :: stride + type(MPI_Datatype), intent(in) :: oldtype + type(MPI_Datatype), intent(out) :: newtype + integer, intent(out) :: ierror + end subroutine MPI_Type_vector + + subroutine MPI_Unpack( & + inbuf, & + insize, & + position, & + outbuf, & + outcount, & + datatype, & + comm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) inbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: inbuf + integer, intent(in) :: inbuf(*) + integer, intent(in) :: insize + integer, intent(out) :: position + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) outbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: outbuf + integer :: outbuf(*) + integer, intent(in) :: outcount + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Unpack + + subroutine MPI_Unpack_external( & + datarep, & + inbuf, & + insize, & + position, & + outbuf, & + outcount, & + datatype, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + character(*), intent(in) :: datarep + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) inbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: inbuf + integer, intent(in) :: inbuf(*) + integer(MPI_ADDRESS_KIND), intent(in) :: insize + integer(MPI_ADDRESS_KIND), intent(out) :: position + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) outbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: outbuf + integer :: outbuf(*) + integer, intent(in) :: outcount + type(MPI_Datatype), intent(in) :: datatype + integer, intent(out) :: ierror + end subroutine MPI_Unpack_external + + subroutine MPI_Allgather( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Allgather + + subroutine MPI_Allgather_init( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + info, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Allgather_init + + subroutine MPI_Allgatherv( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcounts, & + displs, & + recvtype, & + comm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: displs(*) + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Allgatherv + + subroutine MPI_Allgatherv_init( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcounts, & + displs, & + recvtype, & + comm, & + info, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: displs(*) + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Allgatherv_init + + subroutine MPI_Allreduce( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + comm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Op), intent(in) :: op + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Allreduce + + subroutine MPI_Allreduce_init( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + comm, & + info, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Op), intent(in) :: op + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Allreduce_init + + subroutine MPI_Alltoall( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Alltoall + + subroutine MPI_Alltoall_init( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + info, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Alltoall_init + + subroutine MPI_Alltoallv( & + sendbuf, & + sendcounts, & + sdispls, & + sendtype, & + recvbuf, & + recvcounts, & + rdispls, & + recvtype, & + comm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: rdispls(*) + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Alltoallv + + subroutine MPI_Alltoallv_init( & + sendbuf, & + sendcounts, & + sdispls, & + sendtype, & + recvbuf, & + recvcounts, & + rdispls, & + recvtype, & + comm, & + info, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: rdispls(*) + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Alltoallv_init + + subroutine MPI_Alltoallw( & + sendbuf, & + sendcounts, & + sdispls, & + sendtypes, & + recvbuf, & + recvcounts, & + rdispls, & + recvtypes, & + comm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + type(MPI_Datatype), intent(in) :: sendtypes(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: rdispls(*) + type(MPI_Datatype), intent(in) :: recvtypes(*) + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Alltoallw + + subroutine MPI_Alltoallw_init( & + sendbuf, & + sendcounts, & + sdispls, & + sendtypes, & + recvbuf, & + recvcounts, & + rdispls, & + recvtypes, & + comm, & + info, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + type(MPI_Datatype), intent(in) :: sendtypes(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: rdispls(*) + type(MPI_Datatype), intent(in) :: recvtypes(*) + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Alltoallw_init + + subroutine MPI_Barrier( & + comm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Barrier + + subroutine MPI_Barrier_init( & + comm, & + info, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Barrier_init + + subroutine MPI_Bcast( & + buffer, & + count, & + datatype, & + root, & + comm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buffer + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buffer + integer :: buffer(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Bcast + + subroutine MPI_Bcast_init( & + buffer, & + count, & + datatype, & + root, & + comm, & + info, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buffer + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buffer + integer :: buffer(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Bcast_init + + subroutine MPI_Exscan( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + comm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Op), intent(in) :: op + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Exscan + + subroutine MPI_Exscan_init( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + comm, & + info, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Op), intent(in) :: op + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Exscan_init + + subroutine MPI_Gather( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + root, & + comm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Gather + + subroutine MPI_Gather_init( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + root, & + comm, & + info, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Gather_init + + subroutine MPI_Gatherv( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcounts, & + displs, & + recvtype, & + root, & + comm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: displs(*) + type(MPI_Datatype), intent(in) :: recvtype + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Gatherv + + subroutine MPI_Gatherv_init( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcounts, & + displs, & + recvtype, & + root, & + comm, & + info, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: displs(*) + type(MPI_Datatype), intent(in) :: recvtype + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Gatherv_init + + subroutine MPI_Iallgather( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Iallgather + + subroutine MPI_Iallgatherv( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcounts, & + displs, & + recvtype, & + comm, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: displs(*) + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Iallgatherv + + subroutine MPI_Iallreduce( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + comm, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Op), intent(in) :: op + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Iallreduce + + subroutine MPI_Ialltoall( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Ialltoall + + subroutine MPI_Ialltoallv( & + sendbuf, & + sendcounts, & + sdispls, & + sendtype, & + recvbuf, & + recvcounts, & + rdispls, & + recvtype, & + comm, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: rdispls(*) + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Ialltoallv + + subroutine MPI_Ialltoallw( & + sendbuf, & + sendcounts, & + sdispls, & + sendtypes, & + recvbuf, & + recvcounts, & + rdispls, & + recvtypes, & + comm, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + type(MPI_Datatype), intent(in) :: sendtypes(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: rdispls(*) + type(MPI_Datatype), intent(in) :: recvtypes(*) + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Ialltoallw + + subroutine MPI_Ibarrier( & + comm, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Ibarrier + + subroutine MPI_Ibcast( & + buffer, & + count, & + datatype, & + root, & + comm, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buffer + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buffer + integer :: buffer(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Ibcast + + subroutine MPI_Iexscan( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + comm, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Op), intent(in) :: op + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Iexscan + + subroutine MPI_Igather( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + root, & + comm, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Igather + + subroutine MPI_Igatherv( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcounts, & + displs, & + recvtype, & + root, & + comm, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: displs(*) + type(MPI_Datatype), intent(in) :: recvtype + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Igatherv + + subroutine MPI_Ireduce( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + root, & + comm, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Op), intent(in) :: op + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Ireduce + + subroutine MPI_Ireduce_scatter( & + sendbuf, & + recvbuf, & + recvcounts, & + datatype, & + op, & + comm, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Op), intent(in) :: op + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Ireduce_scatter + + subroutine MPI_Ireduce_scatter_block( & + sendbuf, & + recvbuf, & + recvcount, & + datatype, & + op, & + comm, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Op), intent(in) :: op + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Ireduce_scatter_block + + subroutine MPI_Iscan( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + comm, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Op), intent(in) :: op + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Iscan + + subroutine MPI_Iscatter( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + root, & + comm, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Iscatter + + subroutine MPI_Iscatterv( & + sendbuf, & + sendcounts, & + sdispls, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + root, & + comm, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Iscatterv + + subroutine MPI_Op_commutative( & + op, & + commute, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Op), intent(in) :: op + logical, intent(out) :: commute + integer, intent(out) :: ierror + end subroutine MPI_Op_commutative + + subroutine MPI_Op_create( & + user_fn, & + commute, & + op, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + external :: user_fn + logical, intent(in) :: commute + type(MPI_Op), intent(out) :: op + integer, intent(out) :: ierror + end subroutine MPI_Op_create + + subroutine MPI_Op_free( & + op, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Op), intent(out) :: op + integer, intent(out) :: ierror + end subroutine MPI_Op_free + + subroutine MPI_Reduce( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + root, & + comm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Op), intent(in) :: op + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Reduce + + subroutine MPI_Reduce_init( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + root, & + comm, & + info, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Op), intent(in) :: op + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Reduce_init + + subroutine MPI_Reduce_local( & + inbuf, & + inoutbuf, & + count, & + datatype, & + op, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) inbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: inbuf + integer, intent(in) :: inbuf(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) inoutbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: inoutbuf + integer :: inoutbuf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Op), intent(in) :: op + integer, intent(out) :: ierror + end subroutine MPI_Reduce_local + + subroutine MPI_Reduce_scatter( & + sendbuf, & + recvbuf, & + recvcounts, & + datatype, & + op, & + comm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Op), intent(in) :: op + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Reduce_scatter + + subroutine MPI_Reduce_scatter_block( & + sendbuf, & + recvbuf, & + recvcount, & + datatype, & + op, & + comm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Op), intent(in) :: op + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Reduce_scatter_block + + subroutine MPI_Reduce_scatter_block_init( & + sendbuf, & + recvbuf, & + recvcount, & + datatype, & + op, & + comm, & + info, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Op), intent(in) :: op + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Reduce_scatter_block_init + + subroutine MPI_Reduce_scatter_init( & + sendbuf, & + recvbuf, & + recvcounts, & + datatype, & + op, & + comm, & + info, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Op), intent(in) :: op + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Reduce_scatter_init + + subroutine MPI_Scan( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + comm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Op), intent(in) :: op + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Scan + + subroutine MPI_Scan_init( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + comm, & + info, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Op), intent(in) :: op + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Scan_init + + subroutine MPI_Scatter( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + root, & + comm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Scatter + + subroutine MPI_Scatter_init( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + root, & + comm, & + info, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Scatter_init + + subroutine MPI_Scatterv( & + sendbuf, & + sendcounts, & + displs, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + root, & + comm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: displs(*) + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Scatterv + + subroutine MPI_Scatterv_init( & + sendbuf, & + sendcounts, & + displs, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + root, & + comm, & + info, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: displs(*) + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Scatterv_init + + subroutine MPI_Type_get_value_index( & + value_type, & + index_type, & + pair_type, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Datatype), intent(in) :: value_type + type(MPI_Datatype), intent(in) :: index_type + type(MPI_Datatype), intent(out) :: pair_type + integer, intent(out) :: ierror + end subroutine MPI_Type_get_value_index + + subroutine MPI_Comm_compare( & + comm1, & + comm2, & + result, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm1 + type(MPI_Comm), intent(in) :: comm2 + integer, intent(out) :: result + integer, intent(out) :: ierror + end subroutine MPI_Comm_compare + + subroutine MPI_Comm_create( & + comm, & + group, & + newcomm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + type(MPI_Group), intent(in) :: group + type(MPI_Comm), intent(out) :: newcomm + integer, intent(out) :: ierror + end subroutine MPI_Comm_create + + subroutine MPI_Comm_create_from_group( & + group, & + stringtag, & + info, & + errhandler, & + newcomm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Group), intent(in) :: group + character(*), intent(in) :: stringtag + type(MPI_Info), intent(in) :: info + type(MPI_Errhandler), intent(in) :: errhandler + type(MPI_Comm), intent(out) :: newcomm + integer, intent(out) :: ierror + end subroutine MPI_Comm_create_from_group + + subroutine MPI_Comm_create_group( & + comm, & + group, & + tag, & + newcomm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + type(MPI_Group), intent(in) :: group + integer, intent(in) :: tag + type(MPI_Comm), intent(out) :: newcomm + integer, intent(out) :: ierror + end subroutine MPI_Comm_create_group + + subroutine MPI_Comm_create_keyval( & + comm_copy_attr_fn, & + comm_delete_attr_fn, & + comm_keyval, & + extra_state, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + external :: comm_copy_attr_fn + external :: comm_delete_attr_fn + integer, intent(out) :: comm_keyval + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) extra_state + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: extra_state + integer :: extra_state(*) + integer, intent(out) :: ierror + end subroutine MPI_Comm_create_keyval + + subroutine MPI_Comm_delete_attr( & + comm, & + comm_keyval, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: comm_keyval + integer, intent(out) :: ierror + end subroutine MPI_Comm_delete_attr + + subroutine MPI_Comm_dup( & + comm, & + newcomm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + type(MPI_Comm), intent(out) :: newcomm + integer, intent(out) :: ierror + end subroutine MPI_Comm_dup + + subroutine MPI_Comm_dup_with_info( & + comm, & + info, & + newcomm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Comm), intent(out) :: newcomm + integer, intent(out) :: ierror + end subroutine MPI_Comm_dup_with_info + + subroutine MPI_Comm_free( & + comm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(out) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Comm_free + + subroutine MPI_Comm_get_name( & + comm, & + comm_name, & + resultlen, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + character(*), intent(out) :: comm_name + integer, intent(out) :: resultlen + integer, intent(out) :: ierror + end subroutine MPI_Comm_get_name + + subroutine MPI_Comm_free_keyval( & + comm_keyval, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(out) :: comm_keyval + integer, intent(out) :: ierror + end subroutine MPI_Comm_free_keyval + + subroutine MPI_Comm_get_attr( & + comm, & + comm_keyval, & + attribute_val, & + flag, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: comm_keyval + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) attribute_val + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: attribute_val + integer :: attribute_val(*) + logical, intent(out) :: flag + integer, intent(out) :: ierror + end subroutine MPI_Comm_get_attr + + subroutine MPI_Comm_get_info( & + comm, & + info_used, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(out) :: info_used + integer, intent(out) :: ierror + end subroutine MPI_Comm_get_info + + subroutine MPI_Comm_group( & + comm, & + group, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + type(MPI_Group), intent(out) :: group + integer, intent(out) :: ierror + end subroutine MPI_Comm_group + + subroutine MPI_Comm_idup( & + comm, & + newcomm, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + type(MPI_Comm), intent(out) :: newcomm + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Comm_idup + + subroutine MPI_Comm_idup_with_info( & + comm, & + info, & + newcomm, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Comm), intent(out) :: newcomm + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Comm_idup_with_info + + subroutine MPI_Comm_rank( & + comm, & + rank, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: rank + integer, intent(out) :: ierror + end subroutine MPI_Comm_rank + + subroutine MPI_Comm_remote_group( & + comm, & + group, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + type(MPI_Group), intent(out) :: group + integer, intent(out) :: ierror + end subroutine MPI_Comm_remote_group + + subroutine MPI_Comm_remote_size( & + comm, & + size, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: size + integer, intent(out) :: ierror + end subroutine MPI_Comm_remote_size + + subroutine MPI_Comm_set_attr( & + comm, & + comm_keyval, & + attribute_val, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: comm_keyval + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) attribute_val + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: attribute_val + integer :: attribute_val(*) + integer, intent(out) :: ierror + end subroutine MPI_Comm_set_attr + + subroutine MPI_Comm_set_info( & + comm, & + info, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + integer, intent(out) :: ierror + end subroutine MPI_Comm_set_info + + subroutine MPI_Comm_set_name( & + comm, & + comm_name, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + character(*), intent(in) :: comm_name + integer, intent(out) :: ierror + end subroutine MPI_Comm_set_name + + subroutine MPI_Comm_size( & + comm, & + size, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: size + integer, intent(out) :: ierror + end subroutine MPI_Comm_size + + subroutine MPI_Comm_split( & + comm, & + color, & + key, & + newcomm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: color + integer, intent(in) :: key + type(MPI_Comm), intent(out) :: newcomm + integer, intent(out) :: ierror + end subroutine MPI_Comm_split + + subroutine MPI_Group_free( & + group, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Group), intent(out) :: group + integer, intent(out) :: ierror + end subroutine MPI_Group_free + + subroutine MPI_Comm_split_type( & + comm, & + split_type, & + key, & + info, & + newcomm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: split_type + integer, intent(in) :: key + type(MPI_Info), intent(in) :: info + type(MPI_Comm), intent(out) :: newcomm + integer, intent(out) :: ierror + end subroutine MPI_Comm_split_type + + subroutine MPI_Comm_test_inter( & + comm, & + flag, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + logical, intent(out) :: flag + integer, intent(out) :: ierror + end subroutine MPI_Comm_test_inter + + subroutine MPI_Group_compare( & + group1, & + group2, & + result, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Group), intent(in) :: group1 + type(MPI_Group), intent(in) :: group2 + integer, intent(out) :: result + integer, intent(out) :: ierror + end subroutine MPI_Group_compare + + subroutine MPI_Group_difference( & + group1, & + group2, & + newgroup, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Group), intent(in) :: group1 + type(MPI_Group), intent(in) :: group2 + type(MPI_Group), intent(out) :: newgroup + integer, intent(out) :: ierror + end subroutine MPI_Group_difference + + subroutine MPI_Group_excl( & + group, & + n, & + ranks, & + newgroup, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Group), intent(in) :: group + integer, intent(in) :: n + integer, intent(in) :: ranks(n) + type(MPI_Group), intent(out) :: newgroup + integer, intent(out) :: ierror + end subroutine MPI_Group_excl + + subroutine MPI_Group_from_session_pset( & + session, & + pset_name, & + newgroup, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Session), intent(in) :: session + character(*), intent(in) :: pset_name + type(MPI_Group), intent(out) :: newgroup + integer, intent(out) :: ierror + end subroutine MPI_Group_from_session_pset + + subroutine MPI_Group_incl( & + group, & + n, & + ranks, & + newgroup, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Group), intent(in) :: group + integer, intent(in) :: n + integer, intent(in) :: ranks(n) + type(MPI_Group), intent(out) :: newgroup + integer, intent(out) :: ierror + end subroutine MPI_Group_incl + + subroutine MPI_Group_intersection( & + group1, & + group2, & + newgroup, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Group), intent(in) :: group1 + type(MPI_Group), intent(in) :: group2 + type(MPI_Group), intent(out) :: newgroup + integer, intent(out) :: ierror + end subroutine MPI_Group_intersection + + subroutine MPI_Group_range_excl( & + group, & + n, & + ranges, & + newgroup, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Group), intent(in) :: group + integer, intent(in) :: n + integer, intent(in) :: ranges(n) + type(MPI_Group), intent(out) :: newgroup + integer, intent(out) :: ierror + end subroutine MPI_Group_range_excl + + subroutine MPI_Group_range_incl( & + group, & + n, & + ranges, & + newgroup, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Group), intent(in) :: group + integer, intent(in) :: n + integer, intent(in) :: ranges(n) + type(MPI_Group), intent(out) :: newgroup + integer, intent(out) :: ierror + end subroutine MPI_Group_range_incl + + subroutine MPI_Group_rank( & + group, & + rank, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Group), intent(in) :: group + integer, intent(out) :: rank + integer, intent(out) :: ierror + end subroutine MPI_Group_rank + + subroutine MPI_Group_size( & + group, & + size, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Group), intent(in) :: group + integer, intent(out) :: size + integer, intent(out) :: ierror + end subroutine MPI_Group_size + + subroutine MPI_Group_translate_ranks( & + group1, & + n, & + ranks1, & + group2, & + ranks2, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Group), intent(in) :: group1 + integer, intent(in) :: n + integer, intent(in) :: ranks1(n) + type(MPI_Group), intent(in) :: group2 + integer, intent(in) :: ranks2(n) + integer, intent(out) :: ierror + end subroutine MPI_Group_translate_ranks + + subroutine MPI_Group_union( & + group1, & + group2, & + newgroup, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Group), intent(in) :: group1 + type(MPI_Group), intent(in) :: group2 + type(MPI_Group), intent(out) :: newgroup + integer, intent(out) :: ierror + end subroutine MPI_Group_union + + subroutine MPI_Intercomm_create( & + local_comm, & + local_leader, & + peer_comm, & + remote_leader, & + tag, & + newintercomm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: local_comm + integer, intent(in) :: local_leader + type(MPI_Comm), intent(in) :: peer_comm + integer, intent(in) :: remote_leader + integer, intent(in) :: tag + type(MPI_Comm), intent(out) :: newintercomm + integer, intent(out) :: ierror + end subroutine MPI_Intercomm_create + + subroutine MPI_Intercomm_create_from_groups( & + local_group, & + local_leader, & + remote_group, & + remote_leader, & + stringtag, & + info, & + errhandler, & + newintercomm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Group), intent(in) :: local_group + integer, intent(in) :: local_leader + type(MPI_Group), intent(in) :: remote_group + integer, intent(in) :: remote_leader + character(*), intent(in) :: stringtag + type(MPI_Info), intent(in) :: info + type(MPI_Errhandler), intent(in) :: errhandler + type(MPI_Comm), intent(out) :: newintercomm + integer, intent(out) :: ierror + end subroutine MPI_Intercomm_create_from_groups + + subroutine MPI_Intercomm_merge( & + intercomm, & + high, & + newintracomm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: intercomm + integer, intent(in) :: high + type(MPI_Comm), intent(out) :: newintracomm + integer, intent(out) :: ierror + end subroutine MPI_Intercomm_merge + + subroutine MPI_Type_create_keyval( & + type_copy_attr_fn, & + type_delete_attr_fn, & + type_keyval, & + extra_state, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + external :: type_copy_attr_fn + external :: type_delete_attr_fn + integer, intent(out) :: type_keyval + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) extra_state + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: extra_state + integer :: extra_state(*) + integer, intent(out) :: ierror + end subroutine MPI_Type_create_keyval + + subroutine MPI_Type_delete_attr( & + datatype, & + type_keyval, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: type_keyval + integer, intent(out) :: ierror + end subroutine MPI_Type_delete_attr + + subroutine MPI_Type_free_keyval( & + type_keyval, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(out) :: type_keyval + integer, intent(out) :: ierror + end subroutine MPI_Type_free_keyval + + subroutine MPI_Type_get_attr( & + datatype, & + type_keyval, & + attribute_val, & + flag, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: type_keyval + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) attribute_val + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: attribute_val + integer :: attribute_val(*) + logical, intent(out) :: flag + integer, intent(out) :: ierror + end subroutine MPI_Type_get_attr + + subroutine MPI_Type_get_name( & + datatype, & + type_name, & + resultlen, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Datatype), intent(in) :: datatype + character(*), intent(out) :: type_name + integer, intent(out) :: resultlen + integer, intent(out) :: ierror + end subroutine MPI_Type_get_name + + subroutine MPI_Type_set_attr( & + datatype, & + type_keyval, & + attribute_val, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: type_keyval + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) attribute_val + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: attribute_val + integer :: attribute_val(*) + integer, intent(out) :: ierror + end subroutine MPI_Type_set_attr + + subroutine MPI_Type_set_name( & + datatype, & + type_name, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Datatype), intent(in) :: datatype + character(*), intent(in) :: type_name + integer, intent(out) :: ierror + end subroutine MPI_Type_set_name + + subroutine MPI_Win_create_keyval( & + win_copy_attr_fn, & + win_delete_attr_fn, & + win_keyval, & + extra_state, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + external :: win_copy_attr_fn + external :: win_delete_attr_fn + integer, intent(out) :: win_keyval + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) extra_state + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: extra_state + integer :: extra_state(*) + integer, intent(out) :: ierror + end subroutine MPI_Win_create_keyval + + subroutine MPI_Win_delete_attr( & + win, & + win_keyval, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Win), intent(in) :: win + integer, intent(in) :: win_keyval + integer, intent(out) :: ierror + end subroutine MPI_Win_delete_attr + + subroutine MPI_Win_free_keyval( & + win_keyval, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(out) :: win_keyval + integer, intent(out) :: ierror + end subroutine MPI_Win_free_keyval + + subroutine MPI_Win_get_attr( & + win, & + win_keyval, & + attribute_val, & + flag, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Win), intent(in) :: win + integer, intent(in) :: win_keyval + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) attribute_val + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: attribute_val + integer :: attribute_val(*) + logical, intent(out) :: flag + integer, intent(out) :: ierror + end subroutine MPI_Win_get_attr + + subroutine MPI_Win_get_name( & + win, & + win_name, & + resultlen, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Win), intent(in) :: win + character(*), intent(out) :: win_name + integer, intent(out) :: resultlen + integer, intent(out) :: ierror + end subroutine MPI_Win_get_name + + subroutine MPI_Win_set_attr( & + win, & + win_keyval, & + attribute_val, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Win), intent(in) :: win + integer, intent(in) :: win_keyval + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) attribute_val + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: attribute_val + integer :: attribute_val(*) + integer, intent(out) :: ierror + end subroutine MPI_Win_set_attr + + subroutine MPI_Win_set_name( & + win, & + win_name, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Win), intent(in) :: win + character(*), intent(in) :: win_name + integer, intent(out) :: ierror + end subroutine MPI_Win_set_name + + subroutine MPI_Cart_coords( & + comm, & + rank, & + maxdims, & + coords, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: rank + integer, intent(in) :: maxdims + integer, intent(out) :: coords(maxdims) + integer, intent(out) :: ierror + end subroutine MPI_Cart_coords + + subroutine MPI_Cart_create( & + comm_old, & + ndims, & + dims, & + periods, & + reorder, & + comm_cart, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm_old + integer, intent(in) :: ndims + integer, intent(in) :: dims(ndims) + logical, intent(in) :: periods(ndims) + logical, intent(in) :: reorder + type(MPI_Comm), intent(out) :: comm_cart + integer, intent(out) :: ierror + end subroutine MPI_Cart_create + + subroutine MPI_Cart_get( & + comm, & + maxdims, & + dims, & + periods, & + coords, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: maxdims + integer, intent(out) :: dims(maxdims) + integer, intent(out) :: periods(maxdims) + integer, intent(out) :: coords(maxdims) + integer, intent(out) :: ierror + end subroutine MPI_Cart_get + + subroutine MPI_Cart_map( & + comm, & + ndims, & + dims, & + periods, & + newrank, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: ndims + integer, intent(in) :: dims(ndims) + integer, intent(in) :: periods(ndims) + integer, intent(out) :: newrank + integer, intent(out) :: ierror + end subroutine MPI_Cart_map + + subroutine MPI_Cart_rank( & + comm, & + coords, & + rank, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: coords(*) + integer, intent(out) :: rank + integer, intent(out) :: ierror + end subroutine MPI_Cart_rank + + subroutine MPI_Cart_shift( & + comm, & + direction, & + disp, & + rank_source, & + rank_dest, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: direction + integer, intent(in) :: disp + integer, intent(out) :: rank_source + integer, intent(out) :: rank_dest + integer, intent(out) :: ierror + end subroutine MPI_Cart_shift + + subroutine MPI_Cart_sub( & + comm, & + remain_dims, & + newcomm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + logical, intent(in) :: remain_dims(*) + type(MPI_Comm), intent(out) :: newcomm + integer, intent(out) :: ierror + end subroutine MPI_Cart_sub + + subroutine MPI_Cartdim_get( & + comm, & + ndims, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ndims + integer, intent(out) :: ierror + end subroutine MPI_Cartdim_get + + subroutine MPI_Dims_create( & + nnodes, & + ndims, & + dims, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: nnodes + integer, intent(in) :: ndims + integer, intent(in) :: dims(ndims) + integer, intent(out) :: ierror + end subroutine MPI_Dims_create + + subroutine MPI_Dist_graph_create( & + comm_old, & + n, & + sources, & + degrees, & + destinations, & + weights, & + info, & + reorder, & + comm_dist_graph, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm_old + integer, intent(in) :: n + integer, intent(in) :: sources(n) + integer, intent(in) :: degrees(n) + integer, intent(in) :: destinations(*) + integer, intent(in) :: weights(*) + type(MPI_Info), intent(in) :: info + logical, intent(in) :: reorder + type(MPI_Comm), intent(out) :: comm_dist_graph + integer, intent(out) :: ierror + end subroutine MPI_Dist_graph_create + + subroutine MPI_Dist_graph_create_adjacent( & + comm_old, & + indegree, & + sources, & + sourceweights, & + outdegree, & + destinations, & + destweights, & + info, & + reorder, & + comm_dist_graph, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm_old + integer, intent(in) :: indegree + integer, intent(in) :: sources(indegree) + integer, intent(in) :: sourceweights(*) + integer, intent(in) :: outdegree + integer, intent(in) :: destinations(outdegree) + integer, intent(in) :: destweights(*) + type(MPI_Info), intent(in) :: info + integer, intent(in) :: reorder + type(MPI_Comm), intent(out) :: comm_dist_graph + integer, intent(out) :: ierror + end subroutine MPI_Dist_graph_create_adjacent + + subroutine MPI_Dist_graph_neighbors( & + comm, & + maxindegree, & + sources, & + sourceweights, & + maxoutdegree, & + destinations, & + destweights, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: maxindegree + integer, intent(out) :: sources(maxindegree) + integer, intent(out) :: sourceweights(*) + integer, intent(in) :: maxoutdegree + integer, intent(out) :: destinations(maxoutdegree) + integer, intent(out) :: destweights(*) + integer, intent(out) :: ierror + end subroutine MPI_Dist_graph_neighbors + + subroutine MPI_Dist_graph_neighbors_count( & + comm, & + indegree, & + outdegree, & + weighted, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: indegree + integer, intent(out) :: outdegree + integer, intent(out) :: weighted + integer, intent(out) :: ierror + end subroutine MPI_Dist_graph_neighbors_count + + subroutine MPI_Graph_create( & + comm_old, & + nnodes, & + index, & + edges, & + reorder, & + comm_graph, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm_old + integer, intent(in) :: nnodes + integer, intent(in) :: index(nnodes) + integer, intent(in) :: edges(nnodes) + integer, intent(in) :: reorder + type(MPI_Comm), intent(out) :: comm_graph + integer, intent(out) :: ierror + end subroutine MPI_Graph_create + + subroutine MPI_Graph_get( & + comm, & + maxindex, & + maxedges, & + index, & + edges, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: maxindex + integer, intent(in) :: maxedges + integer, intent(out) :: index(maxindex) + integer, intent(out) :: edges(maxedges) + integer, intent(out) :: ierror + end subroutine MPI_Graph_get + + subroutine MPI_Graph_map( & + comm, & + nnodes, & + index, & + edges, & + newrank, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: nnodes + integer, intent(in) :: index(nnodes) + integer, intent(in) :: edges(nnodes) + integer, intent(out) :: newrank + integer, intent(out) :: ierror + end subroutine MPI_Graph_map + + subroutine MPI_Graph_neighbors( & + comm, & + rank, & + maxneighbors, & + neighbors, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: rank + integer, intent(in) :: maxneighbors + integer, intent(out) :: neighbors(maxneighbors) + integer, intent(out) :: ierror + end subroutine MPI_Graph_neighbors + + subroutine MPI_Graph_neighbors_count( & + comm, & + rank, & + nneighbors, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: rank + integer, intent(out) :: nneighbors + integer, intent(out) :: ierror + end subroutine MPI_Graph_neighbors_count + + subroutine MPI_Graphdims_get( & + comm, & + nnodes, & + nedges, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: nnodes + integer, intent(out) :: nedges + integer, intent(out) :: ierror + end subroutine MPI_Graphdims_get + + subroutine MPI_Ineighbor_allgather( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Ineighbor_allgather + + subroutine MPI_Ineighbor_allgatherv( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcounts, & + displs, & + recvtype, & + comm, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: displs(*) + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Ineighbor_allgatherv + + subroutine MPI_Ineighbor_alltoall( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Ineighbor_alltoall + + subroutine MPI_Ineighbor_alltoallv( & + sendbuf, & + sendcounts, & + sdispls, & + sendtype, & + recvbuf, & + recvcounts, & + rdispls, & + recvtype, & + comm, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: rdispls(*) + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Ineighbor_alltoallv + + subroutine MPI_Ineighbor_alltoallw( & + sendbuf, & + sendcounts, & + sdispls, & + sendtypes, & + recvbuf, & + recvcounts, & + rdispls, & + recvtypes, & + comm, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer(MPI_ADDRESS_KIND), intent(in) :: sdispls(*) + type(MPI_Datatype), intent(in) :: sendtypes(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer(MPI_ADDRESS_KIND), intent(in) :: rdispls(*) + type(MPI_Datatype), intent(in) :: recvtypes(*) + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Ineighbor_alltoallw + + subroutine MPI_Neighbor_allgather( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Neighbor_allgather + + subroutine MPI_Neighbor_allgather_init( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + info, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Neighbor_allgather_init + + subroutine MPI_Neighbor_allgatherv( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcounts, & + displs, & + recvtype, & + comm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer(MPI_ADDRESS_KIND), intent(in) :: displs(*) + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Neighbor_allgatherv + + subroutine MPI_Neighbor_allgatherv_init( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcounts, & + displs, & + recvtype, & + comm, & + info, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer(MPI_ADDRESS_KIND), intent(in) :: displs(*) + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Neighbor_allgatherv_init + + subroutine MPI_Neighbor_alltoall( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Neighbor_alltoall + + subroutine MPI_Neighbor_alltoall_init( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + info, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Neighbor_alltoall_init + + subroutine MPI_Neighbor_alltoallv( & + sendbuf, & + sendcounts, & + sdispls, & + sendtype, & + recvbuf, & + recvcounts, & + rdispls, & + recvtype, & + comm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: rdispls(*) + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Neighbor_alltoallv + + subroutine MPI_Neighbor_alltoallv_init( & + sendbuf, & + sendcounts, & + sdispls, & + sendtype, & + recvbuf, & + recvcounts, & + rdispls, & + recvtype, & + comm, & + info, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: rdispls(*) + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Neighbor_alltoallv_init + + subroutine MPI_Neighbor_alltoallw( & + sendbuf, & + sendcounts, & + sdispls, & + sendtypes, & + recvbuf, & + recvcounts, & + rdispls, & + recvtypes, & + comm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer(MPI_ADDRESS_KIND), intent(in) :: sdispls(*) + type(MPI_Datatype), intent(in) :: sendtypes(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer(MPI_ADDRESS_KIND), intent(in) :: rdispls(*) + type(MPI_Datatype), intent(in) :: recvtypes(*) + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Neighbor_alltoallw + + subroutine MPI_Neighbor_alltoallw_init( & + sendbuf, & + sendcounts, & + sdispls, & + sendtypes, & + recvbuf, & + recvcounts, & + rdispls, & + recvtypes, & + comm, & + info, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer(MPI_ADDRESS_KIND), intent(in) :: sdispls(*) + type(MPI_Datatype), intent(in) :: sendtypes(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer(MPI_ADDRESS_KIND), intent(in) :: rdispls(*) + type(MPI_Datatype), intent(in) :: recvtypes(*) + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Neighbor_alltoallw_init + + subroutine MPI_Topo_test( & + comm, & + status, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: status + integer, intent(out) :: ierror + end subroutine MPI_Topo_test + + subroutine MPI_Add_error_class( & + errorclass, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(out) :: errorclass + integer, intent(out) :: ierror + end subroutine MPI_Add_error_class + + subroutine MPI_Add_error_code( & + errorclass, & + errorcode, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: errorclass + integer, intent(out) :: errorcode + integer, intent(out) :: ierror + end subroutine MPI_Add_error_code + + subroutine MPI_Add_error_string( & + errorcode, & + string, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: errorcode + character(*), intent(in) :: string + integer, intent(out) :: ierror + end subroutine MPI_Add_error_string + + subroutine MPI_Alloc_mem( & + size, & + info, & + baseptr, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer(MPI_ADDRESS_KIND), intent(in) :: size + type(MPI_Info), intent(in) :: info + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) baseptr + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: baseptr + integer :: baseptr(*) + integer, intent(out) :: ierror + end subroutine MPI_Alloc_mem + + subroutine MPI_Comm_call_errhandler( & + comm, & + errorcode, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: errorcode + integer, intent(out) :: ierror + end subroutine MPI_Comm_call_errhandler + + subroutine MPI_Comm_create_errhandler( & + comm_errhandler_fn, & + errhandler, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + external :: comm_errhandler_fn + type(MPI_Errhandler), intent(out) :: errhandler + integer, intent(out) :: ierror + end subroutine MPI_Comm_create_errhandler + + subroutine MPI_Comm_get_errhandler( & + comm, & + errhandler, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + type(MPI_Errhandler), intent(out) :: errhandler + integer, intent(out) :: ierror + end subroutine MPI_Comm_get_errhandler + + subroutine MPI_Comm_set_errhandler( & + comm, & + errhandler, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + type(MPI_Errhandler), intent(in) :: errhandler + integer, intent(out) :: ierror + end subroutine MPI_Comm_set_errhandler + + subroutine MPI_Errhandler_free( & + errhandler, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Errhandler), intent(out) :: errhandler + integer, intent(out) :: ierror + end subroutine MPI_Errhandler_free + + subroutine MPI_Error_class( & + errorcode, & + errorclass, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: errorcode + integer, intent(out) :: errorclass + integer, intent(out) :: ierror + end subroutine MPI_Error_class + + subroutine MPI_Error_string( & + errorcode, & + string, & + resultlen, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: errorcode + character(*), intent(out) :: string + integer, intent(out) :: resultlen + integer, intent(out) :: ierror + end subroutine MPI_Error_string + + subroutine MPI_File_call_errhandler( & + fh, & + errorcode, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + integer, intent(in) :: errorcode + integer, intent(out) :: ierror + end subroutine MPI_File_call_errhandler + + subroutine MPI_File_create_errhandler( & + file_errhandler_fn, & + errhandler, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + external :: file_errhandler_fn + type(MPI_Errhandler), intent(out) :: errhandler + integer, intent(out) :: ierror + end subroutine MPI_File_create_errhandler + + subroutine MPI_File_get_errhandler( & + file, & + errhandler, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: file + type(MPI_Errhandler), intent(out) :: errhandler + integer, intent(out) :: ierror + end subroutine MPI_File_get_errhandler + + subroutine MPI_File_set_errhandler( & + file, & + errhandler, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: file + type(MPI_Errhandler), intent(in) :: errhandler + integer, intent(out) :: ierror + end subroutine MPI_File_set_errhandler + + subroutine MPI_Free_mem( & + base, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) base + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: base + integer :: base(*) + integer, intent(out) :: ierror + end subroutine MPI_Free_mem + + subroutine MPI_Get_hw_resource_info( & + hw_info, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Info), intent(out) :: hw_info + integer, intent(out) :: ierror + end subroutine MPI_Get_hw_resource_info + + subroutine MPI_Get_library_version( & + version, & + resultlen, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + character(*), intent(out) :: version + integer, intent(out) :: resultlen + integer, intent(out) :: ierror + end subroutine MPI_Get_library_version + + subroutine MPI_Get_processor_name( & + name, & + resultlen, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + character(*), intent(out) :: name + integer, intent(out) :: resultlen + integer, intent(out) :: ierror + end subroutine MPI_Get_processor_name + + subroutine MPI_Get_version( & + version, & + subversion, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(out) :: version + integer, intent(out) :: subversion + integer, intent(out) :: ierror + end subroutine MPI_Get_version + + subroutine MPI_Remove_error_class( & + errorclass, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: errorclass + integer, intent(out) :: ierror + end subroutine MPI_Remove_error_class + + subroutine MPI_Remove_error_code( & + errorcode, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: errorcode + integer, intent(out) :: ierror + end subroutine MPI_Remove_error_code + + subroutine MPI_Remove_error_string( & + errorcode, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: errorcode + integer, intent(out) :: ierror + end subroutine MPI_Remove_error_string + + subroutine MPI_Session_call_errhandler( & + session, & + errorcode, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Session), intent(in) :: session + integer, intent(in) :: errorcode + integer, intent(out) :: ierror + end subroutine MPI_Session_call_errhandler + + subroutine MPI_Session_create_errhandler( & + session_errhandler_fn, & + errhandler, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + external :: session_errhandler_fn + type(MPI_Errhandler), intent(out) :: errhandler + integer, intent(out) :: ierror + end subroutine MPI_Session_create_errhandler + + subroutine MPI_Session_get_errhandler( & + session, & + errhandler, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Session), intent(in) :: session + type(MPI_Errhandler), intent(out) :: errhandler + integer, intent(out) :: ierror + end subroutine MPI_Session_get_errhandler + + subroutine MPI_Session_set_errhandler( & + session, & + errhandler, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Session), intent(in) :: session + type(MPI_Errhandler), intent(in) :: errhandler + integer, intent(out) :: ierror + end subroutine MPI_Session_set_errhandler + + subroutine MPI_Win_call_errhandler( & + win, & + errorcode, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Win), intent(in) :: win + integer, intent(in) :: errorcode + integer, intent(out) :: ierror + end subroutine MPI_Win_call_errhandler + + subroutine MPI_Win_create_errhandler( & + win_errhandler_fn, & + errhandler, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + external :: win_errhandler_fn + type(MPI_Errhandler), intent(out) :: errhandler + integer, intent(out) :: ierror + end subroutine MPI_Win_create_errhandler + + subroutine MPI_Win_get_errhandler( & + win, & + errhandler, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Win), intent(in) :: win + type(MPI_Errhandler), intent(out) :: errhandler + integer, intent(out) :: ierror + end subroutine MPI_Win_get_errhandler + + subroutine MPI_Win_set_errhandler( & + win, & + errhandler, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Win), intent(in) :: win + type(MPI_Errhandler), intent(in) :: errhandler + integer, intent(out) :: ierror + end subroutine MPI_Win_set_errhandler + + function MPI_Wtick( & + ) result(result) + use mpi_f08_types + use mpi_f08_constants + implicit none + double precision :: result + end function MPI_Wtick + + function MPI_Wtime( & + ) result(result) + use mpi_f08_types + use mpi_f08_constants + implicit none + double precision :: result + end function MPI_Wtime + + subroutine MPI_Info_create( & + info, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Info), intent(out) :: info + integer, intent(out) :: ierror + end subroutine MPI_Info_create + + subroutine MPI_Info_create_env( & + info, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Info), intent(out) :: info + integer, intent(out) :: ierror + end subroutine MPI_Info_create_env + + subroutine MPI_Info_delete( & + info, & + key, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Info), intent(in) :: info + character(*), intent(in) :: key + integer, intent(out) :: ierror + end subroutine MPI_Info_delete + + subroutine MPI_Info_dup( & + info, & + newinfo, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Info), intent(in) :: info + type(MPI_Info), intent(out) :: newinfo + integer, intent(out) :: ierror + end subroutine MPI_Info_dup + + subroutine MPI_Info_free( & + info, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Info), intent(out) :: info + integer, intent(out) :: ierror + end subroutine MPI_Info_free + + subroutine MPI_Info_get_nkeys( & + info, & + nkeys, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Info), intent(in) :: info + integer, intent(out) :: nkeys + integer, intent(out) :: ierror + end subroutine MPI_Info_get_nkeys + + subroutine MPI_Info_get_nthkey( & + info, & + n, & + key, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Info), intent(in) :: info + integer, intent(in) :: n + character(*), intent(out) :: key + integer, intent(out) :: ierror + end subroutine MPI_Info_get_nthkey + + subroutine MPI_Info_get_string( & + info, & + key, & + buflen, & + value, & + flag, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Info), intent(in) :: info + character(*), intent(in) :: key + integer, intent(out) :: buflen + character(*), intent(out) :: value + logical, intent(out) :: flag + integer, intent(out) :: ierror + end subroutine MPI_Info_get_string + + subroutine MPI_Info_set( & + info, & + key, & + value, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Info), intent(in) :: info + character(*), intent(in) :: key + character(*), intent(in) :: value + integer, intent(out) :: ierror + end subroutine MPI_Info_set + + subroutine MPI_Abort( & + comm, & + errorcode, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: errorcode + integer, intent(out) :: ierror + end subroutine MPI_Abort + + subroutine MPI_Close_port( & + port_name, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + character(*), intent(in) :: port_name + integer, intent(out) :: ierror + end subroutine MPI_Close_port + + subroutine MPI_Comm_accept( & + port_name, & + info, & + root, & + comm, & + newcomm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + character(*), intent(in) :: port_name + type(MPI_Info), intent(in) :: info + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + type(MPI_Comm), intent(out) :: newcomm + integer, intent(out) :: ierror + end subroutine MPI_Comm_accept + + subroutine MPI_Comm_connect( & + port_name, & + info, & + root, & + comm, & + newcomm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + character(*), intent(in) :: port_name + type(MPI_Info), intent(in) :: info + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + type(MPI_Comm), intent(out) :: newcomm + integer, intent(out) :: ierror + end subroutine MPI_Comm_connect + + subroutine MPI_Comm_disconnect( & + comm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(out) :: comm + integer, intent(out) :: ierror + end subroutine MPI_Comm_disconnect + + subroutine MPI_Comm_get_parent( & + parent, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(out) :: parent + integer, intent(out) :: ierror + end subroutine MPI_Comm_get_parent + + subroutine MPI_Comm_join( & + fd, & + intercomm, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: fd + type(MPI_Comm), intent(out) :: intercomm + integer, intent(out) :: ierror + end subroutine MPI_Comm_join + + subroutine MPI_Comm_spawn( & + command, & + argv, & + maxprocs, & + info, & + root, & + comm, & + intercomm, & + array_of_errcodes, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + character(*), intent(in) :: command + character(*), intent(in) :: argv(*) + integer, intent(in) :: maxprocs + type(MPI_Info), intent(in) :: info + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + type(MPI_Comm), intent(out) :: intercomm + integer, intent(out) :: array_of_errcodes(maxprocs) + integer, intent(out) :: ierror + end subroutine MPI_Comm_spawn + + subroutine MPI_Comm_spawn_multiple( & + count, & + array_of_commands, & + array_of_argv, & + array_of_maxprocs, & + array_of_info, & + root, & + comm, & + intercomm, & + array_of_errcodes, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: count + character(*), intent(in) :: array_of_commands(count) + character(*), intent(in) :: array_of_argv(count, *) + integer, intent(in) :: array_of_maxprocs(count) + type(MPI_Info), intent(in) :: array_of_info(count) + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + type(MPI_Comm), intent(out) :: intercomm + integer, intent(out) :: array_of_errcodes(*) + integer, intent(out) :: ierror + end subroutine MPI_Comm_spawn_multiple + + subroutine MPI_Finalize( & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(out) :: ierror + end subroutine MPI_Finalize + + subroutine MPI_Finalized( & + flag, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + logical, intent(out) :: flag + integer, intent(out) :: ierror + end subroutine MPI_Finalized + + subroutine MPI_Init( & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(out) :: ierror + end subroutine MPI_Init + + subroutine MPI_Init_thread( & + required, & + provided, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: required + integer, intent(out) :: provided + integer, intent(out) :: ierror + end subroutine MPI_Init_thread + + subroutine MPI_Initialized( & + flag, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + logical, intent(out) :: flag + integer, intent(out) :: ierror + end subroutine MPI_Initialized + + subroutine MPI_Is_thread_main( & + flag, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + logical, intent(out) :: flag + integer, intent(out) :: ierror + end subroutine MPI_Is_thread_main + + subroutine MPI_Lookup_name( & + service_name, & + info, & + port_name, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + character(*), intent(in) :: service_name + type(MPI_Info), intent(in) :: info + character(*), intent(out) :: port_name + integer, intent(out) :: ierror + end subroutine MPI_Lookup_name + + subroutine MPI_Open_port( & + info, & + port_name, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Info), intent(in) :: info + character(*), intent(out) :: port_name + integer, intent(out) :: ierror + end subroutine MPI_Open_port + + subroutine MPI_Publish_name( & + service_name, & + info, & + port_name, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + character(*), intent(in) :: service_name + type(MPI_Info), intent(in) :: info + character(*), intent(in) :: port_name + integer, intent(out) :: ierror + end subroutine MPI_Publish_name + + subroutine MPI_Query_thread( & + provided, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(out) :: provided + integer, intent(out) :: ierror + end subroutine MPI_Query_thread + + subroutine MPI_Session_finalize( & + session, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Session), intent(out) :: session + integer, intent(out) :: ierror + end subroutine MPI_Session_finalize + + subroutine MPI_Session_get_info( & + session, & + info_used, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Session), intent(in) :: session + type(MPI_Info), intent(out) :: info_used + integer, intent(out) :: ierror + end subroutine MPI_Session_get_info + + subroutine MPI_Session_get_nth_pset( & + session, & + info, & + n, & + pset_len, & + pset_name, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Session), intent(in) :: session + type(MPI_Info), intent(in) :: info + integer, intent(in) :: n + integer, intent(out) :: pset_len + character(*), intent(out) :: pset_name + integer, intent(out) :: ierror + end subroutine MPI_Session_get_nth_pset + + subroutine MPI_Session_get_num_psets( & + session, & + info, & + npset_names, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Session), intent(in) :: session + type(MPI_Info), intent(in) :: info + integer, intent(out) :: npset_names + integer, intent(out) :: ierror + end subroutine MPI_Session_get_num_psets + + subroutine MPI_Session_get_pset_info( & + session, & + pset_name, & + info, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Session), intent(in) :: session + character(*), intent(in) :: pset_name + type(MPI_Info), intent(out) :: info + integer, intent(out) :: ierror + end subroutine MPI_Session_get_pset_info + + subroutine MPI_Session_init( & + info, & + errhandler, & + session, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Info), intent(in) :: info + type(MPI_Errhandler), intent(in) :: errhandler + type(MPI_Session), intent(out) :: session + integer, intent(out) :: ierror + end subroutine MPI_Session_init + + subroutine MPI_Unpublish_name( & + service_name, & + info, & + port_name, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + character(*), intent(in) :: service_name + type(MPI_Info), intent(in) :: info + character(*), intent(in) :: port_name + integer, intent(out) :: ierror + end subroutine MPI_Unpublish_name + + subroutine MPI_Accumulate( & + origin_addr, & + origin_count, & + origin_datatype, & + target_rank, & + target_disp, & + target_count, & + target_datatype, & + op, & + win, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) origin_addr + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: origin_addr + integer, intent(in) :: origin_addr(*) + integer, intent(in) :: origin_count + type(MPI_Datatype), intent(in) :: origin_datatype + integer, intent(in) :: target_rank + integer(MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + type(MPI_Datatype), intent(in) :: target_datatype + type(MPI_Op), intent(in) :: op + type(MPI_Win), intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Accumulate + + subroutine MPI_Compare_and_swap( & + origin_addr, & + compare_addr, & + result_addr, & + datatype, & + target_rank, & + target_disp, & + win, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) origin_addr + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: origin_addr + integer, intent(in) :: origin_addr(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) compare_addr + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: compare_addr + integer, intent(in) :: compare_addr(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) result_addr + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: result_addr + integer :: result_addr(*) + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: target_rank + integer(MPI_ADDRESS_KIND), intent(in) :: target_disp + type(MPI_Win), intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Compare_and_swap + + subroutine MPI_Fetch_and_op( & + origin_addr, & + result_addr, & + datatype, & + target_rank, & + target_disp, & + op, & + win, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) origin_addr + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: origin_addr + integer, intent(in) :: origin_addr(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) result_addr + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: result_addr + integer :: result_addr(*) + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: target_rank + integer(MPI_ADDRESS_KIND), intent(in) :: target_disp + type(MPI_Op), intent(in) :: op + type(MPI_Win), intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Fetch_and_op + + subroutine MPI_Get( & + origin_addr, & + origin_count, & + origin_datatype, & + target_rank, & + target_disp, & + target_count, & + target_datatype, & + win, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) origin_addr + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: origin_addr + integer :: origin_addr(*) + integer, intent(in) :: origin_count + type(MPI_Datatype), intent(in) :: origin_datatype + integer, intent(in) :: target_rank + integer(MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + type(MPI_Datatype), intent(in) :: target_datatype + type(MPI_Win), intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Get + + subroutine 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, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) origin_addr + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: origin_addr + integer, intent(in) :: origin_addr(*) + integer, intent(in) :: origin_count + type(MPI_Datatype), intent(in) :: origin_datatype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) result_addr + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: result_addr + integer :: result_addr(*) + integer, intent(in) :: result_count + type(MPI_Datatype), intent(in) :: result_datatype + integer, intent(in) :: target_rank + integer(MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + type(MPI_Datatype), intent(in) :: target_datatype + type(MPI_Op), intent(in) :: op + type(MPI_Win), intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Get_accumulate + + subroutine MPI_Put( & + origin_addr, & + origin_count, & + origin_datatype, & + target_rank, & + target_disp, & + target_count, & + target_datatype, & + win, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) origin_addr + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: origin_addr + integer, intent(in) :: origin_addr(*) + integer, intent(in) :: origin_count + type(MPI_Datatype), intent(in) :: origin_datatype + integer, intent(in) :: target_rank + integer(MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + type(MPI_Datatype), intent(in) :: target_datatype + type(MPI_Win), intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Put + + subroutine MPI_Raccumulate( & + origin_addr, & + origin_count, & + origin_datatype, & + target_rank, & + target_disp, & + target_count, & + target_datatype, & + op, & + win, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) origin_addr + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: origin_addr + integer, intent(in) :: origin_addr(*) + integer, intent(in) :: origin_count + type(MPI_Datatype), intent(in) :: origin_datatype + integer, intent(in) :: target_rank + integer(MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + type(MPI_Datatype), intent(in) :: target_datatype + type(MPI_Op), intent(in) :: op + type(MPI_Win), intent(in) :: win + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Raccumulate + + subroutine MPI_Rget( & + origin_addr, & + origin_count, & + origin_datatype, & + target_rank, & + target_disp, & + target_count, & + target_datatype, & + win, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) origin_addr + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: origin_addr + integer :: origin_addr(*) + integer, intent(in) :: origin_count + type(MPI_Datatype), intent(in) :: origin_datatype + integer, intent(in) :: target_rank + integer(MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + type(MPI_Datatype), intent(in) :: target_datatype + type(MPI_Win), intent(in) :: win + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Rget + + subroutine 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, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) origin_addr + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: origin_addr + integer, intent(in) :: origin_addr(*) + integer, intent(in) :: origin_count + type(MPI_Datatype), intent(in) :: origin_datatype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) result_addr + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: result_addr + integer :: result_addr(*) + integer, intent(in) :: result_count + type(MPI_Datatype), intent(in) :: result_datatype + integer, intent(in) :: target_rank + integer(MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + type(MPI_Datatype), intent(in) :: target_datatype + type(MPI_Op), intent(in) :: op + type(MPI_Win), intent(in) :: win + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Rget_accumulate + + subroutine MPI_Rput( & + origin_addr, & + origin_count, & + origin_datatype, & + target_rank, & + target_disp, & + target_count, & + target_datatype, & + win, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) origin_addr + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: origin_addr + integer, intent(in) :: origin_addr(*) + integer, intent(in) :: origin_count + type(MPI_Datatype), intent(in) :: origin_datatype + integer, intent(in) :: target_rank + integer(MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + type(MPI_Datatype), intent(in) :: target_datatype + type(MPI_Win), intent(in) :: win + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Rput + + subroutine MPI_Win_allocate( & + size, & + disp_unit, & + info, & + comm, & + baseptr, & + win, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer(MPI_ADDRESS_KIND), intent(in) :: size + integer, intent(in) :: disp_unit + type(MPI_Info), intent(in) :: info + type(MPI_Comm), intent(in) :: comm + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) baseptr + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: baseptr + integer :: baseptr(*) + type(MPI_Win), intent(out) :: win + integer, intent(out) :: ierror + end subroutine MPI_Win_allocate + + subroutine MPI_Win_allocate_shared( & + size, & + disp_unit, & + info, & + comm, & + baseptr, & + win, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer(MPI_ADDRESS_KIND), intent(in) :: size + integer, intent(in) :: disp_unit + type(MPI_Info), intent(in) :: info + type(MPI_Comm), intent(in) :: comm + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) baseptr + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: baseptr + integer :: baseptr(*) + type(MPI_Win), intent(out) :: win + integer, intent(out) :: ierror + end subroutine MPI_Win_allocate_shared + + subroutine MPI_Win_attach( & + win, & + base, & + size, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Win), intent(in) :: win + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) base + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: base + integer :: base(*) + integer(MPI_ADDRESS_KIND), intent(in) :: size + integer, intent(out) :: ierror + end subroutine MPI_Win_attach + + subroutine MPI_Win_complete( & + win, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Win), intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Win_complete + + subroutine MPI_Win_create( & + base, & + size, & + disp_unit, & + info, & + comm, & + win, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) base + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: base + integer :: base(*) + integer(MPI_ADDRESS_KIND), intent(in) :: size + integer, intent(in) :: disp_unit + type(MPI_Info), intent(in) :: info + type(MPI_Comm), intent(in) :: comm + type(MPI_Win), intent(out) :: win + integer, intent(out) :: ierror + end subroutine MPI_Win_create + + subroutine MPI_Win_create_dynamic( & + info, & + comm, & + win, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Info), intent(in) :: info + type(MPI_Comm), intent(in) :: comm + type(MPI_Win), intent(out) :: win + integer, intent(out) :: ierror + end subroutine MPI_Win_create_dynamic + + subroutine MPI_Win_detach( & + win, & + base, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Win), intent(in) :: win + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) base + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: base + integer, intent(in) :: base(*) + integer, intent(out) :: ierror + end subroutine MPI_Win_detach + + subroutine MPI_Win_fence( & + assert, & + win, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: assert + type(MPI_Win), intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Win_fence + + subroutine MPI_Win_flush( & + rank, & + win, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: rank + type(MPI_Win), intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Win_flush + + subroutine MPI_Win_flush_all( & + win, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Win), intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Win_flush_all + + subroutine MPI_Win_flush_local( & + rank, & + win, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: rank + type(MPI_Win), intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Win_flush_local + + subroutine MPI_Win_flush_local_all( & + win, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Win), intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Win_flush_local_all + + subroutine MPI_Win_free( & + win, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Win), intent(out) :: win + integer, intent(out) :: ierror + end subroutine MPI_Win_free + + subroutine MPI_Win_get_group( & + win, & + group, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Win), intent(in) :: win + type(MPI_Group), intent(out) :: group + integer, intent(out) :: ierror + end subroutine MPI_Win_get_group + + subroutine MPI_Win_get_info( & + win, & + info_used, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Win), intent(in) :: win + type(MPI_Info), intent(out) :: info_used + integer, intent(out) :: ierror + end subroutine MPI_Win_get_info + + subroutine MPI_Win_lock( & + lock_type, & + rank, & + assert, & + win, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: lock_type + integer, intent(in) :: rank + integer, intent(in) :: assert + type(MPI_Win), intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Win_lock + + subroutine MPI_Win_lock_all( & + assert, & + win, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: assert + type(MPI_Win), intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Win_lock_all + + subroutine MPI_Win_post( & + group, & + assert, & + win, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Group), intent(in) :: group + integer, intent(in) :: assert + type(MPI_Win), intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Win_post + + subroutine MPI_Win_set_info( & + win, & + info, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Win), intent(in) :: win + type(MPI_Info), intent(in) :: info + integer, intent(out) :: ierror + end subroutine MPI_Win_set_info + + subroutine MPI_Win_shared_query( & + win, & + rank, & + size, & + disp_unit, & + baseptr, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Win), intent(in) :: win + integer, intent(in) :: rank + integer(MPI_ADDRESS_KIND), intent(out) :: size + integer, intent(out) :: disp_unit + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) baseptr + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: baseptr + integer :: baseptr(*) + integer, intent(out) :: ierror + end subroutine MPI_Win_shared_query + + subroutine MPI_Win_start( & + group, & + assert, & + win, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Group), intent(in) :: group + integer, intent(in) :: assert + type(MPI_Win), intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Win_start + + subroutine MPI_Win_sync( & + win, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Win), intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Win_sync + + subroutine MPI_Win_test( & + win, & + flag, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Win), intent(in) :: win + logical, intent(out) :: flag + integer, intent(out) :: ierror + end subroutine MPI_Win_test + + subroutine MPI_Win_unlock( & + rank, & + win, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: rank + type(MPI_Win), intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Win_unlock + + subroutine MPI_Win_unlock_all( & + win, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Win), intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Win_unlock_all + + subroutine MPI_Win_wait( & + win, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Win), intent(in) :: win + integer, intent(out) :: ierror + end subroutine MPI_Win_wait + + subroutine MPI_Grequest_complete( & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Request), intent(in) :: request + integer, intent(out) :: ierror + end subroutine MPI_Grequest_complete + + subroutine MPI_Grequest_start( & + query_fn, & + free_fn, & + cancel_fn, & + extra_state, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + external :: query_fn + external :: free_fn + external :: cancel_fn + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) extra_state + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: extra_state + integer :: extra_state(*) + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_Grequest_start + + subroutine MPI_Status_set_cancelled( & + status, & + flag, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Status), intent(out) :: status + logical, intent(in) :: flag + integer, intent(out) :: ierror + end subroutine MPI_Status_set_cancelled + + subroutine MPI_Status_set_elements( & + status, & + datatype, & + count, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Status), intent(out) :: status + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: count + integer, intent(out) :: ierror + end subroutine MPI_Status_set_elements + + subroutine MPI_Status_set_error( & + status, & + err, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Status), intent(out) :: status + integer, intent(in) :: err + integer, intent(out) :: ierror + end subroutine MPI_Status_set_error + + subroutine MPI_Status_set_source( & + status, & + source, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Status), intent(out) :: status + integer, intent(in) :: source + integer, intent(out) :: ierror + end subroutine MPI_Status_set_source + + subroutine MPI_Status_set_tag( & + status, & + tag, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Status), intent(out) :: status + integer, intent(in) :: tag + integer, intent(out) :: ierror + end subroutine MPI_Status_set_tag + + subroutine MPI_File_close( & + fh, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(out) :: fh + integer, intent(out) :: ierror + end subroutine MPI_File_close + + subroutine MPI_File_delete( & + filename, & + info, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + character(*), intent(in) :: filename + type(MPI_Info), intent(in) :: info + integer, intent(out) :: ierror + end subroutine MPI_File_delete + + subroutine MPI_File_get_amode( & + fh, & + amode, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + integer, intent(out) :: amode + integer, intent(out) :: ierror + end subroutine MPI_File_get_amode + + subroutine MPI_File_get_atomicity( & + fh, & + flag, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + logical, intent(out) :: flag + integer, intent(out) :: ierror + end subroutine MPI_File_get_atomicity + + subroutine MPI_File_get_byte_offset( & + fh, & + offset, & + disp, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset + integer(MPI_OFFSET_KIND), intent(out) :: disp + integer, intent(out) :: ierror + end subroutine MPI_File_get_byte_offset + + subroutine MPI_File_get_group( & + fh, & + group, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + type(MPI_Group), intent(out) :: group + integer, intent(out) :: ierror + end subroutine MPI_File_get_group + + subroutine MPI_File_get_info( & + fh, & + info_used, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + type(MPI_Info), intent(out) :: info_used + integer, intent(out) :: ierror + end subroutine MPI_File_get_info + + subroutine MPI_File_get_position( & + fh, & + offset, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(out) :: offset + integer, intent(out) :: ierror + end subroutine MPI_File_get_position + + subroutine MPI_File_get_position_shared( & + fh, & + offset, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(out) :: offset + integer, intent(out) :: ierror + end subroutine MPI_File_get_position_shared + + subroutine MPI_File_get_size( & + fh, & + size, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(out) :: size + integer, intent(out) :: ierror + end subroutine MPI_File_get_size + + subroutine MPI_File_get_type_extent( & + fh, & + datatype, & + extent, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + type(MPI_Datatype), intent(in) :: datatype + integer(MPI_ADDRESS_KIND), intent(out) :: extent + integer, intent(out) :: ierror + end subroutine MPI_File_get_type_extent + + subroutine MPI_File_get_view( & + fh, & + disp, & + etype, & + filetype, & + datarep, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(out) :: disp + type(MPI_Datatype), intent(out) :: etype + type(MPI_Datatype), intent(out) :: filetype + character(*), intent(out) :: datarep + integer, intent(out) :: ierror + end subroutine MPI_File_get_view + + subroutine MPI_File_iread( & + fh, & + buf, & + count, & + datatype, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_File_iread + + subroutine MPI_File_iread_all( & + fh, & + buf, & + count, & + datatype, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_File_iread_all + + subroutine MPI_File_iread_at( & + fh, & + offset, & + buf, & + count, & + datatype, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_File_iread_at + + subroutine MPI_File_iread_at_all( & + fh, & + offset, & + buf, & + count, & + datatype, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_File_iread_at_all + + subroutine MPI_File_iread_shared( & + fh, & + buf, & + count, & + datatype, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_File_iread_shared + + subroutine MPI_File_iwrite( & + fh, & + buf, & + count, & + datatype, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_File_iwrite + + subroutine MPI_File_iwrite_all( & + fh, & + buf, & + count, & + datatype, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_File_iwrite_all + + subroutine MPI_File_iwrite_at( & + fh, & + offset, & + buf, & + count, & + datatype, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_File_iwrite_at + + subroutine MPI_File_iwrite_at_all( & + fh, & + offset, & + buf, & + count, & + datatype, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_File_iwrite_at_all + + subroutine MPI_File_iwrite_shared( & + fh, & + buf, & + count, & + datatype, & + request, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Request), intent(out) :: request + integer, intent(out) :: ierror + end subroutine MPI_File_iwrite_shared + + subroutine MPI_File_open( & + comm, & + filename, & + amode, & + info, & + fh, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + character(*), intent(in) :: filename + integer, intent(in) :: amode + type(MPI_Info), intent(in) :: info + type(MPI_File), intent(out) :: fh + integer, intent(out) :: ierror + end subroutine MPI_File_open + + subroutine MPI_File_preallocate( & + fh, & + size, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: size + integer, intent(out) :: ierror + end subroutine MPI_File_preallocate + + subroutine MPI_File_read( & + fh, & + buf, & + count, & + datatype, & + status, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Status), intent(out) :: status + integer, intent(out) :: ierror + end subroutine MPI_File_read + + subroutine MPI_File_read_all( & + fh, & + buf, & + count, & + datatype, & + status, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Status), intent(out) :: status + integer, intent(out) :: ierror + end subroutine MPI_File_read_all + + subroutine MPI_File_read_all_begin( & + fh, & + buf, & + count, & + datatype, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(out) :: ierror + end subroutine MPI_File_read_all_begin + + subroutine MPI_File_read_all_end( & + fh, & + buf, & + status, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + type(MPI_Status), intent(out) :: status + integer, intent(out) :: ierror + end subroutine MPI_File_read_all_end + + subroutine MPI_File_read_at( & + fh, & + offset, & + buf, & + count, & + datatype, & + status, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Status), intent(out) :: status + integer, intent(out) :: ierror + end subroutine MPI_File_read_at + + subroutine MPI_File_read_at_all( & + fh, & + offset, & + buf, & + count, & + datatype, & + status, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Status), intent(out) :: status + integer, intent(out) :: ierror + end subroutine MPI_File_read_at_all + + subroutine MPI_File_read_at_all_begin( & + fh, & + offset, & + buf, & + count, & + datatype, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(out) :: ierror + end subroutine MPI_File_read_at_all_begin + + subroutine MPI_File_read_at_all_end( & + fh, & + buf, & + status, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + type(MPI_Status), intent(out) :: status + integer, intent(out) :: ierror + end subroutine MPI_File_read_at_all_end + + subroutine MPI_File_read_ordered( & + fh, & + buf, & + count, & + datatype, & + status, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Status), intent(out) :: status + integer, intent(out) :: ierror + end subroutine MPI_File_read_ordered + + subroutine MPI_File_read_ordered_begin( & + fh, & + buf, & + count, & + datatype, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(out) :: ierror + end subroutine MPI_File_read_ordered_begin + + subroutine MPI_File_read_ordered_end( & + fh, & + buf, & + status, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + type(MPI_Status), intent(out) :: status + integer, intent(out) :: ierror + end subroutine MPI_File_read_ordered_end + + subroutine MPI_File_read_shared( & + fh, & + buf, & + count, & + datatype, & + status, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Status), intent(out) :: status + integer, intent(out) :: ierror + end subroutine MPI_File_read_shared + + subroutine MPI_File_seek( & + fh, & + offset, & + whence, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset + integer, intent(in) :: whence + integer, intent(out) :: ierror + end subroutine MPI_File_seek + + subroutine MPI_File_seek_shared( & + fh, & + offset, & + whence, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset + integer, intent(in) :: whence + integer, intent(out) :: ierror + end subroutine MPI_File_seek_shared + + subroutine MPI_File_set_atomicity( & + fh, & + flag, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + logical, intent(in) :: flag + integer, intent(out) :: ierror + end subroutine MPI_File_set_atomicity + + subroutine MPI_File_set_info( & + fh, & + info, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + type(MPI_Info), intent(in) :: info + integer, intent(out) :: ierror + end subroutine MPI_File_set_info + + subroutine MPI_File_set_size( & + fh, & + size, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: size + integer, intent(out) :: ierror + end subroutine MPI_File_set_size + + subroutine MPI_File_set_view( & + fh, & + disp, & + etype, & + filetype, & + datarep, & + info, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: disp + type(MPI_Datatype), intent(in) :: etype + type(MPI_Datatype), intent(in) :: filetype + character(*), intent(in) :: datarep + type(MPI_Info), intent(in) :: info + integer, intent(out) :: ierror + end subroutine MPI_File_set_view + + subroutine MPI_File_sync( & + fh, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + integer, intent(out) :: ierror + end subroutine MPI_File_sync + + subroutine MPI_File_write( & + fh, & + buf, & + count, & + datatype, & + status, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Status), intent(out) :: status + integer, intent(out) :: ierror + end subroutine MPI_File_write + + subroutine MPI_File_write_all( & + fh, & + buf, & + count, & + datatype, & + status, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Status), intent(out) :: status + integer, intent(out) :: ierror + end subroutine MPI_File_write_all + + subroutine MPI_File_write_all_begin( & + fh, & + buf, & + count, & + datatype, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(out) :: ierror + end subroutine MPI_File_write_all_begin + + subroutine MPI_File_write_all_end( & + fh, & + buf, & + status, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + type(MPI_Status), intent(out) :: status + integer, intent(out) :: ierror + end subroutine MPI_File_write_all_end + + subroutine MPI_File_write_at( & + fh, & + offset, & + buf, & + count, & + datatype, & + status, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Status), intent(out) :: status + integer, intent(out) :: ierror + end subroutine MPI_File_write_at + + subroutine MPI_File_write_at_all( & + fh, & + offset, & + buf, & + count, & + datatype, & + status, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Status), intent(out) :: status + integer, intent(out) :: ierror + end subroutine MPI_File_write_at_all + + subroutine MPI_File_write_at_all_begin( & + fh, & + offset, & + buf, & + count, & + datatype, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(out) :: ierror + end subroutine MPI_File_write_at_all_begin + + subroutine MPI_File_write_at_all_end( & + fh, & + buf, & + status, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + type(MPI_Status), intent(out) :: status + integer, intent(out) :: ierror + end subroutine MPI_File_write_at_all_end + + subroutine MPI_File_write_ordered( & + fh, & + buf, & + count, & + datatype, & + status, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Status), intent(out) :: status + integer, intent(out) :: ierror + end subroutine MPI_File_write_ordered + + subroutine MPI_File_write_ordered_begin( & + fh, & + buf, & + count, & + datatype, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(out) :: ierror + end subroutine MPI_File_write_ordered_begin + + subroutine MPI_File_write_ordered_end( & + fh, & + buf, & + status, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + type(MPI_Status), intent(out) :: status + integer, intent(out) :: ierror + end subroutine MPI_File_write_ordered_end + + subroutine MPI_File_write_shared( & + fh, & + buf, & + count, & + datatype, & + status, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Status), intent(out) :: status + integer, intent(out) :: ierror + end subroutine MPI_File_write_shared + + subroutine MPI_Register_datarep( & + datarep, & + read_conversion_fn, & + write_conversion_fn, & + dtype_file_extent_fn, & + extra_state, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + character(*), intent(in) :: datarep + external :: read_conversion_fn + external :: write_conversion_fn + external :: dtype_file_extent_fn + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) extra_state + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: extra_state + integer :: extra_state(*) + integer, intent(out) :: ierror + end subroutine MPI_Register_datarep + + subroutine MPI_F_sync_reg( & + buf & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + end subroutine MPI_F_sync_reg + + subroutine MPI_Type_create_f90_complex( & + p, & + r, & + newtype, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: p + integer, intent(in) :: r + type(MPI_Datatype), intent(out) :: newtype + integer, intent(out) :: ierror + end subroutine MPI_Type_create_f90_complex + + subroutine MPI_Type_create_f90_integer( & + r, & + newtype, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: r + type(MPI_Datatype), intent(out) :: newtype + integer, intent(out) :: ierror + end subroutine MPI_Type_create_f90_integer + + subroutine MPI_Type_create_f90_real( & + p, & + r, & + newtype, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: p + integer, intent(in) :: r + type(MPI_Datatype), intent(out) :: newtype + integer, intent(out) :: ierror + end subroutine MPI_Type_create_f90_real + + subroutine MPI_Type_match_size( & + typeclass, & + size, & + newtype, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: typeclass + integer, intent(in) :: size + type(MPI_Datatype), intent(out) :: newtype + integer, intent(out) :: ierror + end subroutine MPI_Type_match_size + + subroutine MPI_Pcontrol( & + level & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: level + end subroutine MPI_Pcontrol + + subroutine MPI_Attr_delete( & + comm, & + keyval, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: keyval + integer, intent(out) :: ierror + end subroutine MPI_Attr_delete + + subroutine MPI_Attr_get( & + comm, & + keyval, & + attribute_val, & + flag, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: keyval + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) attribute_val + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: attribute_val + integer :: attribute_val(*) + logical, intent(out) :: flag + integer, intent(out) :: ierror + end subroutine MPI_Attr_get + + subroutine MPI_Attr_put( & + comm, & + keyval, & + attribute_val, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: keyval + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) attribute_val + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: attribute_val + integer :: attribute_val(*) + integer, intent(out) :: ierror + end subroutine MPI_Attr_put + + subroutine MPI_Get_elements_x( & + status, & + datatype, & + count, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Status), intent(in) :: status + type(MPI_Datatype), intent(in) :: datatype + integer(MPI_COUNT_KIND), intent(out) :: count + integer, intent(out) :: ierror + end subroutine MPI_Get_elements_x + + subroutine MPI_Info_get( & + info, & + key, & + valuelen, & + value, & + flag, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Info), intent(in) :: info + character(*), intent(in) :: key + integer, intent(in) :: valuelen + character(*), intent(out) :: value + logical, intent(out) :: flag + integer, intent(out) :: ierror + end subroutine MPI_Info_get + + subroutine MPI_Info_get_valuelen( & + info, & + key, & + valuelen, & + flag, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Info), intent(in) :: info + character(*), intent(in) :: key + integer, intent(out) :: valuelen + logical, intent(out) :: flag + integer, intent(out) :: ierror + end subroutine MPI_Info_get_valuelen + + subroutine MPI_Keyval_create( & + copy_fn, & + delete_fn, & + keyval, & + extra_state, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + external :: copy_fn + external :: delete_fn + integer, intent(out) :: keyval + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) extra_state + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: extra_state + integer :: extra_state(*) + integer, intent(out) :: ierror + end subroutine MPI_Keyval_create + + subroutine MPI_Keyval_free( & + keyval, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(out) :: keyval + integer, intent(out) :: ierror + end subroutine MPI_Keyval_free + + subroutine MPI_Status_set_elements_x( & + status, & + datatype, & + count, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Status), intent(out) :: status + type(MPI_Datatype), intent(in) :: datatype + integer(MPI_COUNT_KIND), intent(in) :: count + integer, intent(out) :: ierror + end subroutine MPI_Status_set_elements_x + + subroutine MPI_Type_get_extent_x( & + datatype, & + lb, & + extent, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Datatype), intent(in) :: datatype + integer(MPI_COUNT_KIND), intent(out) :: lb + integer(MPI_COUNT_KIND), intent(out) :: extent + integer, intent(out) :: ierror + end subroutine MPI_Type_get_extent_x + + subroutine MPI_Type_get_true_extent_x( & + datatype, & + true_lb, & + true_extent, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Datatype), intent(in) :: datatype + integer(MPI_COUNT_KIND), intent(out) :: true_lb + integer(MPI_COUNT_KIND), intent(out) :: true_extent + integer, intent(out) :: ierror + end subroutine MPI_Type_get_true_extent_x + + subroutine MPI_Type_size_x( & + datatype, & + size, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Datatype), intent(in) :: datatype + integer(MPI_COUNT_KIND), intent(out) :: size + integer, intent(out) :: ierror + end subroutine MPI_Type_size_x + + subroutine MPI_Address( & + location, & + address, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) location + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: location + integer :: location(*) + integer(MPI_ADDRESS_KIND), intent(out) :: address + integer, intent(out) :: ierror + end subroutine MPI_Address + + subroutine MPI_Type_hindexed( & + count, & + array_of_blocklengths, & + array_of_displacements, & + oldtype, & + newtype, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: count + integer, intent(out) :: array_of_blocklengths + integer(MPI_ADDRESS_KIND), intent(out) :: array_of_displacements + type(MPI_Datatype), intent(in) :: oldtype + type(MPI_Datatype), intent(out) :: newtype + integer, intent(out) :: ierror + end subroutine MPI_Type_hindexed + + subroutine MPI_Type_hvector( & + count, & + blocklength, & + stride, & + oldtype, & + newtype, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: count + integer, intent(in) :: blocklength + integer(MPI_ADDRESS_KIND), intent(in) :: stride + type(MPI_Datatype), intent(in) :: oldtype + type(MPI_Datatype), intent(out) :: newtype + integer, intent(out) :: ierror + end subroutine MPI_Type_hvector + + subroutine MPI_Type_struct( & + count, & + array_of_blocklengths, & + array_of_displacements, & + array_of_types, & + newtype, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + integer, intent(in) :: count + integer, intent(out) :: array_of_blocklengths + integer(MPI_ADDRESS_KIND), intent(out) :: array_of_displacements + type(MPI_Datatype), intent(out) :: array_of_types + type(MPI_Datatype), intent(out) :: newtype + integer, intent(out) :: ierror + end subroutine MPI_Type_struct + + subroutine MPI_Type_extent( & + datatype, & + extent, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Datatype), intent(in) :: datatype + integer(MPI_ADDRESS_KIND), intent(out) :: extent + integer, intent(out) :: ierror + end subroutine MPI_Type_extent + + subroutine MPI_Type_lb( & + datatype, & + displacement, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Datatype), intent(in) :: datatype + integer(MPI_ADDRESS_KIND), intent(out) :: displacement + integer, intent(out) :: ierror + end subroutine MPI_Type_lb + + subroutine MPI_Type_ub( & + datatype, & + displacement, & + ierror & + ) + use mpi_f08_types + use mpi_f08_constants + implicit none + type(MPI_Datatype), intent(in) :: datatype + integer(MPI_ADDRESS_KIND), intent(out) :: displacement + integer, intent(out) :: ierror + end subroutine MPI_Type_ub + + end interface + +end module mpi_f08_functions_internal + +module mpi_f08_functions + use mpi_f08_types + use mpi_f08_constants + + use mpi_f08_functions_internal, & + wrapped_MPI_Bsend => MPI_Bsend, & + wrapped_MPI_Bsend_init => MPI_Bsend_init, & + wrapped_MPI_Buffer_attach => MPI_Buffer_attach, & + wrapped_MPI_Buffer_detach => MPI_Buffer_detach, & + wrapped_MPI_Buffer_flush => MPI_Buffer_flush, & + wrapped_MPI_Buffer_iflush => MPI_Buffer_iflush, & + wrapped_MPI_Cancel => MPI_Cancel, & + wrapped_MPI_Comm_attach_buffer => MPI_Comm_attach_buffer, & + wrapped_MPI_Comm_detach_buffer => MPI_Comm_detach_buffer, & + wrapped_MPI_Comm_flush_buffer => MPI_Comm_flush_buffer, & + wrapped_MPI_Comm_iflush_buffer => MPI_Comm_iflush_buffer, & + wrapped_MPI_Get_count => MPI_Get_count, & + wrapped_MPI_Ibsend => MPI_Ibsend, & + wrapped_MPI_Improbe => MPI_Improbe, & + wrapped_MPI_Imrecv => MPI_Imrecv, & + wrapped_MPI_Iprobe => MPI_Iprobe, & + wrapped_MPI_Irecv => MPI_Irecv, & + wrapped_MPI_Irsend => MPI_Irsend, & + wrapped_MPI_Isend => MPI_Isend, & + wrapped_MPI_Isendrecv => MPI_Isendrecv, & + wrapped_MPI_Isendrecv_replace => MPI_Isendrecv_replace, & + wrapped_MPI_Issend => MPI_Issend, & + wrapped_MPI_Mprobe => MPI_Mprobe, & + wrapped_MPI_Mrecv => MPI_Mrecv, & + wrapped_MPI_Probe => MPI_Probe, & + wrapped_MPI_Recv => MPI_Recv, & + wrapped_MPI_Recv_init => MPI_Recv_init, & + wrapped_MPI_Request_free => MPI_Request_free, & + wrapped_MPI_Request_get_status => MPI_Request_get_status, & + wrapped_MPI_Request_get_status_all => MPI_Request_get_status_all, & + wrapped_MPI_Request_get_status_any => MPI_Request_get_status_any, & + wrapped_MPI_Request_get_status_some => MPI_Request_get_status_some, & + wrapped_MPI_Rsend => MPI_Rsend, & + wrapped_MPI_Rsend_init => MPI_Rsend_init, & + wrapped_MPI_Send => MPI_Send, & + wrapped_MPI_Send_init => MPI_Send_init, & + wrapped_MPI_Sendrecv => MPI_Sendrecv, & + wrapped_MPI_Sendrecv_replace => MPI_Sendrecv_replace, & + wrapped_MPI_Session_attach_buffer => MPI_Session_attach_buffer, & + wrapped_MPI_Session_detach_buffer => MPI_Session_detach_buffer, & + wrapped_MPI_Session_flush_buffer => MPI_Session_flush_buffer, & + wrapped_MPI_Session_iflush_buffer => MPI_Session_iflush_buffer, & + wrapped_MPI_Ssend => MPI_Ssend, & + wrapped_MPI_Ssend_init => MPI_Ssend_init, & + wrapped_MPI_Start => MPI_Start, & + wrapped_MPI_Startall => MPI_Startall, & + wrapped_MPI_Status_get_error => MPI_Status_get_error, & + wrapped_MPI_Status_get_source => MPI_Status_get_source, & + wrapped_MPI_Status_get_tag => MPI_Status_get_tag, & + wrapped_MPI_Test => MPI_Test, & + wrapped_MPI_Test_cancelled => MPI_Test_cancelled, & + wrapped_MPI_Testall => MPI_Testall, & + wrapped_MPI_Testany => MPI_Testany, & + wrapped_MPI_Testsome => MPI_Testsome, & + wrapped_MPI_Wait => MPI_Wait, & + wrapped_MPI_Waitall => MPI_Waitall, & + wrapped_MPI_Waitany => MPI_Waitany, & + wrapped_MPI_Waitsome => MPI_Waitsome, & + wrapped_MPI_Parrived => MPI_Parrived, & + wrapped_MPI_Pready => MPI_Pready, & + wrapped_MPI_Pready_list => MPI_Pready_list, & + wrapped_MPI_Pready_range => MPI_Pready_range, & + wrapped_MPI_Precv_init => MPI_Precv_init, & + wrapped_MPI_Psend_init => MPI_Psend_init, & + wrapped_MPI_Aint_add => MPI_Aint_add, & + wrapped_MPI_Aint_diff => MPI_Aint_diff, & + wrapped_MPI_Get_address => MPI_Get_address, & + wrapped_MPI_Get_elements => MPI_Get_elements, & + wrapped_MPI_Pack => MPI_Pack, & + wrapped_MPI_Pack_external => MPI_Pack_external, & + wrapped_MPI_Pack_external_size => MPI_Pack_external_size, & + wrapped_MPI_Pack_size => MPI_Pack_size, & + wrapped_MPI_Type_commit => MPI_Type_commit, & + wrapped_MPI_Type_contiguous => MPI_Type_contiguous, & + wrapped_MPI_Type_create_darray => MPI_Type_create_darray, & + wrapped_MPI_Type_create_hindexed => MPI_Type_create_hindexed, & + wrapped_MPI_Type_create_hindexed_block => MPI_Type_create_hindexed_block, & + wrapped_MPI_Type_create_hvector => MPI_Type_create_hvector, & + wrapped_MPI_Type_create_indexed_block => MPI_Type_create_indexed_block, & + wrapped_MPI_Type_create_resized => MPI_Type_create_resized, & + wrapped_MPI_Type_create_struct => MPI_Type_create_struct, & + wrapped_MPI_Type_create_subarray => MPI_Type_create_subarray, & + wrapped_MPI_Type_dup => MPI_Type_dup, & + wrapped_MPI_Type_free => MPI_Type_free, & + wrapped_MPI_Type_get_contents => MPI_Type_get_contents, & + wrapped_MPI_Type_get_envelope => MPI_Type_get_envelope, & + wrapped_MPI_Type_get_extent => MPI_Type_get_extent, & + wrapped_MPI_Type_get_true_extent => MPI_Type_get_true_extent, & + wrapped_MPI_Type_indexed => MPI_Type_indexed, & + wrapped_MPI_Type_size => MPI_Type_size, & + wrapped_MPI_Type_vector => MPI_Type_vector, & + wrapped_MPI_Unpack => MPI_Unpack, & + wrapped_MPI_Unpack_external => MPI_Unpack_external, & + wrapped_MPI_Allgather => MPI_Allgather, & + wrapped_MPI_Allgather_init => MPI_Allgather_init, & + wrapped_MPI_Allgatherv => MPI_Allgatherv, & + wrapped_MPI_Allgatherv_init => MPI_Allgatherv_init, & + wrapped_MPI_Allreduce => MPI_Allreduce, & + wrapped_MPI_Allreduce_init => MPI_Allreduce_init, & + wrapped_MPI_Alltoall => MPI_Alltoall, & + wrapped_MPI_Alltoall_init => MPI_Alltoall_init, & + wrapped_MPI_Alltoallv => MPI_Alltoallv, & + wrapped_MPI_Alltoallv_init => MPI_Alltoallv_init, & + wrapped_MPI_Alltoallw => MPI_Alltoallw, & + wrapped_MPI_Alltoallw_init => MPI_Alltoallw_init, & + wrapped_MPI_Barrier => MPI_Barrier, & + wrapped_MPI_Barrier_init => MPI_Barrier_init, & + wrapped_MPI_Bcast => MPI_Bcast, & + wrapped_MPI_Bcast_init => MPI_Bcast_init, & + wrapped_MPI_Exscan => MPI_Exscan, & + wrapped_MPI_Exscan_init => MPI_Exscan_init, & + wrapped_MPI_Gather => MPI_Gather, & + wrapped_MPI_Gather_init => MPI_Gather_init, & + wrapped_MPI_Gatherv => MPI_Gatherv, & + wrapped_MPI_Gatherv_init => MPI_Gatherv_init, & + wrapped_MPI_Iallgather => MPI_Iallgather, & + wrapped_MPI_Iallgatherv => MPI_Iallgatherv, & + wrapped_MPI_Iallreduce => MPI_Iallreduce, & + wrapped_MPI_Ialltoall => MPI_Ialltoall, & + wrapped_MPI_Ialltoallv => MPI_Ialltoallv, & + wrapped_MPI_Ialltoallw => MPI_Ialltoallw, & + wrapped_MPI_Ibarrier => MPI_Ibarrier, & + wrapped_MPI_Ibcast => MPI_Ibcast, & + wrapped_MPI_Iexscan => MPI_Iexscan, & + wrapped_MPI_Igather => MPI_Igather, & + wrapped_MPI_Igatherv => MPI_Igatherv, & + wrapped_MPI_Ireduce => MPI_Ireduce, & + wrapped_MPI_Ireduce_scatter => MPI_Ireduce_scatter, & + wrapped_MPI_Ireduce_scatter_block => MPI_Ireduce_scatter_block, & + wrapped_MPI_Iscan => MPI_Iscan, & + wrapped_MPI_Iscatter => MPI_Iscatter, & + wrapped_MPI_Iscatterv => MPI_Iscatterv, & + wrapped_MPI_Op_commutative => MPI_Op_commutative, & + wrapped_MPI_Op_create => MPI_Op_create, & + wrapped_MPI_Op_free => MPI_Op_free, & + wrapped_MPI_Reduce => MPI_Reduce, & + wrapped_MPI_Reduce_init => MPI_Reduce_init, & + wrapped_MPI_Reduce_local => MPI_Reduce_local, & + wrapped_MPI_Reduce_scatter => MPI_Reduce_scatter, & + wrapped_MPI_Reduce_scatter_block => MPI_Reduce_scatter_block, & + wrapped_MPI_Reduce_scatter_block_init => MPI_Reduce_scatter_block_init, & + wrapped_MPI_Reduce_scatter_init => MPI_Reduce_scatter_init, & + wrapped_MPI_Scan => MPI_Scan, & + wrapped_MPI_Scan_init => MPI_Scan_init, & + wrapped_MPI_Scatter => MPI_Scatter, & + wrapped_MPI_Scatter_init => MPI_Scatter_init, & + wrapped_MPI_Scatterv => MPI_Scatterv, & + wrapped_MPI_Scatterv_init => MPI_Scatterv_init, & + wrapped_MPI_Type_get_value_index => MPI_Type_get_value_index, & + wrapped_MPI_Comm_compare => MPI_Comm_compare, & + wrapped_MPI_Comm_create => MPI_Comm_create, & + wrapped_MPI_Comm_create_from_group => MPI_Comm_create_from_group, & + wrapped_MPI_Comm_create_group => MPI_Comm_create_group, & + wrapped_MPI_Comm_create_keyval => MPI_Comm_create_keyval, & + wrapped_MPI_Comm_delete_attr => MPI_Comm_delete_attr, & + wrapped_MPI_Comm_dup => MPI_Comm_dup, & + wrapped_MPI_Comm_dup_with_info => MPI_Comm_dup_with_info, & + wrapped_MPI_Comm_free => MPI_Comm_free, & + wrapped_MPI_Comm_get_name => MPI_Comm_get_name, & + wrapped_MPI_Comm_free_keyval => MPI_Comm_free_keyval, & + wrapped_MPI_Comm_get_attr => MPI_Comm_get_attr, & + wrapped_MPI_Comm_get_info => MPI_Comm_get_info, & + wrapped_MPI_Comm_group => MPI_Comm_group, & + wrapped_MPI_Comm_idup => MPI_Comm_idup, & + wrapped_MPI_Comm_idup_with_info => MPI_Comm_idup_with_info, & + wrapped_MPI_Comm_rank => MPI_Comm_rank, & + wrapped_MPI_Comm_remote_group => MPI_Comm_remote_group, & + wrapped_MPI_Comm_remote_size => MPI_Comm_remote_size, & + wrapped_MPI_Comm_set_attr => MPI_Comm_set_attr, & + wrapped_MPI_Comm_set_info => MPI_Comm_set_info, & + wrapped_MPI_Comm_set_name => MPI_Comm_set_name, & + wrapped_MPI_Comm_size => MPI_Comm_size, & + wrapped_MPI_Comm_split => MPI_Comm_split, & + wrapped_MPI_Group_free => MPI_Group_free, & + wrapped_MPI_Comm_split_type => MPI_Comm_split_type, & + wrapped_MPI_Comm_test_inter => MPI_Comm_test_inter, & + wrapped_MPI_Group_compare => MPI_Group_compare, & + wrapped_MPI_Group_difference => MPI_Group_difference, & + wrapped_MPI_Group_excl => MPI_Group_excl, & + wrapped_MPI_Group_from_session_pset => MPI_Group_from_session_pset, & + wrapped_MPI_Group_incl => MPI_Group_incl, & + wrapped_MPI_Group_intersection => MPI_Group_intersection, & + wrapped_MPI_Group_range_excl => MPI_Group_range_excl, & + wrapped_MPI_Group_range_incl => MPI_Group_range_incl, & + wrapped_MPI_Group_rank => MPI_Group_rank, & + wrapped_MPI_Group_size => MPI_Group_size, & + wrapped_MPI_Group_translate_ranks => MPI_Group_translate_ranks, & + wrapped_MPI_Group_union => MPI_Group_union, & + wrapped_MPI_Intercomm_create => MPI_Intercomm_create, & + wrapped_MPI_Intercomm_create_from_groups => MPI_Intercomm_create_from_groups, & + wrapped_MPI_Intercomm_merge => MPI_Intercomm_merge, & + wrapped_MPI_Type_create_keyval => MPI_Type_create_keyval, & + wrapped_MPI_Type_delete_attr => MPI_Type_delete_attr, & + wrapped_MPI_Type_free_keyval => MPI_Type_free_keyval, & + wrapped_MPI_Type_get_attr => MPI_Type_get_attr, & + wrapped_MPI_Type_get_name => MPI_Type_get_name, & + wrapped_MPI_Type_set_attr => MPI_Type_set_attr, & + wrapped_MPI_Type_set_name => MPI_Type_set_name, & + wrapped_MPI_Win_create_keyval => MPI_Win_create_keyval, & + wrapped_MPI_Win_delete_attr => MPI_Win_delete_attr, & + wrapped_MPI_Win_free_keyval => MPI_Win_free_keyval, & + wrapped_MPI_Win_get_attr => MPI_Win_get_attr, & + wrapped_MPI_Win_get_name => MPI_Win_get_name, & + wrapped_MPI_Win_set_attr => MPI_Win_set_attr, & + wrapped_MPI_Win_set_name => MPI_Win_set_name, & + wrapped_MPI_Cart_coords => MPI_Cart_coords, & + wrapped_MPI_Cart_create => MPI_Cart_create, & + wrapped_MPI_Cart_get => MPI_Cart_get, & + wrapped_MPI_Cart_map => MPI_Cart_map, & + wrapped_MPI_Cart_rank => MPI_Cart_rank, & + wrapped_MPI_Cart_shift => MPI_Cart_shift, & + wrapped_MPI_Cart_sub => MPI_Cart_sub, & + wrapped_MPI_Cartdim_get => MPI_Cartdim_get, & + wrapped_MPI_Dims_create => MPI_Dims_create, & + wrapped_MPI_Dist_graph_create => MPI_Dist_graph_create, & + wrapped_MPI_Dist_graph_create_adjacent => MPI_Dist_graph_create_adjacent, & + wrapped_MPI_Dist_graph_neighbors => MPI_Dist_graph_neighbors, & + wrapped_MPI_Dist_graph_neighbors_count => MPI_Dist_graph_neighbors_count, & + wrapped_MPI_Graph_create => MPI_Graph_create, & + wrapped_MPI_Graph_get => MPI_Graph_get, & + wrapped_MPI_Graph_map => MPI_Graph_map, & + wrapped_MPI_Graph_neighbors => MPI_Graph_neighbors, & + wrapped_MPI_Graph_neighbors_count => MPI_Graph_neighbors_count, & + wrapped_MPI_Graphdims_get => MPI_Graphdims_get, & + wrapped_MPI_Ineighbor_allgather => MPI_Ineighbor_allgather, & + wrapped_MPI_Ineighbor_allgatherv => MPI_Ineighbor_allgatherv, & + wrapped_MPI_Ineighbor_alltoall => MPI_Ineighbor_alltoall, & + wrapped_MPI_Ineighbor_alltoallv => MPI_Ineighbor_alltoallv, & + wrapped_MPI_Ineighbor_alltoallw => MPI_Ineighbor_alltoallw, & + wrapped_MPI_Neighbor_allgather => MPI_Neighbor_allgather, & + wrapped_MPI_Neighbor_allgather_init => MPI_Neighbor_allgather_init, & + wrapped_MPI_Neighbor_allgatherv => MPI_Neighbor_allgatherv, & + wrapped_MPI_Neighbor_allgatherv_init => MPI_Neighbor_allgatherv_init, & + wrapped_MPI_Neighbor_alltoall => MPI_Neighbor_alltoall, & + wrapped_MPI_Neighbor_alltoall_init => MPI_Neighbor_alltoall_init, & + wrapped_MPI_Neighbor_alltoallv => MPI_Neighbor_alltoallv, & + wrapped_MPI_Neighbor_alltoallv_init => MPI_Neighbor_alltoallv_init, & + wrapped_MPI_Neighbor_alltoallw => MPI_Neighbor_alltoallw, & + wrapped_MPI_Neighbor_alltoallw_init => MPI_Neighbor_alltoallw_init, & + wrapped_MPI_Topo_test => MPI_Topo_test, & + wrapped_MPI_Add_error_class => MPI_Add_error_class, & + wrapped_MPI_Add_error_code => MPI_Add_error_code, & + wrapped_MPI_Add_error_string => MPI_Add_error_string, & + wrapped_MPI_Alloc_mem => MPI_Alloc_mem, & + wrapped_MPI_Comm_call_errhandler => MPI_Comm_call_errhandler, & + wrapped_MPI_Comm_create_errhandler => MPI_Comm_create_errhandler, & + wrapped_MPI_Comm_get_errhandler => MPI_Comm_get_errhandler, & + wrapped_MPI_Comm_set_errhandler => MPI_Comm_set_errhandler, & + wrapped_MPI_Errhandler_free => MPI_Errhandler_free, & + wrapped_MPI_Error_class => MPI_Error_class, & + wrapped_MPI_Error_string => MPI_Error_string, & + wrapped_MPI_File_call_errhandler => MPI_File_call_errhandler, & + wrapped_MPI_File_create_errhandler => MPI_File_create_errhandler, & + wrapped_MPI_File_get_errhandler => MPI_File_get_errhandler, & + wrapped_MPI_File_set_errhandler => MPI_File_set_errhandler, & + wrapped_MPI_Free_mem => MPI_Free_mem, & + wrapped_MPI_Get_hw_resource_info => MPI_Get_hw_resource_info, & + wrapped_MPI_Get_library_version => MPI_Get_library_version, & + wrapped_MPI_Get_processor_name => MPI_Get_processor_name, & + wrapped_MPI_Get_version => MPI_Get_version, & + wrapped_MPI_Remove_error_class => MPI_Remove_error_class, & + wrapped_MPI_Remove_error_code => MPI_Remove_error_code, & + wrapped_MPI_Remove_error_string => MPI_Remove_error_string, & + wrapped_MPI_Session_call_errhandler => MPI_Session_call_errhandler, & + wrapped_MPI_Session_create_errhandler => MPI_Session_create_errhandler, & + wrapped_MPI_Session_get_errhandler => MPI_Session_get_errhandler, & + wrapped_MPI_Session_set_errhandler => MPI_Session_set_errhandler, & + wrapped_MPI_Win_call_errhandler => MPI_Win_call_errhandler, & + wrapped_MPI_Win_create_errhandler => MPI_Win_create_errhandler, & + wrapped_MPI_Win_get_errhandler => MPI_Win_get_errhandler, & + wrapped_MPI_Win_set_errhandler => MPI_Win_set_errhandler, & + wrapped_MPI_Wtick => MPI_Wtick, & + wrapped_MPI_Wtime => MPI_Wtime, & + wrapped_MPI_Info_create => MPI_Info_create, & + wrapped_MPI_Info_create_env => MPI_Info_create_env, & + wrapped_MPI_Info_delete => MPI_Info_delete, & + wrapped_MPI_Info_dup => MPI_Info_dup, & + wrapped_MPI_Info_free => MPI_Info_free, & + wrapped_MPI_Info_get_nkeys => MPI_Info_get_nkeys, & + wrapped_MPI_Info_get_nthkey => MPI_Info_get_nthkey, & + wrapped_MPI_Info_get_string => MPI_Info_get_string, & + wrapped_MPI_Info_set => MPI_Info_set, & + wrapped_MPI_Abort => MPI_Abort, & + wrapped_MPI_Close_port => MPI_Close_port, & + wrapped_MPI_Comm_accept => MPI_Comm_accept, & + wrapped_MPI_Comm_connect => MPI_Comm_connect, & + wrapped_MPI_Comm_disconnect => MPI_Comm_disconnect, & + wrapped_MPI_Comm_get_parent => MPI_Comm_get_parent, & + wrapped_MPI_Comm_join => MPI_Comm_join, & + wrapped_MPI_Comm_spawn => MPI_Comm_spawn, & + wrapped_MPI_Comm_spawn_multiple => MPI_Comm_spawn_multiple, & + wrapped_MPI_Finalize => MPI_Finalize, & + wrapped_MPI_Finalized => MPI_Finalized, & + wrapped_MPI_Init => MPI_Init, & + wrapped_MPI_Init_thread => MPI_Init_thread, & + wrapped_MPI_Initialized => MPI_Initialized, & + wrapped_MPI_Is_thread_main => MPI_Is_thread_main, & + wrapped_MPI_Lookup_name => MPI_Lookup_name, & + wrapped_MPI_Open_port => MPI_Open_port, & + wrapped_MPI_Publish_name => MPI_Publish_name, & + wrapped_MPI_Query_thread => MPI_Query_thread, & + wrapped_MPI_Session_finalize => MPI_Session_finalize, & + wrapped_MPI_Session_get_info => MPI_Session_get_info, & + wrapped_MPI_Session_get_nth_pset => MPI_Session_get_nth_pset, & + wrapped_MPI_Session_get_num_psets => MPI_Session_get_num_psets, & + wrapped_MPI_Session_get_pset_info => MPI_Session_get_pset_info, & + wrapped_MPI_Session_init => MPI_Session_init, & + wrapped_MPI_Unpublish_name => MPI_Unpublish_name, & + wrapped_MPI_Accumulate => MPI_Accumulate, & + wrapped_MPI_Compare_and_swap => MPI_Compare_and_swap, & + wrapped_MPI_Fetch_and_op => MPI_Fetch_and_op, & + wrapped_MPI_Get => MPI_Get, & + wrapped_MPI_Get_accumulate => MPI_Get_accumulate, & + wrapped_MPI_Put => MPI_Put, & + wrapped_MPI_Raccumulate => MPI_Raccumulate, & + wrapped_MPI_Rget => MPI_Rget, & + wrapped_MPI_Rget_accumulate => MPI_Rget_accumulate, & + wrapped_MPI_Rput => MPI_Rput, & + wrapped_MPI_Win_allocate => MPI_Win_allocate, & + wrapped_MPI_Win_allocate_shared => MPI_Win_allocate_shared, & + wrapped_MPI_Win_attach => MPI_Win_attach, & + wrapped_MPI_Win_complete => MPI_Win_complete, & + wrapped_MPI_Win_create => MPI_Win_create, & + wrapped_MPI_Win_create_dynamic => MPI_Win_create_dynamic, & + wrapped_MPI_Win_detach => MPI_Win_detach, & + wrapped_MPI_Win_fence => MPI_Win_fence, & + wrapped_MPI_Win_flush => MPI_Win_flush, & + wrapped_MPI_Win_flush_all => MPI_Win_flush_all, & + wrapped_MPI_Win_flush_local => MPI_Win_flush_local, & + wrapped_MPI_Win_flush_local_all => MPI_Win_flush_local_all, & + wrapped_MPI_Win_free => MPI_Win_free, & + wrapped_MPI_Win_get_group => MPI_Win_get_group, & + wrapped_MPI_Win_get_info => MPI_Win_get_info, & + wrapped_MPI_Win_lock => MPI_Win_lock, & + wrapped_MPI_Win_lock_all => MPI_Win_lock_all, & + wrapped_MPI_Win_post => MPI_Win_post, & + wrapped_MPI_Win_set_info => MPI_Win_set_info, & + wrapped_MPI_Win_shared_query => MPI_Win_shared_query, & + wrapped_MPI_Win_start => MPI_Win_start, & + wrapped_MPI_Win_sync => MPI_Win_sync, & + wrapped_MPI_Win_test => MPI_Win_test, & + wrapped_MPI_Win_unlock => MPI_Win_unlock, & + wrapped_MPI_Win_unlock_all => MPI_Win_unlock_all, & + wrapped_MPI_Win_wait => MPI_Win_wait, & + wrapped_MPI_Grequest_complete => MPI_Grequest_complete, & + wrapped_MPI_Grequest_start => MPI_Grequest_start, & + wrapped_MPI_Status_set_cancelled => MPI_Status_set_cancelled, & + wrapped_MPI_Status_set_elements => MPI_Status_set_elements, & + wrapped_MPI_Status_set_error => MPI_Status_set_error, & + wrapped_MPI_Status_set_source => MPI_Status_set_source, & + wrapped_MPI_Status_set_tag => MPI_Status_set_tag, & + wrapped_MPI_File_close => MPI_File_close, & + wrapped_MPI_File_delete => MPI_File_delete, & + wrapped_MPI_File_get_amode => MPI_File_get_amode, & + wrapped_MPI_File_get_atomicity => MPI_File_get_atomicity, & + wrapped_MPI_File_get_byte_offset => MPI_File_get_byte_offset, & + wrapped_MPI_File_get_group => MPI_File_get_group, & + wrapped_MPI_File_get_info => MPI_File_get_info, & + wrapped_MPI_File_get_position => MPI_File_get_position, & + wrapped_MPI_File_get_position_shared => MPI_File_get_position_shared, & + wrapped_MPI_File_get_size => MPI_File_get_size, & + wrapped_MPI_File_get_type_extent => MPI_File_get_type_extent, & + wrapped_MPI_File_get_view => MPI_File_get_view, & + wrapped_MPI_File_iread => MPI_File_iread, & + wrapped_MPI_File_iread_all => MPI_File_iread_all, & + wrapped_MPI_File_iread_at => MPI_File_iread_at, & + wrapped_MPI_File_iread_at_all => MPI_File_iread_at_all, & + wrapped_MPI_File_iread_shared => MPI_File_iread_shared, & + wrapped_MPI_File_iwrite => MPI_File_iwrite, & + wrapped_MPI_File_iwrite_all => MPI_File_iwrite_all, & + wrapped_MPI_File_iwrite_at => MPI_File_iwrite_at, & + wrapped_MPI_File_iwrite_at_all => MPI_File_iwrite_at_all, & + wrapped_MPI_File_iwrite_shared => MPI_File_iwrite_shared, & + wrapped_MPI_File_open => MPI_File_open, & + wrapped_MPI_File_preallocate => MPI_File_preallocate, & + wrapped_MPI_File_read => MPI_File_read, & + wrapped_MPI_File_read_all => MPI_File_read_all, & + wrapped_MPI_File_read_all_begin => MPI_File_read_all_begin, & + wrapped_MPI_File_read_all_end => MPI_File_read_all_end, & + wrapped_MPI_File_read_at => MPI_File_read_at, & + wrapped_MPI_File_read_at_all => MPI_File_read_at_all, & + wrapped_MPI_File_read_at_all_begin => MPI_File_read_at_all_begin, & + wrapped_MPI_File_read_at_all_end => MPI_File_read_at_all_end, & + wrapped_MPI_File_read_ordered => MPI_File_read_ordered, & + wrapped_MPI_File_read_ordered_begin => MPI_File_read_ordered_begin, & + wrapped_MPI_File_read_ordered_end => MPI_File_read_ordered_end, & + wrapped_MPI_File_read_shared => MPI_File_read_shared, & + wrapped_MPI_File_seek => MPI_File_seek, & + wrapped_MPI_File_seek_shared => MPI_File_seek_shared, & + wrapped_MPI_File_set_atomicity => MPI_File_set_atomicity, & + wrapped_MPI_File_set_info => MPI_File_set_info, & + wrapped_MPI_File_set_size => MPI_File_set_size, & + wrapped_MPI_File_set_view => MPI_File_set_view, & + wrapped_MPI_File_sync => MPI_File_sync, & + wrapped_MPI_File_write => MPI_File_write, & + wrapped_MPI_File_write_all => MPI_File_write_all, & + wrapped_MPI_File_write_all_begin => MPI_File_write_all_begin, & + wrapped_MPI_File_write_all_end => MPI_File_write_all_end, & + wrapped_MPI_File_write_at => MPI_File_write_at, & + wrapped_MPI_File_write_at_all => MPI_File_write_at_all, & + wrapped_MPI_File_write_at_all_begin => MPI_File_write_at_all_begin, & + wrapped_MPI_File_write_at_all_end => MPI_File_write_at_all_end, & + wrapped_MPI_File_write_ordered => MPI_File_write_ordered, & + wrapped_MPI_File_write_ordered_begin => MPI_File_write_ordered_begin, & + wrapped_MPI_File_write_ordered_end => MPI_File_write_ordered_end, & + wrapped_MPI_File_write_shared => MPI_File_write_shared, & + wrapped_MPI_Register_datarep => MPI_Register_datarep, & + wrapped_MPI_F_sync_reg => MPI_F_sync_reg, & + wrapped_MPI_Type_create_f90_complex => MPI_Type_create_f90_complex, & + wrapped_MPI_Type_create_f90_integer => MPI_Type_create_f90_integer, & + wrapped_MPI_Type_create_f90_real => MPI_Type_create_f90_real, & + wrapped_MPI_Type_match_size => MPI_Type_match_size, & + wrapped_MPI_Pcontrol => MPI_Pcontrol, & + wrapped_MPI_Attr_delete => MPI_Attr_delete, & + wrapped_MPI_Attr_get => MPI_Attr_get, & + wrapped_MPI_Attr_put => MPI_Attr_put, & + wrapped_MPI_Get_elements_x => MPI_Get_elements_x, & + wrapped_MPI_Info_get => MPI_Info_get, & + wrapped_MPI_Info_get_valuelen => MPI_Info_get_valuelen, & + wrapped_MPI_Keyval_create => MPI_Keyval_create, & + wrapped_MPI_Keyval_free => MPI_Keyval_free, & + wrapped_MPI_Status_set_elements_x => MPI_Status_set_elements_x, & + wrapped_MPI_Type_get_extent_x => MPI_Type_get_extent_x, & + wrapped_MPI_Type_get_true_extent_x => MPI_Type_get_true_extent_x, & + wrapped_MPI_Type_size_x => MPI_Type_size_x, & + wrapped_MPI_Address => MPI_Address, & + wrapped_MPI_Type_hindexed => MPI_Type_hindexed, & + wrapped_MPI_Type_hvector => MPI_Type_hvector, & + wrapped_MPI_Type_struct => MPI_Type_struct, & + wrapped_MPI_Type_extent => MPI_Type_extent, & + wrapped_MPI_Type_lb => MPI_Type_lb, & + wrapped_MPI_Type_ub => MPI_Type_ub + + implicit none + private + save + + public :: MPI_Bsend + public :: MPI_Bsend_init + public :: MPI_Buffer_attach + public :: MPI_Buffer_detach + public :: MPI_Buffer_flush + public :: MPI_Buffer_iflush + public :: MPI_Cancel + public :: MPI_Comm_attach_buffer + public :: MPI_Comm_detach_buffer + public :: MPI_Comm_flush_buffer + public :: MPI_Comm_iflush_buffer + public :: MPI_Get_count + public :: MPI_Ibsend + public :: MPI_Improbe + public :: MPI_Imrecv + public :: MPI_Iprobe + public :: MPI_Irecv + public :: MPI_Irsend + public :: MPI_Isend + public :: MPI_Isendrecv + public :: MPI_Isendrecv_replace + public :: MPI_Issend + public :: MPI_Mprobe + public :: MPI_Mrecv + public :: MPI_Probe + public :: MPI_Recv + public :: MPI_Recv_init + public :: MPI_Request_free + public :: MPI_Request_get_status + public :: MPI_Request_get_status_all + public :: MPI_Request_get_status_any + public :: MPI_Request_get_status_some + public :: MPI_Rsend + public :: MPI_Rsend_init + public :: MPI_Send + public :: MPI_Send_init + public :: MPI_Sendrecv + public :: MPI_Sendrecv_replace + public :: MPI_Session_attach_buffer + public :: MPI_Session_detach_buffer + public :: MPI_Session_flush_buffer + public :: MPI_Session_iflush_buffer + public :: MPI_Ssend + public :: MPI_Ssend_init + public :: MPI_Start + public :: MPI_Startall + public :: MPI_Status_get_error + public :: MPI_Status_get_source + public :: MPI_Status_get_tag + public :: MPI_Test + public :: MPI_Test_cancelled + public :: MPI_Testall + public :: MPI_Testany + public :: MPI_Testsome + public :: MPI_Wait + public :: MPI_Waitall + public :: MPI_Waitany + public :: MPI_Waitsome + public :: MPI_Parrived + public :: MPI_Pready + public :: MPI_Pready_list + public :: MPI_Pready_range + public :: MPI_Precv_init + public :: MPI_Psend_init + public :: MPI_Aint_add + public :: MPI_Aint_diff + public :: MPI_Get_address + public :: MPI_Get_elements + public :: MPI_Pack + public :: MPI_Pack_external + public :: MPI_Pack_external_size + public :: MPI_Pack_size + public :: MPI_Type_commit + public :: MPI_Type_contiguous + public :: MPI_Type_create_darray + public :: MPI_Type_create_hindexed + public :: MPI_Type_create_hindexed_block + public :: MPI_Type_create_hvector + public :: MPI_Type_create_indexed_block + public :: MPI_Type_create_resized + public :: MPI_Type_create_struct + public :: MPI_Type_create_subarray + public :: MPI_Type_dup + public :: MPI_Type_free + public :: MPI_Type_get_contents + public :: MPI_Type_get_envelope + public :: MPI_Type_get_extent + public :: MPI_Type_get_true_extent + public :: MPI_Type_indexed + public :: MPI_Type_size + public :: MPI_Type_vector + public :: MPI_Unpack + public :: MPI_Unpack_external + public :: MPI_Allgather + public :: MPI_Allgather_init + public :: MPI_Allgatherv + public :: MPI_Allgatherv_init + public :: MPI_Allreduce + public :: MPI_Allreduce_init + public :: MPI_Alltoall + public :: MPI_Alltoall_init + public :: MPI_Alltoallv + public :: MPI_Alltoallv_init + public :: MPI_Alltoallw + public :: MPI_Alltoallw_init + public :: MPI_Barrier + public :: MPI_Barrier_init + public :: MPI_Bcast + public :: MPI_Bcast_init + public :: MPI_Exscan + public :: MPI_Exscan_init + public :: MPI_Gather + public :: MPI_Gather_init + public :: MPI_Gatherv + public :: MPI_Gatherv_init + public :: MPI_Iallgather + public :: MPI_Iallgatherv + public :: MPI_Iallreduce + public :: MPI_Ialltoall + public :: MPI_Ialltoallv + public :: MPI_Ialltoallw + public :: MPI_Ibarrier + public :: MPI_Ibcast + public :: MPI_Iexscan + public :: MPI_Igather + public :: MPI_Igatherv + public :: MPI_Ireduce + public :: MPI_Ireduce_scatter + public :: MPI_Ireduce_scatter_block + public :: MPI_Iscan + public :: MPI_Iscatter + public :: MPI_Iscatterv + public :: MPI_Op_commutative + public :: MPI_Op_create + public :: MPI_Op_free + public :: MPI_Reduce + public :: MPI_Reduce_init + public :: MPI_Reduce_local + public :: MPI_Reduce_scatter + public :: MPI_Reduce_scatter_block + public :: MPI_Reduce_scatter_block_init + public :: MPI_Reduce_scatter_init + public :: MPI_Scan + public :: MPI_Scan_init + public :: MPI_Scatter + public :: MPI_Scatter_init + public :: MPI_Scatterv + public :: MPI_Scatterv_init + public :: MPI_Type_get_value_index + public :: MPI_Comm_compare + public :: MPI_Comm_create + public :: MPI_Comm_create_from_group + public :: MPI_Comm_create_group + public :: MPI_Comm_create_keyval + public :: MPI_Comm_delete_attr + public :: MPI_Comm_dup + public :: MPI_Comm_dup_with_info + public :: MPI_Comm_free + public :: MPI_Comm_get_name + public :: MPI_Comm_free_keyval + public :: MPI_Comm_get_attr + public :: MPI_Comm_get_info + public :: MPI_Comm_group + public :: MPI_Comm_idup + public :: MPI_Comm_idup_with_info + public :: MPI_Comm_rank + public :: MPI_Comm_remote_group + public :: MPI_Comm_remote_size + public :: MPI_Comm_set_attr + public :: MPI_Comm_set_info + public :: MPI_Comm_set_name + public :: MPI_Comm_size + public :: MPI_Comm_split + public :: MPI_Group_free + public :: MPI_Comm_split_type + public :: MPI_Comm_test_inter + public :: MPI_Group_compare + public :: MPI_Group_difference + public :: MPI_Group_excl + public :: MPI_Group_from_session_pset + public :: MPI_Group_incl + public :: MPI_Group_intersection + public :: MPI_Group_range_excl + public :: MPI_Group_range_incl + public :: MPI_Group_rank + public :: MPI_Group_size + public :: MPI_Group_translate_ranks + public :: MPI_Group_union + public :: MPI_Intercomm_create + public :: MPI_Intercomm_create_from_groups + public :: MPI_Intercomm_merge + public :: MPI_Type_create_keyval + public :: MPI_Type_delete_attr + public :: MPI_Type_free_keyval + public :: MPI_Type_get_attr + public :: MPI_Type_get_name + public :: MPI_Type_set_attr + public :: MPI_Type_set_name + public :: MPI_Win_create_keyval + public :: MPI_Win_delete_attr + public :: MPI_Win_free_keyval + public :: MPI_Win_get_attr + public :: MPI_Win_get_name + public :: MPI_Win_set_attr + public :: MPI_Win_set_name + public :: MPI_Cart_coords + public :: MPI_Cart_create + public :: MPI_Cart_get + public :: MPI_Cart_map + public :: MPI_Cart_rank + public :: MPI_Cart_shift + public :: MPI_Cart_sub + public :: MPI_Cartdim_get + public :: MPI_Dims_create + public :: MPI_Dist_graph_create + public :: MPI_Dist_graph_create_adjacent + public :: MPI_Dist_graph_neighbors + public :: MPI_Dist_graph_neighbors_count + public :: MPI_Graph_create + public :: MPI_Graph_get + public :: MPI_Graph_map + public :: MPI_Graph_neighbors + public :: MPI_Graph_neighbors_count + public :: MPI_Graphdims_get + public :: MPI_Ineighbor_allgather + public :: MPI_Ineighbor_allgatherv + public :: MPI_Ineighbor_alltoall + public :: MPI_Ineighbor_alltoallv + public :: MPI_Ineighbor_alltoallw + public :: MPI_Neighbor_allgather + public :: MPI_Neighbor_allgather_init + public :: MPI_Neighbor_allgatherv + public :: MPI_Neighbor_allgatherv_init + public :: MPI_Neighbor_alltoall + public :: MPI_Neighbor_alltoall_init + public :: MPI_Neighbor_alltoallv + public :: MPI_Neighbor_alltoallv_init + public :: MPI_Neighbor_alltoallw + public :: MPI_Neighbor_alltoallw_init + public :: MPI_Topo_test + public :: MPI_Add_error_class + public :: MPI_Add_error_code + public :: MPI_Add_error_string + public :: MPI_Alloc_mem + public :: MPI_Comm_call_errhandler + public :: MPI_Comm_create_errhandler + public :: MPI_Comm_get_errhandler + public :: MPI_Comm_set_errhandler + public :: MPI_Errhandler_free + public :: MPI_Error_class + public :: MPI_Error_string + public :: MPI_File_call_errhandler + public :: MPI_File_create_errhandler + public :: MPI_File_get_errhandler + public :: MPI_File_set_errhandler + public :: MPI_Free_mem + public :: MPI_Get_hw_resource_info + public :: MPI_Get_library_version + public :: MPI_Get_processor_name + public :: MPI_Get_version + public :: MPI_Remove_error_class + public :: MPI_Remove_error_code + public :: MPI_Remove_error_string + public :: MPI_Session_call_errhandler + public :: MPI_Session_create_errhandler + public :: MPI_Session_get_errhandler + public :: MPI_Session_set_errhandler + public :: MPI_Win_call_errhandler + public :: MPI_Win_create_errhandler + public :: MPI_Win_get_errhandler + public :: MPI_Win_set_errhandler + public :: MPI_Wtick + public :: MPI_Wtime + public :: MPI_Info_create + public :: MPI_Info_create_env + public :: MPI_Info_delete + public :: MPI_Info_dup + public :: MPI_Info_free + public :: MPI_Info_get_nkeys + public :: MPI_Info_get_nthkey + public :: MPI_Info_get_string + public :: MPI_Info_set + public :: MPI_Abort + public :: MPI_Close_port + public :: MPI_Comm_accept + public :: MPI_Comm_connect + public :: MPI_Comm_disconnect + public :: MPI_Comm_get_parent + public :: MPI_Comm_join + public :: MPI_Comm_spawn + public :: MPI_Comm_spawn_multiple + public :: MPI_Finalize + public :: MPI_Finalized + public :: MPI_Init + public :: MPI_Init_thread + public :: MPI_Initialized + public :: MPI_Is_thread_main + public :: MPI_Lookup_name + public :: MPI_Open_port + public :: MPI_Publish_name + public :: MPI_Query_thread + public :: MPI_Session_finalize + public :: MPI_Session_get_info + public :: MPI_Session_get_nth_pset + public :: MPI_Session_get_num_psets + public :: MPI_Session_get_pset_info + public :: MPI_Session_init + public :: MPI_Unpublish_name + public :: MPI_Accumulate + public :: MPI_Compare_and_swap + public :: MPI_Fetch_and_op + public :: MPI_Get + public :: MPI_Get_accumulate + public :: MPI_Put + public :: MPI_Raccumulate + public :: MPI_Rget + public :: MPI_Rget_accumulate + public :: MPI_Rput + public :: MPI_Win_allocate + public :: MPI_Win_allocate_shared + public :: MPI_Win_attach + public :: MPI_Win_complete + public :: MPI_Win_create + public :: MPI_Win_create_dynamic + public :: MPI_Win_detach + public :: MPI_Win_fence + public :: MPI_Win_flush + public :: MPI_Win_flush_all + public :: MPI_Win_flush_local + public :: MPI_Win_flush_local_all + public :: MPI_Win_free + public :: MPI_Win_get_group + public :: MPI_Win_get_info + public :: MPI_Win_lock + public :: MPI_Win_lock_all + public :: MPI_Win_post + public :: MPI_Win_set_info + public :: MPI_Win_shared_query + public :: MPI_Win_start + public :: MPI_Win_sync + public :: MPI_Win_test + public :: MPI_Win_unlock + public :: MPI_Win_unlock_all + public :: MPI_Win_wait + public :: MPI_Grequest_complete + public :: MPI_Grequest_start + public :: MPI_Status_set_cancelled + public :: MPI_Status_set_elements + public :: MPI_Status_set_error + public :: MPI_Status_set_source + public :: MPI_Status_set_tag + public :: MPI_File_close + public :: MPI_File_delete + public :: MPI_File_get_amode + public :: MPI_File_get_atomicity + public :: MPI_File_get_byte_offset + public :: MPI_File_get_group + public :: MPI_File_get_info + public :: MPI_File_get_position + public :: MPI_File_get_position_shared + public :: MPI_File_get_size + public :: MPI_File_get_type_extent + public :: MPI_File_get_view + public :: MPI_File_iread + public :: MPI_File_iread_all + public :: MPI_File_iread_at + public :: MPI_File_iread_at_all + public :: MPI_File_iread_shared + public :: MPI_File_iwrite + public :: MPI_File_iwrite_all + public :: MPI_File_iwrite_at + public :: MPI_File_iwrite_at_all + public :: MPI_File_iwrite_shared + public :: MPI_File_open + public :: MPI_File_preallocate + public :: MPI_File_read + public :: MPI_File_read_all + public :: MPI_File_read_all_begin + public :: MPI_File_read_all_end + public :: MPI_File_read_at + public :: MPI_File_read_at_all + public :: MPI_File_read_at_all_begin + public :: MPI_File_read_at_all_end + public :: MPI_File_read_ordered + public :: MPI_File_read_ordered_begin + public :: MPI_File_read_ordered_end + public :: MPI_File_read_shared + public :: MPI_File_seek + public :: MPI_File_seek_shared + public :: MPI_File_set_atomicity + public :: MPI_File_set_info + public :: MPI_File_set_size + public :: MPI_File_set_view + public :: MPI_File_sync + public :: MPI_File_write + public :: MPI_File_write_all + public :: MPI_File_write_all_begin + public :: MPI_File_write_all_end + public :: MPI_File_write_at + public :: MPI_File_write_at_all + public :: MPI_File_write_at_all_begin + public :: MPI_File_write_at_all_end + public :: MPI_File_write_ordered + public :: MPI_File_write_ordered_begin + public :: MPI_File_write_ordered_end + public :: MPI_File_write_shared + public :: MPI_Register_datarep + public :: MPI_F_sync_reg + public :: MPI_Type_create_f90_complex + public :: MPI_Type_create_f90_integer + public :: MPI_Type_create_f90_real + public :: MPI_Type_match_size + public :: MPI_Pcontrol + public :: MPI_Attr_delete + public :: MPI_Attr_get + public :: MPI_Attr_put + public :: MPI_Get_elements_x + public :: MPI_Info_get + public :: MPI_Info_get_valuelen + public :: MPI_Keyval_create + public :: MPI_Keyval_free + public :: MPI_Status_set_elements_x + public :: MPI_Type_get_extent_x + public :: MPI_Type_get_true_extent_x + public :: MPI_Type_size_x + public :: MPI_Address + public :: MPI_Type_hindexed + public :: MPI_Type_hvector + public :: MPI_Type_struct + public :: MPI_Type_extent + public :: MPI_Type_lb + public :: MPI_Type_ub + +contains + + subroutine MPI_Bsend( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Bsend( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Bsend + + subroutine MPI_Bsend_init( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Bsend_init( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Bsend_init + + subroutine MPI_Buffer_attach( & + buffer, & + size, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buffer + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buffer + integer :: buffer(*) + integer, intent(in) :: size + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Buffer_attach( & + buffer, & + size, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Buffer_attach + + subroutine MPI_Buffer_detach( & + buffer_addr, & + size, & + ierror & + ) + integer(MPI_ADDRESS_KIND), intent(out) :: buffer_addr + integer, intent(out) :: size + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Buffer_detach( & + buffer_addr, & + size, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Buffer_detach + + subroutine MPI_Buffer_flush( & + ierror & + ) + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Buffer_flush( & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Buffer_flush + + subroutine MPI_Buffer_iflush( & + request, & + ierror & + ) + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Buffer_iflush( & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Buffer_iflush + + subroutine MPI_Cancel( & + request, & + ierror & + ) + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Cancel( & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Cancel + + subroutine MPI_Comm_attach_buffer( & + comm, & + buffer, & + size, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buffer + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buffer + integer, intent(in) :: buffer(*) + integer, intent(in) :: size + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_attach_buffer( & + comm, & + buffer, & + size, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_attach_buffer + + subroutine MPI_Comm_detach_buffer( & + comm, & + buffer_addr, & + size, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + integer(MPI_ADDRESS_KIND), intent(out) :: buffer_addr + integer, intent(out) :: size + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_detach_buffer( & + comm, & + buffer_addr, & + size, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_detach_buffer + + subroutine MPI_Comm_flush_buffer( & + comm, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_flush_buffer( & + comm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_flush_buffer + + subroutine MPI_Comm_iflush_buffer( & + comm, & + request, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_iflush_buffer( & + comm, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_iflush_buffer + + subroutine MPI_Get_count( & + status, & + datatype, & + count, & + ierror & + ) + type(MPI_Status), intent(in) :: status + type(MPI_Datatype), intent(in) :: datatype + integer, intent(out) :: count + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Get_count( & + status, & + datatype, & + count, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Get_count + + subroutine MPI_Ibsend( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Ibsend( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Ibsend + + subroutine MPI_Improbe( & + source, & + tag, & + comm, & + flag, & + message, & + status, & + ierror & + ) + integer, intent(in) :: source + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + logical, intent(out) :: flag + type(MPI_Message), intent(out) :: message + type(MPI_Status), intent(out) :: status + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Improbe( & + source, & + tag, & + comm, & + flag, & + message, & + status, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Improbe + + subroutine MPI_Imrecv( & + buf, & + count, & + datatype, & + message, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Message), intent(out) :: message + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Imrecv( & + buf, & + count, & + datatype, & + message, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Imrecv + + subroutine MPI_Iprobe( & + source, & + tag, & + comm, & + flag, & + status, & + ierror & + ) + integer, intent(in) :: source + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + logical, intent(out) :: flag + type(MPI_Status), intent(out) :: status + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Iprobe( & + source, & + tag, & + comm, & + flag, & + status, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Iprobe + + subroutine MPI_Irecv( & + buf, & + count, & + datatype, & + source, & + tag, & + comm, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: source + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Irecv( & + buf, & + count, & + datatype, & + source, & + tag, & + comm, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Irecv + + subroutine MPI_Irsend( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Irsend( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Irsend + + subroutine MPI_Isend( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Isend( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Isend + + subroutine MPI_Isendrecv( & + sendbuf, & + sendcount, & + sendtype, & + dest, & + sendtag, & + recvbuf, & + recvcount, & + recvtype, & + source, & + recvtag, & + comm, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + integer, intent(in) :: dest + integer, intent(in) :: sendtag + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + integer, intent(in) :: source + integer, intent(in) :: recvtag + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Isendrecv( & + sendbuf, & + sendcount, & + sendtype, & + dest, & + sendtag, & + recvbuf, & + recvcount, & + recvtype, & + source, & + recvtag, & + comm, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Isendrecv + + subroutine MPI_Isendrecv_replace( & + buf, & + count, & + datatype, & + dest, & + sendtag, & + source, & + recvtag, & + comm, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(inout) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: sendtag + integer, intent(in) :: source + integer, intent(in) :: recvtag + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Isendrecv_replace( & + buf, & + count, & + datatype, & + dest, & + sendtag, & + source, & + recvtag, & + comm, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Isendrecv_replace + + subroutine MPI_Issend( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Issend( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Issend + + subroutine MPI_Mprobe( & + source, & + tag, & + comm, & + message, & + status, & + ierror & + ) + integer, intent(in) :: source + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + type(MPI_Message), intent(out) :: message + type(MPI_Status), intent(out) :: status + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Mprobe( & + source, & + tag, & + comm, & + message, & + status, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Mprobe + + subroutine MPI_Mrecv( & + buf, & + count, & + datatype, & + message, & + status, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Message), intent(out) :: message + type(MPI_Status), intent(out) :: status + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Mrecv( & + buf, & + count, & + datatype, & + message, & + status, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Mrecv + + subroutine MPI_Probe( & + source, & + tag, & + comm, & + status, & + ierror & + ) + integer, intent(in) :: source + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + type(MPI_Status), intent(out) :: status + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Probe( & + source, & + tag, & + comm, & + status, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Probe + + subroutine MPI_Recv( & + buf, & + count, & + datatype, & + source, & + tag, & + comm, & + status, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: source + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + type(MPI_Status), intent(out) :: status + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Recv( & + buf, & + count, & + datatype, & + source, & + tag, & + comm, & + status, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Recv + + subroutine MPI_Recv_init( & + buf, & + count, & + datatype, & + source, & + tag, & + comm, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: source + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Recv_init( & + buf, & + count, & + datatype, & + source, & + tag, & + comm, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Recv_init + + subroutine MPI_Request_free( & + request, & + ierror & + ) + type(MPI_Request), intent(inout) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Request_free( & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Request_free + + subroutine MPI_Request_get_status( & + request, & + flag, & + status, & + ierror & + ) + type(MPI_Request), intent(in) :: request + logical, intent(out) :: flag + type(MPI_Status), intent(out) :: status + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Request_get_status( & + request, & + flag, & + status, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Request_get_status + + subroutine MPI_Request_get_status_all( & + count, & + array_of_requests, & + flag, & + array_of_statuses, & + ierror & + ) + integer, intent(in) :: count + type(MPI_Request), intent(in) :: array_of_requests(count) + logical, intent(out) :: flag + type(MPI_Status), intent(out) :: array_of_statuses(count) + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Request_get_status_all( & + count, & + array_of_requests, & + flag, & + array_of_statuses, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Request_get_status_all + + subroutine MPI_Request_get_status_any( & + count, & + array_of_requests, & + index, & + flag, & + status, & + ierror & + ) + integer, intent(in) :: count + type(MPI_Request), intent(in) :: array_of_requests(count) + integer, intent(out) :: index + logical, intent(out) :: flag + type(MPI_Status), intent(out) :: status + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Request_get_status_any( & + count, & + array_of_requests, & + index, & + flag, & + status, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Request_get_status_any + + subroutine MPI_Request_get_status_some( & + incount, & + array_of_requests, & + outcount, & + array_of_indices, & + array_of_statuses, & + ierror & + ) + integer, intent(in) :: incount + type(MPI_Request), intent(in) :: array_of_requests(incount) + integer, intent(out) :: outcount + integer, intent(out) :: array_of_indices(incount) + type(MPI_Status), intent(out) :: array_of_statuses(incount) + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Request_get_status_some( & + incount, & + array_of_requests, & + outcount, & + array_of_indices, & + array_of_statuses, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Request_get_status_some + + subroutine MPI_Rsend( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Rsend( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Rsend + + subroutine MPI_Rsend_init( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Rsend_init( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Rsend_init + + subroutine MPI_Send( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Send( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Send + + subroutine MPI_Send_init( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Send_init( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Send_init + + subroutine MPI_Sendrecv( & + sendbuf, & + sendcount, & + sendtype, & + dest, & + sendtag, & + recvbuf, & + recvcount, & + recvtype, & + source, & + recvtag, & + comm, & + status, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + integer, intent(in) :: dest + integer, intent(in) :: sendtag + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + integer, intent(in) :: source + integer, intent(in) :: recvtag + type(MPI_Comm), intent(in) :: comm + type(MPI_Status), intent(out) :: status + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Sendrecv( & + sendbuf, & + sendcount, & + sendtype, & + dest, & + sendtag, & + recvbuf, & + recvcount, & + recvtype, & + source, & + recvtag, & + comm, & + status, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Sendrecv + + subroutine MPI_Sendrecv_replace( & + buf, & + count, & + datatype, & + dest, & + sendtag, & + source, & + recvtag, & + comm, & + status, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(inout) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: sendtag + integer, intent(in) :: source + integer, intent(in) :: recvtag + type(MPI_Comm), intent(in) :: comm + type(MPI_Status), intent(out) :: status + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Sendrecv_replace( & + buf, & + count, & + datatype, & + dest, & + sendtag, & + source, & + recvtag, & + comm, & + status, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Sendrecv_replace + + subroutine MPI_Session_attach_buffer( & + session, & + buffer, & + size, & + ierror & + ) + type(MPI_Session), intent(in) :: session + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buffer + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buffer + integer, intent(in) :: buffer(*) + integer, intent(in) :: size + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Session_attach_buffer( & + session, & + buffer, & + size, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Session_attach_buffer + + subroutine MPI_Session_detach_buffer( & + session, & + buffer_addr, & + size, & + ierror & + ) + type(MPI_Session), intent(in) :: session + integer(MPI_ADDRESS_KIND), intent(out) :: buffer_addr + integer, intent(out) :: size + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Session_detach_buffer( & + session, & + buffer_addr, & + size, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Session_detach_buffer + + subroutine MPI_Session_flush_buffer( & + session, & + ierror & + ) + type(MPI_Session), intent(in) :: session + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Session_flush_buffer( & + session, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Session_flush_buffer + + subroutine MPI_Session_iflush_buffer( & + session, & + request, & + ierror & + ) + type(MPI_Session), intent(in) :: session + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Session_iflush_buffer( & + session, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Session_iflush_buffer + + subroutine MPI_Ssend( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Ssend( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Ssend + + subroutine MPI_Ssend_init( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Ssend_init( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Ssend_init + + subroutine MPI_Start( & + request, & + ierror & + ) + type(MPI_Request), intent(inout) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Start( & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Start + + subroutine MPI_Startall( & + count, & + array_of_requests, & + ierror & + ) + integer, intent(in) :: count + type(MPI_Request), intent(inout) :: array_of_requests(count) + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Startall( & + count, & + array_of_requests, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Startall + + subroutine MPI_Status_get_error( & + status, & + err, & + ierror & + ) + type(MPI_Status), intent(in) :: status + integer, intent(out) :: err + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Status_get_error( & + status, & + err, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Status_get_error + + subroutine MPI_Status_get_source( & + status, & + source, & + ierror & + ) + type(MPI_Status), intent(in) :: status + integer, intent(out) :: source + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Status_get_source( & + status, & + source, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Status_get_source + + subroutine MPI_Status_get_tag( & + status, & + tag, & + ierror & + ) + type(MPI_Status), intent(in) :: status + integer, intent(out) :: tag + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Status_get_tag( & + status, & + tag, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Status_get_tag + + subroutine MPI_Test( & + request, & + flag, & + status, & + ierror & + ) + type(MPI_Request), intent(inout) :: request + logical, intent(out) :: flag + type(MPI_Status), intent(out) :: status + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Test( & + request, & + flag, & + status, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Test + + subroutine MPI_Test_cancelled( & + status, & + flag, & + ierror & + ) + type(MPI_Status), intent(in) :: status + logical, intent(out) :: flag + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Test_cancelled( & + status, & + flag, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Test_cancelled + + subroutine MPI_Testall( & + count, & + array_of_requests, & + flag, & + array_of_statuses, & + ierror & + ) + integer, intent(in) :: count + type(MPI_Request), intent(inout) :: array_of_requests(count) + logical, intent(out) :: flag + type(MPI_Status), intent(out) :: array_of_statuses(count) + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Testall( & + count, & + array_of_requests, & + flag, & + array_of_statuses, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Testall + + subroutine MPI_Testany( & + count, & + array_of_requests, & + index, & + flag, & + status, & + ierror & + ) + integer, intent(in) :: count + type(MPI_Request), intent(inout) :: array_of_requests(count) + integer, intent(out) :: index + logical, intent(out) :: flag + type(MPI_Status), intent(out) :: status + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Testany( & + count, & + array_of_requests, & + index, & + flag, & + status, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Testany + + subroutine MPI_Testsome( & + incount, & + array_of_requests, & + outcount, & + array_of_indices, & + array_of_statuses, & + ierror & + ) + integer, intent(in) :: incount + type(MPI_Request), intent(inout) :: array_of_requests(incount) + integer, intent(out) :: outcount + integer, intent(out) :: array_of_indices(incount) + type(MPI_Status), intent(out) :: array_of_statuses(incount) + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Testsome( & + incount, & + array_of_requests, & + outcount, & + array_of_indices, & + array_of_statuses, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Testsome + + subroutine MPI_Wait( & + request, & + status, & + ierror & + ) + type(MPI_Request), intent(inout) :: request + type(MPI_Status), intent(out) :: status + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Wait( & + request, & + status, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Wait + + subroutine MPI_Waitall( & + count, & + array_of_requests, & + array_of_statuses, & + ierror & + ) + integer, intent(in) :: count + type(MPI_Request), intent(inout) :: array_of_requests(count) + type(MPI_Status), intent(out) :: array_of_statuses(count) + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Waitall( & + count, & + array_of_requests, & + array_of_statuses, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Waitall + + subroutine MPI_Waitany( & + count, & + array_of_requests, & + index, & + status, & + ierror & + ) + integer, intent(in) :: count + type(MPI_Request), intent(inout) :: array_of_requests(count) + integer, intent(out) :: index + type(MPI_Status), intent(out) :: status + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Waitany( & + count, & + array_of_requests, & + index, & + status, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Waitany + + subroutine MPI_Waitsome( & + incount, & + array_of_requests, & + outcount, & + array_of_indices, & + array_of_statuses, & + ierror & + ) + integer, intent(in) :: incount + type(MPI_Request), intent(inout) :: array_of_requests(incount) + integer, intent(out) :: outcount + integer, intent(out) :: array_of_indices(incount) + type(MPI_Status), intent(out) :: array_of_statuses(incount) + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Waitsome( & + incount, & + array_of_requests, & + outcount, & + array_of_indices, & + array_of_statuses, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Waitsome + + subroutine MPI_Parrived( & + request, & + partition, & + flag, & + ierror & + ) + type(MPI_Request), intent(in) :: request + integer, intent(in) :: partition + logical, intent(out) :: flag + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Parrived( & + request, & + partition, & + flag, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Parrived + + subroutine MPI_Pready( & + partition, & + request, & + ierror & + ) + integer, intent(in) :: partition + type(MPI_Request), intent(in) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Pready( & + partition, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Pready + + subroutine MPI_Pready_list( & + length, & + array_of_partitions, & + request, & + ierror & + ) + integer, intent(in) :: length + integer, intent(in) :: array_of_partitions(length) + type(MPI_Request), intent(in) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Pready_list( & + length, & + array_of_partitions, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Pready_list + + subroutine MPI_Pready_range( & + partition_low, & + partition_high, & + request, & + ierror & + ) + integer, intent(in) :: partition_low + integer, intent(in) :: partition_high + type(MPI_Request), intent(in) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Pready_range( & + partition_low, & + partition_high, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Pready_range + + subroutine MPI_Precv_init( & + buf, & + partitions, & + count, & + datatype, & + source, & + tag, & + comm, & + info, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: partitions + integer(MPI_COUNT_KIND), intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: source + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Precv_init( & + buf, & + partitions, & + count, & + datatype, & + source, & + tag, & + comm, & + info, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Precv_init + + subroutine MPI_Psend_init( & + buf, & + partitions, & + count, & + datatype, & + source, & + tag, & + comm, & + info, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: partitions + integer(MPI_COUNT_KIND), intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: source + integer, intent(in) :: tag + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Psend_init( & + buf, & + partitions, & + count, & + datatype, & + source, & + tag, & + comm, & + info, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Psend_init + + function MPI_Aint_add( & + base, & + disp & + ) result(result) + integer(MPI_ADDRESS_KIND), intent(in) :: base + integer(MPI_ADDRESS_KIND), intent(in) :: disp + integer(MPI_ADDRESS_KIND) :: result + result = wrapped_MPI_Aint_add( & + base, & + disp & + ) + end function MPI_Aint_add + + function MPI_Aint_diff( & + addr1, & + addr2 & + ) result(result) + integer(MPI_ADDRESS_KIND), intent(in) :: addr1 + integer(MPI_ADDRESS_KIND), intent(in) :: addr2 + integer(MPI_ADDRESS_KIND) :: result + result = wrapped_MPI_Aint_diff( & + addr1, & + addr2 & + ) + end function MPI_Aint_diff + + subroutine MPI_Get_address( & + location, & + address, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) location + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: location + integer, intent(in) :: location(*) + integer(MPI_ADDRESS_KIND), intent(out) :: address + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Get_address( & + location, & + address, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Get_address + + subroutine MPI_Get_elements( & + status, & + datatype, & + count, & + ierror & + ) + type(MPI_Status), intent(in) :: status + type(MPI_Datatype), intent(in) :: datatype + integer, intent(out) :: count + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Get_elements( & + status, & + datatype, & + count, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Get_elements + + subroutine MPI_Pack( & + inbuf, & + incount, & + datatype, & + outbuf, & + outsize, & + position, & + comm, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) inbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: inbuf + integer, intent(in) :: inbuf(*) + integer, intent(in) :: incount + type(MPI_Datatype), intent(in) :: datatype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) outbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: outbuf + integer :: outbuf(*) + integer, intent(in) :: outsize + integer, intent(out) :: position + type(MPI_Comm), intent(in) :: comm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Pack( & + inbuf, & + incount, & + datatype, & + outbuf, & + outsize, & + position, & + comm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Pack + + subroutine MPI_Pack_external( & + datarep, & + inbuf, & + incount, & + datatype, & + outbuf, & + outsize, & + position, & + ierror & + ) + character(*), intent(in) :: datarep + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) inbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: inbuf + integer, intent(in) :: inbuf(*) + integer, intent(in) :: incount + type(MPI_Datatype), intent(in) :: datatype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) outbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: outbuf + integer :: outbuf(*) + integer(MPI_ADDRESS_KIND), intent(in) :: outsize + integer(MPI_ADDRESS_KIND), intent(out) :: position + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Pack_external( & + datarep, & + inbuf, & + incount, & + datatype, & + outbuf, & + outsize, & + position, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Pack_external + + subroutine MPI_Pack_external_size( & + datarep, & + incount, & + datatype, & + size, & + ierror & + ) + character(*), intent(in) :: datarep + integer(MPI_COUNT_KIND), intent(in) :: incount + type(MPI_Datatype), intent(in) :: datatype + integer(MPI_ADDRESS_KIND), intent(out) :: size + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Pack_external_size( & + datarep, & + incount, & + datatype, & + size, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Pack_external_size + + subroutine MPI_Pack_size( & + incount, & + datatype, & + comm, & + size, & + ierror & + ) + integer, intent(in) :: incount + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: size + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Pack_size( & + incount, & + datatype, & + comm, & + size, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Pack_size + + subroutine MPI_Type_commit( & + datatype, & + ierror & + ) + type(MPI_Datatype), intent(out) :: datatype + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_commit( & + datatype, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_commit + + subroutine MPI_Type_contiguous( & + count, & + oldtype, & + newtype, & + ierror & + ) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: oldtype + type(MPI_Datatype), intent(out) :: newtype + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_contiguous( & + count, & + oldtype, & + newtype, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_contiguous + + subroutine MPI_Type_create_darray( & + size, & + rank, & + ndims, & + array_of_gsizes, & + array_of_distribs, & + array_of_dargs, & + array_of_psizes, & + order, & + oldtype, & + newtype, & + ierror & + ) + integer, intent(in) :: size + integer, intent(in) :: rank + integer, intent(in) :: ndims + integer, intent(in) :: array_of_gsizes(ndims) + integer, intent(in) :: array_of_distribs(ndims) + integer, intent(in) :: array_of_dargs(ndims) + integer, intent(in) :: array_of_psizes(ndims) + integer, intent(in) :: order + type(MPI_Datatype), intent(in) :: oldtype + type(MPI_Datatype), intent(out) :: newtype + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_create_darray( & + size, & + rank, & + ndims, & + array_of_gsizes, & + array_of_distribs, & + array_of_dargs, & + array_of_psizes, & + order, & + oldtype, & + newtype, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_create_darray + + subroutine MPI_Type_create_hindexed( & + count, & + array_of_blocklengths, & + array_of_displacements, & + oldtype, & + newtype, & + ierror & + ) + integer, intent(in) :: count + integer, intent(in) :: array_of_blocklengths(count) + integer(MPI_ADDRESS_KIND), intent(in) :: array_of_displacements(count) + type(MPI_Datatype), intent(in) :: oldtype + type(MPI_Datatype), intent(out) :: newtype + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_create_hindexed( & + count, & + array_of_blocklengths, & + array_of_displacements, & + oldtype, & + newtype, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_create_hindexed + + subroutine MPI_Type_create_hindexed_block( & + count, & + blocklength, & + array_of_displacements, & + oldtype, & + newtype, & + ierror & + ) + integer, intent(in) :: count + integer, intent(in) :: blocklength + integer(MPI_ADDRESS_KIND), intent(in) :: array_of_displacements(count) + type(MPI_Datatype), intent(in) :: oldtype + type(MPI_Datatype), intent(out) :: newtype + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_create_hindexed_block( & + count, & + blocklength, & + array_of_displacements, & + oldtype, & + newtype, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_create_hindexed_block + + subroutine MPI_Type_create_hvector( & + count, & + blocklength, & + stride, & + oldtype, & + newtype, & + ierror & + ) + integer, intent(in) :: count + integer, intent(in) :: blocklength + integer(MPI_ADDRESS_KIND), intent(in) :: stride + type(MPI_Datatype), intent(in) :: oldtype + type(MPI_Datatype), intent(out) :: newtype + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_create_hvector( & + count, & + blocklength, & + stride, & + oldtype, & + newtype, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_create_hvector + + subroutine MPI_Type_create_indexed_block( & + count, & + blocklength, & + array_of_displacements, & + oldtype, & + newtype, & + ierror & + ) + integer, intent(in) :: count + integer, intent(in) :: blocklength + integer, intent(in) :: array_of_displacements(count) + type(MPI_Datatype), intent(in) :: oldtype + type(MPI_Datatype), intent(out) :: newtype + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_create_indexed_block( & + count, & + blocklength, & + array_of_displacements, & + oldtype, & + newtype, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_create_indexed_block + + subroutine MPI_Type_create_resized( & + oldtype, & + lb, & + extent, & + newtype, & + ierror & + ) + type(MPI_Datatype), intent(in) :: oldtype + integer(MPI_ADDRESS_KIND), intent(in) :: lb + integer(MPI_ADDRESS_KIND), intent(in) :: extent + type(MPI_Datatype), intent(out) :: newtype + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_create_resized( & + oldtype, & + lb, & + extent, & + newtype, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_create_resized + + subroutine MPI_Type_create_struct( & + count, & + array_of_blocklengths, & + array_of_displacements, & + array_of_types, & + newtype, & + ierror & + ) + integer, intent(in) :: count + integer, intent(in) :: array_of_blocklengths(count) + integer(MPI_ADDRESS_KIND), intent(in) :: array_of_displacements(count) + type(MPI_Datatype), intent(in) :: array_of_types(count) + type(MPI_Datatype), intent(out) :: newtype + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_create_struct( & + count, & + array_of_blocklengths, & + array_of_displacements, & + array_of_types, & + newtype, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_create_struct + + subroutine MPI_Type_create_subarray( & + ndims, & + array_of_sizes, & + array_of_subsizes, & + array_of_starts, & + order, & + oldtype, & + newtype, & + ierror & + ) + integer, intent(in) :: ndims + integer, intent(in) :: array_of_sizes(ndims) + integer, intent(in) :: array_of_subsizes(ndims) + integer, intent(in) :: array_of_starts(ndims) + integer, intent(in) :: order + type(MPI_Datatype), intent(in) :: oldtype + type(MPI_Datatype), intent(out) :: newtype + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_create_subarray( & + ndims, & + array_of_sizes, & + array_of_subsizes, & + array_of_starts, & + order, & + oldtype, & + newtype, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_create_subarray + + subroutine MPI_Type_dup( & + oldtype, & + newtype, & + ierror & + ) + type(MPI_Datatype), intent(in) :: oldtype + type(MPI_Datatype), intent(out) :: newtype + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_dup( & + oldtype, & + newtype, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_dup + + subroutine MPI_Type_free( & + datatype, & + ierror & + ) + type(MPI_Datatype), intent(out) :: datatype + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_free( & + datatype, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_free + + subroutine MPI_Type_get_contents( & + datatype, & + max_integers, & + max_addresses, & + max_datatypes, & + array_of_integers, & + array_of_addresses, & + array_of_datatypes, & + ierror & + ) + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: max_integers + integer, intent(in) :: max_addresses + integer, intent(in) :: max_datatypes + integer, intent(out) :: array_of_integers + integer(MPI_ADDRESS_KIND), intent(out) :: array_of_addresses + type(MPI_Datatype), intent(out) :: array_of_datatypes + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_get_contents( & + datatype, & + max_integers, & + max_addresses, & + max_datatypes, & + array_of_integers, & + array_of_addresses, & + array_of_datatypes, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_get_contents + + subroutine MPI_Type_get_envelope( & + datatype, & + num_integers, & + num_addresses, & + num_datatypes, & + combiner, & + ierror & + ) + type(MPI_Datatype), intent(in) :: datatype + integer, intent(out) :: num_integers + integer, intent(out) :: num_addresses + integer, intent(out) :: num_datatypes + integer, intent(out) :: combiner + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_get_envelope( & + datatype, & + num_integers, & + num_addresses, & + num_datatypes, & + combiner, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_get_envelope + + subroutine MPI_Type_get_extent( & + datatype, & + lb, & + extent, & + ierror & + ) + type(MPI_Datatype), intent(in) :: datatype + integer(MPI_ADDRESS_KIND), intent(out) :: lb + integer(MPI_ADDRESS_KIND), intent(out) :: extent + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_get_extent( & + datatype, & + lb, & + extent, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_get_extent + + subroutine MPI_Type_get_true_extent( & + datatype, & + true_lb, & + true_extent, & + ierror & + ) + type(MPI_Datatype), intent(in) :: datatype + integer(MPI_ADDRESS_KIND), intent(out) :: true_lb + integer(MPI_ADDRESS_KIND), intent(out) :: true_extent + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_get_true_extent( & + datatype, & + true_lb, & + true_extent, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_get_true_extent + + subroutine MPI_Type_indexed( & + count, & + array_of_blocklengths, & + array_of_displacements, & + oldtype, & + newtype, & + ierror & + ) + integer, intent(in) :: count + integer, intent(in) :: array_of_blocklengths(count) + integer, intent(in) :: array_of_displacements(count) + type(MPI_Datatype), intent(in) :: oldtype + type(MPI_Datatype), intent(out) :: newtype + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_indexed( & + count, & + array_of_blocklengths, & + array_of_displacements, & + oldtype, & + newtype, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_indexed + + subroutine MPI_Type_size( & + datatype, & + size, & + ierror & + ) + type(MPI_Datatype), intent(in) :: datatype + integer, intent(out) :: size + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_size( & + datatype, & + size, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_size + + subroutine MPI_Type_vector( & + count, & + blocklength, & + stride, & + oldtype, & + newtype, & + ierror & + ) + integer, intent(in) :: count + integer, intent(in) :: blocklength + integer, intent(in) :: stride + type(MPI_Datatype), intent(in) :: oldtype + type(MPI_Datatype), intent(out) :: newtype + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_vector( & + count, & + blocklength, & + stride, & + oldtype, & + newtype, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_vector + + subroutine MPI_Unpack( & + inbuf, & + insize, & + position, & + outbuf, & + outcount, & + datatype, & + comm, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) inbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: inbuf + integer, intent(in) :: inbuf(*) + integer, intent(in) :: insize + integer, intent(out) :: position + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) outbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: outbuf + integer :: outbuf(*) + integer, intent(in) :: outcount + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Comm), intent(in) :: comm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Unpack( & + inbuf, & + insize, & + position, & + outbuf, & + outcount, & + datatype, & + comm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Unpack + + subroutine MPI_Unpack_external( & + datarep, & + inbuf, & + insize, & + position, & + outbuf, & + outcount, & + datatype, & + ierror & + ) + character(*), intent(in) :: datarep + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) inbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: inbuf + integer, intent(in) :: inbuf(*) + integer(MPI_ADDRESS_KIND), intent(in) :: insize + integer(MPI_ADDRESS_KIND), intent(out) :: position + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) outbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: outbuf + integer :: outbuf(*) + integer, intent(in) :: outcount + type(MPI_Datatype), intent(in) :: datatype + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Unpack_external( & + datarep, & + inbuf, & + insize, & + position, & + outbuf, & + outcount, & + datatype, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Unpack_external + + subroutine MPI_Allgather( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Allgather( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Allgather + + subroutine MPI_Allgather_init( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + info, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Allgather_init( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + info, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Allgather_init + + subroutine MPI_Allgatherv( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcounts, & + displs, & + recvtype, & + comm, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: displs(*) + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Allgatherv( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcounts, & + displs, & + recvtype, & + comm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Allgatherv + + subroutine MPI_Allgatherv_init( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcounts, & + displs, & + recvtype, & + comm, & + info, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: displs(*) + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Allgatherv_init( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcounts, & + displs, & + recvtype, & + comm, & + info, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Allgatherv_init + + subroutine MPI_Allreduce( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + comm, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Op), intent(in) :: op + type(MPI_Comm), intent(in) :: comm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Allreduce( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + comm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Allreduce + + subroutine MPI_Allreduce_init( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + comm, & + info, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Op), intent(in) :: op + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Allreduce_init( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + comm, & + info, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Allreduce_init + + subroutine MPI_Alltoall( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Alltoall( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Alltoall + + subroutine MPI_Alltoall_init( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + info, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Alltoall_init( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + info, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Alltoall_init + + subroutine MPI_Alltoallv( & + sendbuf, & + sendcounts, & + sdispls, & + sendtype, & + recvbuf, & + recvcounts, & + rdispls, & + recvtype, & + comm, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: rdispls(*) + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Alltoallv( & + sendbuf, & + sendcounts, & + sdispls, & + sendtype, & + recvbuf, & + recvcounts, & + rdispls, & + recvtype, & + comm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Alltoallv + + subroutine MPI_Alltoallv_init( & + sendbuf, & + sendcounts, & + sdispls, & + sendtype, & + recvbuf, & + recvcounts, & + rdispls, & + recvtype, & + comm, & + info, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: rdispls(*) + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Alltoallv_init( & + sendbuf, & + sendcounts, & + sdispls, & + sendtype, & + recvbuf, & + recvcounts, & + rdispls, & + recvtype, & + comm, & + info, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Alltoallv_init + + subroutine MPI_Alltoallw( & + sendbuf, & + sendcounts, & + sdispls, & + sendtypes, & + recvbuf, & + recvcounts, & + rdispls, & + recvtypes, & + comm, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + type(MPI_Datatype), intent(in) :: sendtypes(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: rdispls(*) + type(MPI_Datatype), intent(in) :: recvtypes(*) + type(MPI_Comm), intent(in) :: comm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Alltoallw( & + sendbuf, & + sendcounts, & + sdispls, & + sendtypes, & + recvbuf, & + recvcounts, & + rdispls, & + recvtypes, & + comm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Alltoallw + + subroutine MPI_Alltoallw_init( & + sendbuf, & + sendcounts, & + sdispls, & + sendtypes, & + recvbuf, & + recvcounts, & + rdispls, & + recvtypes, & + comm, & + info, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + type(MPI_Datatype), intent(in) :: sendtypes(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: rdispls(*) + type(MPI_Datatype), intent(in) :: recvtypes(*) + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Alltoallw_init( & + sendbuf, & + sendcounts, & + sdispls, & + sendtypes, & + recvbuf, & + recvcounts, & + rdispls, & + recvtypes, & + comm, & + info, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Alltoallw_init + + subroutine MPI_Barrier( & + comm, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Barrier( & + comm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Barrier + + subroutine MPI_Barrier_init( & + comm, & + info, & + request, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Barrier_init( & + comm, & + info, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Barrier_init + + subroutine MPI_Bcast( & + buffer, & + count, & + datatype, & + root, & + comm, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buffer + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buffer + integer :: buffer(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Bcast( & + buffer, & + count, & + datatype, & + root, & + comm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Bcast + + subroutine MPI_Bcast_init( & + buffer, & + count, & + datatype, & + root, & + comm, & + info, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buffer + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buffer + integer :: buffer(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Bcast_init( & + buffer, & + count, & + datatype, & + root, & + comm, & + info, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Bcast_init + + subroutine MPI_Exscan( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + comm, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Op), intent(in) :: op + type(MPI_Comm), intent(in) :: comm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Exscan( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + comm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Exscan + + subroutine MPI_Exscan_init( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + comm, & + info, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Op), intent(in) :: op + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Exscan_init( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + comm, & + info, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Exscan_init + + subroutine MPI_Gather( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + root, & + comm, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Gather( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + root, & + comm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Gather + + subroutine MPI_Gather_init( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + root, & + comm, & + info, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Gather_init( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + root, & + comm, & + info, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Gather_init + + subroutine MPI_Gatherv( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcounts, & + displs, & + recvtype, & + root, & + comm, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: displs(*) + type(MPI_Datatype), intent(in) :: recvtype + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Gatherv( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcounts, & + displs, & + recvtype, & + root, & + comm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Gatherv + + subroutine MPI_Gatherv_init( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcounts, & + displs, & + recvtype, & + root, & + comm, & + info, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: displs(*) + type(MPI_Datatype), intent(in) :: recvtype + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Gatherv_init( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcounts, & + displs, & + recvtype, & + root, & + comm, & + info, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Gatherv_init + + subroutine MPI_Iallgather( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Iallgather( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Iallgather + + subroutine MPI_Iallgatherv( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcounts, & + displs, & + recvtype, & + comm, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: displs(*) + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Iallgatherv( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcounts, & + displs, & + recvtype, & + comm, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Iallgatherv + + subroutine MPI_Iallreduce( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + comm, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Op), intent(in) :: op + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Iallreduce( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + comm, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Iallreduce + + subroutine MPI_Ialltoall( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Ialltoall( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Ialltoall + + subroutine MPI_Ialltoallv( & + sendbuf, & + sendcounts, & + sdispls, & + sendtype, & + recvbuf, & + recvcounts, & + rdispls, & + recvtype, & + comm, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: rdispls(*) + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Ialltoallv( & + sendbuf, & + sendcounts, & + sdispls, & + sendtype, & + recvbuf, & + recvcounts, & + rdispls, & + recvtype, & + comm, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Ialltoallv + + subroutine MPI_Ialltoallw( & + sendbuf, & + sendcounts, & + sdispls, & + sendtypes, & + recvbuf, & + recvcounts, & + rdispls, & + recvtypes, & + comm, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + type(MPI_Datatype), intent(in) :: sendtypes(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: rdispls(*) + type(MPI_Datatype), intent(in) :: recvtypes(*) + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Ialltoallw( & + sendbuf, & + sendcounts, & + sdispls, & + sendtypes, & + recvbuf, & + recvcounts, & + rdispls, & + recvtypes, & + comm, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Ialltoallw + + subroutine MPI_Ibarrier( & + comm, & + request, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Ibarrier( & + comm, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Ibarrier + + subroutine MPI_Ibcast( & + buffer, & + count, & + datatype, & + root, & + comm, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buffer + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buffer + integer :: buffer(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Ibcast( & + buffer, & + count, & + datatype, & + root, & + comm, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Ibcast + + subroutine MPI_Iexscan( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + comm, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Op), intent(in) :: op + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Iexscan( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + comm, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Iexscan + + subroutine MPI_Igather( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + root, & + comm, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Igather( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + root, & + comm, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Igather + + subroutine MPI_Igatherv( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcounts, & + displs, & + recvtype, & + root, & + comm, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: displs(*) + type(MPI_Datatype), intent(in) :: recvtype + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Igatherv( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcounts, & + displs, & + recvtype, & + root, & + comm, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Igatherv + + subroutine MPI_Ireduce( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + root, & + comm, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Op), intent(in) :: op + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Ireduce( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + root, & + comm, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Ireduce + + subroutine MPI_Ireduce_scatter( & + sendbuf, & + recvbuf, & + recvcounts, & + datatype, & + op, & + comm, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Op), intent(in) :: op + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Ireduce_scatter( & + sendbuf, & + recvbuf, & + recvcounts, & + datatype, & + op, & + comm, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Ireduce_scatter + + subroutine MPI_Ireduce_scatter_block( & + sendbuf, & + recvbuf, & + recvcount, & + datatype, & + op, & + comm, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Op), intent(in) :: op + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Ireduce_scatter_block( & + sendbuf, & + recvbuf, & + recvcount, & + datatype, & + op, & + comm, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Ireduce_scatter_block + + subroutine MPI_Iscan( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + comm, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Op), intent(in) :: op + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Iscan( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + comm, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Iscan + + subroutine MPI_Iscatter( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + root, & + comm, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Iscatter( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + root, & + comm, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Iscatter + + subroutine MPI_Iscatterv( & + sendbuf, & + sendcounts, & + sdispls, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + root, & + comm, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Iscatterv( & + sendbuf, & + sendcounts, & + sdispls, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + root, & + comm, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Iscatterv + + subroutine MPI_Op_commutative( & + op, & + commute, & + ierror & + ) + type(MPI_Op), intent(in) :: op + logical, intent(out) :: commute + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Op_commutative( & + op, & + commute, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Op_commutative + + subroutine MPI_Op_create( & + user_fn, & + commute, & + op, & + ierror & + ) + external :: user_fn + logical, intent(in) :: commute + type(MPI_Op), intent(out) :: op + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Op_create( & + user_fn, & + commute, & + op, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Op_create + + subroutine MPI_Op_free( & + op, & + ierror & + ) + type(MPI_Op), intent(out) :: op + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Op_free( & + op, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Op_free + + subroutine MPI_Reduce( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + root, & + comm, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Op), intent(in) :: op + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Reduce( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + root, & + comm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Reduce + + subroutine MPI_Reduce_init( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + root, & + comm, & + info, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Op), intent(in) :: op + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Reduce_init( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + root, & + comm, & + info, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Reduce_init + + subroutine MPI_Reduce_local( & + inbuf, & + inoutbuf, & + count, & + datatype, & + op, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) inbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: inbuf + integer, intent(in) :: inbuf(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) inoutbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: inoutbuf + integer :: inoutbuf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Op), intent(in) :: op + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Reduce_local( & + inbuf, & + inoutbuf, & + count, & + datatype, & + op, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Reduce_local + + subroutine MPI_Reduce_scatter( & + sendbuf, & + recvbuf, & + recvcounts, & + datatype, & + op, & + comm, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Op), intent(in) :: op + type(MPI_Comm), intent(in) :: comm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Reduce_scatter( & + sendbuf, & + recvbuf, & + recvcounts, & + datatype, & + op, & + comm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Reduce_scatter + + subroutine MPI_Reduce_scatter_block( & + sendbuf, & + recvbuf, & + recvcount, & + datatype, & + op, & + comm, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Op), intent(in) :: op + type(MPI_Comm), intent(in) :: comm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Reduce_scatter_block( & + sendbuf, & + recvbuf, & + recvcount, & + datatype, & + op, & + comm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Reduce_scatter_block + + subroutine MPI_Reduce_scatter_block_init( & + sendbuf, & + recvbuf, & + recvcount, & + datatype, & + op, & + comm, & + info, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Op), intent(in) :: op + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Reduce_scatter_block_init( & + sendbuf, & + recvbuf, & + recvcount, & + datatype, & + op, & + comm, & + info, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Reduce_scatter_block_init + + subroutine MPI_Reduce_scatter_init( & + sendbuf, & + recvbuf, & + recvcounts, & + datatype, & + op, & + comm, & + info, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Op), intent(in) :: op + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Reduce_scatter_init( & + sendbuf, & + recvbuf, & + recvcounts, & + datatype, & + op, & + comm, & + info, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Reduce_scatter_init + + subroutine MPI_Scan( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + comm, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Op), intent(in) :: op + type(MPI_Comm), intent(in) :: comm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Scan( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + comm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Scan + + subroutine MPI_Scan_init( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + comm, & + info, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Op), intent(in) :: op + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Scan_init( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + comm, & + info, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Scan_init + + subroutine MPI_Scatter( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + root, & + comm, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Scatter( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + root, & + comm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Scatter + + subroutine MPI_Scatter_init( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + root, & + comm, & + info, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Scatter_init( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + root, & + comm, & + info, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Scatter_init + + subroutine MPI_Scatterv( & + sendbuf, & + sendcounts, & + displs, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + root, & + comm, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: displs(*) + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Scatterv( & + sendbuf, & + sendcounts, & + displs, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + root, & + comm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Scatterv + + subroutine MPI_Scatterv_init( & + sendbuf, & + sendcounts, & + displs, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + root, & + comm, & + info, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: displs(*) + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Scatterv_init( & + sendbuf, & + sendcounts, & + displs, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + root, & + comm, & + info, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Scatterv_init + + subroutine MPI_Type_get_value_index( & + value_type, & + index_type, & + pair_type, & + ierror & + ) + type(MPI_Datatype), intent(in) :: value_type + type(MPI_Datatype), intent(in) :: index_type + type(MPI_Datatype), intent(out) :: pair_type + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_get_value_index( & + value_type, & + index_type, & + pair_type, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_get_value_index + + subroutine MPI_Comm_compare( & + comm1, & + comm2, & + result, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm1 + type(MPI_Comm), intent(in) :: comm2 + integer, intent(out) :: result + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_compare( & + comm1, & + comm2, & + result, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_compare + + subroutine MPI_Comm_create( & + comm, & + group, & + newcomm, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + type(MPI_Group), intent(in) :: group + type(MPI_Comm), intent(out) :: newcomm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_create( & + comm, & + group, & + newcomm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_create + + subroutine MPI_Comm_create_from_group( & + group, & + stringtag, & + info, & + errhandler, & + newcomm, & + ierror & + ) + type(MPI_Group), intent(in) :: group + character(*), intent(in) :: stringtag + type(MPI_Info), intent(in) :: info + type(MPI_Errhandler), intent(in) :: errhandler + type(MPI_Comm), intent(out) :: newcomm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_create_from_group( & + group, & + stringtag, & + info, & + errhandler, & + newcomm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_create_from_group + + subroutine MPI_Comm_create_group( & + comm, & + group, & + tag, & + newcomm, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + type(MPI_Group), intent(in) :: group + integer, intent(in) :: tag + type(MPI_Comm), intent(out) :: newcomm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_create_group( & + comm, & + group, & + tag, & + newcomm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_create_group + + subroutine MPI_Comm_create_keyval( & + comm_copy_attr_fn, & + comm_delete_attr_fn, & + comm_keyval, & + extra_state, & + ierror & + ) + external :: comm_copy_attr_fn + external :: comm_delete_attr_fn + integer, intent(out) :: comm_keyval + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) extra_state + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: extra_state + integer :: extra_state(*) + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_create_keyval( & + comm_copy_attr_fn, & + comm_delete_attr_fn, & + comm_keyval, & + extra_state, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_create_keyval + + subroutine MPI_Comm_delete_attr( & + comm, & + comm_keyval, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: comm_keyval + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_delete_attr( & + comm, & + comm_keyval, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_delete_attr + + subroutine MPI_Comm_dup( & + comm, & + newcomm, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + type(MPI_Comm), intent(out) :: newcomm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_dup( & + comm, & + newcomm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_dup + + subroutine MPI_Comm_dup_with_info( & + comm, & + info, & + newcomm, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Comm), intent(out) :: newcomm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_dup_with_info( & + comm, & + info, & + newcomm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_dup_with_info + + subroutine MPI_Comm_free( & + comm, & + ierror & + ) + type(MPI_Comm), intent(out) :: comm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_free( & + comm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_free + + subroutine MPI_Comm_get_name( & + comm, & + comm_name, & + resultlen, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + character(*), intent(out) :: comm_name + integer, intent(out) :: resultlen + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_get_name( & + comm, & + comm_name, & + resultlen, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_get_name + + subroutine MPI_Comm_free_keyval( & + comm_keyval, & + ierror & + ) + integer, intent(out) :: comm_keyval + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_free_keyval( & + comm_keyval, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_free_keyval + + subroutine MPI_Comm_get_attr( & + comm, & + comm_keyval, & + attribute_val, & + flag, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: comm_keyval + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) attribute_val + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: attribute_val + integer :: attribute_val(*) + logical, intent(out) :: flag + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_get_attr( & + comm, & + comm_keyval, & + attribute_val, & + flag, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_get_attr + + subroutine MPI_Comm_get_info( & + comm, & + info_used, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(out) :: info_used + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_get_info( & + comm, & + info_used, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_get_info + + subroutine MPI_Comm_group( & + comm, & + group, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + type(MPI_Group), intent(out) :: group + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_group( & + comm, & + group, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_group + + subroutine MPI_Comm_idup( & + comm, & + newcomm, & + request, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + type(MPI_Comm), intent(out) :: newcomm + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_idup( & + comm, & + newcomm, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_idup + + subroutine MPI_Comm_idup_with_info( & + comm, & + info, & + newcomm, & + request, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Comm), intent(out) :: newcomm + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_idup_with_info( & + comm, & + info, & + newcomm, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_idup_with_info + + subroutine MPI_Comm_rank( & + comm, & + rank, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: rank + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_rank( & + comm, & + rank, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_rank + + subroutine MPI_Comm_remote_group( & + comm, & + group, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + type(MPI_Group), intent(out) :: group + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_remote_group( & + comm, & + group, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_remote_group + + subroutine MPI_Comm_remote_size( & + comm, & + size, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: size + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_remote_size( & + comm, & + size, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_remote_size + + subroutine MPI_Comm_set_attr( & + comm, & + comm_keyval, & + attribute_val, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: comm_keyval + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) attribute_val + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: attribute_val + integer :: attribute_val(*) + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_set_attr( & + comm, & + comm_keyval, & + attribute_val, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_set_attr + + subroutine MPI_Comm_set_info( & + comm, & + info, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_set_info( & + comm, & + info, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_set_info + + subroutine MPI_Comm_set_name( & + comm, & + comm_name, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + character(*), intent(in) :: comm_name + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_set_name( & + comm, & + comm_name, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_set_name + + subroutine MPI_Comm_size( & + comm, & + size, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: size + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_size( & + comm, & + size, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_size + + subroutine MPI_Comm_split( & + comm, & + color, & + key, & + newcomm, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: color + integer, intent(in) :: key + type(MPI_Comm), intent(out) :: newcomm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_split( & + comm, & + color, & + key, & + newcomm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_split + + subroutine MPI_Group_free( & + group, & + ierror & + ) + type(MPI_Group), intent(out) :: group + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Group_free( & + group, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Group_free + + subroutine MPI_Comm_split_type( & + comm, & + split_type, & + key, & + info, & + newcomm, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: split_type + integer, intent(in) :: key + type(MPI_Info), intent(in) :: info + type(MPI_Comm), intent(out) :: newcomm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_split_type( & + comm, & + split_type, & + key, & + info, & + newcomm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_split_type + + subroutine MPI_Comm_test_inter( & + comm, & + flag, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + logical, intent(out) :: flag + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_test_inter( & + comm, & + flag, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_test_inter + + subroutine MPI_Group_compare( & + group1, & + group2, & + result, & + ierror & + ) + type(MPI_Group), intent(in) :: group1 + type(MPI_Group), intent(in) :: group2 + integer, intent(out) :: result + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Group_compare( & + group1, & + group2, & + result, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Group_compare + + subroutine MPI_Group_difference( & + group1, & + group2, & + newgroup, & + ierror & + ) + type(MPI_Group), intent(in) :: group1 + type(MPI_Group), intent(in) :: group2 + type(MPI_Group), intent(out) :: newgroup + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Group_difference( & + group1, & + group2, & + newgroup, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Group_difference + + subroutine MPI_Group_excl( & + group, & + n, & + ranks, & + newgroup, & + ierror & + ) + type(MPI_Group), intent(in) :: group + integer, intent(in) :: n + integer, intent(in) :: ranks(n) + type(MPI_Group), intent(out) :: newgroup + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Group_excl( & + group, & + n, & + ranks, & + newgroup, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Group_excl + + subroutine MPI_Group_from_session_pset( & + session, & + pset_name, & + newgroup, & + ierror & + ) + type(MPI_Session), intent(in) :: session + character(*), intent(in) :: pset_name + type(MPI_Group), intent(out) :: newgroup + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Group_from_session_pset( & + session, & + pset_name, & + newgroup, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Group_from_session_pset + + subroutine MPI_Group_incl( & + group, & + n, & + ranks, & + newgroup, & + ierror & + ) + type(MPI_Group), intent(in) :: group + integer, intent(in) :: n + integer, intent(in) :: ranks(n) + type(MPI_Group), intent(out) :: newgroup + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Group_incl( & + group, & + n, & + ranks, & + newgroup, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Group_incl + + subroutine MPI_Group_intersection( & + group1, & + group2, & + newgroup, & + ierror & + ) + type(MPI_Group), intent(in) :: group1 + type(MPI_Group), intent(in) :: group2 + type(MPI_Group), intent(out) :: newgroup + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Group_intersection( & + group1, & + group2, & + newgroup, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Group_intersection + + subroutine MPI_Group_range_excl( & + group, & + n, & + ranges, & + newgroup, & + ierror & + ) + type(MPI_Group), intent(in) :: group + integer, intent(in) :: n + integer, intent(in) :: ranges(n) + type(MPI_Group), intent(out) :: newgroup + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Group_range_excl( & + group, & + n, & + ranges, & + newgroup, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Group_range_excl + + subroutine MPI_Group_range_incl( & + group, & + n, & + ranges, & + newgroup, & + ierror & + ) + type(MPI_Group), intent(in) :: group + integer, intent(in) :: n + integer, intent(in) :: ranges(n) + type(MPI_Group), intent(out) :: newgroup + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Group_range_incl( & + group, & + n, & + ranges, & + newgroup, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Group_range_incl + + subroutine MPI_Group_rank( & + group, & + rank, & + ierror & + ) + type(MPI_Group), intent(in) :: group + integer, intent(out) :: rank + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Group_rank( & + group, & + rank, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Group_rank + + subroutine MPI_Group_size( & + group, & + size, & + ierror & + ) + type(MPI_Group), intent(in) :: group + integer, intent(out) :: size + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Group_size( & + group, & + size, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Group_size + + subroutine MPI_Group_translate_ranks( & + group1, & + n, & + ranks1, & + group2, & + ranks2, & + ierror & + ) + type(MPI_Group), intent(in) :: group1 + integer, intent(in) :: n + integer, intent(in) :: ranks1(n) + type(MPI_Group), intent(in) :: group2 + integer, intent(in) :: ranks2(n) + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Group_translate_ranks( & + group1, & + n, & + ranks1, & + group2, & + ranks2, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Group_translate_ranks + + subroutine MPI_Group_union( & + group1, & + group2, & + newgroup, & + ierror & + ) + type(MPI_Group), intent(in) :: group1 + type(MPI_Group), intent(in) :: group2 + type(MPI_Group), intent(out) :: newgroup + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Group_union( & + group1, & + group2, & + newgroup, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Group_union + + subroutine MPI_Intercomm_create( & + local_comm, & + local_leader, & + peer_comm, & + remote_leader, & + tag, & + newintercomm, & + ierror & + ) + type(MPI_Comm), intent(in) :: local_comm + integer, intent(in) :: local_leader + type(MPI_Comm), intent(in) :: peer_comm + integer, intent(in) :: remote_leader + integer, intent(in) :: tag + type(MPI_Comm), intent(out) :: newintercomm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Intercomm_create( & + local_comm, & + local_leader, & + peer_comm, & + remote_leader, & + tag, & + newintercomm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Intercomm_create + + subroutine MPI_Intercomm_create_from_groups( & + local_group, & + local_leader, & + remote_group, & + remote_leader, & + stringtag, & + info, & + errhandler, & + newintercomm, & + ierror & + ) + type(MPI_Group), intent(in) :: local_group + integer, intent(in) :: local_leader + type(MPI_Group), intent(in) :: remote_group + integer, intent(in) :: remote_leader + character(*), intent(in) :: stringtag + type(MPI_Info), intent(in) :: info + type(MPI_Errhandler), intent(in) :: errhandler + type(MPI_Comm), intent(out) :: newintercomm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Intercomm_create_from_groups( & + local_group, & + local_leader, & + remote_group, & + remote_leader, & + stringtag, & + info, & + errhandler, & + newintercomm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Intercomm_create_from_groups + + subroutine MPI_Intercomm_merge( & + intercomm, & + high, & + newintracomm, & + ierror & + ) + type(MPI_Comm), intent(in) :: intercomm + integer, intent(in) :: high + type(MPI_Comm), intent(out) :: newintracomm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Intercomm_merge( & + intercomm, & + high, & + newintracomm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Intercomm_merge + + subroutine MPI_Type_create_keyval( & + type_copy_attr_fn, & + type_delete_attr_fn, & + type_keyval, & + extra_state, & + ierror & + ) + external :: type_copy_attr_fn + external :: type_delete_attr_fn + integer, intent(out) :: type_keyval + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) extra_state + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: extra_state + integer :: extra_state(*) + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_create_keyval( & + type_copy_attr_fn, & + type_delete_attr_fn, & + type_keyval, & + extra_state, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_create_keyval + + subroutine MPI_Type_delete_attr( & + datatype, & + type_keyval, & + ierror & + ) + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: type_keyval + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_delete_attr( & + datatype, & + type_keyval, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_delete_attr + + subroutine MPI_Type_free_keyval( & + type_keyval, & + ierror & + ) + integer, intent(out) :: type_keyval + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_free_keyval( & + type_keyval, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_free_keyval + + subroutine MPI_Type_get_attr( & + datatype, & + type_keyval, & + attribute_val, & + flag, & + ierror & + ) + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: type_keyval + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) attribute_val + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: attribute_val + integer :: attribute_val(*) + logical, intent(out) :: flag + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_get_attr( & + datatype, & + type_keyval, & + attribute_val, & + flag, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_get_attr + + subroutine MPI_Type_get_name( & + datatype, & + type_name, & + resultlen, & + ierror & + ) + type(MPI_Datatype), intent(in) :: datatype + character(*), intent(out) :: type_name + integer, intent(out) :: resultlen + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_get_name( & + datatype, & + type_name, & + resultlen, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_get_name + + subroutine MPI_Type_set_attr( & + datatype, & + type_keyval, & + attribute_val, & + ierror & + ) + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: type_keyval + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) attribute_val + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: attribute_val + integer :: attribute_val(*) + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_set_attr( & + datatype, & + type_keyval, & + attribute_val, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_set_attr + + subroutine MPI_Type_set_name( & + datatype, & + type_name, & + ierror & + ) + type(MPI_Datatype), intent(in) :: datatype + character(*), intent(in) :: type_name + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_set_name( & + datatype, & + type_name, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_set_name + + subroutine MPI_Win_create_keyval( & + win_copy_attr_fn, & + win_delete_attr_fn, & + win_keyval, & + extra_state, & + ierror & + ) + external :: win_copy_attr_fn + external :: win_delete_attr_fn + integer, intent(out) :: win_keyval + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) extra_state + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: extra_state + integer :: extra_state(*) + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Win_create_keyval( & + win_copy_attr_fn, & + win_delete_attr_fn, & + win_keyval, & + extra_state, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Win_create_keyval + + subroutine MPI_Win_delete_attr( & + win, & + win_keyval, & + ierror & + ) + type(MPI_Win), intent(in) :: win + integer, intent(in) :: win_keyval + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Win_delete_attr( & + win, & + win_keyval, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Win_delete_attr + + subroutine MPI_Win_free_keyval( & + win_keyval, & + ierror & + ) + integer, intent(out) :: win_keyval + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Win_free_keyval( & + win_keyval, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Win_free_keyval + + subroutine MPI_Win_get_attr( & + win, & + win_keyval, & + attribute_val, & + flag, & + ierror & + ) + type(MPI_Win), intent(in) :: win + integer, intent(in) :: win_keyval + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) attribute_val + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: attribute_val + integer :: attribute_val(*) + logical, intent(out) :: flag + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Win_get_attr( & + win, & + win_keyval, & + attribute_val, & + flag, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Win_get_attr + + subroutine MPI_Win_get_name( & + win, & + win_name, & + resultlen, & + ierror & + ) + type(MPI_Win), intent(in) :: win + character(*), intent(out) :: win_name + integer, intent(out) :: resultlen + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Win_get_name( & + win, & + win_name, & + resultlen, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Win_get_name + + subroutine MPI_Win_set_attr( & + win, & + win_keyval, & + attribute_val, & + ierror & + ) + type(MPI_Win), intent(in) :: win + integer, intent(in) :: win_keyval + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) attribute_val + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: attribute_val + integer :: attribute_val(*) + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Win_set_attr( & + win, & + win_keyval, & + attribute_val, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Win_set_attr + + subroutine MPI_Win_set_name( & + win, & + win_name, & + ierror & + ) + type(MPI_Win), intent(in) :: win + character(*), intent(in) :: win_name + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Win_set_name( & + win, & + win_name, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Win_set_name + + subroutine MPI_Cart_coords( & + comm, & + rank, & + maxdims, & + coords, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: rank + integer, intent(in) :: maxdims + integer, intent(out) :: coords(maxdims) + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Cart_coords( & + comm, & + rank, & + maxdims, & + coords, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Cart_coords + + subroutine MPI_Cart_create( & + comm_old, & + ndims, & + dims, & + periods, & + reorder, & + comm_cart, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm_old + integer, intent(in) :: ndims + integer, intent(in) :: dims(ndims) + logical, intent(in) :: periods(ndims) + logical, intent(in) :: reorder + type(MPI_Comm), intent(out) :: comm_cart + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Cart_create( & + comm_old, & + ndims, & + dims, & + periods, & + reorder, & + comm_cart, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Cart_create + + subroutine MPI_Cart_get( & + comm, & + maxdims, & + dims, & + periods, & + coords, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: maxdims + integer, intent(out) :: dims(maxdims) + integer, intent(out) :: periods(maxdims) + integer, intent(out) :: coords(maxdims) + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Cart_get( & + comm, & + maxdims, & + dims, & + periods, & + coords, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Cart_get + + subroutine MPI_Cart_map( & + comm, & + ndims, & + dims, & + periods, & + newrank, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: ndims + integer, intent(in) :: dims(ndims) + integer, intent(in) :: periods(ndims) + integer, intent(out) :: newrank + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Cart_map( & + comm, & + ndims, & + dims, & + periods, & + newrank, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Cart_map + + subroutine MPI_Cart_rank( & + comm, & + coords, & + rank, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: coords(*) + integer, intent(out) :: rank + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Cart_rank( & + comm, & + coords, & + rank, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Cart_rank + + subroutine MPI_Cart_shift( & + comm, & + direction, & + disp, & + rank_source, & + rank_dest, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: direction + integer, intent(in) :: disp + integer, intent(out) :: rank_source + integer, intent(out) :: rank_dest + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Cart_shift( & + comm, & + direction, & + disp, & + rank_source, & + rank_dest, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Cart_shift + + subroutine MPI_Cart_sub( & + comm, & + remain_dims, & + newcomm, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + logical, intent(in) :: remain_dims(*) + type(MPI_Comm), intent(out) :: newcomm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Cart_sub( & + comm, & + remain_dims, & + newcomm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Cart_sub + + subroutine MPI_Cartdim_get( & + comm, & + ndims, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ndims + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Cartdim_get( & + comm, & + ndims, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Cartdim_get + + subroutine MPI_Dims_create( & + nnodes, & + ndims, & + dims, & + ierror & + ) + integer, intent(in) :: nnodes + integer, intent(in) :: ndims + integer, intent(in) :: dims(ndims) + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Dims_create( & + nnodes, & + ndims, & + dims, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Dims_create + + subroutine MPI_Dist_graph_create( & + comm_old, & + n, & + sources, & + degrees, & + destinations, & + weights, & + info, & + reorder, & + comm_dist_graph, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm_old + integer, intent(in) :: n + integer, intent(in) :: sources(n) + integer, intent(in) :: degrees(n) + integer, intent(in) :: destinations(*) + integer, intent(in) :: weights(*) + type(MPI_Info), intent(in) :: info + logical, intent(in) :: reorder + type(MPI_Comm), intent(out) :: comm_dist_graph + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Dist_graph_create( & + comm_old, & + n, & + sources, & + degrees, & + destinations, & + weights, & + info, & + reorder, & + comm_dist_graph, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Dist_graph_create + + subroutine MPI_Dist_graph_create_adjacent( & + comm_old, & + indegree, & + sources, & + sourceweights, & + outdegree, & + destinations, & + destweights, & + info, & + reorder, & + comm_dist_graph, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm_old + integer, intent(in) :: indegree + integer, intent(in) :: sources(indegree) + integer, intent(in) :: sourceweights(*) + integer, intent(in) :: outdegree + integer, intent(in) :: destinations(outdegree) + integer, intent(in) :: destweights(*) + type(MPI_Info), intent(in) :: info + integer, intent(in) :: reorder + type(MPI_Comm), intent(out) :: comm_dist_graph + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Dist_graph_create_adjacent( & + comm_old, & + indegree, & + sources, & + sourceweights, & + outdegree, & + destinations, & + destweights, & + info, & + reorder, & + comm_dist_graph, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Dist_graph_create_adjacent + + subroutine MPI_Dist_graph_neighbors( & + comm, & + maxindegree, & + sources, & + sourceweights, & + maxoutdegree, & + destinations, & + destweights, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: maxindegree + integer, intent(out) :: sources(maxindegree) + integer, intent(out) :: sourceweights(*) + integer, intent(in) :: maxoutdegree + integer, intent(out) :: destinations(maxoutdegree) + integer, intent(out) :: destweights(*) + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Dist_graph_neighbors( & + comm, & + maxindegree, & + sources, & + sourceweights, & + maxoutdegree, & + destinations, & + destweights, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Dist_graph_neighbors + + subroutine MPI_Dist_graph_neighbors_count( & + comm, & + indegree, & + outdegree, & + weighted, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: indegree + integer, intent(out) :: outdegree + integer, intent(out) :: weighted + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Dist_graph_neighbors_count( & + comm, & + indegree, & + outdegree, & + weighted, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Dist_graph_neighbors_count + + subroutine MPI_Graph_create( & + comm_old, & + nnodes, & + index, & + edges, & + reorder, & + comm_graph, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm_old + integer, intent(in) :: nnodes + integer, intent(in) :: index(nnodes) + integer, intent(in) :: edges(nnodes) + integer, intent(in) :: reorder + type(MPI_Comm), intent(out) :: comm_graph + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Graph_create( & + comm_old, & + nnodes, & + index, & + edges, & + reorder, & + comm_graph, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Graph_create + + subroutine MPI_Graph_get( & + comm, & + maxindex, & + maxedges, & + index, & + edges, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: maxindex + integer, intent(in) :: maxedges + integer, intent(out) :: index(maxindex) + integer, intent(out) :: edges(maxedges) + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Graph_get( & + comm, & + maxindex, & + maxedges, & + index, & + edges, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Graph_get + + subroutine MPI_Graph_map( & + comm, & + nnodes, & + index, & + edges, & + newrank, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: nnodes + integer, intent(in) :: index(nnodes) + integer, intent(in) :: edges(nnodes) + integer, intent(out) :: newrank + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Graph_map( & + comm, & + nnodes, & + index, & + edges, & + newrank, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Graph_map + + subroutine MPI_Graph_neighbors( & + comm, & + rank, & + maxneighbors, & + neighbors, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: rank + integer, intent(in) :: maxneighbors + integer, intent(out) :: neighbors(maxneighbors) + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Graph_neighbors( & + comm, & + rank, & + maxneighbors, & + neighbors, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Graph_neighbors + + subroutine MPI_Graph_neighbors_count( & + comm, & + rank, & + nneighbors, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: rank + integer, intent(out) :: nneighbors + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Graph_neighbors_count( & + comm, & + rank, & + nneighbors, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Graph_neighbors_count + + subroutine MPI_Graphdims_get( & + comm, & + nnodes, & + nedges, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: nnodes + integer, intent(out) :: nedges + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Graphdims_get( & + comm, & + nnodes, & + nedges, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Graphdims_get + + subroutine MPI_Ineighbor_allgather( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Ineighbor_allgather( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Ineighbor_allgather + + subroutine MPI_Ineighbor_allgatherv( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcounts, & + displs, & + recvtype, & + comm, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: displs(*) + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Ineighbor_allgatherv( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcounts, & + displs, & + recvtype, & + comm, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Ineighbor_allgatherv + + subroutine MPI_Ineighbor_alltoall( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Ineighbor_alltoall( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Ineighbor_alltoall + + subroutine MPI_Ineighbor_alltoallv( & + sendbuf, & + sendcounts, & + sdispls, & + sendtype, & + recvbuf, & + recvcounts, & + rdispls, & + recvtype, & + comm, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: rdispls(*) + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Ineighbor_alltoallv( & + sendbuf, & + sendcounts, & + sdispls, & + sendtype, & + recvbuf, & + recvcounts, & + rdispls, & + recvtype, & + comm, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Ineighbor_alltoallv + + subroutine MPI_Ineighbor_alltoallw( & + sendbuf, & + sendcounts, & + sdispls, & + sendtypes, & + recvbuf, & + recvcounts, & + rdispls, & + recvtypes, & + comm, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer(MPI_ADDRESS_KIND), intent(in) :: sdispls(*) + type(MPI_Datatype), intent(in) :: sendtypes(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer(MPI_ADDRESS_KIND), intent(in) :: rdispls(*) + type(MPI_Datatype), intent(in) :: recvtypes(*) + type(MPI_Comm), intent(in) :: comm + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Ineighbor_alltoallw( & + sendbuf, & + sendcounts, & + sdispls, & + sendtypes, & + recvbuf, & + recvcounts, & + rdispls, & + recvtypes, & + comm, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Ineighbor_alltoallw + + subroutine MPI_Neighbor_allgather( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Neighbor_allgather( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Neighbor_allgather + + subroutine MPI_Neighbor_allgather_init( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + info, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Neighbor_allgather_init( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + info, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Neighbor_allgather_init + + subroutine MPI_Neighbor_allgatherv( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcounts, & + displs, & + recvtype, & + comm, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer(MPI_ADDRESS_KIND), intent(in) :: displs(*) + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Neighbor_allgatherv( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcounts, & + displs, & + recvtype, & + comm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Neighbor_allgatherv + + subroutine MPI_Neighbor_allgatherv_init( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcounts, & + displs, & + recvtype, & + comm, & + info, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer(MPI_ADDRESS_KIND), intent(in) :: displs(*) + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Neighbor_allgatherv_init( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcounts, & + displs, & + recvtype, & + comm, & + info, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Neighbor_allgatherv_init + + subroutine MPI_Neighbor_alltoall( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Neighbor_alltoall( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Neighbor_alltoall + + subroutine MPI_Neighbor_alltoall_init( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + info, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcount + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Neighbor_alltoall_init( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + info, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Neighbor_alltoall_init + + subroutine MPI_Neighbor_alltoallv( & + sendbuf, & + sendcounts, & + sdispls, & + sendtype, & + recvbuf, & + recvcounts, & + rdispls, & + recvtype, & + comm, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: rdispls(*) + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Neighbor_alltoallv( & + sendbuf, & + sendcounts, & + sdispls, & + sendtype, & + recvbuf, & + recvcounts, & + rdispls, & + recvtype, & + comm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Neighbor_alltoallv + + subroutine MPI_Neighbor_alltoallv_init( & + sendbuf, & + sendcounts, & + sdispls, & + sendtype, & + recvbuf, & + recvcounts, & + rdispls, & + recvtype, & + comm, & + info, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + type(MPI_Datatype), intent(in) :: sendtype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: rdispls(*) + type(MPI_Datatype), intent(in) :: recvtype + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Neighbor_alltoallv_init( & + sendbuf, & + sendcounts, & + sdispls, & + sendtype, & + recvbuf, & + recvcounts, & + rdispls, & + recvtype, & + comm, & + info, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Neighbor_alltoallv_init + + subroutine MPI_Neighbor_alltoallw( & + sendbuf, & + sendcounts, & + sdispls, & + sendtypes, & + recvbuf, & + recvcounts, & + rdispls, & + recvtypes, & + comm, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer(MPI_ADDRESS_KIND), intent(in) :: sdispls(*) + type(MPI_Datatype), intent(in) :: sendtypes(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer(MPI_ADDRESS_KIND), intent(in) :: rdispls(*) + type(MPI_Datatype), intent(in) :: recvtypes(*) + type(MPI_Comm), intent(in) :: comm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Neighbor_alltoallw( & + sendbuf, & + sendcounts, & + sdispls, & + sendtypes, & + recvbuf, & + recvcounts, & + rdispls, & + recvtypes, & + comm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Neighbor_alltoallw + + subroutine MPI_Neighbor_alltoallw_init( & + sendbuf, & + sendcounts, & + sdispls, & + sendtypes, & + recvbuf, & + recvcounts, & + rdispls, & + recvtypes, & + comm, & + info, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) sendbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: sendbuf + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer(MPI_ADDRESS_KIND), intent(in) :: sdispls(*) + type(MPI_Datatype), intent(in) :: sendtypes(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) recvbuf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: recvbuf + integer :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer(MPI_ADDRESS_KIND), intent(in) :: rdispls(*) + type(MPI_Datatype), intent(in) :: recvtypes(*) + type(MPI_Comm), intent(in) :: comm + type(MPI_Info), intent(in) :: info + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Neighbor_alltoallw_init( & + sendbuf, & + sendcounts, & + sdispls, & + sendtypes, & + recvbuf, & + recvcounts, & + rdispls, & + recvtypes, & + comm, & + info, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Neighbor_alltoallw_init + + subroutine MPI_Topo_test( & + comm, & + status, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: status + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Topo_test( & + comm, & + status, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Topo_test + + subroutine MPI_Add_error_class( & + errorclass, & + ierror & + ) + integer, intent(out) :: errorclass + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Add_error_class( & + errorclass, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Add_error_class + + subroutine MPI_Add_error_code( & + errorclass, & + errorcode, & + ierror & + ) + integer, intent(in) :: errorclass + integer, intent(out) :: errorcode + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Add_error_code( & + errorclass, & + errorcode, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Add_error_code + + subroutine MPI_Add_error_string( & + errorcode, & + string, & + ierror & + ) + integer, intent(in) :: errorcode + character(*), intent(in) :: string + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Add_error_string( & + errorcode, & + string, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Add_error_string + + subroutine MPI_Alloc_mem( & + size, & + info, & + baseptr, & + ierror & + ) + integer(MPI_ADDRESS_KIND), intent(in) :: size + type(MPI_Info), intent(in) :: info + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) baseptr + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: baseptr + integer :: baseptr(*) + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Alloc_mem( & + size, & + info, & + baseptr, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Alloc_mem + + subroutine MPI_Comm_call_errhandler( & + comm, & + errorcode, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: errorcode + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_call_errhandler( & + comm, & + errorcode, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_call_errhandler + + subroutine MPI_Comm_create_errhandler( & + comm_errhandler_fn, & + errhandler, & + ierror & + ) + external :: comm_errhandler_fn + type(MPI_Errhandler), intent(out) :: errhandler + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_create_errhandler( & + comm_errhandler_fn, & + errhandler, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_create_errhandler + + subroutine MPI_Comm_get_errhandler( & + comm, & + errhandler, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + type(MPI_Errhandler), intent(out) :: errhandler + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_get_errhandler( & + comm, & + errhandler, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_get_errhandler + + subroutine MPI_Comm_set_errhandler( & + comm, & + errhandler, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + type(MPI_Errhandler), intent(in) :: errhandler + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_set_errhandler( & + comm, & + errhandler, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_set_errhandler + + subroutine MPI_Errhandler_free( & + errhandler, & + ierror & + ) + type(MPI_Errhandler), intent(out) :: errhandler + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Errhandler_free( & + errhandler, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Errhandler_free + + subroutine MPI_Error_class( & + errorcode, & + errorclass, & + ierror & + ) + integer, intent(in) :: errorcode + integer, intent(out) :: errorclass + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Error_class( & + errorcode, & + errorclass, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Error_class + + subroutine MPI_Error_string( & + errorcode, & + string, & + resultlen, & + ierror & + ) + integer, intent(in) :: errorcode + character(*), intent(out) :: string + integer, intent(out) :: resultlen + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Error_string( & + errorcode, & + string, & + resultlen, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Error_string + + subroutine MPI_File_call_errhandler( & + fh, & + errorcode, & + ierror & + ) + type(MPI_File), intent(in) :: fh + integer, intent(in) :: errorcode + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_call_errhandler( & + fh, & + errorcode, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_call_errhandler + + subroutine MPI_File_create_errhandler( & + file_errhandler_fn, & + errhandler, & + ierror & + ) + external :: file_errhandler_fn + type(MPI_Errhandler), intent(out) :: errhandler + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_create_errhandler( & + file_errhandler_fn, & + errhandler, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_create_errhandler + + subroutine MPI_File_get_errhandler( & + file, & + errhandler, & + ierror & + ) + type(MPI_File), intent(in) :: file + type(MPI_Errhandler), intent(out) :: errhandler + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_get_errhandler( & + file, & + errhandler, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_get_errhandler + + subroutine MPI_File_set_errhandler( & + file, & + errhandler, & + ierror & + ) + type(MPI_File), intent(in) :: file + type(MPI_Errhandler), intent(in) :: errhandler + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_set_errhandler( & + file, & + errhandler, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_set_errhandler + + subroutine MPI_Free_mem( & + base, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) base + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: base + integer :: base(*) + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Free_mem( & + base, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Free_mem + + subroutine MPI_Get_hw_resource_info( & + hw_info, & + ierror & + ) + type(MPI_Info), intent(out) :: hw_info + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Get_hw_resource_info( & + hw_info, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Get_hw_resource_info + + subroutine MPI_Get_library_version( & + version, & + resultlen, & + ierror & + ) + character(*), intent(out) :: version + integer, intent(out) :: resultlen + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Get_library_version( & + version, & + resultlen, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Get_library_version + + subroutine MPI_Get_processor_name( & + name, & + resultlen, & + ierror & + ) + character(*), intent(out) :: name + integer, intent(out) :: resultlen + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Get_processor_name( & + name, & + resultlen, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Get_processor_name + + subroutine MPI_Get_version( & + version, & + subversion, & + ierror & + ) + integer, intent(out) :: version + integer, intent(out) :: subversion + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Get_version( & + version, & + subversion, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Get_version + + subroutine MPI_Remove_error_class( & + errorclass, & + ierror & + ) + integer, intent(in) :: errorclass + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Remove_error_class( & + errorclass, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Remove_error_class + + subroutine MPI_Remove_error_code( & + errorcode, & + ierror & + ) + integer, intent(in) :: errorcode + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Remove_error_code( & + errorcode, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Remove_error_code + + subroutine MPI_Remove_error_string( & + errorcode, & + ierror & + ) + integer, intent(in) :: errorcode + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Remove_error_string( & + errorcode, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Remove_error_string + + subroutine MPI_Session_call_errhandler( & + session, & + errorcode, & + ierror & + ) + type(MPI_Session), intent(in) :: session + integer, intent(in) :: errorcode + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Session_call_errhandler( & + session, & + errorcode, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Session_call_errhandler + + subroutine MPI_Session_create_errhandler( & + session_errhandler_fn, & + errhandler, & + ierror & + ) + external :: session_errhandler_fn + type(MPI_Errhandler), intent(out) :: errhandler + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Session_create_errhandler( & + session_errhandler_fn, & + errhandler, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Session_create_errhandler + + subroutine MPI_Session_get_errhandler( & + session, & + errhandler, & + ierror & + ) + type(MPI_Session), intent(in) :: session + type(MPI_Errhandler), intent(out) :: errhandler + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Session_get_errhandler( & + session, & + errhandler, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Session_get_errhandler + + subroutine MPI_Session_set_errhandler( & + session, & + errhandler, & + ierror & + ) + type(MPI_Session), intent(in) :: session + type(MPI_Errhandler), intent(in) :: errhandler + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Session_set_errhandler( & + session, & + errhandler, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Session_set_errhandler + + subroutine MPI_Win_call_errhandler( & + win, & + errorcode, & + ierror & + ) + type(MPI_Win), intent(in) :: win + integer, intent(in) :: errorcode + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Win_call_errhandler( & + win, & + errorcode, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Win_call_errhandler + + subroutine MPI_Win_create_errhandler( & + win_errhandler_fn, & + errhandler, & + ierror & + ) + external :: win_errhandler_fn + type(MPI_Errhandler), intent(out) :: errhandler + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Win_create_errhandler( & + win_errhandler_fn, & + errhandler, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Win_create_errhandler + + subroutine MPI_Win_get_errhandler( & + win, & + errhandler, & + ierror & + ) + type(MPI_Win), intent(in) :: win + type(MPI_Errhandler), intent(out) :: errhandler + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Win_get_errhandler( & + win, & + errhandler, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Win_get_errhandler + + subroutine MPI_Win_set_errhandler( & + win, & + errhandler, & + ierror & + ) + type(MPI_Win), intent(in) :: win + type(MPI_Errhandler), intent(in) :: errhandler + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Win_set_errhandler( & + win, & + errhandler, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Win_set_errhandler + + function MPI_Wtick( & + ) result(result) + double precision :: result + result = wrapped_MPI_Wtick( & + ) + end function MPI_Wtick + + function MPI_Wtime( & + ) result(result) + double precision :: result + result = wrapped_MPI_Wtime( & + ) + end function MPI_Wtime + + subroutine MPI_Info_create( & + info, & + ierror & + ) + type(MPI_Info), intent(out) :: info + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Info_create( & + info, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Info_create + + subroutine MPI_Info_create_env( & + info, & + ierror & + ) + type(MPI_Info), intent(out) :: info + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Info_create_env( & + info, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Info_create_env + + subroutine MPI_Info_delete( & + info, & + key, & + ierror & + ) + type(MPI_Info), intent(in) :: info + character(*), intent(in) :: key + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Info_delete( & + info, & + key, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Info_delete + + subroutine MPI_Info_dup( & + info, & + newinfo, & + ierror & + ) + type(MPI_Info), intent(in) :: info + type(MPI_Info), intent(out) :: newinfo + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Info_dup( & + info, & + newinfo, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Info_dup + + subroutine MPI_Info_free( & + info, & + ierror & + ) + type(MPI_Info), intent(out) :: info + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Info_free( & + info, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Info_free + + subroutine MPI_Info_get_nkeys( & + info, & + nkeys, & + ierror & + ) + type(MPI_Info), intent(in) :: info + integer, intent(out) :: nkeys + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Info_get_nkeys( & + info, & + nkeys, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Info_get_nkeys + + subroutine MPI_Info_get_nthkey( & + info, & + n, & + key, & + ierror & + ) + type(MPI_Info), intent(in) :: info + integer, intent(in) :: n + character(*), intent(out) :: key + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Info_get_nthkey( & + info, & + n, & + key, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Info_get_nthkey + + subroutine MPI_Info_get_string( & + info, & + key, & + buflen, & + value, & + flag, & + ierror & + ) + type(MPI_Info), intent(in) :: info + character(*), intent(in) :: key + integer, intent(out) :: buflen + character(*), intent(out) :: value + logical, intent(out) :: flag + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Info_get_string( & + info, & + key, & + buflen, & + value, & + flag, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Info_get_string + + subroutine MPI_Info_set( & + info, & + key, & + value, & + ierror & + ) + type(MPI_Info), intent(in) :: info + character(*), intent(in) :: key + character(*), intent(in) :: value + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Info_set( & + info, & + key, & + value, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Info_set + + subroutine MPI_Abort( & + comm, & + errorcode, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: errorcode + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Abort( & + comm, & + errorcode, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Abort + + subroutine MPI_Close_port( & + port_name, & + ierror & + ) + character(*), intent(in) :: port_name + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Close_port( & + port_name, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Close_port + + subroutine MPI_Comm_accept( & + port_name, & + info, & + root, & + comm, & + newcomm, & + ierror & + ) + character(*), intent(in) :: port_name + type(MPI_Info), intent(in) :: info + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + type(MPI_Comm), intent(out) :: newcomm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_accept( & + port_name, & + info, & + root, & + comm, & + newcomm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_accept + + subroutine MPI_Comm_connect( & + port_name, & + info, & + root, & + comm, & + newcomm, & + ierror & + ) + character(*), intent(in) :: port_name + type(MPI_Info), intent(in) :: info + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + type(MPI_Comm), intent(out) :: newcomm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_connect( & + port_name, & + info, & + root, & + comm, & + newcomm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_connect + + subroutine MPI_Comm_disconnect( & + comm, & + ierror & + ) + type(MPI_Comm), intent(out) :: comm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_disconnect( & + comm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_disconnect + + subroutine MPI_Comm_get_parent( & + parent, & + ierror & + ) + type(MPI_Comm), intent(out) :: parent + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_get_parent( & + parent, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_get_parent + + subroutine MPI_Comm_join( & + fd, & + intercomm, & + ierror & + ) + integer, intent(in) :: fd + type(MPI_Comm), intent(out) :: intercomm + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_join( & + fd, & + intercomm, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_join + + subroutine MPI_Comm_spawn( & + command, & + argv, & + maxprocs, & + info, & + root, & + comm, & + intercomm, & + array_of_errcodes, & + ierror & + ) + character(*), intent(in) :: command + character(*), intent(in) :: argv(*) + integer, intent(in) :: maxprocs + type(MPI_Info), intent(in) :: info + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + type(MPI_Comm), intent(out) :: intercomm + integer, intent(out) :: array_of_errcodes(maxprocs) + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_spawn( & + command, & + argv, & + maxprocs, & + info, & + root, & + comm, & + intercomm, & + array_of_errcodes, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_spawn + + subroutine MPI_Comm_spawn_multiple( & + count, & + array_of_commands, & + array_of_argv, & + array_of_maxprocs, & + array_of_info, & + root, & + comm, & + intercomm, & + array_of_errcodes, & + ierror & + ) + integer, intent(in) :: count + character(*), intent(in) :: array_of_commands(count) + character(*), intent(in) :: array_of_argv(count, *) + integer, intent(in) :: array_of_maxprocs(count) + type(MPI_Info), intent(in) :: array_of_info(count) + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + type(MPI_Comm), intent(out) :: intercomm + integer, intent(out) :: array_of_errcodes(*) + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Comm_spawn_multiple( & + count, & + array_of_commands, & + array_of_argv, & + array_of_maxprocs, & + array_of_info, & + root, & + comm, & + intercomm, & + array_of_errcodes, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Comm_spawn_multiple + + subroutine MPI_Finalize( & + ierror & + ) + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Finalize( & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Finalize + + subroutine MPI_Finalized( & + flag, & + ierror & + ) + logical, intent(out) :: flag + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Finalized( & + flag, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Finalized + + subroutine MPI_Init( & + ierror & + ) + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Init( & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Init + + subroutine MPI_Init_thread( & + required, & + provided, & + ierror & + ) + integer, intent(in) :: required + integer, intent(out) :: provided + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Init_thread( & + required, & + provided, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Init_thread + + subroutine MPI_Initialized( & + flag, & + ierror & + ) + logical, intent(out) :: flag + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Initialized( & + flag, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Initialized + + subroutine MPI_Is_thread_main( & + flag, & + ierror & + ) + logical, intent(out) :: flag + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Is_thread_main( & + flag, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Is_thread_main + + subroutine MPI_Lookup_name( & + service_name, & + info, & + port_name, & + ierror & + ) + character(*), intent(in) :: service_name + type(MPI_Info), intent(in) :: info + character(*), intent(out) :: port_name + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Lookup_name( & + service_name, & + info, & + port_name, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Lookup_name + + subroutine MPI_Open_port( & + info, & + port_name, & + ierror & + ) + type(MPI_Info), intent(in) :: info + character(*), intent(out) :: port_name + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Open_port( & + info, & + port_name, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Open_port + + subroutine MPI_Publish_name( & + service_name, & + info, & + port_name, & + ierror & + ) + character(*), intent(in) :: service_name + type(MPI_Info), intent(in) :: info + character(*), intent(in) :: port_name + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Publish_name( & + service_name, & + info, & + port_name, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Publish_name + + subroutine MPI_Query_thread( & + provided, & + ierror & + ) + integer, intent(out) :: provided + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Query_thread( & + provided, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Query_thread + + subroutine MPI_Session_finalize( & + session, & + ierror & + ) + type(MPI_Session), intent(out) :: session + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Session_finalize( & + session, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Session_finalize + + subroutine MPI_Session_get_info( & + session, & + info_used, & + ierror & + ) + type(MPI_Session), intent(in) :: session + type(MPI_Info), intent(out) :: info_used + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Session_get_info( & + session, & + info_used, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Session_get_info + + subroutine MPI_Session_get_nth_pset( & + session, & + info, & + n, & + pset_len, & + pset_name, & + ierror & + ) + type(MPI_Session), intent(in) :: session + type(MPI_Info), intent(in) :: info + integer, intent(in) :: n + integer, intent(out) :: pset_len + character(*), intent(out) :: pset_name + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Session_get_nth_pset( & + session, & + info, & + n, & + pset_len, & + pset_name, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Session_get_nth_pset + + subroutine MPI_Session_get_num_psets( & + session, & + info, & + npset_names, & + ierror & + ) + type(MPI_Session), intent(in) :: session + type(MPI_Info), intent(in) :: info + integer, intent(out) :: npset_names + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Session_get_num_psets( & + session, & + info, & + npset_names, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Session_get_num_psets + + subroutine MPI_Session_get_pset_info( & + session, & + pset_name, & + info, & + ierror & + ) + type(MPI_Session), intent(in) :: session + character(*), intent(in) :: pset_name + type(MPI_Info), intent(out) :: info + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Session_get_pset_info( & + session, & + pset_name, & + info, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Session_get_pset_info + + subroutine MPI_Session_init( & + info, & + errhandler, & + session, & + ierror & + ) + type(MPI_Info), intent(in) :: info + type(MPI_Errhandler), intent(in) :: errhandler + type(MPI_Session), intent(out) :: session + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Session_init( & + info, & + errhandler, & + session, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Session_init + + subroutine MPI_Unpublish_name( & + service_name, & + info, & + port_name, & + ierror & + ) + character(*), intent(in) :: service_name + type(MPI_Info), intent(in) :: info + character(*), intent(in) :: port_name + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Unpublish_name( & + service_name, & + info, & + port_name, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Unpublish_name + + subroutine MPI_Accumulate( & + origin_addr, & + origin_count, & + origin_datatype, & + target_rank, & + target_disp, & + target_count, & + target_datatype, & + op, & + win, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) origin_addr + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: origin_addr + integer, intent(in) :: origin_addr(*) + integer, intent(in) :: origin_count + type(MPI_Datatype), intent(in) :: origin_datatype + integer, intent(in) :: target_rank + integer(MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + type(MPI_Datatype), intent(in) :: target_datatype + type(MPI_Op), intent(in) :: op + type(MPI_Win), intent(in) :: win + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Accumulate( & + origin_addr, & + origin_count, & + origin_datatype, & + target_rank, & + target_disp, & + target_count, & + target_datatype, & + op, & + win, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Accumulate + + subroutine MPI_Compare_and_swap( & + origin_addr, & + compare_addr, & + result_addr, & + datatype, & + target_rank, & + target_disp, & + win, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) origin_addr + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: origin_addr + integer, intent(in) :: origin_addr(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) compare_addr + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: compare_addr + integer, intent(in) :: compare_addr(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) result_addr + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: result_addr + integer :: result_addr(*) + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: target_rank + integer(MPI_ADDRESS_KIND), intent(in) :: target_disp + type(MPI_Win), intent(in) :: win + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Compare_and_swap( & + origin_addr, & + compare_addr, & + result_addr, & + datatype, & + target_rank, & + target_disp, & + win, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Compare_and_swap + + subroutine MPI_Fetch_and_op( & + origin_addr, & + result_addr, & + datatype, & + target_rank, & + target_disp, & + op, & + win, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) origin_addr + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: origin_addr + integer, intent(in) :: origin_addr(*) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) result_addr + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: result_addr + integer :: result_addr(*) + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: target_rank + integer(MPI_ADDRESS_KIND), intent(in) :: target_disp + type(MPI_Op), intent(in) :: op + type(MPI_Win), intent(in) :: win + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Fetch_and_op( & + origin_addr, & + result_addr, & + datatype, & + target_rank, & + target_disp, & + op, & + win, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Fetch_and_op + + subroutine MPI_Get( & + origin_addr, & + origin_count, & + origin_datatype, & + target_rank, & + target_disp, & + target_count, & + target_datatype, & + win, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) origin_addr + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: origin_addr + integer :: origin_addr(*) + integer, intent(in) :: origin_count + type(MPI_Datatype), intent(in) :: origin_datatype + integer, intent(in) :: target_rank + integer(MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + type(MPI_Datatype), intent(in) :: target_datatype + type(MPI_Win), intent(in) :: win + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Get( & + origin_addr, & + origin_count, & + origin_datatype, & + target_rank, & + target_disp, & + target_count, & + target_datatype, & + win, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Get + + subroutine 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, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) origin_addr + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: origin_addr + integer, intent(in) :: origin_addr(*) + integer, intent(in) :: origin_count + type(MPI_Datatype), intent(in) :: origin_datatype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) result_addr + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: result_addr + integer :: result_addr(*) + integer, intent(in) :: result_count + type(MPI_Datatype), intent(in) :: result_datatype + integer, intent(in) :: target_rank + integer(MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + type(MPI_Datatype), intent(in) :: target_datatype + type(MPI_Op), intent(in) :: op + type(MPI_Win), intent(in) :: win + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_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, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Get_accumulate + + subroutine MPI_Put( & + origin_addr, & + origin_count, & + origin_datatype, & + target_rank, & + target_disp, & + target_count, & + target_datatype, & + win, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) origin_addr + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: origin_addr + integer, intent(in) :: origin_addr(*) + integer, intent(in) :: origin_count + type(MPI_Datatype), intent(in) :: origin_datatype + integer, intent(in) :: target_rank + integer(MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + type(MPI_Datatype), intent(in) :: target_datatype + type(MPI_Win), intent(in) :: win + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Put( & + origin_addr, & + origin_count, & + origin_datatype, & + target_rank, & + target_disp, & + target_count, & + target_datatype, & + win, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Put + + subroutine MPI_Raccumulate( & + origin_addr, & + origin_count, & + origin_datatype, & + target_rank, & + target_disp, & + target_count, & + target_datatype, & + op, & + win, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) origin_addr + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: origin_addr + integer, intent(in) :: origin_addr(*) + integer, intent(in) :: origin_count + type(MPI_Datatype), intent(in) :: origin_datatype + integer, intent(in) :: target_rank + integer(MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + type(MPI_Datatype), intent(in) :: target_datatype + type(MPI_Op), intent(in) :: op + type(MPI_Win), intent(in) :: win + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Raccumulate( & + origin_addr, & + origin_count, & + origin_datatype, & + target_rank, & + target_disp, & + target_count, & + target_datatype, & + op, & + win, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Raccumulate + + subroutine MPI_Rget( & + origin_addr, & + origin_count, & + origin_datatype, & + target_rank, & + target_disp, & + target_count, & + target_datatype, & + win, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) origin_addr + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: origin_addr + integer :: origin_addr(*) + integer, intent(in) :: origin_count + type(MPI_Datatype), intent(in) :: origin_datatype + integer, intent(in) :: target_rank + integer(MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + type(MPI_Datatype), intent(in) :: target_datatype + type(MPI_Win), intent(in) :: win + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Rget( & + origin_addr, & + origin_count, & + origin_datatype, & + target_rank, & + target_disp, & + target_count, & + target_datatype, & + win, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Rget + + subroutine 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, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) origin_addr + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: origin_addr + integer, intent(in) :: origin_addr(*) + integer, intent(in) :: origin_count + type(MPI_Datatype), intent(in) :: origin_datatype + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) result_addr + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: result_addr + integer :: result_addr(*) + integer, intent(in) :: result_count + type(MPI_Datatype), intent(in) :: result_datatype + integer, intent(in) :: target_rank + integer(MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + type(MPI_Datatype), intent(in) :: target_datatype + type(MPI_Op), intent(in) :: op + type(MPI_Win), intent(in) :: win + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_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, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Rget_accumulate + + subroutine MPI_Rput( & + origin_addr, & + origin_count, & + origin_datatype, & + target_rank, & + target_disp, & + target_count, & + target_datatype, & + win, & + request, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) origin_addr + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: origin_addr + integer, intent(in) :: origin_addr(*) + integer, intent(in) :: origin_count + type(MPI_Datatype), intent(in) :: origin_datatype + integer, intent(in) :: target_rank + integer(MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + type(MPI_Datatype), intent(in) :: target_datatype + type(MPI_Win), intent(in) :: win + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Rput( & + origin_addr, & + origin_count, & + origin_datatype, & + target_rank, & + target_disp, & + target_count, & + target_datatype, & + win, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Rput + + subroutine MPI_Win_allocate( & + size, & + disp_unit, & + info, & + comm, & + baseptr, & + win, & + ierror & + ) + integer(MPI_ADDRESS_KIND), intent(in) :: size + integer, intent(in) :: disp_unit + type(MPI_Info), intent(in) :: info + type(MPI_Comm), intent(in) :: comm + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) baseptr + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: baseptr + integer :: baseptr(*) + type(MPI_Win), intent(out) :: win + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Win_allocate( & + size, & + disp_unit, & + info, & + comm, & + baseptr, & + win, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Win_allocate + + subroutine MPI_Win_allocate_shared( & + size, & + disp_unit, & + info, & + comm, & + baseptr, & + win, & + ierror & + ) + integer(MPI_ADDRESS_KIND), intent(in) :: size + integer, intent(in) :: disp_unit + type(MPI_Info), intent(in) :: info + type(MPI_Comm), intent(in) :: comm + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) baseptr + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: baseptr + integer :: baseptr(*) + type(MPI_Win), intent(out) :: win + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Win_allocate_shared( & + size, & + disp_unit, & + info, & + comm, & + baseptr, & + win, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Win_allocate_shared + + subroutine MPI_Win_attach( & + win, & + base, & + size, & + ierror & + ) + type(MPI_Win), intent(in) :: win + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) base + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: base + integer :: base(*) + integer(MPI_ADDRESS_KIND), intent(in) :: size + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Win_attach( & + win, & + base, & + size, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Win_attach + + subroutine MPI_Win_complete( & + win, & + ierror & + ) + type(MPI_Win), intent(in) :: win + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Win_complete( & + win, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Win_complete + + subroutine MPI_Win_create( & + base, & + size, & + disp_unit, & + info, & + comm, & + win, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) base + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: base + integer :: base(*) + integer(MPI_ADDRESS_KIND), intent(in) :: size + integer, intent(in) :: disp_unit + type(MPI_Info), intent(in) :: info + type(MPI_Comm), intent(in) :: comm + type(MPI_Win), intent(out) :: win + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Win_create( & + base, & + size, & + disp_unit, & + info, & + comm, & + win, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Win_create + + subroutine MPI_Win_create_dynamic( & + info, & + comm, & + win, & + ierror & + ) + type(MPI_Info), intent(in) :: info + type(MPI_Comm), intent(in) :: comm + type(MPI_Win), intent(out) :: win + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Win_create_dynamic( & + info, & + comm, & + win, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Win_create_dynamic + + subroutine MPI_Win_detach( & + win, & + base, & + ierror & + ) + type(MPI_Win), intent(in) :: win + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) base + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: base + integer, intent(in) :: base(*) + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Win_detach( & + win, & + base, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Win_detach + + subroutine MPI_Win_fence( & + assert, & + win, & + ierror & + ) + integer, intent(in) :: assert + type(MPI_Win), intent(in) :: win + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Win_fence( & + assert, & + win, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Win_fence + + subroutine MPI_Win_flush( & + rank, & + win, & + ierror & + ) + integer, intent(in) :: rank + type(MPI_Win), intent(in) :: win + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Win_flush( & + rank, & + win, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Win_flush + + subroutine MPI_Win_flush_all( & + win, & + ierror & + ) + type(MPI_Win), intent(in) :: win + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Win_flush_all( & + win, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Win_flush_all + + subroutine MPI_Win_flush_local( & + rank, & + win, & + ierror & + ) + integer, intent(in) :: rank + type(MPI_Win), intent(in) :: win + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Win_flush_local( & + rank, & + win, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Win_flush_local + + subroutine MPI_Win_flush_local_all( & + win, & + ierror & + ) + type(MPI_Win), intent(in) :: win + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Win_flush_local_all( & + win, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Win_flush_local_all + + subroutine MPI_Win_free( & + win, & + ierror & + ) + type(MPI_Win), intent(out) :: win + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Win_free( & + win, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Win_free + + subroutine MPI_Win_get_group( & + win, & + group, & + ierror & + ) + type(MPI_Win), intent(in) :: win + type(MPI_Group), intent(out) :: group + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Win_get_group( & + win, & + group, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Win_get_group + + subroutine MPI_Win_get_info( & + win, & + info_used, & + ierror & + ) + type(MPI_Win), intent(in) :: win + type(MPI_Info), intent(out) :: info_used + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Win_get_info( & + win, & + info_used, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Win_get_info + + subroutine MPI_Win_lock( & + lock_type, & + rank, & + assert, & + win, & + ierror & + ) + integer, intent(in) :: lock_type + integer, intent(in) :: rank + integer, intent(in) :: assert + type(MPI_Win), intent(in) :: win + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Win_lock( & + lock_type, & + rank, & + assert, & + win, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Win_lock + + subroutine MPI_Win_lock_all( & + assert, & + win, & + ierror & + ) + integer, intent(in) :: assert + type(MPI_Win), intent(in) :: win + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Win_lock_all( & + assert, & + win, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Win_lock_all + + subroutine MPI_Win_post( & + group, & + assert, & + win, & + ierror & + ) + type(MPI_Group), intent(in) :: group + integer, intent(in) :: assert + type(MPI_Win), intent(in) :: win + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Win_post( & + group, & + assert, & + win, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Win_post + + subroutine MPI_Win_set_info( & + win, & + info, & + ierror & + ) + type(MPI_Win), intent(in) :: win + type(MPI_Info), intent(in) :: info + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Win_set_info( & + win, & + info, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Win_set_info + + subroutine MPI_Win_shared_query( & + win, & + rank, & + size, & + disp_unit, & + baseptr, & + ierror & + ) + type(MPI_Win), intent(in) :: win + integer, intent(in) :: rank + integer(MPI_ADDRESS_KIND), intent(out) :: size + integer, intent(out) :: disp_unit + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) baseptr + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: baseptr + integer :: baseptr(*) + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Win_shared_query( & + win, & + rank, & + size, & + disp_unit, & + baseptr, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Win_shared_query + + subroutine MPI_Win_start( & + group, & + assert, & + win, & + ierror & + ) + type(MPI_Group), intent(in) :: group + integer, intent(in) :: assert + type(MPI_Win), intent(in) :: win + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Win_start( & + group, & + assert, & + win, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Win_start + + subroutine MPI_Win_sync( & + win, & + ierror & + ) + type(MPI_Win), intent(in) :: win + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Win_sync( & + win, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Win_sync + + subroutine MPI_Win_test( & + win, & + flag, & + ierror & + ) + type(MPI_Win), intent(in) :: win + logical, intent(out) :: flag + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Win_test( & + win, & + flag, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Win_test + + subroutine MPI_Win_unlock( & + rank, & + win, & + ierror & + ) + integer, intent(in) :: rank + type(MPI_Win), intent(in) :: win + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Win_unlock( & + rank, & + win, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Win_unlock + + subroutine MPI_Win_unlock_all( & + win, & + ierror & + ) + type(MPI_Win), intent(in) :: win + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Win_unlock_all( & + win, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Win_unlock_all + + subroutine MPI_Win_wait( & + win, & + ierror & + ) + type(MPI_Win), intent(in) :: win + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Win_wait( & + win, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Win_wait + + subroutine MPI_Grequest_complete( & + request, & + ierror & + ) + type(MPI_Request), intent(in) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Grequest_complete( & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Grequest_complete + + subroutine MPI_Grequest_start( & + query_fn, & + free_fn, & + cancel_fn, & + extra_state, & + request, & + ierror & + ) + external :: query_fn + external :: free_fn + external :: cancel_fn + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) extra_state + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: extra_state + integer :: extra_state(*) + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Grequest_start( & + query_fn, & + free_fn, & + cancel_fn, & + extra_state, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Grequest_start + + subroutine MPI_Status_set_cancelled( & + status, & + flag, & + ierror & + ) + type(MPI_Status), intent(out) :: status + logical, intent(in) :: flag + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Status_set_cancelled( & + status, & + flag, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Status_set_cancelled + + subroutine MPI_Status_set_elements( & + status, & + datatype, & + count, & + ierror & + ) + type(MPI_Status), intent(out) :: status + type(MPI_Datatype), intent(in) :: datatype + integer, intent(in) :: count + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Status_set_elements( & + status, & + datatype, & + count, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Status_set_elements + + subroutine MPI_Status_set_error( & + status, & + err, & + ierror & + ) + type(MPI_Status), intent(out) :: status + integer, intent(in) :: err + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Status_set_error( & + status, & + err, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Status_set_error + + subroutine MPI_Status_set_source( & + status, & + source, & + ierror & + ) + type(MPI_Status), intent(out) :: status + integer, intent(in) :: source + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Status_set_source( & + status, & + source, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Status_set_source + + subroutine MPI_Status_set_tag( & + status, & + tag, & + ierror & + ) + type(MPI_Status), intent(out) :: status + integer, intent(in) :: tag + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Status_set_tag( & + status, & + tag, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Status_set_tag + + subroutine MPI_File_close( & + fh, & + ierror & + ) + type(MPI_File), intent(out) :: fh + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_close( & + fh, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_close + + subroutine MPI_File_delete( & + filename, & + info, & + ierror & + ) + character(*), intent(in) :: filename + type(MPI_Info), intent(in) :: info + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_delete( & + filename, & + info, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_delete + + subroutine MPI_File_get_amode( & + fh, & + amode, & + ierror & + ) + type(MPI_File), intent(in) :: fh + integer, intent(out) :: amode + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_get_amode( & + fh, & + amode, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_get_amode + + subroutine MPI_File_get_atomicity( & + fh, & + flag, & + ierror & + ) + type(MPI_File), intent(in) :: fh + logical, intent(out) :: flag + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_get_atomicity( & + fh, & + flag, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_get_atomicity + + subroutine MPI_File_get_byte_offset( & + fh, & + offset, & + disp, & + ierror & + ) + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset + integer(MPI_OFFSET_KIND), intent(out) :: disp + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_get_byte_offset( & + fh, & + offset, & + disp, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_get_byte_offset + + subroutine MPI_File_get_group( & + fh, & + group, & + ierror & + ) + type(MPI_File), intent(in) :: fh + type(MPI_Group), intent(out) :: group + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_get_group( & + fh, & + group, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_get_group + + subroutine MPI_File_get_info( & + fh, & + info_used, & + ierror & + ) + type(MPI_File), intent(in) :: fh + type(MPI_Info), intent(out) :: info_used + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_get_info( & + fh, & + info_used, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_get_info + + subroutine MPI_File_get_position( & + fh, & + offset, & + ierror & + ) + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(out) :: offset + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_get_position( & + fh, & + offset, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_get_position + + subroutine MPI_File_get_position_shared( & + fh, & + offset, & + ierror & + ) + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(out) :: offset + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_get_position_shared( & + fh, & + offset, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_get_position_shared + + subroutine MPI_File_get_size( & + fh, & + size, & + ierror & + ) + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(out) :: size + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_get_size( & + fh, & + size, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_get_size + + subroutine MPI_File_get_type_extent( & + fh, & + datatype, & + extent, & + ierror & + ) + type(MPI_File), intent(in) :: fh + type(MPI_Datatype), intent(in) :: datatype + integer(MPI_ADDRESS_KIND), intent(out) :: extent + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_get_type_extent( & + fh, & + datatype, & + extent, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_get_type_extent + + subroutine MPI_File_get_view( & + fh, & + disp, & + etype, & + filetype, & + datarep, & + ierror & + ) + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(out) :: disp + type(MPI_Datatype), intent(out) :: etype + type(MPI_Datatype), intent(out) :: filetype + character(*), intent(out) :: datarep + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_get_view( & + fh, & + disp, & + etype, & + filetype, & + datarep, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_get_view + + subroutine MPI_File_iread( & + fh, & + buf, & + count, & + datatype, & + request, & + ierror & + ) + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_iread( & + fh, & + buf, & + count, & + datatype, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_iread + + subroutine MPI_File_iread_all( & + fh, & + buf, & + count, & + datatype, & + request, & + ierror & + ) + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_iread_all( & + fh, & + buf, & + count, & + datatype, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_iread_all + + subroutine MPI_File_iread_at( & + fh, & + offset, & + buf, & + count, & + datatype, & + request, & + ierror & + ) + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_iread_at( & + fh, & + offset, & + buf, & + count, & + datatype, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_iread_at + + subroutine MPI_File_iread_at_all( & + fh, & + offset, & + buf, & + count, & + datatype, & + request, & + ierror & + ) + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_iread_at_all( & + fh, & + offset, & + buf, & + count, & + datatype, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_iread_at_all + + subroutine MPI_File_iread_shared( & + fh, & + buf, & + count, & + datatype, & + request, & + ierror & + ) + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_iread_shared( & + fh, & + buf, & + count, & + datatype, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_iread_shared + + subroutine MPI_File_iwrite( & + fh, & + buf, & + count, & + datatype, & + request, & + ierror & + ) + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_iwrite( & + fh, & + buf, & + count, & + datatype, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_iwrite + + subroutine MPI_File_iwrite_all( & + fh, & + buf, & + count, & + datatype, & + request, & + ierror & + ) + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_iwrite_all( & + fh, & + buf, & + count, & + datatype, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_iwrite_all + + subroutine MPI_File_iwrite_at( & + fh, & + offset, & + buf, & + count, & + datatype, & + request, & + ierror & + ) + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_iwrite_at( & + fh, & + offset, & + buf, & + count, & + datatype, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_iwrite_at + + subroutine MPI_File_iwrite_at_all( & + fh, & + offset, & + buf, & + count, & + datatype, & + request, & + ierror & + ) + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_iwrite_at_all( & + fh, & + offset, & + buf, & + count, & + datatype, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_iwrite_at_all + + subroutine MPI_File_iwrite_shared( & + fh, & + buf, & + count, & + datatype, & + request, & + ierror & + ) + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Request), intent(out) :: request + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_iwrite_shared( & + fh, & + buf, & + count, & + datatype, & + request, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_iwrite_shared + + subroutine MPI_File_open( & + comm, & + filename, & + amode, & + info, & + fh, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + character(*), intent(in) :: filename + integer, intent(in) :: amode + type(MPI_Info), intent(in) :: info + type(MPI_File), intent(out) :: fh + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_open( & + comm, & + filename, & + amode, & + info, & + fh, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_open + + subroutine MPI_File_preallocate( & + fh, & + size, & + ierror & + ) + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: size + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_preallocate( & + fh, & + size, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_preallocate + + subroutine MPI_File_read( & + fh, & + buf, & + count, & + datatype, & + status, & + ierror & + ) + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Status), intent(out) :: status + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_read( & + fh, & + buf, & + count, & + datatype, & + status, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_read + + subroutine MPI_File_read_all( & + fh, & + buf, & + count, & + datatype, & + status, & + ierror & + ) + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Status), intent(out) :: status + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_read_all( & + fh, & + buf, & + count, & + datatype, & + status, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_read_all + + subroutine MPI_File_read_all_begin( & + fh, & + buf, & + count, & + datatype, & + ierror & + ) + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_read_all_begin( & + fh, & + buf, & + count, & + datatype, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_read_all_begin + + subroutine MPI_File_read_all_end( & + fh, & + buf, & + status, & + ierror & + ) + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + type(MPI_Status), intent(out) :: status + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_read_all_end( & + fh, & + buf, & + status, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_read_all_end + + subroutine MPI_File_read_at( & + fh, & + offset, & + buf, & + count, & + datatype, & + status, & + ierror & + ) + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Status), intent(out) :: status + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_read_at( & + fh, & + offset, & + buf, & + count, & + datatype, & + status, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_read_at + + subroutine MPI_File_read_at_all( & + fh, & + offset, & + buf, & + count, & + datatype, & + status, & + ierror & + ) + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Status), intent(out) :: status + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_read_at_all( & + fh, & + offset, & + buf, & + count, & + datatype, & + status, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_read_at_all + + subroutine MPI_File_read_at_all_begin( & + fh, & + offset, & + buf, & + count, & + datatype, & + ierror & + ) + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_read_at_all_begin( & + fh, & + offset, & + buf, & + count, & + datatype, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_read_at_all_begin + + subroutine MPI_File_read_at_all_end( & + fh, & + buf, & + status, & + ierror & + ) + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + type(MPI_Status), intent(out) :: status + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_read_at_all_end( & + fh, & + buf, & + status, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_read_at_all_end + + subroutine MPI_File_read_ordered( & + fh, & + buf, & + count, & + datatype, & + status, & + ierror & + ) + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Status), intent(out) :: status + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_read_ordered( & + fh, & + buf, & + count, & + datatype, & + status, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_read_ordered + + subroutine MPI_File_read_ordered_begin( & + fh, & + buf, & + count, & + datatype, & + ierror & + ) + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_read_ordered_begin( & + fh, & + buf, & + count, & + datatype, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_read_ordered_begin + + subroutine MPI_File_read_ordered_end( & + fh, & + buf, & + status, & + ierror & + ) + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + type(MPI_Status), intent(out) :: status + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_read_ordered_end( & + fh, & + buf, & + status, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_read_ordered_end + + subroutine MPI_File_read_shared( & + fh, & + buf, & + count, & + datatype, & + status, & + ierror & + ) + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Status), intent(out) :: status + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_read_shared( & + fh, & + buf, & + count, & + datatype, & + status, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_read_shared + + subroutine MPI_File_seek( & + fh, & + offset, & + whence, & + ierror & + ) + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset + integer, intent(in) :: whence + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_seek( & + fh, & + offset, & + whence, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_seek + + subroutine MPI_File_seek_shared( & + fh, & + offset, & + whence, & + ierror & + ) + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset + integer, intent(in) :: whence + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_seek_shared( & + fh, & + offset, & + whence, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_seek_shared + + subroutine MPI_File_set_atomicity( & + fh, & + flag, & + ierror & + ) + type(MPI_File), intent(in) :: fh + logical, intent(in) :: flag + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_set_atomicity( & + fh, & + flag, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_set_atomicity + + subroutine MPI_File_set_info( & + fh, & + info, & + ierror & + ) + type(MPI_File), intent(in) :: fh + type(MPI_Info), intent(in) :: info + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_set_info( & + fh, & + info, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_set_info + + subroutine MPI_File_set_size( & + fh, & + size, & + ierror & + ) + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: size + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_set_size( & + fh, & + size, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_set_size + + subroutine MPI_File_set_view( & + fh, & + disp, & + etype, & + filetype, & + datarep, & + info, & + ierror & + ) + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: disp + type(MPI_Datatype), intent(in) :: etype + type(MPI_Datatype), intent(in) :: filetype + character(*), intent(in) :: datarep + type(MPI_Info), intent(in) :: info + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_set_view( & + fh, & + disp, & + etype, & + filetype, & + datarep, & + info, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_set_view + + subroutine MPI_File_sync( & + fh, & + ierror & + ) + type(MPI_File), intent(in) :: fh + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_sync( & + fh, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_sync + + subroutine MPI_File_write( & + fh, & + buf, & + count, & + datatype, & + status, & + ierror & + ) + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Status), intent(out) :: status + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_write( & + fh, & + buf, & + count, & + datatype, & + status, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_write + + subroutine MPI_File_write_all( & + fh, & + buf, & + count, & + datatype, & + status, & + ierror & + ) + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Status), intent(out) :: status + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_write_all( & + fh, & + buf, & + count, & + datatype, & + status, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_write_all + + subroutine MPI_File_write_all_begin( & + fh, & + buf, & + count, & + datatype, & + ierror & + ) + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_write_all_begin( & + fh, & + buf, & + count, & + datatype, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_write_all_begin + + subroutine MPI_File_write_all_end( & + fh, & + buf, & + status, & + ierror & + ) + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + type(MPI_Status), intent(out) :: status + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_write_all_end( & + fh, & + buf, & + status, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_write_all_end + + subroutine MPI_File_write_at( & + fh, & + offset, & + buf, & + count, & + datatype, & + status, & + ierror & + ) + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Status), intent(out) :: status + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_write_at( & + fh, & + offset, & + buf, & + count, & + datatype, & + status, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_write_at + + subroutine MPI_File_write_at_all( & + fh, & + offset, & + buf, & + count, & + datatype, & + status, & + ierror & + ) + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Status), intent(out) :: status + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_write_at_all( & + fh, & + offset, & + buf, & + count, & + datatype, & + status, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_write_at_all + + subroutine MPI_File_write_at_all_begin( & + fh, & + offset, & + buf, & + count, & + datatype, & + ierror & + ) + type(MPI_File), intent(in) :: fh + integer(MPI_OFFSET_KIND), intent(in) :: offset + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_write_at_all_begin( & + fh, & + offset, & + buf, & + count, & + datatype, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_write_at_all_begin + + subroutine MPI_File_write_at_all_end( & + fh, & + buf, & + status, & + ierror & + ) + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + type(MPI_Status), intent(out) :: status + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_write_at_all_end( & + fh, & + buf, & + status, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_write_at_all_end + + subroutine MPI_File_write_ordered( & + fh, & + buf, & + count, & + datatype, & + status, & + ierror & + ) + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Status), intent(out) :: status + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_write_ordered( & + fh, & + buf, & + count, & + datatype, & + status, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_write_ordered + + subroutine MPI_File_write_ordered_begin( & + fh, & + buf, & + count, & + datatype, & + ierror & + ) + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_write_ordered_begin( & + fh, & + buf, & + count, & + datatype, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_write_ordered_begin + + subroutine MPI_File_write_ordered_end( & + fh, & + buf, & + status, & + ierror & + ) + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + type(MPI_Status), intent(out) :: status + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_write_ordered_end( & + fh, & + buf, & + status, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_write_ordered_end + + subroutine MPI_File_write_shared( & + fh, & + buf, & + count, & + datatype, & + status, & + ierror & + ) + type(MPI_File), intent(in) :: fh + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer, intent(in) :: buf(*) + integer, intent(in) :: count + type(MPI_Datatype), intent(in) :: datatype + type(MPI_Status), intent(out) :: status + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_File_write_shared( & + fh, & + buf, & + count, & + datatype, & + status, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_File_write_shared + + subroutine MPI_Register_datarep( & + datarep, & + read_conversion_fn, & + write_conversion_fn, & + dtype_file_extent_fn, & + extra_state, & + ierror & + ) + character(*), intent(in) :: datarep + external :: read_conversion_fn + external :: write_conversion_fn + external :: dtype_file_extent_fn + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) extra_state + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: extra_state + integer :: extra_state(*) + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Register_datarep( & + datarep, & + read_conversion_fn, & + write_conversion_fn, & + dtype_file_extent_fn, & + extra_state, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Register_datarep + + subroutine MPI_F_sync_reg( & + buf & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) buf + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: buf + integer :: buf(*) + call wrapped_MPI_F_sync_reg( & + buf & + ) + end subroutine MPI_F_sync_reg + + subroutine MPI_Type_create_f90_complex( & + p, & + r, & + newtype, & + ierror & + ) + integer, intent(in) :: p + integer, intent(in) :: r + type(MPI_Datatype), intent(out) :: newtype + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_create_f90_complex( & + p, & + r, & + newtype, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_create_f90_complex + + subroutine MPI_Type_create_f90_integer( & + r, & + newtype, & + ierror & + ) + integer, intent(in) :: r + type(MPI_Datatype), intent(out) :: newtype + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_create_f90_integer( & + r, & + newtype, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_create_f90_integer + + subroutine MPI_Type_create_f90_real( & + p, & + r, & + newtype, & + ierror & + ) + integer, intent(in) :: p + integer, intent(in) :: r + type(MPI_Datatype), intent(out) :: newtype + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_create_f90_real( & + p, & + r, & + newtype, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_create_f90_real + + subroutine MPI_Type_match_size( & + typeclass, & + size, & + newtype, & + ierror & + ) + integer, intent(in) :: typeclass + integer, intent(in) :: size + type(MPI_Datatype), intent(out) :: newtype + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_match_size( & + typeclass, & + size, & + newtype, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_match_size + + subroutine MPI_Pcontrol( & + level & + ) + integer, intent(in) :: level + call wrapped_MPI_Pcontrol( & + level & + ) + end subroutine MPI_Pcontrol + + subroutine MPI_Attr_delete( & + comm, & + keyval, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: keyval + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Attr_delete( & + comm, & + keyval, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Attr_delete + + subroutine MPI_Attr_get( & + comm, & + keyval, & + attribute_val, & + flag, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: keyval + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) attribute_val + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: attribute_val + integer :: attribute_val(*) + logical, intent(out) :: flag + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Attr_get( & + comm, & + keyval, & + attribute_val, & + flag, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Attr_get + + subroutine MPI_Attr_put( & + comm, & + keyval, & + attribute_val, & + ierror & + ) + type(MPI_Comm), intent(in) :: comm + integer, intent(in) :: keyval + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) attribute_val + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: attribute_val + integer :: attribute_val(*) + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Attr_put( & + comm, & + keyval, & + attribute_val, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Attr_put + + subroutine MPI_Get_elements_x( & + status, & + datatype, & + count, & + ierror & + ) + type(MPI_Status), intent(in) :: status + type(MPI_Datatype), intent(in) :: datatype + integer(MPI_COUNT_KIND), intent(out) :: count + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Get_elements_x( & + status, & + datatype, & + count, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Get_elements_x + + subroutine MPI_Info_get( & + info, & + key, & + valuelen, & + value, & + flag, & + ierror & + ) + type(MPI_Info), intent(in) :: info + character(*), intent(in) :: key + integer, intent(in) :: valuelen + character(*), intent(out) :: value + logical, intent(out) :: flag + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Info_get( & + info, & + key, & + valuelen, & + value, & + flag, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Info_get + + subroutine MPI_Info_get_valuelen( & + info, & + key, & + valuelen, & + flag, & + ierror & + ) + type(MPI_Info), intent(in) :: info + character(*), intent(in) :: key + integer, intent(out) :: valuelen + logical, intent(out) :: flag + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Info_get_valuelen( & + info, & + key, & + valuelen, & + flag, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Info_get_valuelen + + subroutine MPI_Keyval_create( & + copy_fn, & + delete_fn, & + keyval, & + extra_state, & + ierror & + ) + external :: copy_fn + external :: delete_fn + integer, intent(out) :: keyval + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) extra_state + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: extra_state + integer :: extra_state(*) + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Keyval_create( & + copy_fn, & + delete_fn, & + keyval, & + extra_state, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Keyval_create + + subroutine MPI_Keyval_free( & + keyval, & + ierror & + ) + integer, intent(out) :: keyval + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Keyval_free( & + keyval, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Keyval_free + + subroutine MPI_Status_set_elements_x( & + status, & + datatype, & + count, & + ierror & + ) + type(MPI_Status), intent(out) :: status + type(MPI_Datatype), intent(in) :: datatype + integer(MPI_COUNT_KIND), intent(in) :: count + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Status_set_elements_x( & + status, & + datatype, & + count, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Status_set_elements_x + + subroutine MPI_Type_get_extent_x( & + datatype, & + lb, & + extent, & + ierror & + ) + type(MPI_Datatype), intent(in) :: datatype + integer(MPI_COUNT_KIND), intent(out) :: lb + integer(MPI_COUNT_KIND), intent(out) :: extent + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_get_extent_x( & + datatype, & + lb, & + extent, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_get_extent_x + + subroutine MPI_Type_get_true_extent_x( & + datatype, & + true_lb, & + true_extent, & + ierror & + ) + type(MPI_Datatype), intent(in) :: datatype + integer(MPI_COUNT_KIND), intent(out) :: true_lb + integer(MPI_COUNT_KIND), intent(out) :: true_extent + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_get_true_extent_x( & + datatype, & + true_lb, & + true_extent, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_get_true_extent_x + + subroutine MPI_Type_size_x( & + datatype, & + size, & + ierror & + ) + type(MPI_Datatype), intent(in) :: datatype + integer(MPI_COUNT_KIND), intent(out) :: size + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_size_x( & + datatype, & + size, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_size_x + + subroutine MPI_Address( & + location, & + address, & + ierror & + ) + @DIR_IGNORE_TKR@!dir$ ignore_tkr(tkr) location + @GCC_ATTRIBUTES_NO_ARG_CHECK@!gcc$ attributes no_arg_check :: location + integer :: location(*) + integer(MPI_ADDRESS_KIND), intent(out) :: address + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Address( & + location, & + address, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Address + + subroutine MPI_Type_hindexed( & + count, & + array_of_blocklengths, & + array_of_displacements, & + oldtype, & + newtype, & + ierror & + ) + integer, intent(in) :: count + integer, intent(out) :: array_of_blocklengths + integer(MPI_ADDRESS_KIND), intent(out) :: array_of_displacements + type(MPI_Datatype), intent(in) :: oldtype + type(MPI_Datatype), intent(out) :: newtype + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_hindexed( & + count, & + array_of_blocklengths, & + array_of_displacements, & + oldtype, & + newtype, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_hindexed + + subroutine MPI_Type_hvector( & + count, & + blocklength, & + stride, & + oldtype, & + newtype, & + ierror & + ) + integer, intent(in) :: count + integer, intent(in) :: blocklength + integer(MPI_ADDRESS_KIND), intent(in) :: stride + type(MPI_Datatype), intent(in) :: oldtype + type(MPI_Datatype), intent(out) :: newtype + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_hvector( & + count, & + blocklength, & + stride, & + oldtype, & + newtype, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_hvector + + subroutine MPI_Type_struct( & + count, & + array_of_blocklengths, & + array_of_displacements, & + array_of_types, & + newtype, & + ierror & + ) + integer, intent(in) :: count + integer, intent(out) :: array_of_blocklengths + integer(MPI_ADDRESS_KIND), intent(out) :: array_of_displacements + type(MPI_Datatype), intent(out) :: array_of_types + type(MPI_Datatype), intent(out) :: newtype + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_struct( & + count, & + array_of_blocklengths, & + array_of_displacements, & + array_of_types, & + newtype, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_struct + + subroutine MPI_Type_extent( & + datatype, & + extent, & + ierror & + ) + type(MPI_Datatype), intent(in) :: datatype + integer(MPI_ADDRESS_KIND), intent(out) :: extent + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_extent( & + datatype, & + extent, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_extent + + subroutine MPI_Type_lb( & + datatype, & + displacement, & + ierror & + ) + type(MPI_Datatype), intent(in) :: datatype + integer(MPI_ADDRESS_KIND), intent(out) :: displacement + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_lb( & + datatype, & + displacement, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_lb + + subroutine MPI_Type_ub( & + datatype, & + displacement, & + ierror & + ) + type(MPI_Datatype), intent(in) :: datatype + integer(MPI_ADDRESS_KIND), intent(out) :: displacement + integer, intent(out), optional :: ierror + integer :: wrap_ierror + call wrapped_MPI_Type_ub( & + datatype, & + displacement, & + wrap_ierror & + ) + if (present(ierror)) ierror = wrap_ierror + end subroutine MPI_Type_ub + +end module mpi_f08_functions diff --git a/mpitrampoline/src/mpi_f08_types.F90 b/mpitrampoline/src/mpi_f08_types.F90 new file mode 100644 index 00000000..74f66a99 --- /dev/null +++ b/mpitrampoline/src/mpi_f08_types.F90 @@ -0,0 +1,86 @@ +module mpi_f08_types + use mpi + + implicit none + private + save + + public :: MPI_Status_f2f08 + public :: MPI_Status_f082f + + ! Handles + + type, bind(C), public :: MPI_Comm + integer :: MPI_VAL + end type MPI_Comm + + type, bind(C), public :: MPI_Datatype + integer :: MPI_VAL + end type MPI_Datatype + + type, bind(C), public :: MPI_Errhandler + integer :: MPI_VAL + end type MPI_Errhandler + + type, bind(C), public :: MPI_File + integer :: MPI_VAL + end type MPI_File + + type, bind(C), public :: MPI_Group + integer :: MPI_VAL + end type MPI_Group + + type, bind(C), public :: MPI_Info + integer :: MPI_VAL + end type MPI_Info + + type, bind(C), public :: MPI_Message + integer :: MPI_VAL + end type MPI_Message + + type, bind(C), public :: MPI_Op + integer :: MPI_VAL + end type MPI_Op + + type, bind(C), public :: MPI_Request + integer :: MPI_VAL + end type MPI_Request + + type, bind(C), public :: MPI_Session + integer :: MPI_VAL + end type MPI_Session + + type, bind(C), public :: MPI_Win + integer :: MPI_VAL + end type MPI_Win + + ! Status + + ! We cannot declare this type as `binc(C)` because Flang has a bug + ! (see ) that + ! requires us to use the `sequence` attribute. + ! type, bind(C), public :: MPI_Status + type, public :: MPI_Status + sequence + integer :: MPI_VAL(MPI_STATUS_SIZE) + end type MPI_Status + +contains + + subroutine MPI_Status_f2f08(f_status, f08_status, ierror) + integer, intent(in) :: f_status(MPI_STATUS_SIZE) + type(MPI_Status), intent(out) :: f08_status + integer, optional, intent(out) :: ierror + f08_status%MPI_VAL = f_status + if (present(ierror)) ierror = MPI_SUCCESS + end subroutine MPI_Status_f2f08 + + subroutine MPI_Status_f082f(f08_status, f_status, ierror) + type(MPI_Status), intent(in) :: f08_status + integer, intent(out) :: f_status(MPI_STATUS_SIZE) + integer, optional, intent(out) :: ierror + f_status = f08_status%MPI_VAL + if (present(ierror)) ierror = MPI_SUCCESS + end subroutine MPI_Status_f082f + +end module mpi_f08_types diff --git a/mpitrampoline/src/mpi_functions.c b/mpitrampoline/src/mpi_functions.c new file mode 100644 index 00000000..599f15ef --- /dev/null +++ b/mpitrampoline/src/mpi_functions.c @@ -0,0 +1,1853 @@ +#include + +// Define MPI functions + +// A.3 C Bindings + +// A.3.1 Point-to-Point Communication C Bindings + +extern inline int MPI_Bsend(const void *buf, int count, MPI_Datatype datatype, + int dest, int tag, MPI_Comm comm); +extern inline int MPI_Bsend_c(const void *buf, MPI_Count count, + MPI_Datatype datatype, int dest, int tag, + MPI_Comm comm); +extern inline int MPI_Bsend_init(const void *buf, int count, + MPI_Datatype datatype, int dest, int tag, + MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Bsend_init_c(const void *buf, MPI_Count count, + MPI_Datatype datatype, int dest, int tag, + MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Buffer_attach(void *buffer, int size); +extern inline int MPI_Buffer_attach_c(void *buffer, MPI_Count size); +extern inline int MPI_Buffer_detach(void *buffer_addr, int *size); +extern inline int MPI_Buffer_detach_c(void *buffer_addr, MPI_Count *size); +extern inline int MPI_Buffer_flush(void); +extern inline int MPI_Buffer_iflush(MPI_Request *request); +extern inline int MPI_Cancel(MPI_Request *request); +extern inline int MPI_Comm_attach_buffer(MPI_Comm comm, void *buffer, int size); +extern inline int MPI_Comm_attach_buffer_c(MPI_Comm comm, void *buffer, + MPI_Count size); +extern inline int MPI_Comm_detach_buffer(MPI_Comm comm, void *buffer_addr, + int *size); +extern inline int MPI_Comm_detach_buffer_c(MPI_Comm comm, void *buffer_addr, + MPI_Count *size); +extern inline int MPI_Comm_flush_buffer(MPI_Comm comm); +extern inline int MPI_Comm_iflush_buffer(MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Get_count(const MPI_Status *status, MPI_Datatype datatype, + int *count); +extern inline int MPI_Get_count_c(const MPI_Status *status, + MPI_Datatype datatype, MPI_Count *count); +extern inline int MPI_Ibsend(const void *buf, int count, MPI_Datatype datatype, + int dest, int tag, MPI_Comm comm, + MPI_Request *request); +extern inline int MPI_Ibsend_c(const void *buf, MPI_Count count, + MPI_Datatype datatype, int dest, int tag, + MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Improbe(int source, int tag, MPI_Comm comm, int *flag, + MPI_Message *message, MPI_Status *status); +extern inline int MPI_Imrecv(void *buf, int count, MPI_Datatype datatype, + MPI_Message *message, MPI_Request *request); +extern inline int MPI_Imrecv_c(void *buf, MPI_Count count, + MPI_Datatype datatype, MPI_Message *message, + MPI_Request *request); +extern inline int MPI_Iprobe(int source, int tag, MPI_Comm comm, int *flag, + MPI_Status *status); +extern inline int MPI_Irecv(void *buf, int count, MPI_Datatype datatype, + int source, int tag, MPI_Comm comm, + MPI_Request *request); +extern inline int MPI_Irecv_c(void *buf, MPI_Count count, MPI_Datatype datatype, + int source, int tag, MPI_Comm comm, + MPI_Request *request); +extern inline int MPI_Irsend(const void *buf, int count, MPI_Datatype datatype, + int dest, int tag, MPI_Comm comm, + MPI_Request *request); +extern inline int MPI_Irsend_c(const void *buf, MPI_Count count, + MPI_Datatype datatype, int dest, int tag, + MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Isend(const void *buf, int count, MPI_Datatype datatype, + int dest, int tag, MPI_Comm comm, + MPI_Request *request); +extern inline int MPI_Isend_c(const void *buf, MPI_Count count, + MPI_Datatype datatype, int dest, int tag, + MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Isendrecv(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, int dest, int sendtag, + void *recvbuf, int recvcount, + MPI_Datatype recvtype, int source, int recvtag, + MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Isendrecv_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, int dest, int sendtag, + void *recvbuf, MPI_Count recvcount, + MPI_Datatype recvtype, int source, + int recvtag, MPI_Comm comm, + MPI_Request *request); +extern inline int MPI_Isendrecv_replace(void *buf, int count, + MPI_Datatype datatype, int dest, + int sendtag, int source, int recvtag, + MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Isendrecv_replace_c(void *buf, MPI_Count count, + MPI_Datatype datatype, int dest, + int sendtag, int source, int recvtag, + MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Issend(const void *buf, int count, MPI_Datatype datatype, + int dest, int tag, MPI_Comm comm, + MPI_Request *request); +extern inline int MPI_Issend_c(const void *buf, MPI_Count count, + MPI_Datatype datatype, int dest, int tag, + MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Mprobe(int source, int tag, MPI_Comm comm, + MPI_Message *message, MPI_Status *status); +extern inline int MPI_Mrecv(void *buf, int count, MPI_Datatype datatype, + MPI_Message *message, MPI_Status *status); +extern inline int MPI_Mrecv_c(void *buf, MPI_Count count, MPI_Datatype datatype, + MPI_Message *message, MPI_Status *status); +extern inline int MPI_Probe(int source, int tag, MPI_Comm comm, + MPI_Status *status); +extern inline int MPI_Recv(void *buf, int count, MPI_Datatype datatype, + int source, int tag, MPI_Comm comm, + MPI_Status *status); +extern inline int MPI_Recv_c(void *buf, MPI_Count count, MPI_Datatype datatype, + int source, int tag, MPI_Comm comm, + MPI_Status *status); +extern inline int MPI_Recv_init(void *buf, int count, MPI_Datatype datatype, + int source, int tag, MPI_Comm comm, + MPI_Request *request); +extern inline int MPI_Recv_init_c(void *buf, MPI_Count count, + MPI_Datatype datatype, int source, int tag, + MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Request_free(MPI_Request *request); +extern inline int MPI_Request_get_status(MPI_Request request, int *flag, + MPI_Status *status); +extern inline int +MPI_Request_get_status_all(int count, const MPI_Request array_of_requests[], + int *flag, MPI_Status array_of_statuses[]); +extern inline int +MPI_Request_get_status_any(int count, const MPI_Request array_of_requests[], + int *index, int *flag, MPI_Status *status); +extern inline int +MPI_Request_get_status_some(int incount, const MPI_Request array_of_requests[], + int *outcount, int array_of_indices[], + MPI_Status array_of_statuses[]); +extern inline int MPI_Rsend(const void *buf, int count, MPI_Datatype datatype, + int dest, int tag, MPI_Comm comm); +extern inline int MPI_Rsend_c(const void *buf, MPI_Count count, + MPI_Datatype datatype, int dest, int tag, + MPI_Comm comm); +extern inline int MPI_Rsend_init(const void *buf, int count, + MPI_Datatype datatype, int dest, int tag, + MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Rsend_init_c(const void *buf, MPI_Count count, + MPI_Datatype datatype, int dest, int tag, + MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Send(const void *buf, int count, MPI_Datatype datatype, + int dest, int tag, MPI_Comm comm); +extern inline int MPI_Send_c(const void *buf, MPI_Count count, + MPI_Datatype datatype, int dest, int tag, + MPI_Comm comm); +extern inline int MPI_Send_init(const void *buf, int count, + MPI_Datatype datatype, int dest, int tag, + MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Send_init_c(const void *buf, MPI_Count count, + MPI_Datatype datatype, int dest, int tag, + MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Sendrecv(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, int dest, int sendtag, + void *recvbuf, int recvcount, + MPI_Datatype recvtype, int source, int recvtag, + MPI_Comm comm, MPI_Status *status); +extern inline int MPI_Sendrecv_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, int dest, int sendtag, + void *recvbuf, MPI_Count recvcount, + MPI_Datatype recvtype, int source, int recvtag, + MPI_Comm comm, MPI_Status *status); +extern inline int MPI_Sendrecv_replace(void *buf, int count, + MPI_Datatype datatype, int dest, + int sendtag, int source, int recvtag, + MPI_Comm comm, MPI_Status *status); +extern inline int MPI_Sendrecv_replace_c(void *buf, MPI_Count count, + MPI_Datatype datatype, int dest, + int sendtag, int source, int recvtag, + MPI_Comm comm, MPI_Status *status); +extern inline int MPI_Session_attach_buffer(MPI_Session session, void *buffer, + int size); +extern inline int MPI_Session_attach_buffer_c(MPI_Session session, void *buffer, + MPI_Count size); +extern inline int MPI_Session_detach_buffer(MPI_Session session, + void *buffer_addr, int *size); +extern inline int MPI_Session_detach_buffer_c(MPI_Session session, + void *buffer_addr, + MPI_Count *size); +extern inline int MPI_Session_flush_buffer(MPI_Session session); +extern inline int MPI_Session_iflush_buffer(MPI_Session session, + MPI_Request *request); +extern inline int MPI_Ssend(const void *buf, int count, MPI_Datatype datatype, + int dest, int tag, MPI_Comm comm); +extern inline int MPI_Ssend_c(const void *buf, MPI_Count count, + MPI_Datatype datatype, int dest, int tag, + MPI_Comm comm); +extern inline int MPI_Ssend_init(const void *buf, int count, + MPI_Datatype datatype, int dest, int tag, + MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Ssend_init_c(const void *buf, MPI_Count count, + MPI_Datatype datatype, int dest, int tag, + MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Start(MPI_Request *request); +extern inline int MPI_Startall(int count, MPI_Request array_of_requests[]); +extern inline int MPI_Status_get_error(MPI_Status *status, int *err); +extern inline int MPI_Status_get_source(MPI_Status *status, int *source); +extern inline int MPI_Status_get_tag(MPI_Status *status, int *tag); +extern inline int MPI_Test(MPI_Request *request, int *flag, MPI_Status *status); +extern inline int MPI_Test_cancelled(const MPI_Status *status, int *flag); +extern inline int MPI_Testall(int count, MPI_Request array_of_requests[], + int *flag, MPI_Status array_of_statuses[]); +extern inline int MPI_Testany(int count, MPI_Request array_of_requests[], + int *index, int *flag, MPI_Status *status); +extern inline int MPI_Testsome(int incount, MPI_Request array_of_requests[], + int *outcount, int array_of_indices[], + MPI_Status array_of_statuses[]); +extern inline int MPI_Wait(MPI_Request *request, MPI_Status *status); +extern inline int MPI_Waitall(int count, MPI_Request array_of_requests[], + MPI_Status array_of_statuses[]); +extern inline int MPI_Waitany(int count, MPI_Request array_of_requests[], + int *index, MPI_Status *status); +extern inline int MPI_Waitsome(int incount, MPI_Request array_of_requests[], + int *outcount, int array_of_indices[], + MPI_Status array_of_statuses[]); + +// A.3.2 Partitioned Communication C Bindings + +extern inline int MPI_Parrived(MPI_Request request, int partition, int *flag); +extern inline int MPI_Pready(int partition, MPI_Request request); +extern inline int MPI_Pready_list(int length, const int array_of_partitions[], + MPI_Request request); +extern inline int MPI_Pready_range(int partition_low, int partition_high, + MPI_Request request); +extern inline int MPI_Precv_init(void *buf, int partitions, MPI_Count count, + MPI_Datatype datatype, int source, int tag, + MPI_Comm comm, MPI_Info info, + MPI_Request *request); +extern inline int MPI_Psend_init(const void *buf, int partitions, + MPI_Count count, MPI_Datatype datatype, + int dest, int tag, MPI_Comm comm, + MPI_Info info, MPI_Request *request); + +// A.3.3 Datatypes C Bindings + +extern inline MPI_Aint MPI_Aint_add(MPI_Aint base, MPI_Aint disp); +extern inline MPI_Aint MPI_Aint_diff(MPI_Aint addr1, MPI_Aint addr2); +extern inline int MPI_Get_address(const void *location, MPI_Aint *address); +extern inline int MPI_Get_elements(const MPI_Status *status, + MPI_Datatype datatype, int *count); +extern inline int MPI_Get_elements_c(const MPI_Status *status, + MPI_Datatype datatype, MPI_Count *count); +extern inline int MPI_Pack(const void *inbuf, int incount, + MPI_Datatype datatype, void *outbuf, int outsize, + int *position, MPI_Comm comm); +extern inline int MPI_Pack_c(const void *inbuf, MPI_Count incount, + MPI_Datatype datatype, void *outbuf, + MPI_Count outsize, MPI_Count *position, + MPI_Comm comm); +extern inline int MPI_Pack_external(const char datarep[], const void *inbuf, + int incount, MPI_Datatype datatype, + void *outbuf, MPI_Aint outsize, + MPI_Aint *position); +extern inline int MPI_Pack_external_c(const char datarep[], const void *inbuf, + MPI_Count incount, MPI_Datatype datatype, + void *outbuf, MPI_Count outsize, + MPI_Count *position); +extern inline int MPI_Pack_external_size(const char datarep[], + MPI_Count incount, + MPI_Datatype datatype, MPI_Aint *size); +extern inline int MPI_Pack_external_size_c(const char datarep[], + MPI_Count incount, + MPI_Datatype datatype, + MPI_Count *size); +extern inline int MPI_Pack_size(int incount, MPI_Datatype datatype, + MPI_Comm comm, int *size); +extern inline int MPI_Pack_size_c(MPI_Count incount, MPI_Datatype datatype, + MPI_Comm comm, MPI_Count *size); +extern inline int MPI_Type_commit(MPI_Datatype *datatype); +extern inline int MPI_Type_contiguous(int count, MPI_Datatype oldtype, + MPI_Datatype *newtype); +extern inline int MPI_Type_contiguous_c(MPI_Count count, MPI_Datatype oldtype, + MPI_Datatype *newtype); +extern inline int MPI_Type_create_darray(int size, int rank, int ndims, + const int array_of_gsizes[], + const int array_of_distribs[], + const int array_of_dargs[], + const int array_of_psizes[], int order, + MPI_Datatype oldtype, + MPI_Datatype *newtype); +extern inline int MPI_Type_create_darray_c(int size, int rank, int ndims, + const MPI_Count array_of_gsizes[], + const int array_of_distribs[], + const int array_of_dargs[], + const int array_of_psizes[], + int order, MPI_Datatype oldtype, + MPI_Datatype *newtype); +extern inline int +MPI_Type_create_hindexed(int count, const int array_of_blocklengths[], + const MPI_Aint array_of_displacements[], + MPI_Datatype oldtype, MPI_Datatype *newtype); +extern inline int +MPI_Type_create_hindexed_block(int count, int blocklength, + const MPI_Aint array_of_displacements[], + MPI_Datatype oldtype, MPI_Datatype *newtype); +extern inline int +MPI_Type_create_hindexed_block_c(MPI_Count count, MPI_Count blocklength, + const MPI_Count array_of_displacements[], + MPI_Datatype oldtype, MPI_Datatype *newtype); +extern inline int +MPI_Type_create_hindexed_c(MPI_Count count, + const MPI_Count array_of_blocklengths[], + const MPI_Count array_of_displacements[], + MPI_Datatype oldtype, MPI_Datatype *newtype); +extern inline int MPI_Type_create_hvector(int count, int blocklength, + MPI_Aint stride, MPI_Datatype oldtype, + MPI_Datatype *newtype); +extern inline int MPI_Type_create_hvector_c(MPI_Count count, + MPI_Count blocklength, + MPI_Count stride, + MPI_Datatype oldtype, + MPI_Datatype *newtype); +extern inline int +MPI_Type_create_indexed_block(int count, int blocklength, + const int array_of_displacements[], + MPI_Datatype oldtype, MPI_Datatype *newtype); +extern inline int +MPI_Type_create_indexed_block_c(MPI_Count count, MPI_Count blocklength, + const MPI_Count array_of_displacements[], + MPI_Datatype oldtype, MPI_Datatype *newtype); +extern inline int MPI_Type_create_resized(MPI_Datatype oldtype, MPI_Aint lb, + MPI_Aint extent, + MPI_Datatype *newtype); +extern inline int MPI_Type_create_resized_c(MPI_Datatype oldtype, MPI_Count lb, + MPI_Count extent, + MPI_Datatype *newtype); +extern inline int +MPI_Type_create_struct(int count, const int array_of_blocklengths[], + const MPI_Aint array_of_displacements[], + const MPI_Datatype array_of_types[], + MPI_Datatype *newtype); +extern inline int MPI_Type_create_struct_c( + MPI_Count count, const MPI_Count array_of_blocklengths[], + const MPI_Count array_of_displacements[], + const MPI_Datatype array_of_types[], MPI_Datatype *newtype); +extern inline int MPI_Type_create_subarray(int ndims, + const int array_of_sizes[], + const int array_of_subsizes[], + const int array_of_starts[], + int order, MPI_Datatype oldtype, + MPI_Datatype *newtype); +extern inline int +MPI_Type_create_subarray_c(int ndims, const MPI_Count array_of_sizes[], + const MPI_Count array_of_subsizes[], + const MPI_Count array_of_starts[], int order, + MPI_Datatype oldtype, MPI_Datatype *newtype); +extern inline int MPI_Type_dup(MPI_Datatype oldtype, MPI_Datatype *newtype); +extern inline int MPI_Type_free(MPI_Datatype *datatype); +extern inline int MPI_Type_get_contents(MPI_Datatype datatype, int max_integers, + int max_addresses, int max_datatypes, + int array_of_integers[], + MPI_Aint array_of_addresses[], + MPI_Datatype array_of_datatypes[]); +extern inline int MPI_Type_get_contents_c( + MPI_Datatype datatype, MPI_Count max_integers, MPI_Count max_addresses, + MPI_Count max_large_counts, MPI_Count max_datatypes, + int array_of_integers[], MPI_Aint array_of_addresses[], + MPI_Count array_of_large_counts[], MPI_Datatype array_of_datatypes[]); +extern inline int MPI_Type_get_envelope(MPI_Datatype datatype, + int *num_integers, int *num_addresses, + int *num_datatypes, int *combiner); +extern inline int +MPI_Type_get_envelope_c(MPI_Datatype datatype, MPI_Count *num_integers, + MPI_Count *num_addresses, MPI_Count *num_large_counts, + MPI_Count *num_datatypes, int *combiner); +extern inline int MPI_Type_get_extent(MPI_Datatype datatype, MPI_Aint *lb, + MPI_Aint *extent); +extern inline int MPI_Type_get_extent_c(MPI_Datatype datatype, MPI_Count *lb, + MPI_Count *extent); +extern inline int MPI_Type_get_true_extent(MPI_Datatype datatype, + MPI_Aint *true_lb, + MPI_Aint *true_extent); +extern inline int MPI_Type_get_true_extent_c(MPI_Datatype datatype, + MPI_Count *true_lb, + MPI_Count *true_extent); +extern inline int MPI_Type_indexed(int count, const int array_of_blocklengths[], + const int array_of_displacements[], + MPI_Datatype oldtype, MPI_Datatype *newtype); +extern inline int MPI_Type_indexed_c(MPI_Count count, + const MPI_Count array_of_blocklengths[], + const MPI_Count array_of_displacements[], + MPI_Datatype oldtype, + MPI_Datatype *newtype); +extern inline int MPI_Type_size(MPI_Datatype datatype, int *size); +extern inline int MPI_Type_size_c(MPI_Datatype datatype, MPI_Count *size); +extern inline int MPI_Type_vector(int count, int blocklength, int stride, + MPI_Datatype oldtype, MPI_Datatype *newtype); +extern inline int MPI_Type_vector_c(MPI_Count count, MPI_Count blocklength, + MPI_Count stride, MPI_Datatype oldtype, + MPI_Datatype *newtype); +extern inline int MPI_Unpack(const void *inbuf, int insize, int *position, + void *outbuf, int outcount, MPI_Datatype datatype, + MPI_Comm comm); +extern inline int MPI_Unpack_c(const void *inbuf, MPI_Count insize, + MPI_Count *position, void *outbuf, + MPI_Count outcount, MPI_Datatype datatype, + MPI_Comm comm); +extern inline int MPI_Unpack_external(const char datarep[], const void *inbuf, + MPI_Aint insize, MPI_Aint *position, + void *outbuf, int outcount, + MPI_Datatype datatype); +extern inline int MPI_Unpack_external_c(const char datarep[], const void *inbuf, + MPI_Count insize, MPI_Count *position, + void *outbuf, MPI_Count outcount, + MPI_Datatype datatype); + +// A.3.4 Collective Communication C Bindings + +extern inline int MPI_Allgather(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, + MPI_Comm comm); +extern inline int MPI_Allgather_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + MPI_Count recvcount, MPI_Datatype recvtype, + MPI_Comm comm); +extern inline int MPI_Allgather_init(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, + MPI_Comm comm, MPI_Info info, + MPI_Request *request); +extern inline int MPI_Allgather_init_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + MPI_Count recvcount, + MPI_Datatype recvtype, MPI_Comm comm, + MPI_Info info, MPI_Request *request); +extern inline int MPI_Allgatherv(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPI_Datatype recvtype, MPI_Comm comm); +extern inline int MPI_Allgatherv_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + const MPI_Count recvcounts[], + const MPI_Aint displs[], + MPI_Datatype recvtype, MPI_Comm comm); +extern inline int MPI_Allgatherv_init(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], + const int displs[], MPI_Datatype recvtype, + MPI_Comm comm, MPI_Info info, + MPI_Request *request); +extern inline int MPI_Allgatherv_init_c( + const void *sendbuf, MPI_Count sendcount, MPI_Datatype sendtype, + void *recvbuf, const MPI_Count recvcounts[], const MPI_Aint displs[], + MPI_Datatype recvtype, MPI_Comm comm, MPI_Info info, MPI_Request *request); +extern inline int MPI_Allreduce(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, + MPI_Comm comm); +extern inline int MPI_Allreduce_c(const void *sendbuf, void *recvbuf, + MPI_Count count, MPI_Datatype datatype, + MPI_Op op, MPI_Comm comm); +extern inline int MPI_Allreduce_init(const void *sendbuf, void *recvbuf, + int count, MPI_Datatype datatype, + MPI_Op op, MPI_Comm comm, MPI_Info info, + MPI_Request *request); +extern inline int MPI_Allreduce_init_c(const void *sendbuf, void *recvbuf, + MPI_Count count, MPI_Datatype datatype, + MPI_Op op, MPI_Comm comm, MPI_Info info, + MPI_Request *request); +extern inline int MPI_Alltoall(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, + MPI_Comm comm); +extern inline int MPI_Alltoall_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + MPI_Count recvcount, MPI_Datatype recvtype, + MPI_Comm comm); +extern inline int MPI_Alltoall_init(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, + MPI_Comm comm, MPI_Info info, + MPI_Request *request); +extern inline int MPI_Alltoall_init_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + MPI_Count recvcount, + MPI_Datatype recvtype, MPI_Comm comm, + MPI_Info info, MPI_Request *request); +extern inline int MPI_Alltoallv(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], + const int rdispls[], MPI_Datatype recvtype, + MPI_Comm comm); +extern inline int +MPI_Alltoallv_c(const void *sendbuf, const MPI_Count sendcounts[], + const MPI_Aint sdispls[], MPI_Datatype sendtype, void *recvbuf, + const MPI_Count recvcounts[], const MPI_Aint rdispls[], + MPI_Datatype recvtype, MPI_Comm comm); +extern inline int MPI_Alltoallv_init(const void *sendbuf, + const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], + const int rdispls[], MPI_Datatype recvtype, + MPI_Comm comm, MPI_Info info, + MPI_Request *request); +extern inline int +MPI_Alltoallv_init_c(const void *sendbuf, const MPI_Count sendcounts[], + const MPI_Aint sdispls[], MPI_Datatype sendtype, + void *recvbuf, const MPI_Count recvcounts[], + const MPI_Aint rdispls[], MPI_Datatype recvtype, + MPI_Comm comm, MPI_Info info, MPI_Request *request); +extern inline int 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[], MPI_Comm comm); +extern inline int MPI_Alltoallw_c( + const void *sendbuf, const MPI_Count sendcounts[], const MPI_Aint sdispls[], + const MPI_Datatype sendtypes[], void *recvbuf, const MPI_Count recvcounts[], + const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], MPI_Comm comm); +extern inline int +MPI_Alltoallw_init(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[], MPI_Comm comm, MPI_Info info, + MPI_Request *request); +extern inline int +MPI_Alltoallw_init_c(const void *sendbuf, const MPI_Count sendcounts[], + const MPI_Aint sdispls[], const MPI_Datatype sendtypes[], + void *recvbuf, const MPI_Count recvcounts[], + const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], + MPI_Comm comm, MPI_Info info, MPI_Request *request); +extern inline int MPI_Barrier(MPI_Comm comm); +extern inline int MPI_Barrier_init(MPI_Comm comm, MPI_Info info, + MPI_Request *request); +extern inline int MPI_Bcast(void *buffer, int count, MPI_Datatype datatype, + int root, MPI_Comm comm); +extern inline int MPI_Bcast_c(void *buffer, MPI_Count count, + MPI_Datatype datatype, int root, MPI_Comm comm); +extern inline int MPI_Bcast_init(void *buffer, int count, MPI_Datatype datatype, + int root, MPI_Comm comm, MPI_Info info, + MPI_Request *request); +extern inline int MPI_Bcast_init_c(void *buffer, MPI_Count count, + MPI_Datatype datatype, int root, + MPI_Comm comm, MPI_Info info, + MPI_Request *request); +extern inline int MPI_Exscan(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPI_Comm comm); +extern inline int MPI_Exscan_c(const void *sendbuf, void *recvbuf, + MPI_Count count, MPI_Datatype datatype, + MPI_Op op, MPI_Comm comm); +extern inline int MPI_Exscan_init(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, + MPI_Comm comm, MPI_Info info, + MPI_Request *request); +extern inline int MPI_Exscan_init_c(const void *sendbuf, void *recvbuf, + MPI_Count count, MPI_Datatype datatype, + MPI_Op op, MPI_Comm comm, MPI_Info info, + MPI_Request *request); +extern inline int MPI_Gather(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, int root, + MPI_Comm comm); +extern inline int MPI_Gather_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + MPI_Count recvcount, MPI_Datatype recvtype, + int root, MPI_Comm comm); +extern inline int MPI_Gather_init(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, + int root, MPI_Comm comm, MPI_Info info, + MPI_Request *request); +extern inline int MPI_Gather_init_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + MPI_Count recvcount, MPI_Datatype recvtype, + int root, MPI_Comm comm, MPI_Info info, + MPI_Request *request); +extern inline int MPI_Gatherv(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPI_Datatype recvtype, int root, MPI_Comm comm); +extern inline int MPI_Gatherv_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + const MPI_Count recvcounts[], + const MPI_Aint displs[], MPI_Datatype recvtype, + int root, MPI_Comm comm); +extern inline int MPI_Gatherv_init(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPI_Datatype recvtype, int root, + MPI_Comm comm, MPI_Info info, + MPI_Request *request); +extern inline int MPI_Gatherv_init_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + const MPI_Count recvcounts[], + const MPI_Aint displs[], + MPI_Datatype recvtype, int root, + MPI_Comm comm, MPI_Info info, + MPI_Request *request); +extern inline int MPI_Iallgather(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, + MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Iallgather_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + MPI_Count recvcount, MPI_Datatype recvtype, + MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Iallgatherv(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPI_Datatype recvtype, MPI_Comm comm, + MPI_Request *request); +extern inline int MPI_Iallgatherv_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + const MPI_Count recvcounts[], + const MPI_Aint displs[], + MPI_Datatype recvtype, MPI_Comm comm, + MPI_Request *request); +extern inline int MPI_Iallreduce(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, + MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Iallreduce_c(const void *sendbuf, void *recvbuf, + MPI_Count count, MPI_Datatype datatype, + MPI_Op op, MPI_Comm comm, + MPI_Request *request); +extern inline int MPI_Ialltoall(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, + MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Ialltoall_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + MPI_Count recvcount, MPI_Datatype recvtype, + MPI_Comm comm, MPI_Request *request); +extern inline int 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, + MPI_Comm comm, MPI_Request *request); +extern inline int +MPI_Ialltoallv_c(const void *sendbuf, const MPI_Count sendcounts[], + const MPI_Aint sdispls[], MPI_Datatype sendtype, void *recvbuf, + const MPI_Count recvcounts[], const MPI_Aint rdispls[], + MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request); +extern inline int 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[], MPI_Comm comm, + MPI_Request *request); +extern inline int +MPI_Ialltoallw_c(const void *sendbuf, const MPI_Count sendcounts[], + const MPI_Aint sdispls[], const MPI_Datatype sendtypes[], + void *recvbuf, const MPI_Count recvcounts[], + const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], + MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Ibarrier(MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Ibcast(void *buffer, int count, MPI_Datatype datatype, + int root, MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Ibcast_c(void *buffer, MPI_Count count, + MPI_Datatype datatype, int root, MPI_Comm comm, + MPI_Request *request); +extern inline int MPI_Iexscan(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, + MPI_Request *request); +extern inline int MPI_Iexscan_c(const void *sendbuf, void *recvbuf, + MPI_Count count, MPI_Datatype datatype, + MPI_Op op, MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Igather(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, int root, + MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Igather_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + MPI_Count recvcount, MPI_Datatype recvtype, + int root, MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Igatherv(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPI_Datatype recvtype, int root, MPI_Comm comm, + MPI_Request *request); +extern inline int MPI_Igatherv_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + const MPI_Count recvcounts[], + const MPI_Aint displs[], MPI_Datatype recvtype, + int root, MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Ireduce(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, int root, + MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Ireduce_c(const void *sendbuf, void *recvbuf, + MPI_Count count, MPI_Datatype datatype, + MPI_Op op, int root, MPI_Comm comm, + MPI_Request *request); +extern inline int MPI_Ireduce_scatter(const void *sendbuf, void *recvbuf, + const int recvcounts[], + MPI_Datatype datatype, MPI_Op op, + MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Ireduce_scatter_block(const void *sendbuf, void *recvbuf, + int recvcount, + MPI_Datatype datatype, MPI_Op op, + MPI_Comm comm, + MPI_Request *request); +extern inline int +MPI_Ireduce_scatter_block_c(const void *sendbuf, void *recvbuf, + MPI_Count recvcount, MPI_Datatype datatype, + MPI_Op op, MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Ireduce_scatter_c(const void *sendbuf, void *recvbuf, + const MPI_Count recvcounts[], + MPI_Datatype datatype, MPI_Op op, + MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Iscan(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, + MPI_Request *request); +extern inline int MPI_Iscan_c(const void *sendbuf, void *recvbuf, + MPI_Count count, MPI_Datatype datatype, MPI_Op op, + MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Iscatter(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, int root, + MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Iscatter_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + MPI_Count recvcount, MPI_Datatype recvtype, + int root, MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Iscatterv(const void *sendbuf, const int sendcounts[], + const int displs[], MPI_Datatype sendtype, + void *recvbuf, int recvcount, + MPI_Datatype recvtype, int root, MPI_Comm comm, + MPI_Request *request); +extern inline int +MPI_Iscatterv_c(const void *sendbuf, const MPI_Count sendcounts[], + const MPI_Aint displs[], MPI_Datatype sendtype, void *recvbuf, + MPI_Count recvcount, MPI_Datatype recvtype, int root, + MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Op_commutative(MPI_Op op, int *commute); +extern inline int MPI_Op_create(MPI_User_function *user_fn, int commute, + MPI_Op *op); +extern inline int MPI_Op_create_c(MPI_User_function_c *user_fn, int commute, + MPI_Op *op); +extern inline int MPI_Op_free(MPI_Op *op); +extern inline int MPI_Reduce(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, int root, + MPI_Comm comm); +extern inline int MPI_Reduce_c(const void *sendbuf, void *recvbuf, + MPI_Count count, MPI_Datatype datatype, + MPI_Op op, int root, MPI_Comm comm); +extern inline int MPI_Reduce_init(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, int root, + MPI_Comm comm, MPI_Info info, + MPI_Request *request); +extern inline int MPI_Reduce_init_c(const void *sendbuf, void *recvbuf, + MPI_Count count, MPI_Datatype datatype, + MPI_Op op, int root, MPI_Comm comm, + MPI_Info info, MPI_Request *request); +extern inline int MPI_Reduce_local(const void *inbuf, void *inoutbuf, int count, + MPI_Datatype datatype, MPI_Op op); +extern inline int MPI_Reduce_local_c(const void *inbuf, void *inoutbuf, + MPI_Count count, MPI_Datatype datatype, + MPI_Op op); +extern inline int MPI_Reduce_scatter(const void *sendbuf, void *recvbuf, + const int recvcounts[], + MPI_Datatype datatype, MPI_Op op, + MPI_Comm comm); +extern inline int MPI_Reduce_scatter_block(const void *sendbuf, void *recvbuf, + int recvcount, MPI_Datatype datatype, + MPI_Op op, MPI_Comm comm); +extern inline int MPI_Reduce_scatter_block_c(const void *sendbuf, void *recvbuf, + MPI_Count recvcount, + MPI_Datatype datatype, MPI_Op op, + MPI_Comm comm); +extern inline int +MPI_Reduce_scatter_block_init(const void *sendbuf, void *recvbuf, int recvcount, + MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, + MPI_Info info, MPI_Request *request); +extern inline int +MPI_Reduce_scatter_block_init_c(const void *sendbuf, void *recvbuf, + MPI_Count recvcount, MPI_Datatype datatype, + MPI_Op op, MPI_Comm comm, MPI_Info info, + MPI_Request *request); +extern inline int MPI_Reduce_scatter_c(const void *sendbuf, void *recvbuf, + const MPI_Count recvcounts[], + MPI_Datatype datatype, MPI_Op op, + MPI_Comm comm); +extern inline int MPI_Reduce_scatter_init(const void *sendbuf, void *recvbuf, + const int recvcounts[], + MPI_Datatype datatype, MPI_Op op, + MPI_Comm comm, MPI_Info info, + MPI_Request *request); +extern inline int MPI_Reduce_scatter_init_c(const void *sendbuf, void *recvbuf, + const MPI_Count recvcounts[], + MPI_Datatype datatype, MPI_Op op, + MPI_Comm comm, MPI_Info info, + MPI_Request *request); +extern inline int MPI_Scan(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPI_Comm comm); +extern inline int MPI_Scan_c(const void *sendbuf, void *recvbuf, + MPI_Count count, MPI_Datatype datatype, MPI_Op op, + MPI_Comm comm); +extern inline int MPI_Scan_init(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, + MPI_Info info, MPI_Request *request); +extern inline int MPI_Scan_init_c(const void *sendbuf, void *recvbuf, + MPI_Count count, MPI_Datatype datatype, + MPI_Op op, MPI_Comm comm, MPI_Info info, + MPI_Request *request); +extern inline int MPI_Scatter(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, int root, + MPI_Comm comm); +extern inline int MPI_Scatter_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + MPI_Count recvcount, MPI_Datatype recvtype, + int root, MPI_Comm comm); +extern inline int MPI_Scatter_init(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, + int root, MPI_Comm comm, MPI_Info info, + MPI_Request *request); +extern inline int MPI_Scatter_init_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + MPI_Count recvcount, MPI_Datatype recvtype, + int root, MPI_Comm comm, MPI_Info info, + MPI_Request *request); +extern inline int MPI_Scatterv(const void *sendbuf, const int sendcounts[], + const int displs[], MPI_Datatype sendtype, + void *recvbuf, int recvcount, + MPI_Datatype recvtype, int root, MPI_Comm comm); +extern inline int MPI_Scatterv_c(const void *sendbuf, + const MPI_Count sendcounts[], + const MPI_Aint displs[], MPI_Datatype sendtype, + void *recvbuf, MPI_Count recvcount, + MPI_Datatype recvtype, int root, + MPI_Comm comm); +extern inline int MPI_Scatterv_init(const void *sendbuf, const int sendcounts[], + const int displs[], MPI_Datatype sendtype, + void *recvbuf, int recvcount, + MPI_Datatype recvtype, int root, + MPI_Comm comm, MPI_Info info, + MPI_Request *request); +extern inline int +MPI_Scatterv_init_c(const void *sendbuf, const MPI_Count sendcounts[], + const MPI_Aint displs[], MPI_Datatype sendtype, + void *recvbuf, MPI_Count recvcount, MPI_Datatype recvtype, + int root, MPI_Comm comm, MPI_Info info, + MPI_Request *request); +extern inline int MPI_Type_get_value_index(MPI_Datatype value_type, + MPI_Datatype index_type, + MPI_Datatype *pair_type); + +// A.3.5 Groups, Contexts, Communicators, and Caching C Bindings + +extern inline int MPI_Comm_compare(MPI_Comm comm1, MPI_Comm comm2, int *result); +extern inline int MPI_Comm_create(MPI_Comm comm, MPI_Group group, + MPI_Comm *newcomm); +extern inline int MPI_Comm_create_from_group(MPI_Group group, + const char *stringtag, + MPI_Info info, + MPI_Errhandler errhandler, + MPI_Comm *newcomm); +extern inline int MPI_Comm_create_group(MPI_Comm comm, MPI_Group group, int tag, + MPI_Comm *newcomm); +extern inline int +MPI_Comm_create_keyval(MPI_Comm_copy_attr_function *comm_copy_attr_fn, + MPI_Comm_delete_attr_function *comm_delete_attr_fn, + int *comm_keyval, void *extra_state); +extern inline int MPI_Comm_delete_attr(MPI_Comm comm, int comm_keyval); +extern inline int MPI_Comm_dup(MPI_Comm comm, MPI_Comm *newcomm); +extern inline int MPI_Comm_dup_with_info(MPI_Comm comm, MPI_Info info, + MPI_Comm *newcomm); +extern inline int MPI_Comm_free(MPI_Comm *comm); +extern inline int MPI_Comm_get_name(MPI_Comm comm, char *comm_name, + int *resultlen); +extern inline int MPI_Comm_free_keyval(int *comm_keyval); +extern inline int MPI_Comm_get_attr(MPI_Comm comm, int comm_keyval, + void *attribute_val, int *flag); +extern inline int MPI_Comm_get_info(MPI_Comm comm, MPI_Info *info_used); +extern inline int MPI_Comm_group(MPI_Comm comm, MPI_Group *group); +extern inline int MPI_Comm_idup(MPI_Comm comm, MPI_Comm *newcomm, + MPI_Request *request); +extern inline int MPI_Comm_idup_with_info(MPI_Comm comm, MPI_Info info, + MPI_Comm *newcomm, + MPI_Request *request); +extern inline int MPI_Comm_rank(MPI_Comm comm, int *rank); +extern inline int MPI_Comm_remote_group(MPI_Comm comm, MPI_Group *group); +extern inline int MPI_Comm_remote_size(MPI_Comm comm, int *size); +extern inline int MPI_Comm_set_attr(MPI_Comm comm, int comm_keyval, + void *attribute_val); +extern inline int MPI_Comm_set_info(MPI_Comm comm, MPI_Info info); +extern inline int MPI_Comm_set_name(MPI_Comm comm, const char *comm_name); +extern inline int MPI_Comm_size(MPI_Comm comm, int *size); +extern inline int MPI_Comm_split(MPI_Comm comm, int color, int key, + MPI_Comm *newcomm); +extern inline int MPI_Group_free(MPI_Group *group); +extern inline int MPI_Comm_split_type(MPI_Comm comm, int split_type, int key, + MPI_Info info, MPI_Comm *newcomm); +extern inline int MPI_Comm_test_inter(MPI_Comm comm, int *flag); +extern inline int MPI_Group_compare(MPI_Group group1, MPI_Group group2, + int *result); +extern inline int MPI_Group_difference(MPI_Group group1, MPI_Group group2, + MPI_Group *newgroup); +extern inline int MPI_Group_excl(MPI_Group group, int n, const int ranks[], + MPI_Group *newgroup); +extern inline int MPI_Group_from_session_pset(MPI_Session session, + const char *pset_name, + MPI_Group *newgroup); +extern inline int MPI_Group_incl(MPI_Group group, int n, const int ranks[], + MPI_Group *newgroup); +extern inline int MPI_Group_intersection(MPI_Group group1, MPI_Group group2, + MPI_Group *newgroup); +extern inline int MPI_Group_range_excl(MPI_Group group, int n, int ranges[][3], + MPI_Group *newgroup); +extern inline int MPI_Group_range_incl(MPI_Group group, int n, int ranges[][3], + MPI_Group *newgroup); +extern inline int MPI_Group_rank(MPI_Group group, int *rank); +extern inline int MPI_Group_size(MPI_Group group, int *size); +extern inline int MPI_Group_translate_ranks(MPI_Group group1, int n, + const int ranks1[], + MPI_Group group2, int ranks2[]); +extern inline int MPI_Group_union(MPI_Group group1, MPI_Group group2, + MPI_Group *newgroup); +extern inline int MPI_Intercomm_create(MPI_Comm local_comm, int local_leader, + MPI_Comm peer_comm, int remote_leader, + int tag, MPI_Comm *newintercomm); +extern inline int MPI_Intercomm_create_from_groups( + MPI_Group local_group, int local_leader, MPI_Group remote_group, + int remote_leader, const char *stringtag, MPI_Info info, + MPI_Errhandler errhandler, MPI_Comm *newintercomm); +extern inline int MPI_Intercomm_merge(MPI_Comm intercomm, int high, + MPI_Comm *newintracomm); +extern inline int +MPI_Type_create_keyval(MPI_Type_copy_attr_function *type_copy_attr_fn, + MPI_Type_delete_attr_function *type_delete_attr_fn, + int *type_keyval, void *extra_state); +extern inline int MPI_Type_delete_attr(MPI_Datatype datatype, int type_keyval); +extern inline int MPI_Type_free_keyval(int *type_keyval); +extern inline int MPI_Type_get_attr(MPI_Datatype datatype, int type_keyval, + void *attribute_val, int *flag); +extern inline int MPI_Type_get_name(MPI_Datatype datatype, char *type_name, + int *resultlen); +extern inline int MPI_Type_set_attr(MPI_Datatype datatype, int type_keyval, + void *attribute_val); +extern inline int MPI_Type_set_name(MPI_Datatype datatype, + const char *type_name); +extern inline int +MPI_Win_create_keyval(MPI_Win_copy_attr_function *win_copy_attr_fn, + MPI_Win_delete_attr_function *win_delete_attr_fn, + int *win_keyval, void *extra_state); +extern inline int MPI_Win_delete_attr(MPI_Win win, int win_keyval); +extern inline int MPI_Win_free_keyval(int *win_keyval); +extern inline int MPI_Win_get_attr(MPI_Win win, int win_keyval, + void *attribute_val, int *flag); +extern inline int MPI_Win_get_name(MPI_Win win, char *win_name, int *resultlen); +extern inline int MPI_Win_set_attr(MPI_Win win, int win_keyval, + void *attribute_val); +extern inline int MPI_Win_set_name(MPI_Win win, const char *win_name); + +// A.3.6 Virtual Topologies for MPI Processes C Bindings + +extern inline int MPI_Cart_coords(MPI_Comm comm, int rank, int maxdims, + int coords[]); +extern inline int MPI_Cart_create(MPI_Comm comm_old, int ndims, + const int dims[], const int periods[], + int reorder, MPI_Comm *comm_cart); +extern inline int MPI_Cart_get(MPI_Comm comm, int maxdims, int dims[], + int periods[], int coords[]); +extern inline int MPI_Cart_map(MPI_Comm comm, int ndims, const int dims[], + const int periods[], int *newrank); +extern inline int MPI_Cart_rank(MPI_Comm comm, const int coords[], int *rank); +extern inline int MPI_Cart_shift(MPI_Comm comm, int direction, int disp, + int *rank_source, int *rank_dest); +extern inline int MPI_Cart_sub(MPI_Comm comm, const int remain_dims[], + MPI_Comm *newcomm); +extern inline int MPI_Cartdim_get(MPI_Comm comm, int *ndims); +extern inline int MPI_Dims_create(int nnodes, int ndims, int dims[]); +extern inline int MPI_Dist_graph_create(MPI_Comm comm_old, int n, + const int sources[], + const int degrees[], + const int destinations[], + const int weights[], MPI_Info info, + int reorder, MPI_Comm *comm_dist_graph); +extern inline int +MPI_Dist_graph_create_adjacent(MPI_Comm comm_old, int indegree, + const int sources[], const int sourceweights[], + int outdegree, const int destinations[], + const int destweights[], MPI_Info info, + int reorder, MPI_Comm *comm_dist_graph); +extern inline int MPI_Dist_graph_neighbors(MPI_Comm comm, int maxindegree, + int sources[], int sourceweights[], + int maxoutdegree, int destinations[], + int destweights[]); +extern inline int MPI_Dist_graph_neighbors_count(MPI_Comm comm, int *indegree, + int *outdegree, int *weighted); +extern inline int MPI_Graph_create(MPI_Comm comm_old, int nnodes, + const int index[], const int edges[], + int reorder, MPI_Comm *comm_graph); +extern inline int MPI_Graph_get(MPI_Comm comm, int maxindex, int maxedges, + int index[], int edges[]); +extern inline int MPI_Graph_map(MPI_Comm comm, int nnodes, const int index[], + const int edges[], int *newrank); +extern inline int MPI_Graph_neighbors(MPI_Comm comm, int rank, int maxneighbors, + int neighbors[]); +extern inline int MPI_Graph_neighbors_count(MPI_Comm comm, int rank, + int *nneighbors); +extern inline int MPI_Graphdims_get(MPI_Comm comm, int *nnodes, int *nedges); +extern inline int MPI_Ineighbor_allgather(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, + MPI_Comm comm, MPI_Request *request); +extern inline int +MPI_Ineighbor_allgather_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + MPI_Count recvcount, MPI_Datatype recvtype, + MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Ineighbor_allgatherv(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], + const int displs[], + MPI_Datatype recvtype, MPI_Comm comm, + MPI_Request *request); +extern inline int MPI_Ineighbor_allgatherv_c( + const void *sendbuf, MPI_Count sendcount, MPI_Datatype sendtype, + void *recvbuf, const MPI_Count recvcounts[], const MPI_Aint displs[], + MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Ineighbor_alltoall(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, + MPI_Comm comm, MPI_Request *request); +extern inline int MPI_Ineighbor_alltoall_c(const void *sendbuf, + MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + MPI_Count recvcount, + MPI_Datatype recvtype, MPI_Comm comm, + MPI_Request *request); +extern inline int +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, + MPI_Comm comm, MPI_Request *request); +extern inline int +MPI_Ineighbor_alltoallv_c(const void *sendbuf, const MPI_Count sendcounts[], + const MPI_Aint sdispls[], MPI_Datatype sendtype, + void *recvbuf, const MPI_Count recvcounts[], + const MPI_Aint rdispls[], MPI_Datatype recvtype, + MPI_Comm comm, MPI_Request *request); +extern inline int 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[], MPI_Comm comm, + MPI_Request *request); +extern inline int MPI_Ineighbor_alltoallw_c( + const void *sendbuf, const MPI_Count sendcounts[], const MPI_Aint sdispls[], + const MPI_Datatype sendtypes[], void *recvbuf, const MPI_Count recvcounts[], + const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], MPI_Comm comm, + MPI_Request *request); +extern inline int MPI_Neighbor_allgather(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, + MPI_Comm comm); +extern inline int MPI_Neighbor_allgather_c( + const void *sendbuf, MPI_Count sendcount, MPI_Datatype sendtype, + void *recvbuf, MPI_Count recvcount, MPI_Datatype recvtype, MPI_Comm comm); +extern inline int +MPI_Neighbor_allgather_init(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, MPI_Comm comm, MPI_Info info, + MPI_Request *request); +extern inline int MPI_Neighbor_allgather_init_c( + const void *sendbuf, MPI_Count sendcount, MPI_Datatype sendtype, + void *recvbuf, MPI_Count recvcount, MPI_Datatype recvtype, MPI_Comm comm, + MPI_Info info, MPI_Request *request); +extern inline int MPI_Neighbor_allgatherv(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], + const int displs[], + MPI_Datatype recvtype, MPI_Comm comm); +extern inline int +MPI_Neighbor_allgatherv_c(const void *sendbuf, MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + const MPI_Count recvcounts[], const MPI_Aint displs[], + MPI_Datatype recvtype, MPI_Comm comm); +extern inline int MPI_Neighbor_allgatherv_init( + const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], MPI_Datatype recvtype, + MPI_Comm comm, MPI_Info info, MPI_Request *request); +extern inline int MPI_Neighbor_allgatherv_init_c( + const void *sendbuf, MPI_Count sendcount, MPI_Datatype sendtype, + void *recvbuf, const MPI_Count recvcounts[], const MPI_Aint displs[], + MPI_Datatype recvtype, MPI_Comm comm, MPI_Info info, MPI_Request *request); +extern inline int MPI_Neighbor_alltoall(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, + MPI_Comm comm); +extern inline int MPI_Neighbor_alltoall_c(const void *sendbuf, + MPI_Count sendcount, + MPI_Datatype sendtype, void *recvbuf, + MPI_Count recvcount, + MPI_Datatype recvtype, MPI_Comm comm); +extern inline int MPI_Neighbor_alltoall_init(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, + void *recvbuf, int recvcount, + MPI_Datatype recvtype, + MPI_Comm comm, MPI_Info info, + MPI_Request *request); +extern inline int MPI_Neighbor_alltoall_init_c( + const void *sendbuf, MPI_Count sendcount, MPI_Datatype sendtype, + void *recvbuf, MPI_Count recvcount, MPI_Datatype recvtype, MPI_Comm comm, + MPI_Info info, MPI_Request *request); +extern inline int 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, MPI_Comm comm); +extern inline int MPI_Neighbor_alltoallv_c( + const void *sendbuf, const MPI_Count sendcounts[], const MPI_Aint sdispls[], + MPI_Datatype sendtype, void *recvbuf, const MPI_Count recvcounts[], + const MPI_Aint rdispls[], MPI_Datatype recvtype, MPI_Comm comm); +extern inline int +MPI_Neighbor_alltoallv_init(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], + const int rdispls[], MPI_Datatype recvtype, + MPI_Comm comm, MPI_Info info, MPI_Request *request); +extern inline int MPI_Neighbor_alltoallv_init_c( + const void *sendbuf, const MPI_Count sendcounts[], const MPI_Aint sdispls[], + MPI_Datatype sendtype, void *recvbuf, const MPI_Count recvcounts[], + const MPI_Aint rdispls[], MPI_Datatype recvtype, MPI_Comm comm, + MPI_Info info, MPI_Request *request); +extern inline int 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[], MPI_Comm comm); +extern inline int MPI_Neighbor_alltoallw_c( + const void *sendbuf, const MPI_Count sendcounts[], const MPI_Aint sdispls[], + const MPI_Datatype sendtypes[], void *recvbuf, const MPI_Count recvcounts[], + const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], MPI_Comm comm); +extern inline int MPI_Neighbor_alltoallw_init( + 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[], MPI_Comm comm, + MPI_Info info, MPI_Request *request); +extern inline int MPI_Neighbor_alltoallw_init_c( + const void *sendbuf, const MPI_Count sendcounts[], const MPI_Aint sdispls[], + const MPI_Datatype sendtypes[], void *recvbuf, const MPI_Count recvcounts[], + const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], MPI_Comm comm, + MPI_Info info, MPI_Request *request); +extern inline int MPI_Topo_test(MPI_Comm comm, int *status); + +// A.3.7 MPI Environmental Management C Bindings + +extern inline int MPI_Add_error_class(int *errorclass); +extern inline int MPI_Add_error_code(int errorclass, int *errorcode); +extern inline int MPI_Add_error_string(int errorcode, const char *string); +extern inline int MPI_Alloc_mem(MPI_Aint size, MPI_Info info, void *baseptr); +extern inline int MPI_Comm_call_errhandler(MPI_Comm comm, int errorcode); +extern inline int +MPI_Comm_create_errhandler(MPI_Comm_errhandler_function *comm_errhandler_fn, + MPI_Errhandler *errhandler); +extern inline int MPI_Comm_get_errhandler(MPI_Comm comm, + MPI_Errhandler *errhandler); +extern inline int MPI_Comm_set_errhandler(MPI_Comm comm, + MPI_Errhandler errhandler); +extern inline int MPI_Errhandler_free(MPI_Errhandler *errhandler); +extern inline int MPI_Error_class(int errorcode, int *errorclass); +extern inline int MPI_Error_string(int errorcode, char *string, int *resultlen); +extern inline int MPI_File_call_errhandler(MPI_File fh, int errorcode); +extern inline int +MPI_File_create_errhandler(MPI_File_errhandler_function *file_errhandler_fn, + MPI_Errhandler *errhandler); +extern inline int MPI_File_get_errhandler(MPI_File file, + MPI_Errhandler *errhandler); +extern inline int MPI_File_set_errhandler(MPI_File file, + MPI_Errhandler errhandler); +extern inline int MPI_Free_mem(void *base); +extern inline int MPI_Get_hw_resource_info(MPI_Info *hw_info); +extern inline int MPI_Get_library_version(char *version, int *resultlen); +extern inline int MPI_Get_processor_name(char *name, int *resultlen); +extern inline int MPI_Get_version(int *version, int *subversion); +extern inline int MPI_Remove_error_class(int errorclass); +extern inline int MPI_Remove_error_code(int errorcode); +extern inline int MPI_Remove_error_string(int errorcode); +extern inline int MPI_Session_call_errhandler(MPI_Session session, + int errorcode); +extern inline int MPI_Session_create_errhandler( + MPI_Session_errhandler_function *session_errhandler_fn, + MPI_Errhandler *errhandler); +extern inline int MPI_Session_get_errhandler(MPI_Session session, + MPI_Errhandler *errhandler); +extern inline int MPI_Session_set_errhandler(MPI_Session session, + MPI_Errhandler errhandler); +extern inline int MPI_Win_call_errhandler(MPI_Win win, int errorcode); +extern inline int +MPI_Win_create_errhandler(MPI_Win_errhandler_function *win_errhandler_fn, + MPI_Errhandler *errhandler); +extern inline int MPI_Win_get_errhandler(MPI_Win win, + MPI_Errhandler *errhandler); +extern inline int MPI_Win_set_errhandler(MPI_Win win, + MPI_Errhandler errhandler); +double MPI_Wtick(void); +double MPI_Wtime(void); + +// A.3.8 The Info Object C Bindings + +extern inline int MPI_Info_create(MPI_Info *info); +extern inline int MPI_Info_create_env(int argc, char *argv[], MPI_Info *info); +extern inline int MPI_Info_delete(MPI_Info info, const char *key); +extern inline int MPI_Info_dup(MPI_Info info, MPI_Info *newinfo); +extern inline int MPI_Info_free(MPI_Info *info); +extern inline int MPI_Info_get_nkeys(MPI_Info info, int *nkeys); +extern inline int MPI_Info_get_nthkey(MPI_Info info, int n, char *key); +extern inline int MPI_Info_get_string(MPI_Info info, const char *key, + int *buflen, char *value, int *flag); +extern inline int MPI_Info_set(MPI_Info info, const char *key, + const char *value); + +// A.3.9 Process Creation and Management C Bindings + +extern inline int MPI_Abort(MPI_Comm comm, int errorcode); +extern inline int MPI_Close_port(const char *port_name); +extern inline int MPI_Comm_accept(const char *port_name, MPI_Info info, + int root, MPI_Comm comm, MPI_Comm *newcomm); +extern inline int MPI_Comm_connect(const char *port_name, MPI_Info info, + int root, MPI_Comm comm, MPI_Comm *newcomm); +extern inline int MPI_Comm_disconnect(MPI_Comm *comm); +extern inline int MPI_Comm_get_parent(MPI_Comm *parent); +extern inline int MPI_Comm_join(int fd, MPI_Comm *intercomm); +extern inline int MPI_Comm_spawn(const char *command, char *argv[], + int maxprocs, MPI_Info info, int root, + MPI_Comm comm, MPI_Comm *intercomm, + int array_of_errcodes[]); +extern inline int +MPI_Comm_spawn_multiple(int count, char *array_of_commands[], + char **array_of_argv[], const int array_of_maxprocs[], + const MPI_Info array_of_info[], int root, MPI_Comm comm, + MPI_Comm *intercomm, int array_of_errcodes[]); +extern inline int MPI_Finalize(void); +extern inline int MPI_Finalized(int *flag); +extern inline int MPI_Init(int *argc, char ***argv); +extern inline int MPI_Init_thread(int *argc, char ***argv, int required, + int *provided); +extern inline int MPI_Initialized(int *flag); +extern inline int MPI_Is_thread_main(int *flag); +extern inline int MPI_Lookup_name(const char *service_name, MPI_Info info, + char *port_name); +extern inline int MPI_Open_port(MPI_Info info, char *port_name); +extern inline int MPI_Publish_name(const char *service_name, MPI_Info info, + const char *port_name); +extern inline int MPI_Query_thread(int *provided); +extern inline int MPI_Session_finalize(MPI_Session *session); +extern inline int MPI_Session_get_info(MPI_Session session, + MPI_Info *info_used); +extern inline int MPI_Session_get_nth_pset(MPI_Session session, MPI_Info info, + int n, int *pset_len, + char *pset_name); +extern inline int MPI_Session_get_num_psets(MPI_Session session, MPI_Info info, + int *npset_names); +extern inline int MPI_Session_get_pset_info(MPI_Session session, + const char *pset_name, + MPI_Info *info); +extern inline int MPI_Session_init(MPI_Info info, MPI_Errhandler errhandler, + MPI_Session *session); +extern inline int MPI_Unpublish_name(const char *service_name, MPI_Info info, + const char *port_name); + +// A.3.10 One-Sided Communications C Bindings + +extern inline int MPI_Accumulate(const void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, int target_count, + MPI_Datatype target_datatype, MPI_Op op, + MPI_Win win); +extern inline int +MPI_Accumulate_c(const void *origin_addr, MPI_Count origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, MPI_Count target_count, + MPI_Datatype target_datatype, MPI_Op op, MPI_Win win); +extern inline int MPI_Compare_and_swap(const void *origin_addr, + const void *compare_addr, + void *result_addr, MPI_Datatype datatype, + int target_rank, MPI_Aint target_disp, + MPI_Win win); +extern inline int MPI_Fetch_and_op(const void *origin_addr, void *result_addr, + MPI_Datatype datatype, int target_rank, + MPI_Aint target_disp, MPI_Op op, + MPI_Win win); +extern inline int MPI_Get(void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, int target_count, + MPI_Datatype target_datatype, MPI_Win win); +extern inline int +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, MPI_Win win); +extern inline int +MPI_Get_accumulate_c(const void *origin_addr, MPI_Count origin_count, + MPI_Datatype origin_datatype, void *result_addr, + MPI_Count result_count, MPI_Datatype result_datatype, + int target_rank, MPI_Aint target_disp, + MPI_Count target_count, MPI_Datatype target_datatype, + MPI_Op op, MPI_Win win); +extern inline int MPI_Get_c(void *origin_addr, MPI_Count origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, MPI_Count target_count, + MPI_Datatype target_datatype, MPI_Win win); +extern inline int MPI_Put(const void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, int target_count, + MPI_Datatype target_datatype, MPI_Win win); +extern inline int MPI_Put_c(const void *origin_addr, MPI_Count origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, MPI_Count target_count, + MPI_Datatype target_datatype, MPI_Win win); +extern inline int MPI_Raccumulate(const void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, int target_count, + MPI_Datatype target_datatype, MPI_Op op, + MPI_Win win, MPI_Request *request); +extern inline int MPI_Raccumulate_c(const void *origin_addr, + MPI_Count origin_count, + MPI_Datatype origin_datatype, + int target_rank, MPI_Aint target_disp, + MPI_Count target_count, + MPI_Datatype target_datatype, MPI_Op op, + MPI_Win win, MPI_Request *request); +extern inline int MPI_Rget(void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, int target_count, + MPI_Datatype target_datatype, MPI_Win win, + MPI_Request *request); +extern inline int MPI_Rget_accumulate( + const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, + void *result_addr, int result_count, MPI_Datatype result_datatype, + int target_rank, MPI_Aint target_disp, int target_count, + MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request *request); +extern inline int +MPI_Rget_accumulate_c(const void *origin_addr, MPI_Count origin_count, + MPI_Datatype origin_datatype, void *result_addr, + MPI_Count result_count, MPI_Datatype result_datatype, + int target_rank, MPI_Aint target_disp, + MPI_Count target_count, MPI_Datatype target_datatype, + MPI_Op op, MPI_Win win, MPI_Request *request); +extern inline int MPI_Rget_c(void *origin_addr, MPI_Count origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, MPI_Count target_count, + MPI_Datatype target_datatype, MPI_Win win, + MPI_Request *request); +extern inline int MPI_Rput(const void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, int target_count, + MPI_Datatype target_datatype, MPI_Win win, + MPI_Request *request); +extern inline int MPI_Rput_c(const void *origin_addr, MPI_Count origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, MPI_Count target_count, + MPI_Datatype target_datatype, MPI_Win win, + MPI_Request *request); +extern inline int MPI_Win_allocate(MPI_Aint size, int disp_unit, MPI_Info info, + MPI_Comm comm, void *baseptr, MPI_Win *win); +extern inline int MPI_Win_allocate_c(MPI_Aint size, MPI_Aint disp_unit, + MPI_Info info, MPI_Comm comm, + void *baseptr, MPI_Win *win); +extern inline int MPI_Win_allocate_shared(MPI_Aint size, int disp_unit, + MPI_Info info, MPI_Comm comm, + void *baseptr, MPI_Win *win); +extern inline int MPI_Win_allocate_shared_c(MPI_Aint size, MPI_Aint disp_unit, + MPI_Info info, MPI_Comm comm, + void *baseptr, MPI_Win *win); +extern inline int MPI_Win_attach(MPI_Win win, void *base, MPI_Aint size); +extern inline int MPI_Win_complete(MPI_Win win); +extern inline int MPI_Win_create(void *base, MPI_Aint size, int disp_unit, + MPI_Info info, MPI_Comm comm, MPI_Win *win); +extern inline int MPI_Win_create_c(void *base, MPI_Aint size, + MPI_Aint disp_unit, MPI_Info info, + MPI_Comm comm, MPI_Win *win); +extern inline int MPI_Win_create_dynamic(MPI_Info info, MPI_Comm comm, + MPI_Win *win); +extern inline int MPI_Win_detach(MPI_Win win, const void *base); +extern inline int MPI_Win_fence(int assert, MPI_Win win); +extern inline int MPI_Win_flush(int rank, MPI_Win win); +extern inline int MPI_Win_flush_all(MPI_Win win); +extern inline int MPI_Win_flush_local(int rank, MPI_Win win); +extern inline int MPI_Win_flush_local_all(MPI_Win win); +extern inline int MPI_Win_free(MPI_Win *win); +extern inline int MPI_Win_get_group(MPI_Win win, MPI_Group *group); +extern inline int MPI_Win_get_info(MPI_Win win, MPI_Info *info_used); +extern inline int MPI_Win_lock(int lock_type, int rank, int assert, + MPI_Win win); +extern inline int MPI_Win_lock_all(int assert, MPI_Win win); +extern inline int MPI_Win_post(MPI_Group group, int assert, MPI_Win win); +extern inline int MPI_Win_set_info(MPI_Win win, MPI_Info info); +extern inline int MPI_Win_shared_query(MPI_Win win, int rank, MPI_Aint *size, + int *disp_unit, void *baseptr); +extern inline int MPI_Win_shared_query_c(MPI_Win win, int rank, MPI_Aint *size, + MPI_Aint *disp_unit, void *baseptr); +extern inline int MPI_Win_start(MPI_Group group, int assert, MPI_Win win); +extern inline int MPI_Win_sync(MPI_Win win); +extern inline int MPI_Win_test(MPI_Win win, int *flag); +extern inline int MPI_Win_unlock(int rank, MPI_Win win); +extern inline int MPI_Win_unlock_all(MPI_Win win); +extern inline int MPI_Win_wait(MPI_Win win); + +// A.3.11 External Interfaces C Bindings + +extern inline int MPI_Grequest_complete(MPI_Request request); +extern inline int MPI_Grequest_start(MPI_Grequest_query_function *query_fn, + MPI_Grequest_free_function *free_fn, + MPI_Grequest_cancel_function *cancel_fn, + void *extra_state, MPI_Request *request); +extern inline int MPI_Status_set_cancelled(MPI_Status *status, int flag); +extern inline int MPI_Status_set_elements(MPI_Status *status, + MPI_Datatype datatype, int count); +extern inline int MPI_Status_set_elements_c(MPI_Status *status, + MPI_Datatype datatype, + MPI_Count count); +extern inline int MPI_Status_set_error(MPI_Status *status, int err); +extern inline int MPI_Status_set_source(MPI_Status *status, int source); +extern inline int MPI_Status_set_tag(MPI_Status *status, int tag); + +// A.3.12 I/O C Bindings + +extern inline int MPI_File_close(MPI_File *fh); +extern inline int MPI_File_delete(const char *filename, MPI_Info info); +extern inline int MPI_File_get_amode(MPI_File fh, int *amode); +extern inline int MPI_File_get_atomicity(MPI_File fh, int *flag); +extern inline int MPI_File_get_byte_offset(MPI_File fh, MPI_Offset offset, + MPI_Offset *disp); +extern inline int MPI_File_get_group(MPI_File fh, MPI_Group *group); +extern inline int MPI_File_get_info(MPI_File fh, MPI_Info *info_used); +extern inline int MPI_File_get_position(MPI_File fh, MPI_Offset *offset); +extern inline int MPI_File_get_position_shared(MPI_File fh, MPI_Offset *offset); +extern inline int MPI_File_get_size(MPI_File fh, MPI_Offset *size); +extern inline int MPI_File_get_type_extent(MPI_File fh, MPI_Datatype datatype, + MPI_Aint *extent); +extern inline int MPI_File_get_type_extent_c(MPI_File fh, MPI_Datatype datatype, + MPI_Count *extent); +extern inline int MPI_File_get_view(MPI_File fh, MPI_Offset *disp, + MPI_Datatype *etype, MPI_Datatype *filetype, + char *datarep); +extern inline int MPI_File_iread(MPI_File fh, void *buf, int count, + MPI_Datatype datatype, MPI_Request *request); +extern inline int MPI_File_iread_all(MPI_File fh, void *buf, int count, + MPI_Datatype datatype, + MPI_Request *request); +extern inline int MPI_File_iread_all_c(MPI_File fh, void *buf, MPI_Count count, + MPI_Datatype datatype, + MPI_Request *request); +extern inline int MPI_File_iread_at(MPI_File fh, MPI_Offset offset, void *buf, + int count, MPI_Datatype datatype, + MPI_Request *request); +extern inline int MPI_File_iread_at_all(MPI_File fh, MPI_Offset offset, + void *buf, int count, + MPI_Datatype datatype, + MPI_Request *request); +extern inline int MPI_File_iread_at_all_c(MPI_File fh, MPI_Offset offset, + void *buf, MPI_Count count, + MPI_Datatype datatype, + MPI_Request *request); +extern inline int MPI_File_iread_at_c(MPI_File fh, MPI_Offset offset, void *buf, + MPI_Count count, MPI_Datatype datatype, + MPI_Request *request); +extern inline int MPI_File_iread_c(MPI_File fh, void *buf, MPI_Count count, + MPI_Datatype datatype, MPI_Request *request); +extern inline int MPI_File_iread_shared(MPI_File fh, void *buf, int count, + MPI_Datatype datatype, + MPI_Request *request); +extern inline int MPI_File_iread_shared_c(MPI_File fh, void *buf, + MPI_Count count, + MPI_Datatype datatype, + MPI_Request *request); +extern inline int MPI_File_iwrite(MPI_File fh, const void *buf, int count, + MPI_Datatype datatype, MPI_Request *request); +extern inline int MPI_File_iwrite_all(MPI_File fh, const void *buf, int count, + MPI_Datatype datatype, + MPI_Request *request); +extern inline int MPI_File_iwrite_all_c(MPI_File fh, const void *buf, + MPI_Count count, MPI_Datatype datatype, + MPI_Request *request); +extern inline int MPI_File_iwrite_at(MPI_File fh, MPI_Offset offset, + const void *buf, int count, + MPI_Datatype datatype, + MPI_Request *request); +extern inline int MPI_File_iwrite_at_all(MPI_File fh, MPI_Offset offset, + const void *buf, int count, + MPI_Datatype datatype, + MPI_Request *request); +extern inline int MPI_File_iwrite_at_all_c(MPI_File fh, MPI_Offset offset, + const void *buf, MPI_Count count, + MPI_Datatype datatype, + MPI_Request *request); +extern inline int MPI_File_iwrite_at_c(MPI_File fh, MPI_Offset offset, + const void *buf, MPI_Count count, + MPI_Datatype datatype, + MPI_Request *request); +extern inline int MPI_File_iwrite_c(MPI_File fh, const void *buf, + MPI_Count count, MPI_Datatype datatype, + MPI_Request *request); +extern inline int MPI_File_iwrite_shared(MPI_File fh, const void *buf, + int count, MPI_Datatype datatype, + MPI_Request *request); +extern inline int MPI_File_iwrite_shared_c(MPI_File fh, const void *buf, + MPI_Count count, + MPI_Datatype datatype, + MPI_Request *request); +extern inline int MPI_File_open(MPI_Comm comm, const char *filename, int amode, + MPI_Info info, MPI_File *fh); +extern inline int MPI_File_preallocate(MPI_File fh, MPI_Offset size); +extern inline int MPI_File_read(MPI_File fh, void *buf, int count, + MPI_Datatype datatype, MPI_Status *status); +extern inline int MPI_File_read_all(MPI_File fh, void *buf, int count, + MPI_Datatype datatype, MPI_Status *status); +extern inline int MPI_File_read_all_begin(MPI_File fh, void *buf, int count, + MPI_Datatype datatype); +extern inline int MPI_File_read_all_begin_c(MPI_File fh, void *buf, + MPI_Count count, + MPI_Datatype datatype); +extern inline int MPI_File_read_all_c(MPI_File fh, void *buf, MPI_Count count, + MPI_Datatype datatype, + MPI_Status *status); +extern inline int MPI_File_read_all_end(MPI_File fh, void *buf, + MPI_Status *status); +extern inline int MPI_File_read_at(MPI_File fh, MPI_Offset offset, void *buf, + int count, MPI_Datatype datatype, + MPI_Status *status); +extern inline int MPI_File_read_at_all(MPI_File fh, MPI_Offset offset, + void *buf, int count, + MPI_Datatype datatype, + MPI_Status *status); +extern inline int MPI_File_read_at_all_begin(MPI_File fh, MPI_Offset offset, + void *buf, int count, + MPI_Datatype datatype); +extern inline int MPI_File_read_at_all_begin_c(MPI_File fh, MPI_Offset offset, + void *buf, MPI_Count count, + MPI_Datatype datatype); +extern inline int MPI_File_read_at_all_c(MPI_File fh, MPI_Offset offset, + void *buf, MPI_Count count, + MPI_Datatype datatype, + MPI_Status *status); +extern inline int MPI_File_read_at_all_end(MPI_File fh, void *buf, + MPI_Status *status); +extern inline int MPI_File_read_at_c(MPI_File fh, MPI_Offset offset, void *buf, + MPI_Count count, MPI_Datatype datatype, + MPI_Status *status); +extern inline int MPI_File_read_c(MPI_File fh, void *buf, MPI_Count count, + MPI_Datatype datatype, MPI_Status *status); +extern inline int MPI_File_read_ordered(MPI_File fh, void *buf, int count, + MPI_Datatype datatype, + MPI_Status *status); +extern inline int MPI_File_read_ordered_begin(MPI_File fh, void *buf, int count, + MPI_Datatype datatype); +extern inline int MPI_File_read_ordered_begin_c(MPI_File fh, void *buf, + MPI_Count count, + MPI_Datatype datatype); +extern inline int MPI_File_read_ordered_c(MPI_File fh, void *buf, + MPI_Count count, + MPI_Datatype datatype, + MPI_Status *status); +extern inline int MPI_File_read_ordered_end(MPI_File fh, void *buf, + MPI_Status *status); +extern inline int MPI_File_read_shared(MPI_File fh, void *buf, int count, + MPI_Datatype datatype, + MPI_Status *status); +extern inline int MPI_File_read_shared_c(MPI_File fh, void *buf, + MPI_Count count, MPI_Datatype datatype, + MPI_Status *status); +extern inline int MPI_File_seek(MPI_File fh, MPI_Offset offset, int whence); +extern inline int MPI_File_seek_shared(MPI_File fh, MPI_Offset offset, + int whence); +extern inline int MPI_File_set_atomicity(MPI_File fh, int flag); +extern inline int MPI_File_set_info(MPI_File fh, MPI_Info info); +extern inline int MPI_File_set_size(MPI_File fh, MPI_Offset size); +extern inline int MPI_File_set_view(MPI_File fh, MPI_Offset disp, + MPI_Datatype etype, MPI_Datatype filetype, + const char *datarep, MPI_Info info); +extern inline int MPI_File_sync(MPI_File fh); +extern inline int MPI_File_write(MPI_File fh, const void *buf, int count, + MPI_Datatype datatype, MPI_Status *status); +extern inline int MPI_File_write_all(MPI_File fh, const void *buf, int count, + MPI_Datatype datatype, MPI_Status *status); +extern inline int MPI_File_write_all_begin(MPI_File fh, const void *buf, + int count, MPI_Datatype datatype); +extern inline int MPI_File_write_all_begin_c(MPI_File fh, const void *buf, + MPI_Count count, + MPI_Datatype datatype); +extern inline int MPI_File_write_all_c(MPI_File fh, const void *buf, + MPI_Count count, MPI_Datatype datatype, + MPI_Status *status); +extern inline int MPI_File_write_all_end(MPI_File fh, const void *buf, + MPI_Status *status); +extern inline int MPI_File_write_at(MPI_File fh, MPI_Offset offset, + const void *buf, int count, + MPI_Datatype datatype, MPI_Status *status); +extern inline int MPI_File_write_at_all(MPI_File fh, MPI_Offset offset, + const void *buf, int count, + MPI_Datatype datatype, + MPI_Status *status); +extern inline int MPI_File_write_at_all_begin(MPI_File fh, MPI_Offset offset, + const void *buf, int count, + MPI_Datatype datatype); +extern inline int MPI_File_write_at_all_begin_c(MPI_File fh, MPI_Offset offset, + const void *buf, + MPI_Count count, + MPI_Datatype datatype); +extern inline int MPI_File_write_at_all_c(MPI_File fh, MPI_Offset offset, + const void *buf, MPI_Count count, + MPI_Datatype datatype, + MPI_Status *status); +extern inline int MPI_File_write_at_all_end(MPI_File fh, const void *buf, + MPI_Status *status); +extern inline int MPI_File_write_at_c(MPI_File fh, MPI_Offset offset, + const void *buf, MPI_Count count, + MPI_Datatype datatype, + MPI_Status *status); +extern inline int MPI_File_write_c(MPI_File fh, const void *buf, + MPI_Count count, MPI_Datatype datatype, + MPI_Status *status); +extern inline int MPI_File_write_ordered(MPI_File fh, const void *buf, + int count, MPI_Datatype datatype, + MPI_Status *status); +extern inline int MPI_File_write_ordered_begin(MPI_File fh, const void *buf, + int count, + MPI_Datatype datatype); +extern inline int MPI_File_write_ordered_begin_c(MPI_File fh, const void *buf, + MPI_Count count, + MPI_Datatype datatype); +extern inline int MPI_File_write_ordered_c(MPI_File fh, const void *buf, + MPI_Count count, + MPI_Datatype datatype, + MPI_Status *status); +extern inline int MPI_File_write_ordered_end(MPI_File fh, const void *buf, + MPI_Status *status); +extern inline int MPI_File_write_shared(MPI_File fh, const void *buf, int count, + MPI_Datatype datatype, + MPI_Status *status); +extern inline int MPI_File_write_shared_c(MPI_File fh, const void *buf, + MPI_Count count, + MPI_Datatype datatype, + MPI_Status *status); +extern inline int MPI_Register_datarep( + const char *datarep, MPI_Datarep_conversion_function *read_conversion_fn, + MPI_Datarep_conversion_function *write_conversion_fn, + MPI_Datarep_extent_function *dtype_file_extent_fn, void *extra_state); +extern inline int MPI_Register_datarep_c( + const char *datarep, MPI_Datarep_conversion_function_c *read_conversion_fn, + MPI_Datarep_conversion_function_c *write_conversion_fn, + MPI_Datarep_extent_function *dtype_file_extent_fn, void *extra_state); + +// A.3.13 Language Bindings C Bindings + +extern inline MPI_Fint MPI_Comm_c2f(MPI_Comm comm); +extern inline MPI_Comm MPI_Comm_f2c(MPI_Fint comm); +extern inline MPI_Fint MPI_Errhandler_c2f(MPI_Errhandler errhandler); +extern inline MPI_Errhandler MPI_Errhandler_f2c(MPI_Fint errhandler); +extern inline MPI_Fint MPI_File_c2f(MPI_File file); +extern inline MPI_File MPI_File_f2c(MPI_Fint file); +extern inline MPI_Fint MPI_Group_c2f(MPI_Group group); +extern inline MPI_Group MPI_Group_f2c(MPI_Fint group); +extern inline MPI_Fint MPI_Info_c2f(MPI_Info info); +extern inline MPI_Info MPI_Info_f2c(MPI_Fint info); +extern inline MPI_Fint MPI_Message_c2f(MPI_Message message); +extern inline MPI_Message MPI_Message_f2c(MPI_Fint message); +extern inline MPI_Fint MPI_Op_c2f(MPI_Op op); +extern inline MPI_Op MPI_Op_f2c(MPI_Fint op); +extern inline MPI_Fint MPI_Request_c2f(MPI_Request request); +extern inline MPI_Request MPI_Request_f2c(MPI_Fint request); +extern inline MPI_Fint MPI_Session_c2f(MPI_Session session); +extern inline MPI_Session MPI_Session_f2c(MPI_Fint session); +extern inline int MPI_Status_f082f(const MPI_F08_status *f08_status, + MPI_Fint *f_status); +extern inline int MPI_Status_c2f(const MPI_Status *c_status, + MPI_Fint *f_status); +extern inline int MPI_Status_c2f08(const MPI_Status *c_status, + MPI_F08_status *f08_status); +extern inline int MPI_Status_f082c(const MPI_F08_status *f08_status, + MPI_Status *c_status); +extern inline int MPI_Status_f2c(const MPI_Fint *f_status, + MPI_Status *c_status); +extern inline int MPI_Status_f2f08(const MPI_Fint *f_status, + MPI_F08_status *f08_status); +extern inline MPI_Fint MPI_Type_c2f(MPI_Datatype datatype); +extern inline int MPI_Type_create_f90_complex(int p, int r, + MPI_Datatype *newtype); +extern inline int MPI_Type_create_f90_integer(int r, MPI_Datatype *newtype); +extern inline int MPI_Type_create_f90_real(int p, int r, MPI_Datatype *newtype); +extern inline MPI_Datatype MPI_Type_f2c(MPI_Fint datatype); +extern inline int MPI_Type_match_size(int typeclass, int size, + MPI_Datatype *datatype); +extern inline MPI_Fint MPI_Win_c2f(MPI_Win win); +extern inline MPI_Win MPI_Win_f2c(MPI_Fint win); + +// A.3.14 Tools / Profiling Interface C Bindings + +extern inline int MPI_Pcontrol(const int level, ...); + +// A.3.15 Tools / MPI Tool Information Interface C Bindings + +extern inline int MPI_T_category_changed(int *update_number); +extern inline int MPI_T_category_get_categories(int cat_index, int len, + int indices[]); +extern inline int MPI_T_category_get_cvars(int cat_index, int len, + int indices[]); +extern inline int MPI_T_category_get_events(int cat_index, int len, + int indices[]); +extern inline int MPI_T_category_get_index(const char *name, int *cat_index); +extern inline int MPI_T_category_get_info(int cat_index, char *name, + int *name_len, char *desc, + int *desc_len, int *num_cvars, + int *num_pvars, int *num_categories); +extern inline int MPI_T_category_get_num(int *num_cat); +extern inline int MPI_T_category_get_num_events(int cat_index, int *num_events); +extern inline int MPI_T_category_get_pvars(int cat_index, int len, + int indices[]); +extern inline int MPI_T_cvar_get_index(const char *name, int *cvar_index); +// extern inline int MPI_T_cvar_get_info(int cvar_index, char *name, int +// *name_len, +// int *verbosity, MPI_Datatype *datatype, +// MPI_T_enum *enumtype, char *desc, +// int *desc_len, int *bind, int *scope); +extern inline int MPI_T_cvar_get_num(int *num_cvar); +// extern inline int MPI_T_cvar_handle_alloc(int cvar_index, void *obj_handle, +// MPI_T_cvar_handle *handle, +// int *count); +// extern inline int MPI_T_cvar_handle_free(MPI_T_cvar_handle *handle); +// extern inline int MPI_T_cvar_read(MPI_T_cvar_handle handle, void *buf); +// extern inline int MPI_T_cvar_write(MPI_T_cvar_handle handle, const void +// *buf); extern inline int MPI_T_enum_get_info(MPI_T_enum enumtype, int *num, +// char *name, +// int *name_len); +// extern inline int MPI_T_enum_get_item(MPI_T_enum enumtype, int index, +// int *value, char *name, int *name_len); +// extern inline int +// MPI_T_event_callback_get_info(MPI_T_event_registration event_registration, +// MPI_T_cb_safety cb_safety, MPI_Info +// *info_used); +// extern inline int +// MPI_T_event_callback_set_info(MPI_T_event_registration event_registration, +// MPI_T_cb_safety cb_safety, MPI_Info info); +// extern inline int MPI_T_event_copy(MPI_T_event_instance event_instance, +// void *buffer); +extern inline int MPI_T_event_get_index(const char *name, int *event_index); +// extern inline int MPI_T_event_get_info(int event_index, char *name, +// int *name_len, int *verbosity, +// MPI_Datatype array_of_datatypes[], +// MPI_Aint array_of_displacements[], +// int *num_elements, MPI_T_enum +// *enumtype, MPI_Info *info, char *desc, +// int *desc_len, int *bind); +extern inline int MPI_T_event_get_num(int *num_events); +// extern inline int MPI_T_event_get_source(MPI_T_event_instance event_instance, +// int *source_index); +// extern inline int MPI_T_event_get_timestamp(MPI_T_event_instance +// event_instance, +// MPI_Count *event_timestamp); +// extern inline int +// MPI_T_event_handle_alloc(int event_index, void *obj_handle, MPI_Info info, +// MPI_T_event_registration *event_registration); +// extern inline int +// MPI_T_event_handle_free(MPI_T_event_registration event_registration, +// void *user_data, +// MPI_T_event_free_cb_function free_cb_function); +// extern inline int +// MPI_T_event_handle_get_info(MPI_T_event_registration event_registration, +// MPI_Info *info_used); +// extern inline int +// MPI_T_event_handle_set_info(MPI_T_event_registration event_registration, +// MPI_Info info); +// extern inline int MPI_T_event_read(MPI_T_event_instance event_instance, +// int element_index, void *buffer); +// extern inline int MPI_T_event_register_callback( +// MPI_T_event_registration event_registration, MPI_T_cb_safety cb_safety, +// MPI_Info info, void *user_data, MPI_T_event_cb_function +// event_cb_function); +// extern inline int MPI_T_event_set_dropped_handler( +// MPI_T_event_registration event_registration, +// MPI_T_event_dropped_cb_function dropped_cb_function); +extern inline int MPI_T_finalize(void); +extern inline int MPI_T_init_thread(int required, int *provided); +extern inline int MPI_T_pvar_get_index(const char *name, int var_class, + int *pvar_index); +// extern inline int MPI_T_pvar_get_info(int pvar_index, char *name, int +// *name_len, +// int *verbosity, int *var_class, +// MPI_Datatype *datatype, MPI_T_enum +// *enumtype, char *desc, int *desc_len, int *bind, +// int *readonly, int *continuous, int *atomic); +extern inline int MPI_T_pvar_get_num(int *num_pvar); +// extern inline int MPI_T_pvar_handle_alloc(MPI_T_pvar_session pe_session, int +// pvar_index, +// void *obj_handle, MPI_T_pvar_handle +// *handle, int *count); +// extern inline int MPI_T_pvar_handle_free(MPI_T_pvar_session pe_session, +// MPI_T_pvar_handle *handle); +// extern inline int MPI_T_pvar_read(MPI_T_pvar_session pe_session, +// MPI_T_pvar_handle handle, void *buf); +// extern inline int MPI_T_pvar_readreset(MPI_T_pvar_session pe_session, +// MPI_T_pvar_handle handle, void *buf); +// extern inline int MPI_T_pvar_reset(MPI_T_pvar_session pe_session, +// MPI_T_pvar_handle handle); +// extern inline int MPI_T_pvar_session_create(MPI_T_pvar_session *pe_session); +// extern inline int MPI_T_pvar_session_free(MPI_T_pvar_session *pe_session); +// extern inline int MPI_T_pvar_start(MPI_T_pvar_session pe_session, +// MPI_T_pvar_handle handle); +// extern inline int MPI_T_pvar_stop(MPI_T_pvar_session pe_session, +// MPI_T_pvar_handle handle); +// extern inline int MPI_T_pvar_write(MPI_T_pvar_session pe_session, +// MPI_T_pvar_handle handle, const void *buf); +// extern inline int MPI_T_source_get_info(int source_index, char *name, int +// *name_len, +// char *desc, int *desc_len, +// MPI_T_source_order *ordering, +// MPI_Count *ticks_per_second, +// MPI_Count *max_ticks, MPI_Info *info); +extern inline int MPI_T_source_get_num(int *num_sources); +extern inline int MPI_T_source_get_timestamp(int source_index, + MPI_Count *timestamp); + +// A.3.16 Deprecated C Bindings + +extern inline int MPI_Attr_delete(MPI_Comm comm, int keyval); +extern inline int MPI_Attr_get(MPI_Comm comm, int keyval, void *attribute_val, + int *flag); +extern inline int MPI_Attr_put(MPI_Comm comm, int keyval, void *attribute_val); +extern inline int MPI_Get_elements_x(const MPI_Status *status, + MPI_Datatype datatype, MPI_Count *count); +extern inline int MPI_Info_get(MPI_Info info, const char *key, int valuelen, + char *value, int *flag); +extern inline int MPI_Info_get_valuelen(MPI_Info info, const char *key, + int *valuelen, int *flag); +extern inline int MPI_Keyval_create(MPI_Copy_function *copy_fn, + MPI_Delete_function *delete_fn, int *keyval, + void *extra_state); +extern inline int MPI_Keyval_free(int *keyval); +extern inline int MPI_Status_set_elements_x(MPI_Status *status, + MPI_Datatype datatype, + MPI_Count count); +extern inline int MPI_Type_get_extent_x(MPI_Datatype datatype, MPI_Count *lb, + MPI_Count *extent); +extern inline int MPI_Type_get_true_extent_x(MPI_Datatype datatype, + MPI_Count *true_lb, + MPI_Count *true_extent); +extern inline int MPI_Type_size_x(MPI_Datatype datatype, MPI_Count *size); + +// Removed C Bindings + +extern inline int MPI_Address(void *location, MPI_Aint *address); +extern inline int MPI_Type_hindexed(int count, int *array_of_blocklengths, + MPI_Aint *array_of_displacements, + MPI_Datatype oldtype, + MPI_Datatype *newtype); +extern inline int MPI_Type_hvector(int count, int blocklength, MPI_Aint stride, + MPI_Datatype oldtype, MPI_Datatype *newtype); +extern inline int MPI_Type_struct(int count, int *array_of_blocklengths, + MPI_Aint *array_of_displacements, + MPI_Datatype *array_of_types, + MPI_Datatype *newtype); +extern inline int MPI_Type_extent(MPI_Datatype datatype, MPI_Aint *extent); +extern inline int MPI_Type_lb(MPI_Datatype datatype, MPI_Aint *displacement); +extern inline int MPI_Type_ub(MPI_Datatype datatype, MPI_Aint *displacement); + +// MPIX + +extern inline int MPIX_Query_cuda_support(void); +extern inline int MPIX_Query_hip_support(void); +extern inline int MPIX_Query_rocm_support(void); +extern inline int MPIX_Query_ze_support(void); diff --git a/mpitrampoline/src/mpi_functions_fortran.c b/mpitrampoline/src/mpi_functions_fortran.c new file mode 100644 index 00000000..c638e13d --- /dev/null +++ b/mpitrampoline/src/mpi_functions_fortran.c @@ -0,0 +1,7141 @@ +// MPI Fortran function wrappers + +// This file has been generated automatically +// by `mpitrampoline/generate_trampoline.jl`. +// Do not modify this file, changes will be overwritten. + +#include +#include + +void mpi_bsend_( + const void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + const MPI_Fint *dest, + const MPI_Fint *tag, + const MPI_Fint *comm, + MPI_Fint *ierror +) { + return (*mpiabi_bsend_ptr)( + buf, + count, + datatype, + dest, + tag, + comm, + ierror + ); +} + +void mpi_bsend_init_( + const void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + const MPI_Fint *dest, + const MPI_Fint *tag, + const MPI_Fint *comm, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_bsend_init_ptr)( + buf, + count, + datatype, + dest, + tag, + comm, + request, + ierror + ); +} + +void mpi_buffer_attach_( + void *buffer, + const MPI_Fint *size, + MPI_Fint *ierror +) { + return (*mpiabi_buffer_attach_ptr)( + buffer, + size, + ierror + ); +} + +void mpi_buffer_detach_( + MPI_Aint *buffer_addr, + MPI_Fint *size, + MPI_Fint *ierror +) { + return (*mpiabi_buffer_detach_ptr)( + buffer_addr, + size, + ierror + ); +} + +void mpi_buffer_flush_( + MPI_Fint *ierror +) { + return (*mpiabi_buffer_flush_ptr)( + ierror + ); +} + +void mpi_buffer_iflush_( + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_buffer_iflush_ptr)( + request, + ierror + ); +} + +void mpi_cancel_( + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_cancel_ptr)( + request, + ierror + ); +} + +void mpi_comm_attach_buffer_( + const MPI_Fint *comm, + const void *buffer, + const MPI_Fint *size, + MPI_Fint *ierror +) { + return (*mpiabi_comm_attach_buffer_ptr)( + comm, + buffer, + size, + ierror + ); +} + +void mpi_comm_detach_buffer_( + const MPI_Fint *comm, + MPI_Aint *buffer_addr, + MPI_Fint *size, + MPI_Fint *ierror +) { + return (*mpiabi_comm_detach_buffer_ptr)( + comm, + buffer_addr, + size, + ierror + ); +} + +void mpi_comm_flush_buffer_( + const MPI_Fint *comm, + MPI_Fint *ierror +) { + return (*mpiabi_comm_flush_buffer_ptr)( + comm, + ierror + ); +} + +void mpi_comm_iflush_buffer_( + const MPI_Fint *comm, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_comm_iflush_buffer_ptr)( + comm, + request, + ierror + ); +} + +void mpi_get_count_( + const MPI_Fint *status[MPI_F_STATUS_SIZE], + const MPI_Fint *datatype, + MPI_Fint *count, + MPI_Fint *ierror +) { + return (*mpiabi_get_count_ptr)( + status, + datatype, + count, + ierror + ); +} + +void mpi_ibsend_( + const void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + const MPI_Fint *dest, + const MPI_Fint *tag, + const MPI_Fint *comm, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_ibsend_ptr)( + buf, + count, + datatype, + dest, + tag, + comm, + request, + ierror + ); +} + +void mpi_improbe_( + const MPI_Fint *source, + const MPI_Fint *tag, + const MPI_Fint *comm, + MPI_Fint *flag, + MPI_Fint *message, + MPI_Fint *status[MPI_F_STATUS_SIZE], + MPI_Fint *ierror +) { + return (*mpiabi_improbe_ptr)( + source, + tag, + comm, + flag, + message, + status, + ierror + ); +} + +void mpi_imrecv_( + void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + MPI_Fint *message, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_imrecv_ptr)( + buf, + count, + datatype, + message, + request, + ierror + ); +} + +void mpi_iprobe_( + const MPI_Fint *source, + const MPI_Fint *tag, + const MPI_Fint *comm, + MPI_Fint *flag, + MPI_Fint *status[MPI_F_STATUS_SIZE], + MPI_Fint *ierror +) { + return (*mpiabi_iprobe_ptr)( + source, + tag, + comm, + flag, + status, + ierror + ); +} + +void mpi_irecv_( + void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + const MPI_Fint *source, + const MPI_Fint *tag, + const MPI_Fint *comm, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_irecv_ptr)( + buf, + count, + datatype, + source, + tag, + comm, + request, + ierror + ); +} + +void mpi_irsend_( + const void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + const MPI_Fint *dest, + const MPI_Fint *tag, + const MPI_Fint *comm, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_irsend_ptr)( + buf, + count, + datatype, + dest, + tag, + comm, + request, + ierror + ); +} + +void mpi_isend_( + const void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + const MPI_Fint *dest, + const MPI_Fint *tag, + const MPI_Fint *comm, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_isend_ptr)( + buf, + count, + datatype, + dest, + tag, + comm, + request, + ierror + ); +} + +void mpi_isendrecv_( + const void *sendbuf, + const MPI_Fint *sendcount, + const MPI_Fint *sendtype, + const MPI_Fint *dest, + const MPI_Fint *sendtag, + void *recvbuf, + const MPI_Fint *recvcount, + const MPI_Fint *recvtype, + const MPI_Fint *source, + const MPI_Fint *recvtag, + const MPI_Fint *comm, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_isendrecv_ptr)( + sendbuf, + sendcount, + sendtype, + dest, + sendtag, + recvbuf, + recvcount, + recvtype, + source, + recvtag, + comm, + request, + ierror + ); +} + +void mpi_isendrecv_replace_( + void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + const MPI_Fint *dest, + const MPI_Fint *sendtag, + const MPI_Fint *source, + const MPI_Fint *recvtag, + const MPI_Fint *comm, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_isendrecv_replace_ptr)( + buf, + count, + datatype, + dest, + sendtag, + source, + recvtag, + comm, + request, + ierror + ); +} + +void mpi_issend_( + const void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + const MPI_Fint *dest, + const MPI_Fint *tag, + const MPI_Fint *comm, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_issend_ptr)( + buf, + count, + datatype, + dest, + tag, + comm, + request, + ierror + ); +} + +void mpi_mprobe_( + const MPI_Fint *source, + const MPI_Fint *tag, + const MPI_Fint *comm, + MPI_Fint *message, + MPI_Fint *status[MPI_F_STATUS_SIZE], + MPI_Fint *ierror +) { + return (*mpiabi_mprobe_ptr)( + source, + tag, + comm, + message, + status, + ierror + ); +} + +void mpi_mrecv_( + void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + MPI_Fint *message, + MPI_Fint *status[MPI_F_STATUS_SIZE], + MPI_Fint *ierror +) { + return (*mpiabi_mrecv_ptr)( + buf, + count, + datatype, + message, + status, + ierror + ); +} + +void mpi_probe_( + const MPI_Fint *source, + const MPI_Fint *tag, + const MPI_Fint *comm, + MPI_Fint *status[MPI_F_STATUS_SIZE], + MPI_Fint *ierror +) { + return (*mpiabi_probe_ptr)( + source, + tag, + comm, + status, + ierror + ); +} + +void mpi_recv_( + void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + const MPI_Fint *source, + const MPI_Fint *tag, + const MPI_Fint *comm, + MPI_Fint *status[MPI_F_STATUS_SIZE], + MPI_Fint *ierror +) { + return (*mpiabi_recv_ptr)( + buf, + count, + datatype, + source, + tag, + comm, + status, + ierror + ); +} + +void mpi_recv_init_( + void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + const MPI_Fint *source, + const MPI_Fint *tag, + const MPI_Fint *comm, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_recv_init_ptr)( + buf, + count, + datatype, + source, + tag, + comm, + request, + ierror + ); +} + +void mpi_request_free_( + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_request_free_ptr)( + request, + ierror + ); +} + +void mpi_request_get_status_( + const MPI_Fint *request, + MPI_Fint *flag, + MPI_Fint *status[MPI_F_STATUS_SIZE], + MPI_Fint *ierror +) { + return (*mpiabi_request_get_status_ptr)( + request, + flag, + status, + ierror + ); +} + +void mpi_request_get_status_all_( + const MPI_Fint *count, + const MPI_Fint *array_of_requests, + MPI_Fint *flag, + MPI_Fint *array_of_statuses[MPI_F_STATUS_SIZE], + MPI_Fint *ierror +) { + return (*mpiabi_request_get_status_all_ptr)( + count, + array_of_requests, + flag, + array_of_statuses, + ierror + ); +} + +void mpi_request_get_status_any_( + const MPI_Fint *count, + const MPI_Fint *array_of_requests, + MPI_Fint *index, + MPI_Fint *flag, + MPI_Fint *status[MPI_F_STATUS_SIZE], + MPI_Fint *ierror +) { + return (*mpiabi_request_get_status_any_ptr)( + count, + array_of_requests, + index, + flag, + status, + ierror + ); +} + +void mpi_request_get_status_some_( + const MPI_Fint *incount, + const MPI_Fint *array_of_requests, + MPI_Fint *outcount, + MPI_Fint *array_of_indices, + MPI_Fint *array_of_statuses[MPI_F_STATUS_SIZE], + MPI_Fint *ierror +) { + return (*mpiabi_request_get_status_some_ptr)( + incount, + array_of_requests, + outcount, + array_of_indices, + array_of_statuses, + ierror + ); +} + +void mpi_rsend_( + const void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + const MPI_Fint *dest, + const MPI_Fint *tag, + const MPI_Fint *comm, + MPI_Fint *ierror +) { + return (*mpiabi_rsend_ptr)( + buf, + count, + datatype, + dest, + tag, + comm, + ierror + ); +} + +void mpi_rsend_init_( + const void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + const MPI_Fint *dest, + const MPI_Fint *tag, + const MPI_Fint *comm, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_rsend_init_ptr)( + buf, + count, + datatype, + dest, + tag, + comm, + request, + ierror + ); +} + +void mpi_send_( + const void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + const MPI_Fint *dest, + const MPI_Fint *tag, + const MPI_Fint *comm, + MPI_Fint *ierror +) { + return (*mpiabi_send_ptr)( + buf, + count, + datatype, + dest, + tag, + comm, + ierror + ); +} + +void mpi_send_init_( + const void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + const MPI_Fint *dest, + const MPI_Fint *tag, + const MPI_Fint *comm, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_send_init_ptr)( + buf, + count, + datatype, + dest, + tag, + comm, + request, + ierror + ); +} + +void mpi_sendrecv_( + const void *sendbuf, + const MPI_Fint *sendcount, + const MPI_Fint *sendtype, + const MPI_Fint *dest, + const MPI_Fint *sendtag, + void *recvbuf, + const MPI_Fint *recvcount, + const MPI_Fint *recvtype, + const MPI_Fint *source, + const MPI_Fint *recvtag, + const MPI_Fint *comm, + MPI_Fint *status[MPI_F_STATUS_SIZE], + MPI_Fint *ierror +) { + return (*mpiabi_sendrecv_ptr)( + sendbuf, + sendcount, + sendtype, + dest, + sendtag, + recvbuf, + recvcount, + recvtype, + source, + recvtag, + comm, + status, + ierror + ); +} + +void mpi_sendrecv_replace_( + void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + const MPI_Fint *dest, + const MPI_Fint *sendtag, + const MPI_Fint *source, + const MPI_Fint *recvtag, + const MPI_Fint *comm, + MPI_Fint *status[MPI_F_STATUS_SIZE], + MPI_Fint *ierror +) { + return (*mpiabi_sendrecv_replace_ptr)( + buf, + count, + datatype, + dest, + sendtag, + source, + recvtag, + comm, + status, + ierror + ); +} + +void mpi_session_attach_buffer_( + const MPI_Fint *session, + const void *buffer, + const MPI_Fint *size, + MPI_Fint *ierror +) { + return (*mpiabi_session_attach_buffer_ptr)( + session, + buffer, + size, + ierror + ); +} + +void mpi_session_detach_buffer_( + const MPI_Fint *session, + MPI_Aint *buffer_addr, + MPI_Fint *size, + MPI_Fint *ierror +) { + return (*mpiabi_session_detach_buffer_ptr)( + session, + buffer_addr, + size, + ierror + ); +} + +void mpi_session_flush_buffer_( + const MPI_Fint *session, + MPI_Fint *ierror +) { + return (*mpiabi_session_flush_buffer_ptr)( + session, + ierror + ); +} + +void mpi_session_iflush_buffer_( + const MPI_Fint *session, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_session_iflush_buffer_ptr)( + session, + request, + ierror + ); +} + +void mpi_ssend_( + const void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + const MPI_Fint *dest, + const MPI_Fint *tag, + const MPI_Fint *comm, + MPI_Fint *ierror +) { + return (*mpiabi_ssend_ptr)( + buf, + count, + datatype, + dest, + tag, + comm, + ierror + ); +} + +void mpi_ssend_init_( + const void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + const MPI_Fint *dest, + const MPI_Fint *tag, + const MPI_Fint *comm, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_ssend_init_ptr)( + buf, + count, + datatype, + dest, + tag, + comm, + request, + ierror + ); +} + +void mpi_start_( + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_start_ptr)( + request, + ierror + ); +} + +void mpi_startall_( + const MPI_Fint *count, + MPI_Fint *array_of_requests, + MPI_Fint *ierror +) { + return (*mpiabi_startall_ptr)( + count, + array_of_requests, + ierror + ); +} + +void mpi_status_get_error_( + const MPI_Fint *status[MPI_F_STATUS_SIZE], + MPI_Fint *err, + MPI_Fint *ierror +) { + return (*mpiabi_status_get_error_ptr)( + status, + err, + ierror + ); +} + +void mpi_status_get_source_( + const MPI_Fint *status[MPI_F_STATUS_SIZE], + MPI_Fint *source, + MPI_Fint *ierror +) { + return (*mpiabi_status_get_source_ptr)( + status, + source, + ierror + ); +} + +void mpi_status_get_tag_( + const MPI_Fint *status[MPI_F_STATUS_SIZE], + MPI_Fint *tag, + MPI_Fint *ierror +) { + return (*mpiabi_status_get_tag_ptr)( + status, + tag, + ierror + ); +} + +void mpi_test_( + MPI_Fint *request, + MPI_Fint *flag, + MPI_Fint *status[MPI_F_STATUS_SIZE], + MPI_Fint *ierror +) { + return (*mpiabi_test_ptr)( + request, + flag, + status, + ierror + ); +} + +void mpi_test_cancelled_( + const MPI_Fint *status[MPI_F_STATUS_SIZE], + MPI_Fint *flag, + MPI_Fint *ierror +) { + return (*mpiabi_test_cancelled_ptr)( + status, + flag, + ierror + ); +} + +void mpi_testall_( + const MPI_Fint *count, + MPI_Fint *array_of_requests, + MPI_Fint *flag, + MPI_Fint *array_of_statuses[MPI_F_STATUS_SIZE], + MPI_Fint *ierror +) { + return (*mpiabi_testall_ptr)( + count, + array_of_requests, + flag, + array_of_statuses, + ierror + ); +} + +void mpi_testany_( + const MPI_Fint *count, + MPI_Fint *array_of_requests, + MPI_Fint *index, + MPI_Fint *flag, + MPI_Fint *status[MPI_F_STATUS_SIZE], + MPI_Fint *ierror +) { + return (*mpiabi_testany_ptr)( + count, + array_of_requests, + index, + flag, + status, + ierror + ); +} + +void mpi_testsome_( + const MPI_Fint *incount, + MPI_Fint *array_of_requests, + MPI_Fint *outcount, + MPI_Fint *array_of_indices, + MPI_Fint *array_of_statuses[MPI_F_STATUS_SIZE], + MPI_Fint *ierror +) { + return (*mpiabi_testsome_ptr)( + incount, + array_of_requests, + outcount, + array_of_indices, + array_of_statuses, + ierror + ); +} + +void mpi_wait_( + MPI_Fint *request, + MPI_Fint *status[MPI_F_STATUS_SIZE], + MPI_Fint *ierror +) { + return (*mpiabi_wait_ptr)( + request, + status, + ierror + ); +} + +void mpi_waitall_( + const MPI_Fint *count, + MPI_Fint *array_of_requests, + MPI_Fint *array_of_statuses[MPI_F_STATUS_SIZE], + MPI_Fint *ierror +) { + return (*mpiabi_waitall_ptr)( + count, + array_of_requests, + array_of_statuses, + ierror + ); +} + +void mpi_waitany_( + const MPI_Fint *count, + MPI_Fint *array_of_requests, + MPI_Fint *index, + MPI_Fint *status[MPI_F_STATUS_SIZE], + MPI_Fint *ierror +) { + return (*mpiabi_waitany_ptr)( + count, + array_of_requests, + index, + status, + ierror + ); +} + +void mpi_waitsome_( + const MPI_Fint *incount, + MPI_Fint *array_of_requests, + MPI_Fint *outcount, + MPI_Fint *array_of_indices, + MPI_Fint *array_of_statuses[MPI_F_STATUS_SIZE], + MPI_Fint *ierror +) { + return (*mpiabi_waitsome_ptr)( + incount, + array_of_requests, + outcount, + array_of_indices, + array_of_statuses, + ierror + ); +} + +void mpi_parrived_( + const MPI_Fint *request, + const MPI_Fint *partition, + MPI_Fint *flag, + MPI_Fint *ierror +) { + return (*mpiabi_parrived_ptr)( + request, + partition, + flag, + ierror + ); +} + +void mpi_pready_( + const MPI_Fint *partition, + const MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_pready_ptr)( + partition, + request, + ierror + ); +} + +void mpi_pready_list_( + const MPI_Fint *length, + const MPI_Fint *array_of_partitions, + const MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_pready_list_ptr)( + length, + array_of_partitions, + request, + ierror + ); +} + +void mpi_pready_range_( + const MPI_Fint *partition_low, + const MPI_Fint *partition_high, + const MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_pready_range_ptr)( + partition_low, + partition_high, + request, + ierror + ); +} + +void mpi_precv_init_( + void *buf, + const MPI_Fint *partitions, + const MPI_Count *count, + const MPI_Fint *datatype, + const MPI_Fint *source, + const MPI_Fint *tag, + const MPI_Fint *comm, + const MPI_Fint *info, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_precv_init_ptr)( + buf, + partitions, + count, + datatype, + source, + tag, + comm, + info, + request, + ierror + ); +} + +void mpi_psend_init_( + void *buf, + const MPI_Fint *partitions, + const MPI_Count *count, + const MPI_Fint *datatype, + const MPI_Fint *source, + const MPI_Fint *tag, + const MPI_Fint *comm, + const MPI_Fint *info, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_psend_init_ptr)( + buf, + partitions, + count, + datatype, + source, + tag, + comm, + info, + request, + ierror + ); +} + +MPI_Aint mpi_aint_add_( + const MPI_Aint *base, + const MPI_Aint *disp +) { + return (*mpiabi_aint_add_ptr)( + base, + disp + ); +} + +MPI_Aint mpi_aint_diff_( + const MPI_Aint *addr1, + const MPI_Aint *addr2 +) { + return (*mpiabi_aint_diff_ptr)( + addr1, + addr2 + ); +} + +void mpi_get_address_( + const void *location, + MPI_Aint *address, + MPI_Fint *ierror +) { + return (*mpiabi_get_address_ptr)( + location, + address, + ierror + ); +} + +void mpi_get_elements_( + const MPI_Fint *status[MPI_F_STATUS_SIZE], + const MPI_Fint *datatype, + MPI_Fint *count, + MPI_Fint *ierror +) { + return (*mpiabi_get_elements_ptr)( + status, + datatype, + count, + ierror + ); +} + +void mpi_pack_( + const void *inbuf, + const MPI_Fint *incount, + const MPI_Fint *datatype, + void *outbuf, + const MPI_Fint *outsize, + MPI_Fint *position, + const MPI_Fint *comm, + MPI_Fint *ierror +) { + return (*mpiabi_pack_ptr)( + inbuf, + incount, + datatype, + outbuf, + outsize, + position, + comm, + ierror + ); +} + +void mpi_pack_external_( + const char **datarep, + const void *inbuf, + const MPI_Fint *incount, + const MPI_Fint *datatype, + void *outbuf, + const MPI_Aint *outsize, + MPI_Aint *position, + MPI_Fint *ierror +) { + return (*mpiabi_pack_external_ptr)( + datarep, + inbuf, + incount, + datatype, + outbuf, + outsize, + position, + ierror + ); +} + +void mpi_pack_external_size_( + const char **datarep, + const MPI_Count *incount, + const MPI_Fint *datatype, + MPI_Aint *size, + MPI_Fint *ierror +) { + return (*mpiabi_pack_external_size_ptr)( + datarep, + incount, + datatype, + size, + ierror + ); +} + +void mpi_pack_size_( + const MPI_Fint *incount, + const MPI_Fint *datatype, + const MPI_Fint *comm, + MPI_Fint *size, + MPI_Fint *ierror +) { + return (*mpiabi_pack_size_ptr)( + incount, + datatype, + comm, + size, + ierror + ); +} + +void mpi_type_commit_( + MPI_Fint *datatype, + MPI_Fint *ierror +) { + return (*mpiabi_type_commit_ptr)( + datatype, + ierror + ); +} + +void mpi_type_contiguous_( + const MPI_Fint *count, + const MPI_Fint *oldtype, + MPI_Fint *newtype, + MPI_Fint *ierror +) { + return (*mpiabi_type_contiguous_ptr)( + count, + oldtype, + newtype, + ierror + ); +} + +void mpi_type_create_darray_( + const MPI_Fint *size, + const MPI_Fint *rank, + const MPI_Fint *ndims, + const MPI_Fint *array_of_gsizes, + const MPI_Fint *array_of_distribs, + const MPI_Fint *array_of_dargs, + const MPI_Fint *array_of_psizes, + const MPI_Fint *order, + const MPI_Fint *oldtype, + MPI_Fint *newtype, + MPI_Fint *ierror +) { + return (*mpiabi_type_create_darray_ptr)( + size, + rank, + ndims, + array_of_gsizes, + array_of_distribs, + array_of_dargs, + array_of_psizes, + order, + oldtype, + newtype, + ierror + ); +} + +void mpi_type_create_hindexed_( + const MPI_Fint *count, + const MPI_Fint *array_of_blocklengths, + const MPI_Aint *array_of_displacements, + const MPI_Fint *oldtype, + MPI_Fint *newtype, + MPI_Fint *ierror +) { + return (*mpiabi_type_create_hindexed_ptr)( + count, + array_of_blocklengths, + array_of_displacements, + oldtype, + newtype, + ierror + ); +} + +void mpi_type_create_hindexed_block_( + const MPI_Fint *count, + const MPI_Fint *blocklength, + const MPI_Aint *array_of_displacements, + const MPI_Fint *oldtype, + MPI_Fint *newtype, + MPI_Fint *ierror +) { + return (*mpiabi_type_create_hindexed_block_ptr)( + count, + blocklength, + array_of_displacements, + oldtype, + newtype, + ierror + ); +} + +void mpi_type_create_hvector_( + const MPI_Fint *count, + const MPI_Fint *blocklength, + const MPI_Aint *stride, + const MPI_Fint *oldtype, + MPI_Fint *newtype, + MPI_Fint *ierror +) { + return (*mpiabi_type_create_hvector_ptr)( + count, + blocklength, + stride, + oldtype, + newtype, + ierror + ); +} + +void mpi_type_create_indexed_block_( + const MPI_Fint *count, + const MPI_Fint *blocklength, + const MPI_Fint *array_of_displacements, + const MPI_Fint *oldtype, + MPI_Fint *newtype, + MPI_Fint *ierror +) { + return (*mpiabi_type_create_indexed_block_ptr)( + count, + blocklength, + array_of_displacements, + oldtype, + newtype, + ierror + ); +} + +void mpi_type_create_resized_( + const MPI_Fint *oldtype, + const MPI_Aint *lb, + const MPI_Aint *extent, + MPI_Fint *newtype, + MPI_Fint *ierror +) { + return (*mpiabi_type_create_resized_ptr)( + oldtype, + lb, + extent, + newtype, + ierror + ); +} + +void mpi_type_create_struct_( + const MPI_Fint *count, + const MPI_Fint *array_of_blocklengths, + const MPI_Aint *array_of_displacements, + const MPI_Fint *array_of_types, + MPI_Fint *newtype, + MPI_Fint *ierror +) { + return (*mpiabi_type_create_struct_ptr)( + count, + array_of_blocklengths, + array_of_displacements, + array_of_types, + newtype, + ierror + ); +} + +void mpi_type_create_subarray_( + const MPI_Fint *ndims, + const MPI_Fint *array_of_sizes, + const MPI_Fint *array_of_subsizes, + const MPI_Fint *array_of_starts, + const MPI_Fint *order, + const MPI_Fint *oldtype, + MPI_Fint *newtype, + MPI_Fint *ierror +) { + return (*mpiabi_type_create_subarray_ptr)( + ndims, + array_of_sizes, + array_of_subsizes, + array_of_starts, + order, + oldtype, + newtype, + ierror + ); +} + +void mpi_type_dup_( + const MPI_Fint *oldtype, + MPI_Fint *newtype, + MPI_Fint *ierror +) { + return (*mpiabi_type_dup_ptr)( + oldtype, + newtype, + ierror + ); +} + +void mpi_type_free_( + MPI_Fint *datatype, + MPI_Fint *ierror +) { + return (*mpiabi_type_free_ptr)( + datatype, + ierror + ); +} + +void mpi_type_get_contents_( + const MPI_Fint *datatype, + const MPI_Fint *max_integers, + const MPI_Fint *max_addresses, + const MPI_Fint *max_datatypes, + MPI_Fint *array_of_integers, + MPI_Aint *array_of_addresses, + MPI_Fint *array_of_datatypes, + MPI_Fint *ierror +) { + return (*mpiabi_type_get_contents_ptr)( + datatype, + max_integers, + max_addresses, + max_datatypes, + array_of_integers, + array_of_addresses, + array_of_datatypes, + ierror + ); +} + +void mpi_type_get_envelope_( + const MPI_Fint *datatype, + MPI_Fint *num_integers, + MPI_Fint *num_addresses, + MPI_Fint *num_datatypes, + MPI_Fint *combiner, + MPI_Fint *ierror +) { + return (*mpiabi_type_get_envelope_ptr)( + datatype, + num_integers, + num_addresses, + num_datatypes, + combiner, + ierror + ); +} + +void mpi_type_get_extent_( + const MPI_Fint *datatype, + MPI_Aint *lb, + MPI_Aint *extent, + MPI_Fint *ierror +) { + return (*mpiabi_type_get_extent_ptr)( + datatype, + lb, + extent, + ierror + ); +} + +void mpi_type_get_true_extent_( + const MPI_Fint *datatype, + MPI_Aint *true_lb, + MPI_Aint *true_extent, + MPI_Fint *ierror +) { + return (*mpiabi_type_get_true_extent_ptr)( + datatype, + true_lb, + true_extent, + ierror + ); +} + +void mpi_type_indexed_( + const MPI_Fint *count, + const MPI_Fint *array_of_blocklengths, + const MPI_Fint *array_of_displacements, + const MPI_Fint *oldtype, + MPI_Fint *newtype, + MPI_Fint *ierror +) { + return (*mpiabi_type_indexed_ptr)( + count, + array_of_blocklengths, + array_of_displacements, + oldtype, + newtype, + ierror + ); +} + +void mpi_type_size_( + const MPI_Fint *datatype, + MPI_Fint *size, + MPI_Fint *ierror +) { + return (*mpiabi_type_size_ptr)( + datatype, + size, + ierror + ); +} + +void mpi_type_vector_( + const MPI_Fint *count, + const MPI_Fint *blocklength, + const MPI_Fint *stride, + const MPI_Fint *oldtype, + MPI_Fint *newtype, + MPI_Fint *ierror +) { + return (*mpiabi_type_vector_ptr)( + count, + blocklength, + stride, + oldtype, + newtype, + ierror + ); +} + +void mpi_unpack_( + const void *inbuf, + const MPI_Fint *insize, + MPI_Fint *position, + void *outbuf, + const MPI_Fint *outcount, + const MPI_Fint *datatype, + const MPI_Fint *comm, + MPI_Fint *ierror +) { + return (*mpiabi_unpack_ptr)( + inbuf, + insize, + position, + outbuf, + outcount, + datatype, + comm, + ierror + ); +} + +void mpi_unpack_external_( + const char **datarep, + const void *inbuf, + const MPI_Aint *insize, + MPI_Aint *position, + void *outbuf, + const MPI_Fint *outcount, + const MPI_Fint *datatype, + MPI_Fint *ierror +) { + return (*mpiabi_unpack_external_ptr)( + datarep, + inbuf, + insize, + position, + outbuf, + outcount, + datatype, + ierror + ); +} + +void mpi_allgather_( + const void *sendbuf, + const MPI_Fint *sendcount, + const MPI_Fint *sendtype, + void *recvbuf, + const MPI_Fint *recvcount, + const MPI_Fint *recvtype, + const MPI_Fint *comm, + MPI_Fint *ierror +) { + return (*mpiabi_allgather_ptr)( + sendbuf, + sendcount, + sendtype, + recvbuf, + recvcount, + recvtype, + comm, + ierror + ); +} + +void mpi_allgather_init_( + const void *sendbuf, + const MPI_Fint *sendcount, + const MPI_Fint *sendtype, + void *recvbuf, + const MPI_Fint *recvcount, + const MPI_Fint *recvtype, + const MPI_Fint *comm, + const MPI_Fint *info, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_allgather_init_ptr)( + sendbuf, + sendcount, + sendtype, + recvbuf, + recvcount, + recvtype, + comm, + info, + request, + ierror + ); +} + +void mpi_allgatherv_( + const void *sendbuf, + const MPI_Fint *sendcount, + const MPI_Fint *sendtype, + void *recvbuf, + const MPI_Fint *recvcounts, + const MPI_Fint *displs, + const MPI_Fint *recvtype, + const MPI_Fint *comm, + MPI_Fint *ierror +) { + return (*mpiabi_allgatherv_ptr)( + sendbuf, + sendcount, + sendtype, + recvbuf, + recvcounts, + displs, + recvtype, + comm, + ierror + ); +} + +void mpi_allgatherv_init_( + const void *sendbuf, + const MPI_Fint *sendcount, + const MPI_Fint *sendtype, + void *recvbuf, + const MPI_Fint *recvcounts, + const MPI_Fint *displs, + const MPI_Fint *recvtype, + const MPI_Fint *comm, + const MPI_Fint *info, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_allgatherv_init_ptr)( + sendbuf, + sendcount, + sendtype, + recvbuf, + recvcounts, + displs, + recvtype, + comm, + info, + request, + ierror + ); +} + +void mpi_allreduce_( + const void *sendbuf, + void *recvbuf, + const MPI_Fint *count, + const MPI_Fint *datatype, + const MPI_Fint *op, + const MPI_Fint *comm, + MPI_Fint *ierror +) { + return (*mpiabi_allreduce_ptr)( + sendbuf, + recvbuf, + count, + datatype, + op, + comm, + ierror + ); +} + +void mpi_allreduce_init_( + const void *sendbuf, + void *recvbuf, + const MPI_Fint *count, + const MPI_Fint *datatype, + const MPI_Fint *op, + const MPI_Fint *comm, + const MPI_Fint *info, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_allreduce_init_ptr)( + sendbuf, + recvbuf, + count, + datatype, + op, + comm, + info, + request, + ierror + ); +} + +void mpi_alltoall_( + const void *sendbuf, + const MPI_Fint *sendcount, + const MPI_Fint *sendtype, + void *recvbuf, + const MPI_Fint *recvcount, + const MPI_Fint *recvtype, + const MPI_Fint *comm, + MPI_Fint *ierror +) { + return (*mpiabi_alltoall_ptr)( + sendbuf, + sendcount, + sendtype, + recvbuf, + recvcount, + recvtype, + comm, + ierror + ); +} + +void mpi_alltoall_init_( + const void *sendbuf, + const MPI_Fint *sendcount, + const MPI_Fint *sendtype, + void *recvbuf, + const MPI_Fint *recvcount, + const MPI_Fint *recvtype, + const MPI_Fint *comm, + const MPI_Fint *info, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_alltoall_init_ptr)( + sendbuf, + sendcount, + sendtype, + recvbuf, + recvcount, + recvtype, + comm, + info, + request, + ierror + ); +} + +void mpi_alltoallv_( + const void *sendbuf, + const MPI_Fint *sendcounts, + const MPI_Fint *sdispls, + const MPI_Fint *sendtype, + void *recvbuf, + const MPI_Fint *recvcounts, + const MPI_Fint *rdispls, + const MPI_Fint *recvtype, + const MPI_Fint *comm, + MPI_Fint *ierror +) { + return (*mpiabi_alltoallv_ptr)( + sendbuf, + sendcounts, + sdispls, + sendtype, + recvbuf, + recvcounts, + rdispls, + recvtype, + comm, + ierror + ); +} + +void mpi_alltoallv_init_( + const void *sendbuf, + const MPI_Fint *sendcounts, + const MPI_Fint *sdispls, + const MPI_Fint *sendtype, + void *recvbuf, + const MPI_Fint *recvcounts, + const MPI_Fint *rdispls, + const MPI_Fint *recvtype, + const MPI_Fint *comm, + const MPI_Fint *info, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_alltoallv_init_ptr)( + sendbuf, + sendcounts, + sdispls, + sendtype, + recvbuf, + recvcounts, + rdispls, + recvtype, + comm, + info, + request, + ierror + ); +} + +void mpi_alltoallw_( + const void *sendbuf, + const MPI_Fint *sendcounts, + const MPI_Fint *sdispls, + const MPI_Fint *sendtypes, + void *recvbuf, + const MPI_Fint *recvcounts, + const MPI_Fint *rdispls, + const MPI_Fint *recvtypes, + const MPI_Fint *comm, + MPI_Fint *ierror +) { + return (*mpiabi_alltoallw_ptr)( + sendbuf, + sendcounts, + sdispls, + sendtypes, + recvbuf, + recvcounts, + rdispls, + recvtypes, + comm, + ierror + ); +} + +void mpi_alltoallw_init_( + const void *sendbuf, + const MPI_Fint *sendcounts, + const MPI_Fint *sdispls, + const MPI_Fint *sendtypes, + void *recvbuf, + const MPI_Fint *recvcounts, + const MPI_Fint *rdispls, + const MPI_Fint *recvtypes, + const MPI_Fint *comm, + const MPI_Fint *info, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_alltoallw_init_ptr)( + sendbuf, + sendcounts, + sdispls, + sendtypes, + recvbuf, + recvcounts, + rdispls, + recvtypes, + comm, + info, + request, + ierror + ); +} + +void mpi_barrier_( + const MPI_Fint *comm, + MPI_Fint *ierror +) { + return (*mpiabi_barrier_ptr)( + comm, + ierror + ); +} + +void mpi_barrier_init_( + const MPI_Fint *comm, + const MPI_Fint *info, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_barrier_init_ptr)( + comm, + info, + request, + ierror + ); +} + +void mpi_bcast_( + void *buffer, + const MPI_Fint *count, + const MPI_Fint *datatype, + const MPI_Fint *root, + const MPI_Fint *comm, + MPI_Fint *ierror +) { + return (*mpiabi_bcast_ptr)( + buffer, + count, + datatype, + root, + comm, + ierror + ); +} + +void mpi_bcast_init_( + void *buffer, + const MPI_Fint *count, + const MPI_Fint *datatype, + const MPI_Fint *root, + const MPI_Fint *comm, + const MPI_Fint *info, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_bcast_init_ptr)( + buffer, + count, + datatype, + root, + comm, + info, + request, + ierror + ); +} + +void mpi_exscan_( + const void *sendbuf, + void *recvbuf, + const MPI_Fint *count, + const MPI_Fint *datatype, + const MPI_Fint *op, + const MPI_Fint *comm, + MPI_Fint *ierror +) { + return (*mpiabi_exscan_ptr)( + sendbuf, + recvbuf, + count, + datatype, + op, + comm, + ierror + ); +} + +void mpi_exscan_init_( + const void *sendbuf, + void *recvbuf, + const MPI_Fint *count, + const MPI_Fint *datatype, + const MPI_Fint *op, + const MPI_Fint *comm, + const MPI_Fint *info, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_exscan_init_ptr)( + sendbuf, + recvbuf, + count, + datatype, + op, + comm, + info, + request, + ierror + ); +} + +void mpi_gather_( + const void *sendbuf, + const MPI_Fint *sendcount, + const MPI_Fint *sendtype, + void *recvbuf, + const MPI_Fint *recvcount, + const MPI_Fint *recvtype, + const MPI_Fint *root, + const MPI_Fint *comm, + MPI_Fint *ierror +) { + return (*mpiabi_gather_ptr)( + sendbuf, + sendcount, + sendtype, + recvbuf, + recvcount, + recvtype, + root, + comm, + ierror + ); +} + +void mpi_gather_init_( + const void *sendbuf, + const MPI_Fint *sendcount, + const MPI_Fint *sendtype, + void *recvbuf, + const MPI_Fint *recvcount, + const MPI_Fint *recvtype, + const MPI_Fint *root, + const MPI_Fint *comm, + const MPI_Fint *info, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_gather_init_ptr)( + sendbuf, + sendcount, + sendtype, + recvbuf, + recvcount, + recvtype, + root, + comm, + info, + request, + ierror + ); +} + +void mpi_gatherv_( + const void *sendbuf, + const MPI_Fint *sendcount, + const MPI_Fint *sendtype, + void *recvbuf, + const MPI_Fint *recvcounts, + const MPI_Fint *displs, + const MPI_Fint *recvtype, + const MPI_Fint *root, + const MPI_Fint *comm, + MPI_Fint *ierror +) { + return (*mpiabi_gatherv_ptr)( + sendbuf, + sendcount, + sendtype, + recvbuf, + recvcounts, + displs, + recvtype, + root, + comm, + ierror + ); +} + +void mpi_gatherv_init_( + const void *sendbuf, + const MPI_Fint *sendcount, + const MPI_Fint *sendtype, + void *recvbuf, + const MPI_Fint *recvcounts, + const MPI_Fint *displs, + const MPI_Fint *recvtype, + const MPI_Fint *root, + const MPI_Fint *comm, + const MPI_Fint *info, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_gatherv_init_ptr)( + sendbuf, + sendcount, + sendtype, + recvbuf, + recvcounts, + displs, + recvtype, + root, + comm, + info, + request, + ierror + ); +} + +void mpi_iallgather_( + const void *sendbuf, + const MPI_Fint *sendcount, + const MPI_Fint *sendtype, + void *recvbuf, + const MPI_Fint *recvcount, + const MPI_Fint *recvtype, + const MPI_Fint *comm, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_iallgather_ptr)( + sendbuf, + sendcount, + sendtype, + recvbuf, + recvcount, + recvtype, + comm, + request, + ierror + ); +} + +void mpi_iallgatherv_( + const void *sendbuf, + const MPI_Fint *sendcount, + const MPI_Fint *sendtype, + void *recvbuf, + const MPI_Fint *recvcounts, + const MPI_Fint *displs, + const MPI_Fint *recvtype, + const MPI_Fint *comm, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_iallgatherv_ptr)( + sendbuf, + sendcount, + sendtype, + recvbuf, + recvcounts, + displs, + recvtype, + comm, + request, + ierror + ); +} + +void mpi_iallreduce_( + const void *sendbuf, + void *recvbuf, + const MPI_Fint *count, + const MPI_Fint *datatype, + const MPI_Fint *op, + const MPI_Fint *comm, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_iallreduce_ptr)( + sendbuf, + recvbuf, + count, + datatype, + op, + comm, + request, + ierror + ); +} + +void mpi_ialltoall_( + const void *sendbuf, + const MPI_Fint *sendcount, + const MPI_Fint *sendtype, + void *recvbuf, + const MPI_Fint *recvcount, + const MPI_Fint *recvtype, + const MPI_Fint *comm, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_ialltoall_ptr)( + sendbuf, + sendcount, + sendtype, + recvbuf, + recvcount, + recvtype, + comm, + request, + ierror + ); +} + +void mpi_ialltoallv_( + const void *sendbuf, + const MPI_Fint *sendcounts, + const MPI_Fint *sdispls, + const MPI_Fint *sendtype, + void *recvbuf, + const MPI_Fint *recvcounts, + const MPI_Fint *rdispls, + const MPI_Fint *recvtype, + const MPI_Fint *comm, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_ialltoallv_ptr)( + sendbuf, + sendcounts, + sdispls, + sendtype, + recvbuf, + recvcounts, + rdispls, + recvtype, + comm, + request, + ierror + ); +} + +void mpi_ialltoallw_( + const void *sendbuf, + const MPI_Fint *sendcounts, + const MPI_Fint *sdispls, + const MPI_Fint *sendtypes, + void *recvbuf, + const MPI_Fint *recvcounts, + const MPI_Fint *rdispls, + const MPI_Fint *recvtypes, + const MPI_Fint *comm, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_ialltoallw_ptr)( + sendbuf, + sendcounts, + sdispls, + sendtypes, + recvbuf, + recvcounts, + rdispls, + recvtypes, + comm, + request, + ierror + ); +} + +void mpi_ibarrier_( + const MPI_Fint *comm, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_ibarrier_ptr)( + comm, + request, + ierror + ); +} + +void mpi_ibcast_( + void *buffer, + const MPI_Fint *count, + const MPI_Fint *datatype, + const MPI_Fint *root, + const MPI_Fint *comm, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_ibcast_ptr)( + buffer, + count, + datatype, + root, + comm, + request, + ierror + ); +} + +void mpi_iexscan_( + const void *sendbuf, + void *recvbuf, + const MPI_Fint *count, + const MPI_Fint *datatype, + const MPI_Fint *op, + const MPI_Fint *comm, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_iexscan_ptr)( + sendbuf, + recvbuf, + count, + datatype, + op, + comm, + request, + ierror + ); +} + +void mpi_igather_( + const void *sendbuf, + const MPI_Fint *sendcount, + const MPI_Fint *sendtype, + void *recvbuf, + const MPI_Fint *recvcount, + const MPI_Fint *recvtype, + const MPI_Fint *root, + const MPI_Fint *comm, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_igather_ptr)( + sendbuf, + sendcount, + sendtype, + recvbuf, + recvcount, + recvtype, + root, + comm, + request, + ierror + ); +} + +void mpi_igatherv_( + const void *sendbuf, + const MPI_Fint *sendcount, + const MPI_Fint *sendtype, + void *recvbuf, + const MPI_Fint *recvcounts, + const MPI_Fint *displs, + const MPI_Fint *recvtype, + const MPI_Fint *root, + const MPI_Fint *comm, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_igatherv_ptr)( + sendbuf, + sendcount, + sendtype, + recvbuf, + recvcounts, + displs, + recvtype, + root, + comm, + request, + ierror + ); +} + +void mpi_ireduce_( + const void *sendbuf, + void *recvbuf, + const MPI_Fint *count, + const MPI_Fint *datatype, + const MPI_Fint *op, + const MPI_Fint *root, + const MPI_Fint *comm, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_ireduce_ptr)( + sendbuf, + recvbuf, + count, + datatype, + op, + root, + comm, + request, + ierror + ); +} + +void mpi_ireduce_scatter_( + const void *sendbuf, + void *recvbuf, + const MPI_Fint *recvcounts, + const MPI_Fint *datatype, + const MPI_Fint *op, + const MPI_Fint *comm, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_ireduce_scatter_ptr)( + sendbuf, + recvbuf, + recvcounts, + datatype, + op, + comm, + request, + ierror + ); +} + +void mpi_ireduce_scatter_block_( + const void *sendbuf, + void *recvbuf, + const MPI_Fint *recvcount, + const MPI_Fint *datatype, + const MPI_Fint *op, + const MPI_Fint *comm, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_ireduce_scatter_block_ptr)( + sendbuf, + recvbuf, + recvcount, + datatype, + op, + comm, + request, + ierror + ); +} + +void mpi_iscan_( + const void *sendbuf, + void *recvbuf, + const MPI_Fint *count, + const MPI_Fint *datatype, + const MPI_Fint *op, + const MPI_Fint *comm, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_iscan_ptr)( + sendbuf, + recvbuf, + count, + datatype, + op, + comm, + request, + ierror + ); +} + +void mpi_iscatter_( + const void *sendbuf, + const MPI_Fint *sendcount, + const MPI_Fint *sendtype, + void *recvbuf, + const MPI_Fint *recvcount, + const MPI_Fint *recvtype, + const MPI_Fint *root, + const MPI_Fint *comm, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_iscatter_ptr)( + sendbuf, + sendcount, + sendtype, + recvbuf, + recvcount, + recvtype, + root, + comm, + request, + ierror + ); +} + +void mpi_iscatterv_( + const void *sendbuf, + const MPI_Fint *sendcounts, + const MPI_Fint *sdispls, + const MPI_Fint *sendtype, + void *recvbuf, + const MPI_Fint *recvcount, + const MPI_Fint *recvtype, + const MPI_Fint *root, + const MPI_Fint *comm, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_iscatterv_ptr)( + sendbuf, + sendcounts, + sdispls, + sendtype, + recvbuf, + recvcount, + recvtype, + root, + comm, + request, + ierror + ); +} + +void mpi_op_commutative_( + const MPI_Fint *op, + MPI_Fint *commute, + MPI_Fint *ierror +) { + return (*mpiabi_op_commutative_ptr)( + op, + commute, + ierror + ); +} + +void mpi_op_create_( + const void (**user_fn)(void), + const MPI_Fint *commute, + MPI_Fint *op, + MPI_Fint *ierror +) { + return (*mpiabi_op_create_ptr)( + user_fn, + commute, + op, + ierror + ); +} + +void mpi_op_free_( + MPI_Fint *op, + MPI_Fint *ierror +) { + return (*mpiabi_op_free_ptr)( + op, + ierror + ); +} + +void mpi_reduce_( + const void *sendbuf, + void *recvbuf, + const MPI_Fint *count, + const MPI_Fint *datatype, + const MPI_Fint *op, + const MPI_Fint *root, + const MPI_Fint *comm, + MPI_Fint *ierror +) { + return (*mpiabi_reduce_ptr)( + sendbuf, + recvbuf, + count, + datatype, + op, + root, + comm, + ierror + ); +} + +void mpi_reduce_init_( + const void *sendbuf, + void *recvbuf, + const MPI_Fint *count, + const MPI_Fint *datatype, + const MPI_Fint *op, + const MPI_Fint *root, + const MPI_Fint *comm, + const MPI_Fint *info, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_reduce_init_ptr)( + sendbuf, + recvbuf, + count, + datatype, + op, + root, + comm, + info, + request, + ierror + ); +} + +void mpi_reduce_local_( + const void *inbuf, + void *inoutbuf, + const MPI_Fint *count, + const MPI_Fint *datatype, + const MPI_Fint *op, + MPI_Fint *ierror +) { + return (*mpiabi_reduce_local_ptr)( + inbuf, + inoutbuf, + count, + datatype, + op, + ierror + ); +} + +void mpi_reduce_scatter_( + const void *sendbuf, + void *recvbuf, + const MPI_Fint *recvcounts, + const MPI_Fint *datatype, + const MPI_Fint *op, + const MPI_Fint *comm, + MPI_Fint *ierror +) { + return (*mpiabi_reduce_scatter_ptr)( + sendbuf, + recvbuf, + recvcounts, + datatype, + op, + comm, + ierror + ); +} + +void mpi_reduce_scatter_block_( + const void *sendbuf, + void *recvbuf, + const MPI_Fint *recvcount, + const MPI_Fint *datatype, + const MPI_Fint *op, + const MPI_Fint *comm, + MPI_Fint *ierror +) { + return (*mpiabi_reduce_scatter_block_ptr)( + sendbuf, + recvbuf, + recvcount, + datatype, + op, + comm, + ierror + ); +} + +void mpi_reduce_scatter_block_init_( + const void *sendbuf, + void *recvbuf, + const MPI_Fint *recvcount, + const MPI_Fint *datatype, + const MPI_Fint *op, + const MPI_Fint *comm, + const MPI_Fint *info, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_reduce_scatter_block_init_ptr)( + sendbuf, + recvbuf, + recvcount, + datatype, + op, + comm, + info, + request, + ierror + ); +} + +void mpi_reduce_scatter_init_( + const void *sendbuf, + void *recvbuf, + const MPI_Fint *recvcounts, + const MPI_Fint *datatype, + const MPI_Fint *op, + const MPI_Fint *comm, + const MPI_Fint *info, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_reduce_scatter_init_ptr)( + sendbuf, + recvbuf, + recvcounts, + datatype, + op, + comm, + info, + request, + ierror + ); +} + +void mpi_scan_( + const void *sendbuf, + void *recvbuf, + const MPI_Fint *count, + const MPI_Fint *datatype, + const MPI_Fint *op, + const MPI_Fint *comm, + MPI_Fint *ierror +) { + return (*mpiabi_scan_ptr)( + sendbuf, + recvbuf, + count, + datatype, + op, + comm, + ierror + ); +} + +void mpi_scan_init_( + const void *sendbuf, + void *recvbuf, + const MPI_Fint *count, + const MPI_Fint *datatype, + const MPI_Fint *op, + const MPI_Fint *comm, + const MPI_Fint *info, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_scan_init_ptr)( + sendbuf, + recvbuf, + count, + datatype, + op, + comm, + info, + request, + ierror + ); +} + +void mpi_scatter_( + const void *sendbuf, + const MPI_Fint *sendcount, + const MPI_Fint *sendtype, + void *recvbuf, + const MPI_Fint *recvcount, + const MPI_Fint *recvtype, + const MPI_Fint *root, + const MPI_Fint *comm, + MPI_Fint *ierror +) { + return (*mpiabi_scatter_ptr)( + sendbuf, + sendcount, + sendtype, + recvbuf, + recvcount, + recvtype, + root, + comm, + ierror + ); +} + +void mpi_scatter_init_( + const void *sendbuf, + const MPI_Fint *sendcount, + const MPI_Fint *sendtype, + void *recvbuf, + const MPI_Fint *recvcount, + const MPI_Fint *recvtype, + const MPI_Fint *root, + const MPI_Fint *comm, + const MPI_Fint *info, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_scatter_init_ptr)( + sendbuf, + sendcount, + sendtype, + recvbuf, + recvcount, + recvtype, + root, + comm, + info, + request, + ierror + ); +} + +void mpi_scatterv_( + const void *sendbuf, + const MPI_Fint *sendcounts, + const MPI_Fint *displs, + const MPI_Fint *sendtype, + void *recvbuf, + const MPI_Fint *recvcount, + const MPI_Fint *recvtype, + const MPI_Fint *root, + const MPI_Fint *comm, + MPI_Fint *ierror +) { + return (*mpiabi_scatterv_ptr)( + sendbuf, + sendcounts, + displs, + sendtype, + recvbuf, + recvcount, + recvtype, + root, + comm, + ierror + ); +} + +void mpi_scatterv_init_( + const void *sendbuf, + const MPI_Fint *sendcounts, + const MPI_Fint *displs, + const MPI_Fint *sendtype, + void *recvbuf, + const MPI_Fint *recvcount, + const MPI_Fint *recvtype, + const MPI_Fint *root, + const MPI_Fint *comm, + const MPI_Fint *info, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_scatterv_init_ptr)( + sendbuf, + sendcounts, + displs, + sendtype, + recvbuf, + recvcount, + recvtype, + root, + comm, + info, + request, + ierror + ); +} + +void mpi_type_get_value_index_( + const MPI_Fint *value_type, + const MPI_Fint *index_type, + MPI_Fint *pair_type, + MPI_Fint *ierror +) { + return (*mpiabi_type_get_value_index_ptr)( + value_type, + index_type, + pair_type, + ierror + ); +} + +void mpi_comm_compare_( + const MPI_Fint *comm1, + const MPI_Fint *comm2, + MPI_Fint *result, + MPI_Fint *ierror +) { + return (*mpiabi_comm_compare_ptr)( + comm1, + comm2, + result, + ierror + ); +} + +void mpi_comm_create_( + const MPI_Fint *comm, + const MPI_Fint *group, + MPI_Fint *newcomm, + MPI_Fint *ierror +) { + return (*mpiabi_comm_create_ptr)( + comm, + group, + newcomm, + ierror + ); +} + +void mpi_comm_create_from_group_( + const MPI_Fint *group, + const char **stringtag, + const MPI_Fint *info, + const MPI_Fint *errhandler, + MPI_Fint *newcomm, + MPI_Fint *ierror +) { + return (*mpiabi_comm_create_from_group_ptr)( + group, + stringtag, + info, + errhandler, + newcomm, + ierror + ); +} + +void mpi_comm_create_group_( + const MPI_Fint *comm, + const MPI_Fint *group, + const MPI_Fint *tag, + MPI_Fint *newcomm, + MPI_Fint *ierror +) { + return (*mpiabi_comm_create_group_ptr)( + comm, + group, + tag, + newcomm, + ierror + ); +} + +void mpi_comm_create_keyval_( + const void (**comm_copy_attr_fn)(void), + const void (**comm_delete_attr_fn)(void), + MPI_Fint *comm_keyval, + void *extra_state, + MPI_Fint *ierror +) { + return (*mpiabi_comm_create_keyval_ptr)( + comm_copy_attr_fn, + comm_delete_attr_fn, + comm_keyval, + extra_state, + ierror + ); +} + +void mpi_comm_delete_attr_( + const MPI_Fint *comm, + const MPI_Fint *comm_keyval, + MPI_Fint *ierror +) { + return (*mpiabi_comm_delete_attr_ptr)( + comm, + comm_keyval, + ierror + ); +} + +void mpi_comm_dup_( + const MPI_Fint *comm, + MPI_Fint *newcomm, + MPI_Fint *ierror +) { + return (*mpiabi_comm_dup_ptr)( + comm, + newcomm, + ierror + ); +} + +void mpi_comm_dup_with_info_( + const MPI_Fint *comm, + const MPI_Fint *info, + MPI_Fint *newcomm, + MPI_Fint *ierror +) { + return (*mpiabi_comm_dup_with_info_ptr)( + comm, + info, + newcomm, + ierror + ); +} + +void mpi_comm_free_( + MPI_Fint *comm, + MPI_Fint *ierror +) { + return (*mpiabi_comm_free_ptr)( + comm, + ierror + ); +} + +void mpi_comm_get_name_( + const MPI_Fint *comm, + char **comm_name, + MPI_Fint *resultlen, + MPI_Fint *ierror +) { + return (*mpiabi_comm_get_name_ptr)( + comm, + comm_name, + resultlen, + ierror + ); +} + +void mpi_comm_free_keyval_( + MPI_Fint *comm_keyval, + MPI_Fint *ierror +) { + return (*mpiabi_comm_free_keyval_ptr)( + comm_keyval, + ierror + ); +} + +void mpi_comm_get_attr_( + const MPI_Fint *comm, + const MPI_Fint *comm_keyval, + void *attribute_val, + MPI_Fint *flag, + MPI_Fint *ierror +) { + return (*mpiabi_comm_get_attr_ptr)( + comm, + comm_keyval, + attribute_val, + flag, + ierror + ); +} + +void mpi_comm_get_info_( + const MPI_Fint *comm, + MPI_Fint *info_used, + MPI_Fint *ierror +) { + return (*mpiabi_comm_get_info_ptr)( + comm, + info_used, + ierror + ); +} + +void mpi_comm_group_( + const MPI_Fint *comm, + MPI_Fint *group, + MPI_Fint *ierror +) { + return (*mpiabi_comm_group_ptr)( + comm, + group, + ierror + ); +} + +void mpi_comm_idup_( + const MPI_Fint *comm, + MPI_Fint *newcomm, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_comm_idup_ptr)( + comm, + newcomm, + request, + ierror + ); +} + +void mpi_comm_idup_with_info_( + const MPI_Fint *comm, + const MPI_Fint *info, + MPI_Fint *newcomm, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_comm_idup_with_info_ptr)( + comm, + info, + newcomm, + request, + ierror + ); +} + +void mpi_comm_rank_( + const MPI_Fint *comm, + MPI_Fint *rank, + MPI_Fint *ierror +) { + return (*mpiabi_comm_rank_ptr)( + comm, + rank, + ierror + ); +} + +void mpi_comm_remote_group_( + const MPI_Fint *comm, + MPI_Fint *group, + MPI_Fint *ierror +) { + return (*mpiabi_comm_remote_group_ptr)( + comm, + group, + ierror + ); +} + +void mpi_comm_remote_size_( + const MPI_Fint *comm, + MPI_Fint *size, + MPI_Fint *ierror +) { + return (*mpiabi_comm_remote_size_ptr)( + comm, + size, + ierror + ); +} + +void mpi_comm_set_attr_( + const MPI_Fint *comm, + const MPI_Fint *comm_keyval, + void *attribute_val, + MPI_Fint *ierror +) { + return (*mpiabi_comm_set_attr_ptr)( + comm, + comm_keyval, + attribute_val, + ierror + ); +} + +void mpi_comm_set_info_( + const MPI_Fint *comm, + const MPI_Fint *info, + MPI_Fint *ierror +) { + return (*mpiabi_comm_set_info_ptr)( + comm, + info, + ierror + ); +} + +void mpi_comm_set_name_( + const MPI_Fint *comm, + const char **comm_name, + MPI_Fint *ierror +) { + return (*mpiabi_comm_set_name_ptr)( + comm, + comm_name, + ierror + ); +} + +void mpi_comm_size_( + const MPI_Fint *comm, + MPI_Fint *size, + MPI_Fint *ierror +) { + return (*mpiabi_comm_size_ptr)( + comm, + size, + ierror + ); +} + +void mpi_comm_split_( + const MPI_Fint *comm, + const MPI_Fint *color, + const MPI_Fint *key, + MPI_Fint *newcomm, + MPI_Fint *ierror +) { + return (*mpiabi_comm_split_ptr)( + comm, + color, + key, + newcomm, + ierror + ); +} + +void mpi_group_free_( + MPI_Fint *group, + MPI_Fint *ierror +) { + return (*mpiabi_group_free_ptr)( + group, + ierror + ); +} + +void mpi_comm_split_type_( + const MPI_Fint *comm, + const MPI_Fint *split_type, + const MPI_Fint *key, + const MPI_Fint *info, + MPI_Fint *newcomm, + MPI_Fint *ierror +) { + return (*mpiabi_comm_split_type_ptr)( + comm, + split_type, + key, + info, + newcomm, + ierror + ); +} + +void mpi_comm_test_inter_( + const MPI_Fint *comm, + MPI_Fint *flag, + MPI_Fint *ierror +) { + return (*mpiabi_comm_test_inter_ptr)( + comm, + flag, + ierror + ); +} + +void mpi_group_compare_( + const MPI_Fint *group1, + const MPI_Fint *group2, + MPI_Fint *result, + MPI_Fint *ierror +) { + return (*mpiabi_group_compare_ptr)( + group1, + group2, + result, + ierror + ); +} + +void mpi_group_difference_( + const MPI_Fint *group1, + const MPI_Fint *group2, + MPI_Fint *newgroup, + MPI_Fint *ierror +) { + return (*mpiabi_group_difference_ptr)( + group1, + group2, + newgroup, + ierror + ); +} + +void mpi_group_excl_( + const MPI_Fint *group, + const MPI_Fint *n, + const MPI_Fint *ranks, + MPI_Fint *newgroup, + MPI_Fint *ierror +) { + return (*mpiabi_group_excl_ptr)( + group, + n, + ranks, + newgroup, + ierror + ); +} + +void mpi_group_from_session_pset_( + const MPI_Fint *session, + const char **pset_name, + MPI_Fint *newgroup, + MPI_Fint *ierror +) { + return (*mpiabi_group_from_session_pset_ptr)( + session, + pset_name, + newgroup, + ierror + ); +} + +void mpi_group_incl_( + const MPI_Fint *group, + const MPI_Fint *n, + const MPI_Fint *ranks, + MPI_Fint *newgroup, + MPI_Fint *ierror +) { + return (*mpiabi_group_incl_ptr)( + group, + n, + ranks, + newgroup, + ierror + ); +} + +void mpi_group_intersection_( + const MPI_Fint *group1, + const MPI_Fint *group2, + MPI_Fint *newgroup, + MPI_Fint *ierror +) { + return (*mpiabi_group_intersection_ptr)( + group1, + group2, + newgroup, + ierror + ); +} + +void mpi_group_range_excl_( + const MPI_Fint *group, + const MPI_Fint *n, + const MPI_Fint *ranges, + MPI_Fint *newgroup, + MPI_Fint *ierror +) { + return (*mpiabi_group_range_excl_ptr)( + group, + n, + ranges, + newgroup, + ierror + ); +} + +void mpi_group_range_incl_( + const MPI_Fint *group, + const MPI_Fint *n, + const MPI_Fint *ranges, + MPI_Fint *newgroup, + MPI_Fint *ierror +) { + return (*mpiabi_group_range_incl_ptr)( + group, + n, + ranges, + newgroup, + ierror + ); +} + +void mpi_group_rank_( + const MPI_Fint *group, + MPI_Fint *rank, + MPI_Fint *ierror +) { + return (*mpiabi_group_rank_ptr)( + group, + rank, + ierror + ); +} + +void mpi_group_size_( + const MPI_Fint *group, + MPI_Fint *size, + MPI_Fint *ierror +) { + return (*mpiabi_group_size_ptr)( + group, + size, + ierror + ); +} + +void mpi_group_translate_ranks_( + const MPI_Fint *group1, + const MPI_Fint *n, + const MPI_Fint *ranks1, + const MPI_Fint *group2, + const MPI_Fint *ranks2, + MPI_Fint *ierror +) { + return (*mpiabi_group_translate_ranks_ptr)( + group1, + n, + ranks1, + group2, + ranks2, + ierror + ); +} + +void mpi_group_union_( + const MPI_Fint *group1, + const MPI_Fint *group2, + MPI_Fint *newgroup, + MPI_Fint *ierror +) { + return (*mpiabi_group_union_ptr)( + group1, + group2, + newgroup, + ierror + ); +} + +void mpi_intercomm_create_( + const MPI_Fint *local_comm, + const MPI_Fint *local_leader, + const MPI_Fint *peer_comm, + const MPI_Fint *remote_leader, + const MPI_Fint *tag, + MPI_Fint *newintercomm, + MPI_Fint *ierror +) { + return (*mpiabi_intercomm_create_ptr)( + local_comm, + local_leader, + peer_comm, + remote_leader, + tag, + newintercomm, + ierror + ); +} + +void mpi_intercomm_create_from_groups_( + const MPI_Fint *local_group, + const MPI_Fint *local_leader, + const MPI_Fint *remote_group, + const MPI_Fint *remote_leader, + const char **stringtag, + const MPI_Fint *info, + const MPI_Fint *errhandler, + MPI_Fint *newintercomm, + MPI_Fint *ierror +) { + return (*mpiabi_intercomm_create_from_groups_ptr)( + local_group, + local_leader, + remote_group, + remote_leader, + stringtag, + info, + errhandler, + newintercomm, + ierror + ); +} + +void mpi_intercomm_merge_( + const MPI_Fint *intercomm, + const MPI_Fint *high, + MPI_Fint *newintracomm, + MPI_Fint *ierror +) { + return (*mpiabi_intercomm_merge_ptr)( + intercomm, + high, + newintracomm, + ierror + ); +} + +void mpi_type_create_keyval_( + const void (**type_copy_attr_fn)(void), + const void (**type_delete_attr_fn)(void), + MPI_Fint *type_keyval, + void *extra_state, + MPI_Fint *ierror +) { + return (*mpiabi_type_create_keyval_ptr)( + type_copy_attr_fn, + type_delete_attr_fn, + type_keyval, + extra_state, + ierror + ); +} + +void mpi_type_delete_attr_( + const MPI_Fint *datatype, + const MPI_Fint *type_keyval, + MPI_Fint *ierror +) { + return (*mpiabi_type_delete_attr_ptr)( + datatype, + type_keyval, + ierror + ); +} + +void mpi_type_free_keyval_( + MPI_Fint *type_keyval, + MPI_Fint *ierror +) { + return (*mpiabi_type_free_keyval_ptr)( + type_keyval, + ierror + ); +} + +void mpi_type_get_attr_( + const MPI_Fint *datatype, + const MPI_Fint *type_keyval, + void *attribute_val, + MPI_Fint *flag, + MPI_Fint *ierror +) { + return (*mpiabi_type_get_attr_ptr)( + datatype, + type_keyval, + attribute_val, + flag, + ierror + ); +} + +void mpi_type_get_name_( + const MPI_Fint *datatype, + char **type_name, + MPI_Fint *resultlen, + MPI_Fint *ierror +) { + return (*mpiabi_type_get_name_ptr)( + datatype, + type_name, + resultlen, + ierror + ); +} + +void mpi_type_set_attr_( + const MPI_Fint *datatype, + const MPI_Fint *type_keyval, + void *attribute_val, + MPI_Fint *ierror +) { + return (*mpiabi_type_set_attr_ptr)( + datatype, + type_keyval, + attribute_val, + ierror + ); +} + +void mpi_type_set_name_( + const MPI_Fint *datatype, + const char **type_name, + MPI_Fint *ierror +) { + return (*mpiabi_type_set_name_ptr)( + datatype, + type_name, + ierror + ); +} + +void mpi_win_create_keyval_( + const void (**win_copy_attr_fn)(void), + const void (**win_delete_attr_fn)(void), + MPI_Fint *win_keyval, + void *extra_state, + MPI_Fint *ierror +) { + return (*mpiabi_win_create_keyval_ptr)( + win_copy_attr_fn, + win_delete_attr_fn, + win_keyval, + extra_state, + ierror + ); +} + +void mpi_win_delete_attr_( + const MPI_Fint *win, + const MPI_Fint *win_keyval, + MPI_Fint *ierror +) { + return (*mpiabi_win_delete_attr_ptr)( + win, + win_keyval, + ierror + ); +} + +void mpi_win_free_keyval_( + MPI_Fint *win_keyval, + MPI_Fint *ierror +) { + return (*mpiabi_win_free_keyval_ptr)( + win_keyval, + ierror + ); +} + +void mpi_win_get_attr_( + const MPI_Fint *win, + const MPI_Fint *win_keyval, + void *attribute_val, + MPI_Fint *flag, + MPI_Fint *ierror +) { + return (*mpiabi_win_get_attr_ptr)( + win, + win_keyval, + attribute_val, + flag, + ierror + ); +} + +void mpi_win_get_name_( + const MPI_Fint *win, + char **win_name, + MPI_Fint *resultlen, + MPI_Fint *ierror +) { + return (*mpiabi_win_get_name_ptr)( + win, + win_name, + resultlen, + ierror + ); +} + +void mpi_win_set_attr_( + const MPI_Fint *win, + const MPI_Fint *win_keyval, + void *attribute_val, + MPI_Fint *ierror +) { + return (*mpiabi_win_set_attr_ptr)( + win, + win_keyval, + attribute_val, + ierror + ); +} + +void mpi_win_set_name_( + const MPI_Fint *win, + const char **win_name, + MPI_Fint *ierror +) { + return (*mpiabi_win_set_name_ptr)( + win, + win_name, + ierror + ); +} + +void mpi_cart_coords_( + const MPI_Fint *comm, + const MPI_Fint *rank, + const MPI_Fint *maxdims, + MPI_Fint *coords, + MPI_Fint *ierror +) { + return (*mpiabi_cart_coords_ptr)( + comm, + rank, + maxdims, + coords, + ierror + ); +} + +void mpi_cart_create_( + const MPI_Fint *comm_old, + const MPI_Fint *ndims, + const MPI_Fint *dims, + const MPI_Fint *periods, + const MPI_Fint *reorder, + MPI_Fint *comm_cart, + MPI_Fint *ierror +) { + return (*mpiabi_cart_create_ptr)( + comm_old, + ndims, + dims, + periods, + reorder, + comm_cart, + ierror + ); +} + +void mpi_cart_get_( + const MPI_Fint *comm, + const MPI_Fint *maxdims, + MPI_Fint *dims, + MPI_Fint *periods, + MPI_Fint *coords, + MPI_Fint *ierror +) { + return (*mpiabi_cart_get_ptr)( + comm, + maxdims, + dims, + periods, + coords, + ierror + ); +} + +void mpi_cart_map_( + const MPI_Fint *comm, + const MPI_Fint *ndims, + const MPI_Fint *dims, + const MPI_Fint *periods, + MPI_Fint *newrank, + MPI_Fint *ierror +) { + return (*mpiabi_cart_map_ptr)( + comm, + ndims, + dims, + periods, + newrank, + ierror + ); +} + +void mpi_cart_rank_( + const MPI_Fint *comm, + const MPI_Fint *coords, + MPI_Fint *rank, + MPI_Fint *ierror +) { + return (*mpiabi_cart_rank_ptr)( + comm, + coords, + rank, + ierror + ); +} + +void mpi_cart_shift_( + const MPI_Fint *comm, + const MPI_Fint *direction, + const MPI_Fint *disp, + MPI_Fint *rank_source, + MPI_Fint *rank_dest, + MPI_Fint *ierror +) { + return (*mpiabi_cart_shift_ptr)( + comm, + direction, + disp, + rank_source, + rank_dest, + ierror + ); +} + +void mpi_cart_sub_( + const MPI_Fint *comm, + const MPI_Fint *remain_dims, + MPI_Fint *newcomm, + MPI_Fint *ierror +) { + return (*mpiabi_cart_sub_ptr)( + comm, + remain_dims, + newcomm, + ierror + ); +} + +void mpi_cartdim_get_( + const MPI_Fint *comm, + MPI_Fint *ndims, + MPI_Fint *ierror +) { + return (*mpiabi_cartdim_get_ptr)( + comm, + ndims, + ierror + ); +} + +void mpi_dims_create_( + const MPI_Fint *nnodes, + const MPI_Fint *ndims, + const MPI_Fint *dims, + MPI_Fint *ierror +) { + return (*mpiabi_dims_create_ptr)( + nnodes, + ndims, + dims, + ierror + ); +} + +void mpi_dist_graph_create_( + const MPI_Fint *comm_old, + const MPI_Fint *n, + const MPI_Fint *sources, + const MPI_Fint *degrees, + const MPI_Fint *destinations, + const MPI_Fint *weights, + const MPI_Fint *info, + const MPI_Fint *reorder, + MPI_Fint *comm_dist_graph, + MPI_Fint *ierror +) { + return (*mpiabi_dist_graph_create_ptr)( + comm_old, + n, + sources, + degrees, + destinations, + weights, + info, + reorder, + comm_dist_graph, + ierror + ); +} + +void mpi_dist_graph_create_adjacent_( + const MPI_Fint *comm_old, + const MPI_Fint *indegree, + const MPI_Fint *sources, + const MPI_Fint *sourceweights, + const MPI_Fint *outdegree, + const MPI_Fint *destinations, + const MPI_Fint *destweights, + const MPI_Fint *info, + const MPI_Fint *reorder, + MPI_Fint *comm_dist_graph, + MPI_Fint *ierror +) { + return (*mpiabi_dist_graph_create_adjacent_ptr)( + comm_old, + indegree, + sources, + sourceweights, + outdegree, + destinations, + destweights, + info, + reorder, + comm_dist_graph, + ierror + ); +} + +void mpi_dist_graph_neighbors_( + const MPI_Fint *comm, + const MPI_Fint *maxindegree, + MPI_Fint *sources, + MPI_Fint *sourceweights, + const MPI_Fint *maxoutdegree, + MPI_Fint *destinations, + MPI_Fint *destweights, + MPI_Fint *ierror +) { + return (*mpiabi_dist_graph_neighbors_ptr)( + comm, + maxindegree, + sources, + sourceweights, + maxoutdegree, + destinations, + destweights, + ierror + ); +} + +void mpi_dist_graph_neighbors_count_( + const MPI_Fint *comm, + MPI_Fint *indegree, + MPI_Fint *outdegree, + MPI_Fint *weighted, + MPI_Fint *ierror +) { + return (*mpiabi_dist_graph_neighbors_count_ptr)( + comm, + indegree, + outdegree, + weighted, + ierror + ); +} + +void mpi_graph_create_( + const MPI_Fint *comm_old, + const MPI_Fint *nnodes, + const MPI_Fint *index, + const MPI_Fint *edges, + const MPI_Fint *reorder, + MPI_Fint *comm_graph, + MPI_Fint *ierror +) { + return (*mpiabi_graph_create_ptr)( + comm_old, + nnodes, + index, + edges, + reorder, + comm_graph, + ierror + ); +} + +void mpi_graph_get_( + const MPI_Fint *comm, + const MPI_Fint *maxindex, + const MPI_Fint *maxedges, + MPI_Fint *index, + MPI_Fint *edges, + MPI_Fint *ierror +) { + return (*mpiabi_graph_get_ptr)( + comm, + maxindex, + maxedges, + index, + edges, + ierror + ); +} + +void mpi_graph_map_( + const MPI_Fint *comm, + const MPI_Fint *nnodes, + const MPI_Fint *index, + const MPI_Fint *edges, + MPI_Fint *newrank, + MPI_Fint *ierror +) { + return (*mpiabi_graph_map_ptr)( + comm, + nnodes, + index, + edges, + newrank, + ierror + ); +} + +void mpi_graph_neighbors_( + const MPI_Fint *comm, + const MPI_Fint *rank, + const MPI_Fint *maxneighbors, + MPI_Fint *neighbors, + MPI_Fint *ierror +) { + return (*mpiabi_graph_neighbors_ptr)( + comm, + rank, + maxneighbors, + neighbors, + ierror + ); +} + +void mpi_graph_neighbors_count_( + const MPI_Fint *comm, + const MPI_Fint *rank, + MPI_Fint *nneighbors, + MPI_Fint *ierror +) { + return (*mpiabi_graph_neighbors_count_ptr)( + comm, + rank, + nneighbors, + ierror + ); +} + +void mpi_graphdims_get_( + const MPI_Fint *comm, + MPI_Fint *nnodes, + MPI_Fint *nedges, + MPI_Fint *ierror +) { + return (*mpiabi_graphdims_get_ptr)( + comm, + nnodes, + nedges, + ierror + ); +} + +void mpi_ineighbor_allgather_( + const void *sendbuf, + const MPI_Fint *sendcount, + const MPI_Fint *sendtype, + void *recvbuf, + const MPI_Fint *recvcount, + const MPI_Fint *recvtype, + const MPI_Fint *comm, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_ineighbor_allgather_ptr)( + sendbuf, + sendcount, + sendtype, + recvbuf, + recvcount, + recvtype, + comm, + request, + ierror + ); +} + +void mpi_ineighbor_allgatherv_( + const void *sendbuf, + const MPI_Fint *sendcount, + const MPI_Fint *sendtype, + void *recvbuf, + const MPI_Fint *recvcounts, + const MPI_Fint *displs, + const MPI_Fint *recvtype, + const MPI_Fint *comm, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_ineighbor_allgatherv_ptr)( + sendbuf, + sendcount, + sendtype, + recvbuf, + recvcounts, + displs, + recvtype, + comm, + request, + ierror + ); +} + +void mpi_ineighbor_alltoall_( + const void *sendbuf, + const MPI_Fint *sendcount, + const MPI_Fint *sendtype, + void *recvbuf, + const MPI_Fint *recvcount, + const MPI_Fint *recvtype, + const MPI_Fint *comm, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_ineighbor_alltoall_ptr)( + sendbuf, + sendcount, + sendtype, + recvbuf, + recvcount, + recvtype, + comm, + request, + ierror + ); +} + +void mpi_ineighbor_alltoallv_( + const void *sendbuf, + const MPI_Fint *sendcounts, + const MPI_Fint *sdispls, + const MPI_Fint *sendtype, + void *recvbuf, + const MPI_Fint *recvcounts, + const MPI_Fint *rdispls, + const MPI_Fint *recvtype, + const MPI_Fint *comm, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_ineighbor_alltoallv_ptr)( + sendbuf, + sendcounts, + sdispls, + sendtype, + recvbuf, + recvcounts, + rdispls, + recvtype, + comm, + request, + ierror + ); +} + +void mpi_ineighbor_alltoallw_( + const void *sendbuf, + const MPI_Fint *sendcounts, + const MPI_Aint *sdispls, + const MPI_Fint *sendtypes, + void *recvbuf, + const MPI_Fint *recvcounts, + const MPI_Aint *rdispls, + const MPI_Fint *recvtypes, + const MPI_Fint *comm, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_ineighbor_alltoallw_ptr)( + sendbuf, + sendcounts, + sdispls, + sendtypes, + recvbuf, + recvcounts, + rdispls, + recvtypes, + comm, + request, + ierror + ); +} + +void mpi_neighbor_allgather_( + const void *sendbuf, + const MPI_Fint *sendcount, + const MPI_Fint *sendtype, + void *recvbuf, + const MPI_Fint *recvcount, + const MPI_Fint *recvtype, + const MPI_Fint *comm, + MPI_Fint *ierror +) { + return (*mpiabi_neighbor_allgather_ptr)( + sendbuf, + sendcount, + sendtype, + recvbuf, + recvcount, + recvtype, + comm, + ierror + ); +} + +void mpi_neighbor_allgather_init_( + const void *sendbuf, + const MPI_Fint *sendcount, + const MPI_Fint *sendtype, + void *recvbuf, + const MPI_Fint *recvcount, + const MPI_Fint *recvtype, + const MPI_Fint *comm, + const MPI_Fint *info, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_neighbor_allgather_init_ptr)( + sendbuf, + sendcount, + sendtype, + recvbuf, + recvcount, + recvtype, + comm, + info, + request, + ierror + ); +} + +void mpi_neighbor_allgatherv_( + const void *sendbuf, + const MPI_Fint *sendcount, + const MPI_Fint *sendtype, + void *recvbuf, + const MPI_Fint *recvcounts, + const MPI_Aint *displs, + const MPI_Fint *recvtype, + const MPI_Fint *comm, + MPI_Fint *ierror +) { + return (*mpiabi_neighbor_allgatherv_ptr)( + sendbuf, + sendcount, + sendtype, + recvbuf, + recvcounts, + displs, + recvtype, + comm, + ierror + ); +} + +void mpi_neighbor_allgatherv_init_( + const void *sendbuf, + const MPI_Fint *sendcount, + const MPI_Fint *sendtype, + void *recvbuf, + const MPI_Fint *recvcounts, + const MPI_Aint *displs, + const MPI_Fint *recvtype, + const MPI_Fint *comm, + const MPI_Fint *info, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_neighbor_allgatherv_init_ptr)( + sendbuf, + sendcount, + sendtype, + recvbuf, + recvcounts, + displs, + recvtype, + comm, + info, + request, + ierror + ); +} + +void mpi_neighbor_alltoall_( + const void *sendbuf, + const MPI_Fint *sendcount, + const MPI_Fint *sendtype, + void *recvbuf, + const MPI_Fint *recvcount, + const MPI_Fint *recvtype, + const MPI_Fint *comm, + MPI_Fint *ierror +) { + return (*mpiabi_neighbor_alltoall_ptr)( + sendbuf, + sendcount, + sendtype, + recvbuf, + recvcount, + recvtype, + comm, + ierror + ); +} + +void mpi_neighbor_alltoall_init_( + const void *sendbuf, + const MPI_Fint *sendcount, + const MPI_Fint *sendtype, + void *recvbuf, + const MPI_Fint *recvcount, + const MPI_Fint *recvtype, + const MPI_Fint *comm, + const MPI_Fint *info, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_neighbor_alltoall_init_ptr)( + sendbuf, + sendcount, + sendtype, + recvbuf, + recvcount, + recvtype, + comm, + info, + request, + ierror + ); +} + +void mpi_neighbor_alltoallv_( + const void *sendbuf, + const MPI_Fint *sendcounts, + const MPI_Fint *sdispls, + const MPI_Fint *sendtype, + void *recvbuf, + const MPI_Fint *recvcounts, + const MPI_Fint *rdispls, + const MPI_Fint *recvtype, + const MPI_Fint *comm, + MPI_Fint *ierror +) { + return (*mpiabi_neighbor_alltoallv_ptr)( + sendbuf, + sendcounts, + sdispls, + sendtype, + recvbuf, + recvcounts, + rdispls, + recvtype, + comm, + ierror + ); +} + +void mpi_neighbor_alltoallv_init_( + const void *sendbuf, + const MPI_Fint *sendcounts, + const MPI_Fint *sdispls, + const MPI_Fint *sendtype, + void *recvbuf, + const MPI_Fint *recvcounts, + const MPI_Fint *rdispls, + const MPI_Fint *recvtype, + const MPI_Fint *comm, + const MPI_Fint *info, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_neighbor_alltoallv_init_ptr)( + sendbuf, + sendcounts, + sdispls, + sendtype, + recvbuf, + recvcounts, + rdispls, + recvtype, + comm, + info, + request, + ierror + ); +} + +void mpi_neighbor_alltoallw_( + const void *sendbuf, + const MPI_Fint *sendcounts, + const MPI_Aint *sdispls, + const MPI_Fint *sendtypes, + void *recvbuf, + const MPI_Fint *recvcounts, + const MPI_Aint *rdispls, + const MPI_Fint *recvtypes, + const MPI_Fint *comm, + MPI_Fint *ierror +) { + return (*mpiabi_neighbor_alltoallw_ptr)( + sendbuf, + sendcounts, + sdispls, + sendtypes, + recvbuf, + recvcounts, + rdispls, + recvtypes, + comm, + ierror + ); +} + +void mpi_neighbor_alltoallw_init_( + const void *sendbuf, + const MPI_Fint *sendcounts, + const MPI_Aint *sdispls, + const MPI_Fint *sendtypes, + void *recvbuf, + const MPI_Fint *recvcounts, + const MPI_Aint *rdispls, + const MPI_Fint *recvtypes, + const MPI_Fint *comm, + const MPI_Fint *info, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_neighbor_alltoallw_init_ptr)( + sendbuf, + sendcounts, + sdispls, + sendtypes, + recvbuf, + recvcounts, + rdispls, + recvtypes, + comm, + info, + request, + ierror + ); +} + +void mpi_topo_test_( + const MPI_Fint *comm, + MPI_Fint *status, + MPI_Fint *ierror +) { + return (*mpiabi_topo_test_ptr)( + comm, + status, + ierror + ); +} + +void mpi_add_error_class_( + MPI_Fint *errorclass, + MPI_Fint *ierror +) { + return (*mpiabi_add_error_class_ptr)( + errorclass, + ierror + ); +} + +void mpi_add_error_code_( + const MPI_Fint *errorclass, + MPI_Fint *errorcode, + MPI_Fint *ierror +) { + return (*mpiabi_add_error_code_ptr)( + errorclass, + errorcode, + ierror + ); +} + +void mpi_add_error_string_( + const MPI_Fint *errorcode, + const char **string, + MPI_Fint *ierror +) { + return (*mpiabi_add_error_string_ptr)( + errorcode, + string, + ierror + ); +} + +void mpi_alloc_mem_( + const MPI_Aint *size, + const MPI_Fint *info, + void *baseptr, + MPI_Fint *ierror +) { + return (*mpiabi_alloc_mem_ptr)( + size, + info, + baseptr, + ierror + ); +} + +void mpi_comm_call_errhandler_( + const MPI_Fint *comm, + const MPI_Fint *errorcode, + MPI_Fint *ierror +) { + return (*mpiabi_comm_call_errhandler_ptr)( + comm, + errorcode, + ierror + ); +} + +void mpi_comm_create_errhandler_( + const void (**comm_errhandler_fn)(void), + MPI_Fint *errhandler, + MPI_Fint *ierror +) { + return (*mpiabi_comm_create_errhandler_ptr)( + comm_errhandler_fn, + errhandler, + ierror + ); +} + +void mpi_comm_get_errhandler_( + const MPI_Fint *comm, + MPI_Fint *errhandler, + MPI_Fint *ierror +) { + return (*mpiabi_comm_get_errhandler_ptr)( + comm, + errhandler, + ierror + ); +} + +void mpi_comm_set_errhandler_( + const MPI_Fint *comm, + const MPI_Fint *errhandler, + MPI_Fint *ierror +) { + return (*mpiabi_comm_set_errhandler_ptr)( + comm, + errhandler, + ierror + ); +} + +void mpi_errhandler_free_( + MPI_Fint *errhandler, + MPI_Fint *ierror +) { + return (*mpiabi_errhandler_free_ptr)( + errhandler, + ierror + ); +} + +void mpi_error_class_( + const MPI_Fint *errorcode, + MPI_Fint *errorclass, + MPI_Fint *ierror +) { + return (*mpiabi_error_class_ptr)( + errorcode, + errorclass, + ierror + ); +} + +void mpi_error_string_( + const MPI_Fint *errorcode, + char **string, + MPI_Fint *resultlen, + MPI_Fint *ierror +) { + return (*mpiabi_error_string_ptr)( + errorcode, + string, + resultlen, + ierror + ); +} + +void mpi_file_call_errhandler_( + const MPI_Fint *fh, + const MPI_Fint *errorcode, + MPI_Fint *ierror +) { + return (*mpiabi_file_call_errhandler_ptr)( + fh, + errorcode, + ierror + ); +} + +void mpi_file_create_errhandler_( + const void (**file_errhandler_fn)(void), + MPI_Fint *errhandler, + MPI_Fint *ierror +) { + return (*mpiabi_file_create_errhandler_ptr)( + file_errhandler_fn, + errhandler, + ierror + ); +} + +void mpi_file_get_errhandler_( + const MPI_Fint *file, + MPI_Fint *errhandler, + MPI_Fint *ierror +) { + return (*mpiabi_file_get_errhandler_ptr)( + file, + errhandler, + ierror + ); +} + +void mpi_file_set_errhandler_( + const MPI_Fint *file, + const MPI_Fint *errhandler, + MPI_Fint *ierror +) { + return (*mpiabi_file_set_errhandler_ptr)( + file, + errhandler, + ierror + ); +} + +void mpi_free_mem_( + void *base, + MPI_Fint *ierror +) { + return (*mpiabi_free_mem_ptr)( + base, + ierror + ); +} + +void mpi_get_hw_resource_info_( + MPI_Fint *hw_info, + MPI_Fint *ierror +) { + return (*mpiabi_get_hw_resource_info_ptr)( + hw_info, + ierror + ); +} + +void mpi_get_library_version_( + char **version, + MPI_Fint *resultlen, + MPI_Fint *ierror +) { + return (*mpiabi_get_library_version_ptr)( + version, + resultlen, + ierror + ); +} + +void mpi_get_processor_name_( + char **name, + MPI_Fint *resultlen, + MPI_Fint *ierror +) { + return (*mpiabi_get_processor_name_ptr)( + name, + resultlen, + ierror + ); +} + +void mpi_get_version_( + MPI_Fint *version, + MPI_Fint *subversion, + MPI_Fint *ierror +) { + return (*mpiabi_get_version_ptr)( + version, + subversion, + ierror + ); +} + +void mpi_remove_error_class_( + const MPI_Fint *errorclass, + MPI_Fint *ierror +) { + return (*mpiabi_remove_error_class_ptr)( + errorclass, + ierror + ); +} + +void mpi_remove_error_code_( + const MPI_Fint *errorcode, + MPI_Fint *ierror +) { + return (*mpiabi_remove_error_code_ptr)( + errorcode, + ierror + ); +} + +void mpi_remove_error_string_( + const MPI_Fint *errorcode, + MPI_Fint *ierror +) { + return (*mpiabi_remove_error_string_ptr)( + errorcode, + ierror + ); +} + +void mpi_session_call_errhandler_( + const MPI_Fint *session, + const MPI_Fint *errorcode, + MPI_Fint *ierror +) { + return (*mpiabi_session_call_errhandler_ptr)( + session, + errorcode, + ierror + ); +} + +void mpi_session_create_errhandler_( + const void (**session_errhandler_fn)(void), + MPI_Fint *errhandler, + MPI_Fint *ierror +) { + return (*mpiabi_session_create_errhandler_ptr)( + session_errhandler_fn, + errhandler, + ierror + ); +} + +void mpi_session_get_errhandler_( + const MPI_Fint *session, + MPI_Fint *errhandler, + MPI_Fint *ierror +) { + return (*mpiabi_session_get_errhandler_ptr)( + session, + errhandler, + ierror + ); +} + +void mpi_session_set_errhandler_( + const MPI_Fint *session, + const MPI_Fint *errhandler, + MPI_Fint *ierror +) { + return (*mpiabi_session_set_errhandler_ptr)( + session, + errhandler, + ierror + ); +} + +void mpi_win_call_errhandler_( + const MPI_Fint *win, + const MPI_Fint *errorcode, + MPI_Fint *ierror +) { + return (*mpiabi_win_call_errhandler_ptr)( + win, + errorcode, + ierror + ); +} + +void mpi_win_create_errhandler_( + const void (**win_errhandler_fn)(void), + MPI_Fint *errhandler, + MPI_Fint *ierror +) { + return (*mpiabi_win_create_errhandler_ptr)( + win_errhandler_fn, + errhandler, + ierror + ); +} + +void mpi_win_get_errhandler_( + const MPI_Fint *win, + MPI_Fint *errhandler, + MPI_Fint *ierror +) { + return (*mpiabi_win_get_errhandler_ptr)( + win, + errhandler, + ierror + ); +} + +void mpi_win_set_errhandler_( + const MPI_Fint *win, + const MPI_Fint *errhandler, + MPI_Fint *ierror +) { + return (*mpiabi_win_set_errhandler_ptr)( + win, + errhandler, + ierror + ); +} + +double mpi_wtick_( +) { + return (*mpiabi_wtick_ptr)( + ); +} + +double mpi_wtime_( +) { + return (*mpiabi_wtime_ptr)( + ); +} + +void mpi_info_create_( + MPI_Fint *info, + MPI_Fint *ierror +) { + return (*mpiabi_info_create_ptr)( + info, + ierror + ); +} + +void mpi_info_create_env_( + MPI_Fint *info, + MPI_Fint *ierror +) { + return (*mpiabi_info_create_env_ptr)( + info, + ierror + ); +} + +void mpi_info_delete_( + const MPI_Fint *info, + const char **key, + MPI_Fint *ierror +) { + return (*mpiabi_info_delete_ptr)( + info, + key, + ierror + ); +} + +void mpi_info_dup_( + const MPI_Fint *info, + MPI_Fint *newinfo, + MPI_Fint *ierror +) { + return (*mpiabi_info_dup_ptr)( + info, + newinfo, + ierror + ); +} + +void mpi_info_free_( + MPI_Fint *info, + MPI_Fint *ierror +) { + return (*mpiabi_info_free_ptr)( + info, + ierror + ); +} + +void mpi_info_get_nkeys_( + const MPI_Fint *info, + MPI_Fint *nkeys, + MPI_Fint *ierror +) { + return (*mpiabi_info_get_nkeys_ptr)( + info, + nkeys, + ierror + ); +} + +void mpi_info_get_nthkey_( + const MPI_Fint *info, + const MPI_Fint *n, + char **key, + MPI_Fint *ierror +) { + return (*mpiabi_info_get_nthkey_ptr)( + info, + n, + key, + ierror + ); +} + +void mpi_info_get_string_( + const MPI_Fint *info, + const char **key, + MPI_Fint *buflen, + char **value, + MPI_Fint *flag, + MPI_Fint *ierror +) { + return (*mpiabi_info_get_string_ptr)( + info, + key, + buflen, + value, + flag, + ierror + ); +} + +void mpi_info_set_( + const MPI_Fint *info, + const char **key, + const char **value, + MPI_Fint *ierror +) { + return (*mpiabi_info_set_ptr)( + info, + key, + value, + ierror + ); +} + +void mpi_abort_( + const MPI_Fint *comm, + const MPI_Fint *errorcode, + MPI_Fint *ierror +) { + return (*mpiabi_abort_ptr)( + comm, + errorcode, + ierror + ); +} + +void mpi_close_port_( + const char **port_name, + MPI_Fint *ierror +) { + return (*mpiabi_close_port_ptr)( + port_name, + ierror + ); +} + +void mpi_comm_accept_( + const char **port_name, + const MPI_Fint *info, + const MPI_Fint *root, + const MPI_Fint *comm, + MPI_Fint *newcomm, + MPI_Fint *ierror +) { + return (*mpiabi_comm_accept_ptr)( + port_name, + info, + root, + comm, + newcomm, + ierror + ); +} + +void mpi_comm_connect_( + const char **port_name, + const MPI_Fint *info, + const MPI_Fint *root, + const MPI_Fint *comm, + MPI_Fint *newcomm, + MPI_Fint *ierror +) { + return (*mpiabi_comm_connect_ptr)( + port_name, + info, + root, + comm, + newcomm, + ierror + ); +} + +void mpi_comm_disconnect_( + MPI_Fint *comm, + MPI_Fint *ierror +) { + return (*mpiabi_comm_disconnect_ptr)( + comm, + ierror + ); +} + +void mpi_comm_get_parent_( + MPI_Fint *parent, + MPI_Fint *ierror +) { + return (*mpiabi_comm_get_parent_ptr)( + parent, + ierror + ); +} + +void mpi_comm_join_( + const MPI_Fint *fd, + MPI_Fint *intercomm, + MPI_Fint *ierror +) { + return (*mpiabi_comm_join_ptr)( + fd, + intercomm, + ierror + ); +} + +void mpi_comm_spawn_( + const char **command, + const char **argv, + const MPI_Fint *maxprocs, + const MPI_Fint *info, + const MPI_Fint *root, + const MPI_Fint *comm, + MPI_Fint *intercomm, + MPI_Fint *array_of_errcodes, + MPI_Fint *ierror +) { + return (*mpiabi_comm_spawn_ptr)( + command, + argv, + maxprocs, + info, + root, + comm, + intercomm, + array_of_errcodes, + ierror + ); +} + +void mpi_comm_spawn_multiple_( + const MPI_Fint *count, + const char **array_of_commands, + const char **array_of_argv, + const MPI_Fint *array_of_maxprocs, + const MPI_Fint *array_of_info, + const MPI_Fint *root, + const MPI_Fint *comm, + MPI_Fint *intercomm, + MPI_Fint *array_of_errcodes, + MPI_Fint *ierror +) { + return (*mpiabi_comm_spawn_multiple_ptr)( + count, + array_of_commands, + array_of_argv, + array_of_maxprocs, + array_of_info, + root, + comm, + intercomm, + array_of_errcodes, + ierror + ); +} + +void mpi_finalize_( + MPI_Fint *ierror +) { + return (*mpiabi_finalize_ptr)( + ierror + ); +} + +void mpi_finalized_( + MPI_Fint *flag, + MPI_Fint *ierror +) { + return (*mpiabi_finalized_ptr)( + flag, + ierror + ); +} + +void mpi_init_( + MPI_Fint *ierror +) { + return (*mpiabi_init_ptr)( + ierror + ); +} + +void mpi_init_thread_( + const MPI_Fint *required, + MPI_Fint *provided, + MPI_Fint *ierror +) { + return (*mpiabi_init_thread_ptr)( + required, + provided, + ierror + ); +} + +void mpi_initialized_( + MPI_Fint *flag, + MPI_Fint *ierror +) { + return (*mpiabi_initialized_ptr)( + flag, + ierror + ); +} + +void mpi_is_thread_main_( + MPI_Fint *flag, + MPI_Fint *ierror +) { + return (*mpiabi_is_thread_main_ptr)( + flag, + ierror + ); +} + +void mpi_lookup_name_( + const char **service_name, + const MPI_Fint *info, + char **port_name, + MPI_Fint *ierror +) { + return (*mpiabi_lookup_name_ptr)( + service_name, + info, + port_name, + ierror + ); +} + +void mpi_open_port_( + const MPI_Fint *info, + char **port_name, + MPI_Fint *ierror +) { + return (*mpiabi_open_port_ptr)( + info, + port_name, + ierror + ); +} + +void mpi_publish_name_( + const char **service_name, + const MPI_Fint *info, + const char **port_name, + MPI_Fint *ierror +) { + return (*mpiabi_publish_name_ptr)( + service_name, + info, + port_name, + ierror + ); +} + +void mpi_query_thread_( + MPI_Fint *provided, + MPI_Fint *ierror +) { + return (*mpiabi_query_thread_ptr)( + provided, + ierror + ); +} + +void mpi_session_finalize_( + MPI_Fint *session, + MPI_Fint *ierror +) { + return (*mpiabi_session_finalize_ptr)( + session, + ierror + ); +} + +void mpi_session_get_info_( + const MPI_Fint *session, + MPI_Fint *info_used, + MPI_Fint *ierror +) { + return (*mpiabi_session_get_info_ptr)( + session, + info_used, + ierror + ); +} + +void mpi_session_get_nth_pset_( + const MPI_Fint *session, + const MPI_Fint *info, + const MPI_Fint *n, + MPI_Fint *pset_len, + char **pset_name, + MPI_Fint *ierror +) { + return (*mpiabi_session_get_nth_pset_ptr)( + session, + info, + n, + pset_len, + pset_name, + ierror + ); +} + +void mpi_session_get_num_psets_( + const MPI_Fint *session, + const MPI_Fint *info, + MPI_Fint *npset_names, + MPI_Fint *ierror +) { + return (*mpiabi_session_get_num_psets_ptr)( + session, + info, + npset_names, + ierror + ); +} + +void mpi_session_get_pset_info_( + const MPI_Fint *session, + const char **pset_name, + MPI_Fint *info, + MPI_Fint *ierror +) { + return (*mpiabi_session_get_pset_info_ptr)( + session, + pset_name, + info, + ierror + ); +} + +void mpi_session_init_( + const MPI_Fint *info, + const MPI_Fint *errhandler, + MPI_Fint *session, + MPI_Fint *ierror +) { + return (*mpiabi_session_init_ptr)( + info, + errhandler, + session, + ierror + ); +} + +void mpi_unpublish_name_( + const char **service_name, + const MPI_Fint *info, + const char **port_name, + MPI_Fint *ierror +) { + return (*mpiabi_unpublish_name_ptr)( + service_name, + info, + port_name, + ierror + ); +} + +void mpi_accumulate_( + const void *origin_addr, + const MPI_Fint *origin_count, + const MPI_Fint *origin_datatype, + const MPI_Fint *target_rank, + const MPI_Aint *target_disp, + const MPI_Fint *target_count, + const MPI_Fint *target_datatype, + const MPI_Fint *op, + const MPI_Fint *win, + MPI_Fint *ierror +) { + return (*mpiabi_accumulate_ptr)( + origin_addr, + origin_count, + origin_datatype, + target_rank, + target_disp, + target_count, + target_datatype, + op, + win, + ierror + ); +} + +void mpi_compare_and_swap_( + const void *origin_addr, + const void *compare_addr, + void *result_addr, + const MPI_Fint *datatype, + const MPI_Fint *target_rank, + const MPI_Aint *target_disp, + const MPI_Fint *win, + MPI_Fint *ierror +) { + return (*mpiabi_compare_and_swap_ptr)( + origin_addr, + compare_addr, + result_addr, + datatype, + target_rank, + target_disp, + win, + ierror + ); +} + +void mpi_fetch_and_op_( + const void *origin_addr, + void *result_addr, + const MPI_Fint *datatype, + const MPI_Fint *target_rank, + const MPI_Aint *target_disp, + const MPI_Fint *op, + const MPI_Fint *win, + MPI_Fint *ierror +) { + return (*mpiabi_fetch_and_op_ptr)( + origin_addr, + result_addr, + datatype, + target_rank, + target_disp, + op, + win, + ierror + ); +} + +void mpi_get_( + void *origin_addr, + const MPI_Fint *origin_count, + const MPI_Fint *origin_datatype, + const MPI_Fint *target_rank, + const MPI_Aint *target_disp, + const MPI_Fint *target_count, + const MPI_Fint *target_datatype, + const MPI_Fint *win, + MPI_Fint *ierror +) { + return (*mpiabi_get_ptr)( + origin_addr, + origin_count, + origin_datatype, + target_rank, + target_disp, + target_count, + target_datatype, + win, + ierror + ); +} + +void mpi_get_accumulate_( + const void *origin_addr, + const MPI_Fint *origin_count, + const MPI_Fint *origin_datatype, + void *result_addr, + const MPI_Fint *result_count, + const MPI_Fint *result_datatype, + const MPI_Fint *target_rank, + const MPI_Aint *target_disp, + const MPI_Fint *target_count, + const MPI_Fint *target_datatype, + const MPI_Fint *op, + const MPI_Fint *win, + MPI_Fint *ierror +) { + return (*mpiabi_get_accumulate_ptr)( + origin_addr, + origin_count, + origin_datatype, + result_addr, + result_count, + result_datatype, + target_rank, + target_disp, + target_count, + target_datatype, + op, + win, + ierror + ); +} + +void mpi_put_( + const void *origin_addr, + const MPI_Fint *origin_count, + const MPI_Fint *origin_datatype, + const MPI_Fint *target_rank, + const MPI_Aint *target_disp, + const MPI_Fint *target_count, + const MPI_Fint *target_datatype, + const MPI_Fint *win, + MPI_Fint *ierror +) { + return (*mpiabi_put_ptr)( + origin_addr, + origin_count, + origin_datatype, + target_rank, + target_disp, + target_count, + target_datatype, + win, + ierror + ); +} + +void mpi_raccumulate_( + const void *origin_addr, + const MPI_Fint *origin_count, + const MPI_Fint *origin_datatype, + const MPI_Fint *target_rank, + const MPI_Aint *target_disp, + const MPI_Fint *target_count, + const MPI_Fint *target_datatype, + const MPI_Fint *op, + const MPI_Fint *win, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_raccumulate_ptr)( + origin_addr, + origin_count, + origin_datatype, + target_rank, + target_disp, + target_count, + target_datatype, + op, + win, + request, + ierror + ); +} + +void mpi_rget_( + void *origin_addr, + const MPI_Fint *origin_count, + const MPI_Fint *origin_datatype, + const MPI_Fint *target_rank, + const MPI_Aint *target_disp, + const MPI_Fint *target_count, + const MPI_Fint *target_datatype, + const MPI_Fint *win, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_rget_ptr)( + origin_addr, + origin_count, + origin_datatype, + target_rank, + target_disp, + target_count, + target_datatype, + win, + request, + ierror + ); +} + +void mpi_rget_accumulate_( + const void *origin_addr, + const MPI_Fint *origin_count, + const MPI_Fint *origin_datatype, + void *result_addr, + const MPI_Fint *result_count, + const MPI_Fint *result_datatype, + const MPI_Fint *target_rank, + const MPI_Aint *target_disp, + const MPI_Fint *target_count, + const MPI_Fint *target_datatype, + const MPI_Fint *op, + const MPI_Fint *win, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_rget_accumulate_ptr)( + origin_addr, + origin_count, + origin_datatype, + result_addr, + result_count, + result_datatype, + target_rank, + target_disp, + target_count, + target_datatype, + op, + win, + request, + ierror + ); +} + +void mpi_rput_( + const void *origin_addr, + const MPI_Fint *origin_count, + const MPI_Fint *origin_datatype, + const MPI_Fint *target_rank, + const MPI_Aint *target_disp, + const MPI_Fint *target_count, + const MPI_Fint *target_datatype, + const MPI_Fint *win, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_rput_ptr)( + origin_addr, + origin_count, + origin_datatype, + target_rank, + target_disp, + target_count, + target_datatype, + win, + request, + ierror + ); +} + +void mpi_win_allocate_( + const MPI_Aint *size, + const MPI_Fint *disp_unit, + const MPI_Fint *info, + const MPI_Fint *comm, + void *baseptr, + MPI_Fint *win, + MPI_Fint *ierror +) { + return (*mpiabi_win_allocate_ptr)( + size, + disp_unit, + info, + comm, + baseptr, + win, + ierror + ); +} + +void mpi_win_allocate_shared_( + const MPI_Aint *size, + const MPI_Fint *disp_unit, + const MPI_Fint *info, + const MPI_Fint *comm, + void *baseptr, + MPI_Fint *win, + MPI_Fint *ierror +) { + return (*mpiabi_win_allocate_shared_ptr)( + size, + disp_unit, + info, + comm, + baseptr, + win, + ierror + ); +} + +void mpi_win_attach_( + const MPI_Fint *win, + void *base, + const MPI_Aint *size, + MPI_Fint *ierror +) { + return (*mpiabi_win_attach_ptr)( + win, + base, + size, + ierror + ); +} + +void mpi_win_complete_( + const MPI_Fint *win, + MPI_Fint *ierror +) { + return (*mpiabi_win_complete_ptr)( + win, + ierror + ); +} + +void mpi_win_create_( + void *base, + const MPI_Aint *size, + const MPI_Fint *disp_unit, + const MPI_Fint *info, + const MPI_Fint *comm, + MPI_Fint *win, + MPI_Fint *ierror +) { + return (*mpiabi_win_create_ptr)( + base, + size, + disp_unit, + info, + comm, + win, + ierror + ); +} + +void mpi_win_create_dynamic_( + const MPI_Fint *info, + const MPI_Fint *comm, + MPI_Fint *win, + MPI_Fint *ierror +) { + return (*mpiabi_win_create_dynamic_ptr)( + info, + comm, + win, + ierror + ); +} + +void mpi_win_detach_( + const MPI_Fint *win, + const void *base, + MPI_Fint *ierror +) { + return (*mpiabi_win_detach_ptr)( + win, + base, + ierror + ); +} + +void mpi_win_fence_( + const MPI_Fint *assert, + const MPI_Fint *win, + MPI_Fint *ierror +) { + return (*mpiabi_win_fence_ptr)( + assert, + win, + ierror + ); +} + +void mpi_win_flush_( + const MPI_Fint *rank, + const MPI_Fint *win, + MPI_Fint *ierror +) { + return (*mpiabi_win_flush_ptr)( + rank, + win, + ierror + ); +} + +void mpi_win_flush_all_( + const MPI_Fint *win, + MPI_Fint *ierror +) { + return (*mpiabi_win_flush_all_ptr)( + win, + ierror + ); +} + +void mpi_win_flush_local_( + const MPI_Fint *rank, + const MPI_Fint *win, + MPI_Fint *ierror +) { + return (*mpiabi_win_flush_local_ptr)( + rank, + win, + ierror + ); +} + +void mpi_win_flush_local_all_( + const MPI_Fint *win, + MPI_Fint *ierror +) { + return (*mpiabi_win_flush_local_all_ptr)( + win, + ierror + ); +} + +void mpi_win_free_( + MPI_Fint *win, + MPI_Fint *ierror +) { + return (*mpiabi_win_free_ptr)( + win, + ierror + ); +} + +void mpi_win_get_group_( + const MPI_Fint *win, + MPI_Fint *group, + MPI_Fint *ierror +) { + return (*mpiabi_win_get_group_ptr)( + win, + group, + ierror + ); +} + +void mpi_win_get_info_( + const MPI_Fint *win, + MPI_Fint *info_used, + MPI_Fint *ierror +) { + return (*mpiabi_win_get_info_ptr)( + win, + info_used, + ierror + ); +} + +void mpi_win_lock_( + const MPI_Fint *lock_type, + const MPI_Fint *rank, + const MPI_Fint *assert, + const MPI_Fint *win, + MPI_Fint *ierror +) { + return (*mpiabi_win_lock_ptr)( + lock_type, + rank, + assert, + win, + ierror + ); +} + +void mpi_win_lock_all_( + const MPI_Fint *assert, + const MPI_Fint *win, + MPI_Fint *ierror +) { + return (*mpiabi_win_lock_all_ptr)( + assert, + win, + ierror + ); +} + +void mpi_win_post_( + const MPI_Fint *group, + const MPI_Fint *assert, + const MPI_Fint *win, + MPI_Fint *ierror +) { + return (*mpiabi_win_post_ptr)( + group, + assert, + win, + ierror + ); +} + +void mpi_win_set_info_( + const MPI_Fint *win, + const MPI_Fint *info, + MPI_Fint *ierror +) { + return (*mpiabi_win_set_info_ptr)( + win, + info, + ierror + ); +} + +void mpi_win_shared_query_( + const MPI_Fint *win, + const MPI_Fint *rank, + MPI_Aint *size, + MPI_Fint *disp_unit, + void *baseptr, + MPI_Fint *ierror +) { + return (*mpiabi_win_shared_query_ptr)( + win, + rank, + size, + disp_unit, + baseptr, + ierror + ); +} + +void mpi_win_start_( + const MPI_Fint *group, + const MPI_Fint *assert, + const MPI_Fint *win, + MPI_Fint *ierror +) { + return (*mpiabi_win_start_ptr)( + group, + assert, + win, + ierror + ); +} + +void mpi_win_sync_( + const MPI_Fint *win, + MPI_Fint *ierror +) { + return (*mpiabi_win_sync_ptr)( + win, + ierror + ); +} + +void mpi_win_test_( + const MPI_Fint *win, + MPI_Fint *flag, + MPI_Fint *ierror +) { + return (*mpiabi_win_test_ptr)( + win, + flag, + ierror + ); +} + +void mpi_win_unlock_( + const MPI_Fint *rank, + const MPI_Fint *win, + MPI_Fint *ierror +) { + return (*mpiabi_win_unlock_ptr)( + rank, + win, + ierror + ); +} + +void mpi_win_unlock_all_( + const MPI_Fint *win, + MPI_Fint *ierror +) { + return (*mpiabi_win_unlock_all_ptr)( + win, + ierror + ); +} + +void mpi_win_wait_( + const MPI_Fint *win, + MPI_Fint *ierror +) { + return (*mpiabi_win_wait_ptr)( + win, + ierror + ); +} + +void mpi_grequest_complete_( + const MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_grequest_complete_ptr)( + request, + ierror + ); +} + +void mpi_grequest_start_( + const void (**query_fn)(void), + const void (**free_fn)(void), + const void (**cancel_fn)(void), + void *extra_state, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_grequest_start_ptr)( + query_fn, + free_fn, + cancel_fn, + extra_state, + request, + ierror + ); +} + +void mpi_status_set_cancelled_( + MPI_Fint *status[MPI_F_STATUS_SIZE], + const MPI_Fint *flag, + MPI_Fint *ierror +) { + return (*mpiabi_status_set_cancelled_ptr)( + status, + flag, + ierror + ); +} + +void mpi_status_set_elements_( + MPI_Fint *status[MPI_F_STATUS_SIZE], + const MPI_Fint *datatype, + const MPI_Fint *count, + MPI_Fint *ierror +) { + return (*mpiabi_status_set_elements_ptr)( + status, + datatype, + count, + ierror + ); +} + +void mpi_status_set_error_( + MPI_Fint *status[MPI_F_STATUS_SIZE], + const MPI_Fint *err, + MPI_Fint *ierror +) { + return (*mpiabi_status_set_error_ptr)( + status, + err, + ierror + ); +} + +void mpi_status_set_source_( + MPI_Fint *status[MPI_F_STATUS_SIZE], + const MPI_Fint *source, + MPI_Fint *ierror +) { + return (*mpiabi_status_set_source_ptr)( + status, + source, + ierror + ); +} + +void mpi_status_set_tag_( + MPI_Fint *status[MPI_F_STATUS_SIZE], + const MPI_Fint *tag, + MPI_Fint *ierror +) { + return (*mpiabi_status_set_tag_ptr)( + status, + tag, + ierror + ); +} + +void mpi_file_close_( + MPI_Fint *fh, + MPI_Fint *ierror +) { + return (*mpiabi_file_close_ptr)( + fh, + ierror + ); +} + +void mpi_file_delete_( + const char **filename, + const MPI_Fint *info, + MPI_Fint *ierror +) { + return (*mpiabi_file_delete_ptr)( + filename, + info, + ierror + ); +} + +void mpi_file_get_amode_( + const MPI_Fint *fh, + MPI_Fint *amode, + MPI_Fint *ierror +) { + return (*mpiabi_file_get_amode_ptr)( + fh, + amode, + ierror + ); +} + +void mpi_file_get_atomicity_( + const MPI_Fint *fh, + MPI_Fint *flag, + MPI_Fint *ierror +) { + return (*mpiabi_file_get_atomicity_ptr)( + fh, + flag, + ierror + ); +} + +void mpi_file_get_byte_offset_( + const MPI_Fint *fh, + const MPI_Offset *offset, + MPI_Offset *disp, + MPI_Fint *ierror +) { + return (*mpiabi_file_get_byte_offset_ptr)( + fh, + offset, + disp, + ierror + ); +} + +void mpi_file_get_group_( + const MPI_Fint *fh, + MPI_Fint *group, + MPI_Fint *ierror +) { + return (*mpiabi_file_get_group_ptr)( + fh, + group, + ierror + ); +} + +void mpi_file_get_info_( + const MPI_Fint *fh, + MPI_Fint *info_used, + MPI_Fint *ierror +) { + return (*mpiabi_file_get_info_ptr)( + fh, + info_used, + ierror + ); +} + +void mpi_file_get_position_( + const MPI_Fint *fh, + MPI_Offset *offset, + MPI_Fint *ierror +) { + return (*mpiabi_file_get_position_ptr)( + fh, + offset, + ierror + ); +} + +void mpi_file_get_position_shared_( + const MPI_Fint *fh, + MPI_Offset *offset, + MPI_Fint *ierror +) { + return (*mpiabi_file_get_position_shared_ptr)( + fh, + offset, + ierror + ); +} + +void mpi_file_get_size_( + const MPI_Fint *fh, + MPI_Offset *size, + MPI_Fint *ierror +) { + return (*mpiabi_file_get_size_ptr)( + fh, + size, + ierror + ); +} + +void mpi_file_get_type_extent_( + const MPI_Fint *fh, + const MPI_Fint *datatype, + MPI_Aint *extent, + MPI_Fint *ierror +) { + return (*mpiabi_file_get_type_extent_ptr)( + fh, + datatype, + extent, + ierror + ); +} + +void mpi_file_get_view_( + const MPI_Fint *fh, + MPI_Offset *disp, + MPI_Fint *etype, + MPI_Fint *filetype, + char **datarep, + MPI_Fint *ierror +) { + return (*mpiabi_file_get_view_ptr)( + fh, + disp, + etype, + filetype, + datarep, + ierror + ); +} + +void mpi_file_iread_( + const MPI_Fint *fh, + void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_file_iread_ptr)( + fh, + buf, + count, + datatype, + request, + ierror + ); +} + +void mpi_file_iread_all_( + const MPI_Fint *fh, + void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_file_iread_all_ptr)( + fh, + buf, + count, + datatype, + request, + ierror + ); +} + +void mpi_file_iread_at_( + const MPI_Fint *fh, + const MPI_Offset *offset, + void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_file_iread_at_ptr)( + fh, + offset, + buf, + count, + datatype, + request, + ierror + ); +} + +void mpi_file_iread_at_all_( + const MPI_Fint *fh, + const MPI_Offset *offset, + void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_file_iread_at_all_ptr)( + fh, + offset, + buf, + count, + datatype, + request, + ierror + ); +} + +void mpi_file_iread_shared_( + const MPI_Fint *fh, + void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_file_iread_shared_ptr)( + fh, + buf, + count, + datatype, + request, + ierror + ); +} + +void mpi_file_iwrite_( + const MPI_Fint *fh, + const void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_file_iwrite_ptr)( + fh, + buf, + count, + datatype, + request, + ierror + ); +} + +void mpi_file_iwrite_all_( + const MPI_Fint *fh, + const void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_file_iwrite_all_ptr)( + fh, + buf, + count, + datatype, + request, + ierror + ); +} + +void mpi_file_iwrite_at_( + const MPI_Fint *fh, + const MPI_Offset *offset, + const void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_file_iwrite_at_ptr)( + fh, + offset, + buf, + count, + datatype, + request, + ierror + ); +} + +void mpi_file_iwrite_at_all_( + const MPI_Fint *fh, + const MPI_Offset *offset, + const void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_file_iwrite_at_all_ptr)( + fh, + offset, + buf, + count, + datatype, + request, + ierror + ); +} + +void mpi_file_iwrite_shared_( + const MPI_Fint *fh, + const void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + MPI_Fint *request, + MPI_Fint *ierror +) { + return (*mpiabi_file_iwrite_shared_ptr)( + fh, + buf, + count, + datatype, + request, + ierror + ); +} + +void mpi_file_open_( + const MPI_Fint *comm, + const char **filename, + const MPI_Fint *amode, + const MPI_Fint *info, + MPI_Fint *fh, + MPI_Fint *ierror +) { + return (*mpiabi_file_open_ptr)( + comm, + filename, + amode, + info, + fh, + ierror + ); +} + +void mpi_file_preallocate_( + const MPI_Fint *fh, + const MPI_Offset *size, + MPI_Fint *ierror +) { + return (*mpiabi_file_preallocate_ptr)( + fh, + size, + ierror + ); +} + +void mpi_file_read_( + const MPI_Fint *fh, + void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + MPI_Fint *status[MPI_F_STATUS_SIZE], + MPI_Fint *ierror +) { + return (*mpiabi_file_read_ptr)( + fh, + buf, + count, + datatype, + status, + ierror + ); +} + +void mpi_file_read_all_( + const MPI_Fint *fh, + void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + MPI_Fint *status[MPI_F_STATUS_SIZE], + MPI_Fint *ierror +) { + return (*mpiabi_file_read_all_ptr)( + fh, + buf, + count, + datatype, + status, + ierror + ); +} + +void mpi_file_read_all_begin_( + const MPI_Fint *fh, + void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + MPI_Fint *ierror +) { + return (*mpiabi_file_read_all_begin_ptr)( + fh, + buf, + count, + datatype, + ierror + ); +} + +void mpi_file_read_all_end_( + const MPI_Fint *fh, + void *buf, + MPI_Fint *status[MPI_F_STATUS_SIZE], + MPI_Fint *ierror +) { + return (*mpiabi_file_read_all_end_ptr)( + fh, + buf, + status, + ierror + ); +} + +void mpi_file_read_at_( + const MPI_Fint *fh, + const MPI_Offset *offset, + void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + MPI_Fint *status[MPI_F_STATUS_SIZE], + MPI_Fint *ierror +) { + return (*mpiabi_file_read_at_ptr)( + fh, + offset, + buf, + count, + datatype, + status, + ierror + ); +} + +void mpi_file_read_at_all_( + const MPI_Fint *fh, + const MPI_Offset *offset, + void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + MPI_Fint *status[MPI_F_STATUS_SIZE], + MPI_Fint *ierror +) { + return (*mpiabi_file_read_at_all_ptr)( + fh, + offset, + buf, + count, + datatype, + status, + ierror + ); +} + +void mpi_file_read_at_all_begin_( + const MPI_Fint *fh, + const MPI_Offset *offset, + void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + MPI_Fint *ierror +) { + return (*mpiabi_file_read_at_all_begin_ptr)( + fh, + offset, + buf, + count, + datatype, + ierror + ); +} + +void mpi_file_read_at_all_end_( + const MPI_Fint *fh, + void *buf, + MPI_Fint *status[MPI_F_STATUS_SIZE], + MPI_Fint *ierror +) { + return (*mpiabi_file_read_at_all_end_ptr)( + fh, + buf, + status, + ierror + ); +} + +void mpi_file_read_ordered_( + const MPI_Fint *fh, + void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + MPI_Fint *status[MPI_F_STATUS_SIZE], + MPI_Fint *ierror +) { + return (*mpiabi_file_read_ordered_ptr)( + fh, + buf, + count, + datatype, + status, + ierror + ); +} + +void mpi_file_read_ordered_begin_( + const MPI_Fint *fh, + void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + MPI_Fint *ierror +) { + return (*mpiabi_file_read_ordered_begin_ptr)( + fh, + buf, + count, + datatype, + ierror + ); +} + +void mpi_file_read_ordered_end_( + const MPI_Fint *fh, + void *buf, + MPI_Fint *status[MPI_F_STATUS_SIZE], + MPI_Fint *ierror +) { + return (*mpiabi_file_read_ordered_end_ptr)( + fh, + buf, + status, + ierror + ); +} + +void mpi_file_read_shared_( + const MPI_Fint *fh, + void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + MPI_Fint *status[MPI_F_STATUS_SIZE], + MPI_Fint *ierror +) { + return (*mpiabi_file_read_shared_ptr)( + fh, + buf, + count, + datatype, + status, + ierror + ); +} + +void mpi_file_seek_( + const MPI_Fint *fh, + const MPI_Offset *offset, + const MPI_Fint *whence, + MPI_Fint *ierror +) { + return (*mpiabi_file_seek_ptr)( + fh, + offset, + whence, + ierror + ); +} + +void mpi_file_seek_shared_( + const MPI_Fint *fh, + const MPI_Offset *offset, + const MPI_Fint *whence, + MPI_Fint *ierror +) { + return (*mpiabi_file_seek_shared_ptr)( + fh, + offset, + whence, + ierror + ); +} + +void mpi_file_set_atomicity_( + const MPI_Fint *fh, + const MPI_Fint *flag, + MPI_Fint *ierror +) { + return (*mpiabi_file_set_atomicity_ptr)( + fh, + flag, + ierror + ); +} + +void mpi_file_set_info_( + const MPI_Fint *fh, + const MPI_Fint *info, + MPI_Fint *ierror +) { + return (*mpiabi_file_set_info_ptr)( + fh, + info, + ierror + ); +} + +void mpi_file_set_size_( + const MPI_Fint *fh, + const MPI_Offset *size, + MPI_Fint *ierror +) { + return (*mpiabi_file_set_size_ptr)( + fh, + size, + ierror + ); +} + +void mpi_file_set_view_( + const MPI_Fint *fh, + const MPI_Offset *disp, + const MPI_Fint *etype, + const MPI_Fint *filetype, + const char **datarep, + const MPI_Fint *info, + MPI_Fint *ierror +) { + return (*mpiabi_file_set_view_ptr)( + fh, + disp, + etype, + filetype, + datarep, + info, + ierror + ); +} + +void mpi_file_sync_( + const MPI_Fint *fh, + MPI_Fint *ierror +) { + return (*mpiabi_file_sync_ptr)( + fh, + ierror + ); +} + +void mpi_file_write_( + const MPI_Fint *fh, + const void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + MPI_Fint *status[MPI_F_STATUS_SIZE], + MPI_Fint *ierror +) { + return (*mpiabi_file_write_ptr)( + fh, + buf, + count, + datatype, + status, + ierror + ); +} + +void mpi_file_write_all_( + const MPI_Fint *fh, + const void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + MPI_Fint *status[MPI_F_STATUS_SIZE], + MPI_Fint *ierror +) { + return (*mpiabi_file_write_all_ptr)( + fh, + buf, + count, + datatype, + status, + ierror + ); +} + +void mpi_file_write_all_begin_( + const MPI_Fint *fh, + const void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + MPI_Fint *ierror +) { + return (*mpiabi_file_write_all_begin_ptr)( + fh, + buf, + count, + datatype, + ierror + ); +} + +void mpi_file_write_all_end_( + const MPI_Fint *fh, + const void *buf, + MPI_Fint *status[MPI_F_STATUS_SIZE], + MPI_Fint *ierror +) { + return (*mpiabi_file_write_all_end_ptr)( + fh, + buf, + status, + ierror + ); +} + +void mpi_file_write_at_( + const MPI_Fint *fh, + const MPI_Offset *offset, + const void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + MPI_Fint *status[MPI_F_STATUS_SIZE], + MPI_Fint *ierror +) { + return (*mpiabi_file_write_at_ptr)( + fh, + offset, + buf, + count, + datatype, + status, + ierror + ); +} + +void mpi_file_write_at_all_( + const MPI_Fint *fh, + const MPI_Offset *offset, + const void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + MPI_Fint *status[MPI_F_STATUS_SIZE], + MPI_Fint *ierror +) { + return (*mpiabi_file_write_at_all_ptr)( + fh, + offset, + buf, + count, + datatype, + status, + ierror + ); +} + +void mpi_file_write_at_all_begin_( + const MPI_Fint *fh, + const MPI_Offset *offset, + const void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + MPI_Fint *ierror +) { + return (*mpiabi_file_write_at_all_begin_ptr)( + fh, + offset, + buf, + count, + datatype, + ierror + ); +} + +void mpi_file_write_at_all_end_( + const MPI_Fint *fh, + const void *buf, + MPI_Fint *status[MPI_F_STATUS_SIZE], + MPI_Fint *ierror +) { + return (*mpiabi_file_write_at_all_end_ptr)( + fh, + buf, + status, + ierror + ); +} + +void mpi_file_write_ordered_( + const MPI_Fint *fh, + const void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + MPI_Fint *status[MPI_F_STATUS_SIZE], + MPI_Fint *ierror +) { + return (*mpiabi_file_write_ordered_ptr)( + fh, + buf, + count, + datatype, + status, + ierror + ); +} + +void mpi_file_write_ordered_begin_( + const MPI_Fint *fh, + const void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + MPI_Fint *ierror +) { + return (*mpiabi_file_write_ordered_begin_ptr)( + fh, + buf, + count, + datatype, + ierror + ); +} + +void mpi_file_write_ordered_end_( + const MPI_Fint *fh, + const void *buf, + MPI_Fint *status[MPI_F_STATUS_SIZE], + MPI_Fint *ierror +) { + return (*mpiabi_file_write_ordered_end_ptr)( + fh, + buf, + status, + ierror + ); +} + +void mpi_file_write_shared_( + const MPI_Fint *fh, + const void *buf, + const MPI_Fint *count, + const MPI_Fint *datatype, + MPI_Fint *status[MPI_F_STATUS_SIZE], + MPI_Fint *ierror +) { + return (*mpiabi_file_write_shared_ptr)( + fh, + buf, + count, + datatype, + status, + ierror + ); +} + +void mpi_register_datarep_( + const char **datarep, + const void (**read_conversion_fn)(void), + const void (**write_conversion_fn)(void), + const void (**dtype_file_extent_fn)(void), + void *extra_state, + MPI_Fint *ierror +) { + return (*mpiabi_register_datarep_ptr)( + datarep, + read_conversion_fn, + write_conversion_fn, + dtype_file_extent_fn, + extra_state, + ierror + ); +} + +void mpi_f_sync_reg_( + void *buf +) { + return (*mpiabi_f_sync_reg_ptr)( + buf + ); +} + +void mpi_type_create_f90_complex_( + const MPI_Fint *p, + const MPI_Fint *r, + MPI_Fint *newtype, + MPI_Fint *ierror +) { + return (*mpiabi_type_create_f90_complex_ptr)( + p, + r, + newtype, + ierror + ); +} + +void mpi_type_create_f90_integer_( + const MPI_Fint *r, + MPI_Fint *newtype, + MPI_Fint *ierror +) { + return (*mpiabi_type_create_f90_integer_ptr)( + r, + newtype, + ierror + ); +} + +void mpi_type_create_f90_real_( + const MPI_Fint *p, + const MPI_Fint *r, + MPI_Fint *newtype, + MPI_Fint *ierror +) { + return (*mpiabi_type_create_f90_real_ptr)( + p, + r, + newtype, + ierror + ); +} + +void mpi_type_match_size_( + const MPI_Fint *typeclass, + const MPI_Fint *size, + MPI_Fint *newtype, + MPI_Fint *ierror +) { + return (*mpiabi_type_match_size_ptr)( + typeclass, + size, + newtype, + ierror + ); +} + +void mpi_pcontrol_( + const MPI_Fint *level +) { + return (*mpiabi_pcontrol_ptr)( + level + ); +} + +void mpi_attr_delete_( + const MPI_Fint *comm, + const MPI_Fint *keyval, + MPI_Fint *ierror +) { + return (*mpiabi_attr_delete_ptr)( + comm, + keyval, + ierror + ); +} + +void mpi_attr_get_( + const MPI_Fint *comm, + const MPI_Fint *keyval, + void *attribute_val, + MPI_Fint *flag, + MPI_Fint *ierror +) { + return (*mpiabi_attr_get_ptr)( + comm, + keyval, + attribute_val, + flag, + ierror + ); +} + +void mpi_attr_put_( + const MPI_Fint *comm, + const MPI_Fint *keyval, + void *attribute_val, + MPI_Fint *ierror +) { + return (*mpiabi_attr_put_ptr)( + comm, + keyval, + attribute_val, + ierror + ); +} + +void mpi_get_elements_x_( + const MPI_Fint *status[MPI_F_STATUS_SIZE], + const MPI_Fint *datatype, + MPI_Count *count, + MPI_Fint *ierror +) { + return (*mpiabi_get_elements_x_ptr)( + status, + datatype, + count, + ierror + ); +} + +void mpi_info_get_( + const MPI_Fint *info, + const char **key, + const MPI_Fint *valuelen, + char **value, + MPI_Fint *flag, + MPI_Fint *ierror +) { + return (*mpiabi_info_get_ptr)( + info, + key, + valuelen, + value, + flag, + ierror + ); +} + +void mpi_info_get_valuelen_( + const MPI_Fint *info, + const char **key, + MPI_Fint *valuelen, + MPI_Fint *flag, + MPI_Fint *ierror +) { + return (*mpiabi_info_get_valuelen_ptr)( + info, + key, + valuelen, + flag, + ierror + ); +} + +void mpi_keyval_create_( + const void (**copy_fn)(void), + const void (**delete_fn)(void), + MPI_Fint *keyval, + void *extra_state, + MPI_Fint *ierror +) { + return (*mpiabi_keyval_create_ptr)( + copy_fn, + delete_fn, + keyval, + extra_state, + ierror + ); +} + +void mpi_keyval_free_( + MPI_Fint *keyval, + MPI_Fint *ierror +) { + return (*mpiabi_keyval_free_ptr)( + keyval, + ierror + ); +} + +void mpi_status_set_elements_x_( + MPI_Fint *status[MPI_F_STATUS_SIZE], + const MPI_Fint *datatype, + const MPI_Count *count, + MPI_Fint *ierror +) { + return (*mpiabi_status_set_elements_x_ptr)( + status, + datatype, + count, + ierror + ); +} + +void mpi_type_get_extent_x_( + const MPI_Fint *datatype, + MPI_Count *lb, + MPI_Count *extent, + MPI_Fint *ierror +) { + return (*mpiabi_type_get_extent_x_ptr)( + datatype, + lb, + extent, + ierror + ); +} + +void mpi_type_get_true_extent_x_( + const MPI_Fint *datatype, + MPI_Count *true_lb, + MPI_Count *true_extent, + MPI_Fint *ierror +) { + return (*mpiabi_type_get_true_extent_x_ptr)( + datatype, + true_lb, + true_extent, + ierror + ); +} + +void mpi_type_size_x_( + const MPI_Fint *datatype, + MPI_Count *size, + MPI_Fint *ierror +) { + return (*mpiabi_type_size_x_ptr)( + datatype, + size, + ierror + ); +} + +void mpi_address_( + void *location, + MPI_Aint *address, + MPI_Fint *ierror +) { + return (*mpiabi_address_ptr)( + location, + address, + ierror + ); +} + +void mpi_type_hindexed_( + const MPI_Fint *count, + MPI_Fint *array_of_blocklengths, + MPI_Aint *array_of_displacements, + const MPI_Fint *oldtype, + MPI_Fint *newtype, + MPI_Fint *ierror +) { + return (*mpiabi_type_hindexed_ptr)( + count, + array_of_blocklengths, + array_of_displacements, + oldtype, + newtype, + ierror + ); +} + +void mpi_type_hvector_( + const MPI_Fint *count, + const MPI_Fint *blocklength, + const MPI_Aint *stride, + const MPI_Fint *oldtype, + MPI_Fint *newtype, + MPI_Fint *ierror +) { + return (*mpiabi_type_hvector_ptr)( + count, + blocklength, + stride, + oldtype, + newtype, + ierror + ); +} + +void mpi_type_struct_( + const MPI_Fint *count, + MPI_Fint *array_of_blocklengths, + MPI_Aint *array_of_displacements, + MPI_Fint *array_of_types, + MPI_Fint *newtype, + MPI_Fint *ierror +) { + return (*mpiabi_type_struct_ptr)( + count, + array_of_blocklengths, + array_of_displacements, + array_of_types, + newtype, + ierror + ); +} + +void mpi_type_extent_( + const MPI_Fint *datatype, + MPI_Aint *extent, + MPI_Fint *ierror +) { + return (*mpiabi_type_extent_ptr)( + datatype, + extent, + ierror + ); +} + +void mpi_type_lb_( + const MPI_Fint *datatype, + MPI_Aint *displacement, + MPI_Fint *ierror +) { + return (*mpiabi_type_lb_ptr)( + datatype, + displacement, + ierror + ); +} + +void mpi_type_ub_( + const MPI_Fint *datatype, + MPI_Aint *displacement, + MPI_Fint *ierror +) { + return (*mpiabi_type_ub_ptr)( + datatype, + displacement, + ierror + ); +} + diff --git a/mpitrampoline/src/mpi_mpiabi_function_pointers.c b/mpitrampoline/src/mpi_mpiabi_function_pointers.c new file mode 100644 index 00000000..97c1c4bf --- /dev/null +++ b/mpitrampoline/src/mpi_mpiabi_function_pointers.c @@ -0,0 +1,1879 @@ +#include + +// Declare pointers to MPIABI functions + +// A.3 C Bindings + +// A.3.1 Point-to-Point Communication C Bindings + +int (*MPIABI_Bsend_ptr)(const void *buf, int count, MPIABI_Datatype datatype, + int dest, int tag, MPIABI_Comm comm); +int (*MPIABI_Bsend_c_ptr)(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm); +int (*MPIABI_Bsend_init_ptr)(const void *buf, int count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Bsend_init_c_ptr)(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Buffer_attach_ptr)(void *buffer, int size); +int (*MPIABI_Buffer_attach_c_ptr)(void *buffer, MPIABI_Count size); +int (*MPIABI_Buffer_detach_ptr)(void *buffer_addr, int *size); +int (*MPIABI_Buffer_detach_c_ptr)(void *buffer_addr, MPIABI_Count *size); +int (*MPIABI_Buffer_flush_ptr)(void); +int (*MPIABI_Buffer_iflush_ptr)(MPIABI_Request *request); +int (*MPIABI_Cancel_ptr)(MPIABI_Request *request); +int (*MPIABI_Comm_attach_buffer_ptr)(MPIABI_Comm comm, void *buffer, int size); +int (*MPIABI_Comm_attach_buffer_c_ptr)(MPIABI_Comm comm, void *buffer, + MPIABI_Count size); +int (*MPIABI_Comm_detach_buffer_ptr)(MPIABI_Comm comm, void *buffer_addr, + int *size); +int (*MPIABI_Comm_detach_buffer_c_ptr)(MPIABI_Comm comm, void *buffer_addr, + MPIABI_Count *size); +int (*MPIABI_Comm_flush_buffer_ptr)(MPIABI_Comm comm); +int (*MPIABI_Comm_iflush_buffer_ptr)(MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Get_count_ptr)(const MPIABI_Status *status, + MPIABI_Datatype datatype, int *count); +int (*MPIABI_Get_count_c_ptr)(const MPIABI_Status *status, + MPIABI_Datatype datatype, MPIABI_Count *count); +int (*MPIABI_Ibsend_ptr)(const void *buf, int count, MPIABI_Datatype datatype, + int dest, int tag, MPIABI_Comm comm, + MPIABI_Request *request); +int (*MPIABI_Ibsend_c_ptr)(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Improbe_ptr)(int source, int tag, MPIABI_Comm comm, int *flag, + MPIABI_Message *message, MPIABI_Status *status); +int (*MPIABI_Imrecv_ptr)(void *buf, int count, MPIABI_Datatype datatype, + MPIABI_Message *message, MPIABI_Request *request); +int (*MPIABI_Imrecv_c_ptr)(void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Message *message, + MPIABI_Request *request); +int (*MPIABI_Iprobe_ptr)(int source, int tag, MPIABI_Comm comm, int *flag, + MPIABI_Status *status); +int (*MPIABI_Irecv_ptr)(void *buf, int count, MPIABI_Datatype datatype, + int source, int tag, MPIABI_Comm comm, + MPIABI_Request *request); +int (*MPIABI_Irecv_c_ptr)(void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int source, int tag, + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Irsend_ptr)(const void *buf, int count, MPIABI_Datatype datatype, + int dest, int tag, MPIABI_Comm comm, + MPIABI_Request *request); +int (*MPIABI_Irsend_c_ptr)(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Isend_ptr)(const void *buf, int count, MPIABI_Datatype datatype, + int dest, int tag, MPIABI_Comm comm, + MPIABI_Request *request); +int (*MPIABI_Isend_c_ptr)(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Isendrecv_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, int dest, int sendtag, + void *recvbuf, int recvcount, + MPIABI_Datatype recvtype, int source, int recvtag, + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Isendrecv_c_ptr)(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, int dest, int sendtag, + void *recvbuf, MPIABI_Count recvcount, + MPIABI_Datatype recvtype, int source, int recvtag, + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Isendrecv_replace_ptr)(void *buf, int count, + MPIABI_Datatype datatype, int dest, + int sendtag, int source, int recvtag, + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Isendrecv_replace_c_ptr)(void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, + int sendtag, int source, int recvtag, + MPIABI_Comm comm, + MPIABI_Request *request); +int (*MPIABI_Issend_ptr)(const void *buf, int count, MPIABI_Datatype datatype, + int dest, int tag, MPIABI_Comm comm, + MPIABI_Request *request); +int (*MPIABI_Issend_c_ptr)(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Mprobe_ptr)(int source, int tag, MPIABI_Comm comm, + MPIABI_Message *message, MPIABI_Status *status); +int (*MPIABI_Mrecv_ptr)(void *buf, int count, MPIABI_Datatype datatype, + MPIABI_Message *message, MPIABI_Status *status); +int (*MPIABI_Mrecv_c_ptr)(void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Message *message, + MPIABI_Status *status); +int (*MPIABI_Probe_ptr)(int source, int tag, MPIABI_Comm comm, + MPIABI_Status *status); +int (*MPIABI_Recv_ptr)(void *buf, int count, MPIABI_Datatype datatype, + int source, int tag, MPIABI_Comm comm, + MPIABI_Status *status); +int (*MPIABI_Recv_c_ptr)(void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int source, int tag, + MPIABI_Comm comm, MPIABI_Status *status); +int (*MPIABI_Recv_init_ptr)(void *buf, int count, MPIABI_Datatype datatype, + int source, int tag, MPIABI_Comm comm, + MPIABI_Request *request); +int (*MPIABI_Recv_init_c_ptr)(void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int source, int tag, + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Request_free_ptr)(MPIABI_Request *request); +int (*MPIABI_Request_get_status_ptr)(MPIABI_Request request, int *flag, + MPIABI_Status *status); +int (*MPIABI_Request_get_status_all_ptr)( + int count, const MPIABI_Request array_of_requests[], int *flag, + MPIABI_Status array_of_statuses[]); +int (*MPIABI_Request_get_status_any_ptr)( + int count, const MPIABI_Request array_of_requests[], int *index, int *flag, + MPIABI_Status *status); +int (*MPIABI_Request_get_status_some_ptr)( + int incount, const MPIABI_Request array_of_requests[], int *outcount, + int array_of_indices[], MPIABI_Status array_of_statuses[]); +int (*MPIABI_Rsend_ptr)(const void *buf, int count, MPIABI_Datatype datatype, + int dest, int tag, MPIABI_Comm comm); +int (*MPIABI_Rsend_c_ptr)(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm); +int (*MPIABI_Rsend_init_ptr)(const void *buf, int count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Rsend_init_c_ptr)(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Send_ptr)(const void *buf, int count, MPIABI_Datatype datatype, + int dest, int tag, MPIABI_Comm comm); +int (*MPIABI_Send_c_ptr)(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm); +int (*MPIABI_Send_init_ptr)(const void *buf, int count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Send_init_c_ptr)(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Sendrecv_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, int dest, int sendtag, + void *recvbuf, int recvcount, + MPIABI_Datatype recvtype, int source, int recvtag, + MPIABI_Comm comm, MPIABI_Status *status); +int (*MPIABI_Sendrecv_c_ptr)(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, int dest, int sendtag, + void *recvbuf, MPIABI_Count recvcount, + MPIABI_Datatype recvtype, int source, int recvtag, + MPIABI_Comm comm, MPIABI_Status *status); +int (*MPIABI_Sendrecv_replace_ptr)(void *buf, int count, + MPIABI_Datatype datatype, int dest, + int sendtag, int source, int recvtag, + MPIABI_Comm comm, MPIABI_Status *status); +int (*MPIABI_Sendrecv_replace_c_ptr)(void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, + int sendtag, int source, int recvtag, + MPIABI_Comm comm, MPIABI_Status *status); +int (*MPIABI_Session_attach_buffer_ptr)(MPIABI_Session session, void *buffer, + int size); +int (*MPIABI_Session_attach_buffer_c_ptr)(MPIABI_Session session, void *buffer, + MPIABI_Count size); +int (*MPIABI_Session_detach_buffer_ptr)(MPIABI_Session session, + void *buffer_addr, int *size); +int (*MPIABI_Session_detach_buffer_c_ptr)(MPIABI_Session session, + void *buffer_addr, + MPIABI_Count *size); +int (*MPIABI_Session_flush_buffer_ptr)(MPIABI_Session session); +int (*MPIABI_Session_iflush_buffer_ptr)(MPIABI_Session session, + MPIABI_Request *request); +int (*MPIABI_Ssend_ptr)(const void *buf, int count, MPIABI_Datatype datatype, + int dest, int tag, MPIABI_Comm comm); +int (*MPIABI_Ssend_c_ptr)(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm); +int (*MPIABI_Ssend_init_ptr)(const void *buf, int count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Ssend_init_c_ptr)(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Start_ptr)(MPIABI_Request *request); +int (*MPIABI_Startall_ptr)(int count, MPIABI_Request array_of_requests[]); +int (*MPIABI_Status_get_error_ptr)(MPIABI_Status *status, int *err); +int (*MPIABI_Status_get_source_ptr)(MPIABI_Status *status, int *source); +int (*MPIABI_Status_get_tag_ptr)(MPIABI_Status *status, int *tag); +int (*MPIABI_Test_ptr)(MPIABI_Request *request, int *flag, + MPIABI_Status *status); +int (*MPIABI_Test_cancelled_ptr)(const MPIABI_Status *status, int *flag); +int (*MPIABI_Testall_ptr)(int count, MPIABI_Request array_of_requests[], + int *flag, MPIABI_Status array_of_statuses[]); +int (*MPIABI_Testany_ptr)(int count, MPIABI_Request array_of_requests[], + int *index, int *flag, MPIABI_Status *status); +int (*MPIABI_Testsome_ptr)(int incount, MPIABI_Request array_of_requests[], + int *outcount, int array_of_indices[], + MPIABI_Status array_of_statuses[]); +int (*MPIABI_Wait_ptr)(MPIABI_Request *request, MPIABI_Status *status); +int (*MPIABI_Waitall_ptr)(int count, MPIABI_Request array_of_requests[], + MPIABI_Status array_of_statuses[]); +int (*MPIABI_Waitany_ptr)(int count, MPIABI_Request array_of_requests[], + int *index, MPIABI_Status *status); +int (*MPIABI_Waitsome_ptr)(int incount, MPIABI_Request array_of_requests[], + int *outcount, int array_of_indices[], + MPIABI_Status array_of_statuses[]); + +// A.3.2 Partitioned Communication C Bindings + +int (*MPIABI_Parrived_ptr)(MPIABI_Request request, int partition, int *flag); +int (*MPIABI_Pready_ptr)(int partition, MPIABI_Request request); +int (*MPIABI_Pready_list_ptr)(int length, const int array_of_partitions[], + MPIABI_Request request); +int (*MPIABI_Pready_range_ptr)(int partition_low, int partition_high, + MPIABI_Request request); +int (*MPIABI_Precv_init_ptr)(void *buf, int partitions, MPIABI_Count count, + MPIABI_Datatype datatype, int source, int tag, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int (*MPIABI_Psend_init_ptr)(const void *buf, int partitions, + MPIABI_Count count, MPIABI_Datatype datatype, + int dest, int tag, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *request); + +// A.3.3 Datatypes C Bindings + +MPIABI_Aint (*MPIABI_Aint_add_ptr)(MPIABI_Aint base, MPIABI_Aint disp); +MPIABI_Aint (*MPIABI_Aint_diff_ptr)(MPIABI_Aint addr1, MPIABI_Aint addr2); +int (*MPIABI_Get_address_ptr)(const void *location, MPIABI_Aint *address); +int (*MPIABI_Get_elements_ptr)(const MPIABI_Status *status, + MPIABI_Datatype datatype, int *count); +int (*MPIABI_Get_elements_c_ptr)(const MPIABI_Status *status, + MPIABI_Datatype datatype, MPIABI_Count *count); +int (*MPIABI_Pack_ptr)(const void *inbuf, int incount, MPIABI_Datatype datatype, + void *outbuf, int outsize, int *position, + MPIABI_Comm comm); +int (*MPIABI_Pack_c_ptr)(const void *inbuf, MPIABI_Count incount, + MPIABI_Datatype datatype, void *outbuf, + MPIABI_Count outsize, MPIABI_Count *position, + MPIABI_Comm comm); +int (*MPIABI_Pack_external_ptr)(const char datarep[], const void *inbuf, + int incount, MPIABI_Datatype datatype, + void *outbuf, MPIABI_Aint outsize, + MPIABI_Aint *position); +int (*MPIABI_Pack_external_c_ptr)(const char datarep[], const void *inbuf, + MPIABI_Count incount, + MPIABI_Datatype datatype, void *outbuf, + MPIABI_Count outsize, MPIABI_Count *position); +int (*MPIABI_Pack_external_size_ptr)(const char datarep[], MPIABI_Count incount, + MPIABI_Datatype datatype, + MPIABI_Aint *size); +int (*MPIABI_Pack_external_size_c_ptr)(const char datarep[], + MPIABI_Count incount, + MPIABI_Datatype datatype, + MPIABI_Count *size); +int (*MPIABI_Pack_size_ptr)(int incount, MPIABI_Datatype datatype, + MPIABI_Comm comm, int *size); +int (*MPIABI_Pack_size_c_ptr)(MPIABI_Count incount, MPIABI_Datatype datatype, + MPIABI_Comm comm, MPIABI_Count *size); +int (*MPIABI_Type_commit_ptr)(MPIABI_Datatype *datatype); +int (*MPIABI_Type_contiguous_ptr)(int count, MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +int (*MPIABI_Type_contiguous_c_ptr)(MPIABI_Count count, MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +int (*MPIABI_Type_create_darray_ptr)(int size, int rank, int ndims, + const int array_of_gsizes[], + const int array_of_distribs[], + const int array_of_dargs[], + const int array_of_psizes[], int order, + MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +int (*MPIABI_Type_create_darray_c_ptr)(int size, int rank, int ndims, + const MPIABI_Count array_of_gsizes[], + const int array_of_distribs[], + const int array_of_dargs[], + const int array_of_psizes[], int order, + MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +int (*MPIABI_Type_create_hindexed_ptr)( + int count, const int array_of_blocklengths[], + const MPIABI_Aint array_of_displacements[], MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +int (*MPIABI_Type_create_hindexed_block_ptr)( + int count, int blocklength, const MPIABI_Aint array_of_displacements[], + MPIABI_Datatype oldtype, MPIABI_Datatype *newtype); +int (*MPIABI_Type_create_hindexed_block_c_ptr)( + MPIABI_Count count, MPIABI_Count blocklength, + const MPIABI_Count array_of_displacements[], MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +int (*MPIABI_Type_create_hindexed_c_ptr)( + MPIABI_Count count, const MPIABI_Count array_of_blocklengths[], + const MPIABI_Count array_of_displacements[], MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +int (*MPIABI_Type_create_hvector_ptr)(int count, int blocklength, + MPIABI_Aint stride, + MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +int (*MPIABI_Type_create_hvector_c_ptr)(MPIABI_Count count, + MPIABI_Count blocklength, + MPIABI_Count stride, + MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +int (*MPIABI_Type_create_indexed_block_ptr)(int count, int blocklength, + const int array_of_displacements[], + MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +int (*MPIABI_Type_create_indexed_block_c_ptr)( + MPIABI_Count count, MPIABI_Count blocklength, + const MPIABI_Count array_of_displacements[], MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +int (*MPIABI_Type_create_resized_ptr)(MPIABI_Datatype oldtype, MPIABI_Aint lb, + MPIABI_Aint extent, + MPIABI_Datatype *newtype); +int (*MPIABI_Type_create_resized_c_ptr)(MPIABI_Datatype oldtype, + MPIABI_Count lb, MPIABI_Count extent, + MPIABI_Datatype *newtype); +int (*MPIABI_Type_create_struct_ptr)(int count, + const int array_of_blocklengths[], + const MPIABI_Aint array_of_displacements[], + const MPIABI_Datatype array_of_types[], + MPIABI_Datatype *newtype); +int (*MPIABI_Type_create_struct_c_ptr)( + MPIABI_Count count, const MPIABI_Count array_of_blocklengths[], + const MPIABI_Count array_of_displacements[], + const MPIABI_Datatype array_of_types[], MPIABI_Datatype *newtype); +int (*MPIABI_Type_create_subarray_ptr)(int ndims, const int array_of_sizes[], + const int array_of_subsizes[], + const int array_of_starts[], int order, + MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +int (*MPIABI_Type_create_subarray_c_ptr)(int ndims, + const MPIABI_Count array_of_sizes[], + const MPIABI_Count array_of_subsizes[], + const MPIABI_Count array_of_starts[], + int order, MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +int (*MPIABI_Type_dup_ptr)(MPIABI_Datatype oldtype, MPIABI_Datatype *newtype); +int (*MPIABI_Type_free_ptr)(MPIABI_Datatype *datatype); +int (*MPIABI_Type_get_contents_ptr)(MPIABI_Datatype datatype, int max_integers, + int max_addresses, int max_datatypes, + int array_of_integers[], + MPIABI_Aint array_of_addresses[], + MPIABI_Datatype array_of_datatypes[]); +int (*MPIABI_Type_get_contents_c_ptr)( + MPIABI_Datatype datatype, MPIABI_Count max_integers, + MPIABI_Count max_addresses, MPIABI_Count max_large_counts, + MPIABI_Count max_datatypes, int array_of_integers[], + MPIABI_Aint array_of_addresses[], MPIABI_Count array_of_large_counts[], + MPIABI_Datatype array_of_datatypes[]); +int (*MPIABI_Type_get_envelope_ptr)(MPIABI_Datatype datatype, int *num_integers, + int *num_addresses, int *num_datatypes, + int *combiner); +int (*MPIABI_Type_get_envelope_c_ptr)(MPIABI_Datatype datatype, + MPIABI_Count *num_integers, + MPIABI_Count *num_addresses, + MPIABI_Count *num_large_counts, + MPIABI_Count *num_datatypes, + int *combiner); +int (*MPIABI_Type_get_extent_ptr)(MPIABI_Datatype datatype, MPIABI_Aint *lb, + MPIABI_Aint *extent); +int (*MPIABI_Type_get_extent_c_ptr)(MPIABI_Datatype datatype, MPIABI_Count *lb, + MPIABI_Count *extent); +int (*MPIABI_Type_get_true_extent_ptr)(MPIABI_Datatype datatype, + MPIABI_Aint *true_lb, + MPIABI_Aint *true_extent); +int (*MPIABI_Type_get_true_extent_c_ptr)(MPIABI_Datatype datatype, + MPIABI_Count *true_lb, + MPIABI_Count *true_extent); +int (*MPIABI_Type_indexed_ptr)(int count, const int array_of_blocklengths[], + const int array_of_displacements[], + MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +int (*MPIABI_Type_indexed_c_ptr)(MPIABI_Count count, + const MPIABI_Count array_of_blocklengths[], + const MPIABI_Count array_of_displacements[], + MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +int (*MPIABI_Type_size_ptr)(MPIABI_Datatype datatype, int *size); +int (*MPIABI_Type_size_c_ptr)(MPIABI_Datatype datatype, MPIABI_Count *size); +int (*MPIABI_Type_vector_ptr)(int count, int blocklength, int stride, + MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +int (*MPIABI_Type_vector_c_ptr)(MPIABI_Count count, MPIABI_Count blocklength, + MPIABI_Count stride, MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +int (*MPIABI_Unpack_ptr)(const void *inbuf, int insize, int *position, + void *outbuf, int outcount, MPIABI_Datatype datatype, + MPIABI_Comm comm); +int (*MPIABI_Unpack_c_ptr)(const void *inbuf, MPIABI_Count insize, + MPIABI_Count *position, void *outbuf, + MPIABI_Count outcount, MPIABI_Datatype datatype, + MPIABI_Comm comm); +int (*MPIABI_Unpack_external_ptr)(const char datarep[], const void *inbuf, + MPIABI_Aint insize, MPIABI_Aint *position, + void *outbuf, int outcount, + MPIABI_Datatype datatype); +int (*MPIABI_Unpack_external_c_ptr)(const char datarep[], const void *inbuf, + MPIABI_Count insize, MPIABI_Count *position, + void *outbuf, MPIABI_Count outcount, + MPIABI_Datatype datatype); + +// A.3.4 Collective Communication C Bindings + +int (*MPIABI_Allgather_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm); +int (*MPIABI_Allgather_c_ptr)(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm); +int (*MPIABI_Allgather_init_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int (*MPIABI_Allgather_init_c_ptr)(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *request); +int (*MPIABI_Allgatherv_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPIABI_Datatype recvtype, MPIABI_Comm comm); +int (*MPIABI_Allgatherv_c_ptr)(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], + const MPIABI_Aint displs[], + MPIABI_Datatype recvtype, MPIABI_Comm comm); +int (*MPIABI_Allgatherv_init_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *request); +int (*MPIABI_Allgatherv_init_c_ptr)(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], + const MPIABI_Aint displs[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *request); +int (*MPIABI_Allreduce_ptr)(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm); +int (*MPIABI_Allreduce_c_ptr)(const void *sendbuf, void *recvbuf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm); +int (*MPIABI_Allreduce_init_ptr)(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int (*MPIABI_Allreduce_init_c_ptr)(const void *sendbuf, void *recvbuf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *request); +int (*MPIABI_Alltoall_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm); +int (*MPIABI_Alltoall_c_ptr)(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm); +int (*MPIABI_Alltoall_init_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int (*MPIABI_Alltoall_init_c_ptr)(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *request); +int (*MPIABI_Alltoallv_ptr)(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPIABI_Datatype sendtype, + void *recvbuf, const int recvcounts[], + const int rdispls[], MPIABI_Datatype recvtype, + MPIABI_Comm comm); +int (*MPIABI_Alltoallv_c_ptr)(const void *sendbuf, + const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], + MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], + const MPIABI_Aint rdispls[], + MPIABI_Datatype recvtype, MPIABI_Comm comm); +int (*MPIABI_Alltoallv_init_ptr)(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPIABI_Datatype sendtype, + void *recvbuf, const int recvcounts[], + const int rdispls[], MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int (*MPIABI_Alltoallv_init_c_ptr)(const void *sendbuf, + const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], + MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], + const MPIABI_Aint rdispls[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *request); +int (*MPIABI_Alltoallw_ptr)(const void *sendbuf, const int sendcounts[], + const int sdispls[], + const MPIABI_Datatype sendtypes[], void *recvbuf, + const int recvcounts[], const int rdispls[], + const MPIABI_Datatype recvtypes[], + MPIABI_Comm comm); +int (*MPIABI_Alltoallw_c_ptr)( + const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], const MPIABI_Datatype sendtypes[], + void *recvbuf, const MPIABI_Count recvcounts[], const MPIABI_Aint rdispls[], + const MPIABI_Datatype recvtypes[], MPIABI_Comm comm); +int (*MPIABI_Alltoallw_init_ptr)( + const void *sendbuf, const int sendcounts[], const int sdispls[], + const MPIABI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], + const int rdispls[], const MPIABI_Datatype recvtypes[], MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *request); +int (*MPIABI_Alltoallw_init_c_ptr)( + const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], const MPIABI_Datatype sendtypes[], + void *recvbuf, const MPIABI_Count recvcounts[], const MPIABI_Aint rdispls[], + const MPIABI_Datatype recvtypes[], MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int (*MPIABI_Barrier_ptr)(MPIABI_Comm comm); +int (*MPIABI_Barrier_init_ptr)(MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int (*MPIABI_Bcast_ptr)(void *buffer, int count, MPIABI_Datatype datatype, + int root, MPIABI_Comm comm); +int (*MPIABI_Bcast_c_ptr)(void *buffer, MPIABI_Count count, + MPIABI_Datatype datatype, int root, MPIABI_Comm comm); +int (*MPIABI_Bcast_init_ptr)(void *buffer, int count, MPIABI_Datatype datatype, + int root, MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int (*MPIABI_Bcast_init_c_ptr)(void *buffer, MPIABI_Count count, + MPIABI_Datatype datatype, int root, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int (*MPIABI_Exscan_ptr)(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm); +int (*MPIABI_Exscan_c_ptr)(const void *sendbuf, void *recvbuf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm); +int (*MPIABI_Exscan_init_ptr)(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int (*MPIABI_Exscan_init_c_ptr)(const void *sendbuf, void *recvbuf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *request); +int (*MPIABI_Gather_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, int recvcount, + MPIABI_Datatype recvtype, int root, MPIABI_Comm comm); +int (*MPIABI_Gather_c_ptr)(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, MPIABI_Datatype recvtype, + int root, MPIABI_Comm comm); +int (*MPIABI_Gather_init_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, int root, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int (*MPIABI_Gather_init_c_ptr)(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, + MPIABI_Datatype recvtype, int root, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int (*MPIABI_Gatherv_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPIABI_Datatype recvtype, int root, MPIABI_Comm comm); +int (*MPIABI_Gatherv_c_ptr)(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], + const MPIABI_Aint displs[], + MPIABI_Datatype recvtype, int root, + MPIABI_Comm comm); +int (*MPIABI_Gatherv_init_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPIABI_Datatype recvtype, int root, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int (*MPIABI_Gatherv_init_c_ptr)(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], + const MPIABI_Aint displs[], + MPIABI_Datatype recvtype, int root, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int (*MPIABI_Iallgather_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Iallgather_c_ptr)(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Iallgatherv_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Request *request); +int (*MPIABI_Iallgatherv_c_ptr)(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], + const MPIABI_Aint displs[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Request *request); +int (*MPIABI_Iallreduce_ptr)(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Iallreduce_c_ptr)(const void *sendbuf, void *recvbuf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Request *request); +int (*MPIABI_Ialltoall_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Ialltoall_c_ptr)(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Ialltoallv_ptr)(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPIABI_Datatype sendtype, + void *recvbuf, const int recvcounts[], + const int rdispls[], MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Ialltoallv_c_ptr)( + const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], const MPIABI_Aint rdispls[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Ialltoallw_ptr)(const void *sendbuf, const int sendcounts[], + const int sdispls[], + const MPIABI_Datatype sendtypes[], void *recvbuf, + const int recvcounts[], const int rdispls[], + const MPIABI_Datatype recvtypes[], + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Ialltoallw_c_ptr)(const void *sendbuf, + const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], + const MPIABI_Datatype sendtypes[], void *recvbuf, + const MPIABI_Count recvcounts[], + const MPIABI_Aint rdispls[], + const MPIABI_Datatype recvtypes[], + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Ibarrier_ptr)(MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Ibcast_ptr)(void *buffer, int count, MPIABI_Datatype datatype, + int root, MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Ibcast_c_ptr)(void *buffer, MPIABI_Count count, + MPIABI_Datatype datatype, int root, MPIABI_Comm comm, + MPIABI_Request *request); +int (*MPIABI_Iexscan_ptr)(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Iexscan_c_ptr)(const void *sendbuf, void *recvbuf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Request *request); +int (*MPIABI_Igather_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, int root, + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Igather_c_ptr)(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, MPIABI_Datatype recvtype, + int root, MPIABI_Comm comm, + MPIABI_Request *request); +int (*MPIABI_Igatherv_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPIABI_Datatype recvtype, int root, MPIABI_Comm comm, + MPIABI_Request *request); +int (*MPIABI_Igatherv_c_ptr)(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], + const MPIABI_Aint displs[], + MPIABI_Datatype recvtype, int root, + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Ireduce_ptr)(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, int root, + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Ireduce_c_ptr)(const void *sendbuf, void *recvbuf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Op op, int root, MPIABI_Comm comm, + MPIABI_Request *request); +int (*MPIABI_Ireduce_scatter_ptr)(const void *sendbuf, void *recvbuf, + const int recvcounts[], + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Ireduce_scatter_block_ptr)(const void *sendbuf, void *recvbuf, + int recvcount, MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Request *request); +int (*MPIABI_Ireduce_scatter_block_c_ptr)(const void *sendbuf, void *recvbuf, + MPIABI_Count recvcount, + MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Request *request); +int (*MPIABI_Ireduce_scatter_c_ptr)(const void *sendbuf, void *recvbuf, + const MPIABI_Count recvcounts[], + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Iscan_ptr)(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Iscan_c_ptr)(const void *sendbuf, void *recvbuf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Request *request); +int (*MPIABI_Iscatter_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, int root, + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Iscatter_c_ptr)(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, MPIABI_Datatype recvtype, + int root, MPIABI_Comm comm, + MPIABI_Request *request); +int (*MPIABI_Iscatterv_ptr)(const void *sendbuf, const int sendcounts[], + const int displs[], MPIABI_Datatype sendtype, + void *recvbuf, int recvcount, + MPIABI_Datatype recvtype, int root, + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Iscatterv_c_ptr)(const void *sendbuf, + const MPIABI_Count sendcounts[], + const MPIABI_Aint displs[], + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, MPIABI_Datatype recvtype, + int root, MPIABI_Comm comm, + MPIABI_Request *request); +int (*MPIABI_Op_commutative_ptr)(MPIABI_Op op, int *commute); +int (*MPIABI_Op_create_ptr)(MPIABI_User_function *user_fn, int commute, + MPIABI_Op *op); +int (*MPIABI_Op_create_c_ptr)(MPIABI_User_function_c *user_fn, int commute, + MPIABI_Op *op); +int (*MPIABI_Op_free_ptr)(MPIABI_Op *op); +int (*MPIABI_Reduce_ptr)(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, int root, + MPIABI_Comm comm); +int (*MPIABI_Reduce_c_ptr)(const void *sendbuf, void *recvbuf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Op op, int root, MPIABI_Comm comm); +int (*MPIABI_Reduce_init_ptr)(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, int root, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int (*MPIABI_Reduce_init_c_ptr)(const void *sendbuf, void *recvbuf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Op op, int root, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *request); +int (*MPIABI_Reduce_local_ptr)(const void *inbuf, void *inoutbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op); +int (*MPIABI_Reduce_local_c_ptr)(const void *inbuf, void *inoutbuf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Op op); +int (*MPIABI_Reduce_scatter_ptr)(const void *sendbuf, void *recvbuf, + const int recvcounts[], + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm); +int (*MPIABI_Reduce_scatter_block_ptr)(const void *sendbuf, void *recvbuf, + int recvcount, MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm); +int (*MPIABI_Reduce_scatter_block_c_ptr)(const void *sendbuf, void *recvbuf, + MPIABI_Count recvcount, + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm); +int (*MPIABI_Reduce_scatter_block_init_ptr)( + const void *sendbuf, void *recvbuf, int recvcount, MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm, MPIABI_Info info, MPIABI_Request *request); +int (*MPIABI_Reduce_scatter_block_init_c_ptr)( + const void *sendbuf, void *recvbuf, MPIABI_Count recvcount, + MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int (*MPIABI_Reduce_scatter_c_ptr)(const void *sendbuf, void *recvbuf, + const MPIABI_Count recvcounts[], + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm); +int (*MPIABI_Reduce_scatter_init_ptr)(const void *sendbuf, void *recvbuf, + const int recvcounts[], + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int (*MPIABI_Reduce_scatter_init_c_ptr)(const void *sendbuf, void *recvbuf, + const MPIABI_Count recvcounts[], + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int (*MPIABI_Scan_ptr)(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm); +int (*MPIABI_Scan_c_ptr)(const void *sendbuf, void *recvbuf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm); +int (*MPIABI_Scan_init_ptr)(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int (*MPIABI_Scan_init_c_ptr)(const void *sendbuf, void *recvbuf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int (*MPIABI_Scatter_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, int root, + MPIABI_Comm comm); +int (*MPIABI_Scatter_c_ptr)(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, MPIABI_Datatype recvtype, + int root, MPIABI_Comm comm); +int (*MPIABI_Scatter_init_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, + int root, MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int (*MPIABI_Scatter_init_c_ptr)(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, + MPIABI_Datatype recvtype, int root, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int (*MPIABI_Scatterv_ptr)(const void *sendbuf, const int sendcounts[], + const int displs[], MPIABI_Datatype sendtype, + void *recvbuf, int recvcount, + MPIABI_Datatype recvtype, int root, + MPIABI_Comm comm); +int (*MPIABI_Scatterv_c_ptr)(const void *sendbuf, + const MPIABI_Count sendcounts[], + const MPIABI_Aint displs[], + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, MPIABI_Datatype recvtype, + int root, MPIABI_Comm comm); +int (*MPIABI_Scatterv_init_ptr)(const void *sendbuf, const int sendcounts[], + const int displs[], MPIABI_Datatype sendtype, + void *recvbuf, int recvcount, + MPIABI_Datatype recvtype, int root, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int (*MPIABI_Scatterv_init_c_ptr)( + const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint displs[], MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, MPIABI_Datatype recvtype, int root, + MPIABI_Comm comm, MPIABI_Info info, MPIABI_Request *request); +int (*MPIABI_Type_get_value_index_ptr)(MPIABI_Datatype value_type, + MPIABI_Datatype index_type, + MPIABI_Datatype *pair_type); + +// A.3.5 Groups, Contexts, Communicators, and Caching C Bindings + +int (*MPIABI_Comm_compare_ptr)(MPIABI_Comm comm1, MPIABI_Comm comm2, + int *result); +int (*MPIABI_Comm_create_ptr)(MPIABI_Comm comm, MPIABI_Group group, + MPIABI_Comm *newcomm); +int (*MPIABI_Comm_create_from_group_ptr)(MPIABI_Group group, + const char *stringtag, + MPIABI_Info info, + MPIABI_Errhandler errhandler, + MPIABI_Comm *newcomm); +int (*MPIABI_Comm_create_group_ptr)(MPIABI_Comm comm, MPIABI_Group group, + int tag, MPIABI_Comm *newcomm); +int (*MPIABI_Comm_create_keyval_ptr)( + MPIABI_Comm_copy_attr_function *comm_copy_attr_fn, + MPIABI_Comm_delete_attr_function *comm_delete_attr_fn, int *comm_keyval, + void *extra_state); +int (*MPIABI_Comm_delete_attr_ptr)(MPIABI_Comm comm, int comm_keyval); +int (*MPIABI_Comm_dup_ptr)(MPIABI_Comm comm, MPIABI_Comm *newcomm); +int (*MPIABI_Comm_dup_with_info_ptr)(MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Comm *newcomm); +int (*MPIABI_Comm_free_ptr)(MPIABI_Comm *comm); +int (*MPIABI_Comm_get_name_ptr)(MPIABI_Comm comm, char *comm_name, + int *resultlen); +int (*MPIABI_Comm_free_keyval_ptr)(int *comm_keyval); +int (*MPIABI_Comm_get_attr_ptr)(MPIABI_Comm comm, int comm_keyval, + void *attribute_val, int *flag); +int (*MPIABI_Comm_get_info_ptr)(MPIABI_Comm comm, MPIABI_Info *info_used); +int (*MPIABI_Comm_group_ptr)(MPIABI_Comm comm, MPIABI_Group *group); +int (*MPIABI_Comm_idup_ptr)(MPIABI_Comm comm, MPIABI_Comm *newcomm, + MPIABI_Request *request); +int (*MPIABI_Comm_idup_with_info_ptr)(MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Comm *newcomm, + MPIABI_Request *request); +int (*MPIABI_Comm_rank_ptr)(MPIABI_Comm comm, int *rank); +int (*MPIABI_Comm_remote_group_ptr)(MPIABI_Comm comm, MPIABI_Group *group); +int (*MPIABI_Comm_remote_size_ptr)(MPIABI_Comm comm, int *size); +int (*MPIABI_Comm_set_attr_ptr)(MPIABI_Comm comm, int comm_keyval, + void *attribute_val); +int (*MPIABI_Comm_set_info_ptr)(MPIABI_Comm comm, MPIABI_Info info); +int (*MPIABI_Comm_set_name_ptr)(MPIABI_Comm comm, const char *comm_name); +int (*MPIABI_Comm_size_ptr)(MPIABI_Comm comm, int *size); +int (*MPIABI_Comm_split_ptr)(MPIABI_Comm comm, int color, int key, + MPIABI_Comm *newcomm); +int (*MPIABI_Group_free_ptr)(MPIABI_Group *group); +int (*MPIABI_Comm_split_type_ptr)(MPIABI_Comm comm, int split_type, int key, + MPIABI_Info info, MPIABI_Comm *newcomm); +int (*MPIABI_Comm_test_inter_ptr)(MPIABI_Comm comm, int *flag); +int (*MPIABI_Group_compare_ptr)(MPIABI_Group group1, MPIABI_Group group2, + int *result); +int (*MPIABI_Group_difference_ptr)(MPIABI_Group group1, MPIABI_Group group2, + MPIABI_Group *newgroup); +int (*MPIABI_Group_excl_ptr)(MPIABI_Group group, int n, const int ranks[], + MPIABI_Group *newgroup); +int (*MPIABI_Group_from_session_pset_ptr)(MPIABI_Session session, + const char *pset_name, + MPIABI_Group *newgroup); +int (*MPIABI_Group_incl_ptr)(MPIABI_Group group, int n, const int ranks[], + MPIABI_Group *newgroup); +int (*MPIABI_Group_intersection_ptr)(MPIABI_Group group1, MPIABI_Group group2, + MPIABI_Group *newgroup); +int (*MPIABI_Group_range_excl_ptr)(MPIABI_Group group, int n, int ranges[][3], + MPIABI_Group *newgroup); +int (*MPIABI_Group_range_incl_ptr)(MPIABI_Group group, int n, int ranges[][3], + MPIABI_Group *newgroup); +int (*MPIABI_Group_rank_ptr)(MPIABI_Group group, int *rank); +int (*MPIABI_Group_size_ptr)(MPIABI_Group group, int *size); +int (*MPIABI_Group_translate_ranks_ptr)(MPIABI_Group group1, int n, + const int ranks1[], MPIABI_Group group2, + int ranks2[]); +int (*MPIABI_Group_union_ptr)(MPIABI_Group group1, MPIABI_Group group2, + MPIABI_Group *newgroup); +int (*MPIABI_Intercomm_create_ptr)(MPIABI_Comm local_comm, int local_leader, + MPIABI_Comm peer_comm, int remote_leader, + int tag, MPIABI_Comm *newintercomm); +int (*MPIABI_Intercomm_create_from_groups_ptr)( + MPIABI_Group local_group, int local_leader, MPIABI_Group remote_group, + int remote_leader, const char *stringtag, MPIABI_Info info, + MPIABI_Errhandler errhandler, MPIABI_Comm *newintercomm); +int (*MPIABI_Intercomm_merge_ptr)(MPIABI_Comm intercomm, int high, + MPIABI_Comm *newintracomm); +int (*MPIABI_Type_create_keyval_ptr)( + MPIABI_Type_copy_attr_function *type_copy_attr_fn, + MPIABI_Type_delete_attr_function *type_delete_attr_fn, int *type_keyval, + void *extra_state); +int (*MPIABI_Type_delete_attr_ptr)(MPIABI_Datatype datatype, int type_keyval); +int (*MPIABI_Type_free_keyval_ptr)(int *type_keyval); +int (*MPIABI_Type_get_attr_ptr)(MPIABI_Datatype datatype, int type_keyval, + void *attribute_val, int *flag); +int (*MPIABI_Type_get_name_ptr)(MPIABI_Datatype datatype, char *type_name, + int *resultlen); +int (*MPIABI_Type_set_attr_ptr)(MPIABI_Datatype datatype, int type_keyval, + void *attribute_val); +int (*MPIABI_Type_set_name_ptr)(MPIABI_Datatype datatype, + const char *type_name); +int (*MPIABI_Win_create_keyval_ptr)( + MPIABI_Win_copy_attr_function *win_copy_attr_fn, + MPIABI_Win_delete_attr_function *win_delete_attr_fn, int *win_keyval, + void *extra_state); +int (*MPIABI_Win_delete_attr_ptr)(MPIABI_Win win, int win_keyval); +int (*MPIABI_Win_free_keyval_ptr)(int *win_keyval); +int (*MPIABI_Win_get_attr_ptr)(MPIABI_Win win, int win_keyval, + void *attribute_val, int *flag); +int (*MPIABI_Win_get_name_ptr)(MPIABI_Win win, char *win_name, int *resultlen); +int (*MPIABI_Win_set_attr_ptr)(MPIABI_Win win, int win_keyval, + void *attribute_val); +int (*MPIABI_Win_set_name_ptr)(MPIABI_Win win, const char *win_name); + +// A.3.6 Virtual Topologies for MPI Processes C Bindings + +int (*MPIABI_Cart_coords_ptr)(MPIABI_Comm comm, int rank, int maxdims, + int coords[]); +int (*MPIABI_Cart_create_ptr)(MPIABI_Comm comm_old, int ndims, const int dims[], + const int periods[], int reorder, + MPIABI_Comm *comm_cart); +int (*MPIABI_Cart_get_ptr)(MPIABI_Comm comm, int maxdims, int dims[], + int periods[], int coords[]); +int (*MPIABI_Cart_map_ptr)(MPIABI_Comm comm, int ndims, const int dims[], + const int periods[], int *newrank); +int (*MPIABI_Cart_rank_ptr)(MPIABI_Comm comm, const int coords[], int *rank); +int (*MPIABI_Cart_shift_ptr)(MPIABI_Comm comm, int direction, int disp, + int *rank_source, int *rank_dest); +int (*MPIABI_Cart_sub_ptr)(MPIABI_Comm comm, const int remain_dims[], + MPIABI_Comm *newcomm); +int (*MPIABI_Cartdim_get_ptr)(MPIABI_Comm comm, int *ndims); +int (*MPIABI_Dims_create_ptr)(int nnodes, int ndims, int dims[]); +int (*MPIABI_Dist_graph_create_ptr)(MPIABI_Comm comm_old, int n, + const int sources[], const int degrees[], + const int destinations[], + const int weights[], MPIABI_Info info, + int reorder, MPIABI_Comm *comm_dist_graph); +int (*MPIABI_Dist_graph_create_adjacent_ptr)( + MPIABI_Comm comm_old, int indegree, const int sources[], + const int sourceweights[], int outdegree, const int destinations[], + const int destweights[], MPIABI_Info info, int reorder, + MPIABI_Comm *comm_dist_graph); +int (*MPIABI_Dist_graph_neighbors_ptr)(MPIABI_Comm comm, int maxindegree, + int sources[], int sourceweights[], + int maxoutdegree, int destinations[], + int destweights[]); +int (*MPIABI_Dist_graph_neighbors_count_ptr)(MPIABI_Comm comm, int *indegree, + int *outdegree, int *weighted); +int (*MPIABI_Graph_create_ptr)(MPIABI_Comm comm_old, int nnodes, + const int index[], const int edges[], + int reorder, MPIABI_Comm *comm_graph); +int (*MPIABI_Graph_get_ptr)(MPIABI_Comm comm, int maxindex, int maxedges, + int index[], int edges[]); +int (*MPIABI_Graph_map_ptr)(MPIABI_Comm comm, int nnodes, const int index[], + const int edges[], int *newrank); +int (*MPIABI_Graph_neighbors_ptr)(MPIABI_Comm comm, int rank, int maxneighbors, + int neighbors[]); +int (*MPIABI_Graph_neighbors_count_ptr)(MPIABI_Comm comm, int rank, + int *nneighbors); +int (*MPIABI_Graphdims_get_ptr)(MPIABI_Comm comm, int *nnodes, int *nedges); +int (*MPIABI_Ineighbor_allgather_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, + MPIABI_Request *request); +int (*MPIABI_Ineighbor_allgather_c_ptr)( + const void *sendbuf, MPIABI_Count sendcount, MPIABI_Datatype sendtype, + void *recvbuf, MPIABI_Count recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Ineighbor_allgatherv_ptr)( + const void *sendbuf, int sendcount, MPIABI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Ineighbor_allgatherv_c_ptr)( + const void *sendbuf, MPIABI_Count sendcount, MPIABI_Datatype sendtype, + void *recvbuf, const MPIABI_Count recvcounts[], const MPIABI_Aint displs[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Ineighbor_alltoall_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Ineighbor_alltoall_c_ptr)( + const void *sendbuf, MPIABI_Count sendcount, MPIABI_Datatype sendtype, + void *recvbuf, MPIABI_Count recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Ineighbor_alltoallv_ptr)( + const void *sendbuf, const int sendcounts[], const int sdispls[], + MPIABI_Datatype sendtype, void *recvbuf, const int recvcounts[], + const int rdispls[], MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Request *request); +int (*MPIABI_Ineighbor_alltoallv_c_ptr)( + const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], const MPIABI_Aint rdispls[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Ineighbor_alltoallw_ptr)( + const void *sendbuf, const int sendcounts[], const MPIABI_Aint sdispls[], + const MPIABI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], + const MPIABI_Aint rdispls[], const MPIABI_Datatype recvtypes[], + MPIABI_Comm comm, MPIABI_Request *request); +int (*MPIABI_Ineighbor_alltoallw_c_ptr)( + const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], const MPIABI_Datatype sendtypes[], + void *recvbuf, const MPIABI_Count recvcounts[], const MPIABI_Aint rdispls[], + const MPIABI_Datatype recvtypes[], MPIABI_Comm comm, + MPIABI_Request *request); +int (*MPIABI_Neighbor_allgather_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm); +int (*MPIABI_Neighbor_allgather_c_ptr)(const void *sendbuf, + MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, + MPIABI_Datatype recvtype, + MPIABI_Comm comm); +int (*MPIABI_Neighbor_allgather_init_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, + void *recvbuf, int recvcount, + MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int (*MPIABI_Neighbor_allgather_init_c_ptr)( + const void *sendbuf, MPIABI_Count sendcount, MPIABI_Datatype sendtype, + void *recvbuf, MPIABI_Count recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Info info, MPIABI_Request *request); +int (*MPIABI_Neighbor_allgatherv_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const int recvcounts[], + const int displs[], + MPIABI_Datatype recvtype, + MPIABI_Comm comm); +int (*MPIABI_Neighbor_allgatherv_c_ptr)( + const void *sendbuf, MPIABI_Count sendcount, MPIABI_Datatype sendtype, + void *recvbuf, const MPIABI_Count recvcounts[], const MPIABI_Aint displs[], + MPIABI_Datatype recvtype, MPIABI_Comm comm); +int (*MPIABI_Neighbor_allgatherv_init_ptr)( + const void *sendbuf, int sendcount, MPIABI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Info info, MPIABI_Request *request); +int (*MPIABI_Neighbor_allgatherv_init_c_ptr)( + const void *sendbuf, MPIABI_Count sendcount, MPIABI_Datatype sendtype, + void *recvbuf, const MPIABI_Count recvcounts[], const MPIABI_Aint displs[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int (*MPIABI_Neighbor_alltoall_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm); +int (*MPIABI_Neighbor_alltoall_c_ptr)(const void *sendbuf, + MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, + MPIABI_Datatype recvtype, + MPIABI_Comm comm); +int (*MPIABI_Neighbor_alltoall_init_ptr)(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, + void *recvbuf, int recvcount, + MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int (*MPIABI_Neighbor_alltoall_init_c_ptr)( + const void *sendbuf, MPIABI_Count sendcount, MPIABI_Datatype sendtype, + void *recvbuf, MPIABI_Count recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Info info, MPIABI_Request *request); +int (*MPIABI_Neighbor_alltoallv_ptr)( + const void *sendbuf, const int sendcounts[], const int sdispls[], + MPIABI_Datatype sendtype, void *recvbuf, const int recvcounts[], + const int rdispls[], MPIABI_Datatype recvtype, MPIABI_Comm comm); +int (*MPIABI_Neighbor_alltoallv_c_ptr)( + const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], const MPIABI_Aint rdispls[], + MPIABI_Datatype recvtype, MPIABI_Comm comm); +int (*MPIABI_Neighbor_alltoallv_init_ptr)( + const void *sendbuf, const int sendcounts[], const int sdispls[], + MPIABI_Datatype sendtype, void *recvbuf, const int recvcounts[], + const int rdispls[], MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *request); +int (*MPIABI_Neighbor_alltoallv_init_c_ptr)( + const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], const MPIABI_Aint rdispls[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int (*MPIABI_Neighbor_alltoallw_ptr)( + const void *sendbuf, const int sendcounts[], const MPIABI_Aint sdispls[], + const MPIABI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], + const MPIABI_Aint rdispls[], const MPIABI_Datatype recvtypes[], + MPIABI_Comm comm); +int (*MPIABI_Neighbor_alltoallw_c_ptr)( + const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], const MPIABI_Datatype sendtypes[], + void *recvbuf, const MPIABI_Count recvcounts[], const MPIABI_Aint rdispls[], + const MPIABI_Datatype recvtypes[], MPIABI_Comm comm); +int (*MPIABI_Neighbor_alltoallw_init_ptr)( + const void *sendbuf, const int sendcounts[], const MPIABI_Aint sdispls[], + const MPIABI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], + const MPIABI_Aint rdispls[], const MPIABI_Datatype recvtypes[], + MPIABI_Comm comm, MPIABI_Info info, MPIABI_Request *request); +int (*MPIABI_Neighbor_alltoallw_init_c_ptr)( + const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], const MPIABI_Datatype sendtypes[], + void *recvbuf, const MPIABI_Count recvcounts[], const MPIABI_Aint rdispls[], + const MPIABI_Datatype recvtypes[], MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *request); +int (*MPIABI_Topo_test_ptr)(MPIABI_Comm comm, int *status); + +// A.3.7 MPI Environmental Management C Bindings + +int (*MPIABI_Add_error_class_ptr)(int *errorclass); +int (*MPIABI_Add_error_code_ptr)(int errorclass, int *errorcode); +int (*MPIABI_Add_error_string_ptr)(int errorcode, const char *string); +int (*MPIABI_Alloc_mem_ptr)(MPIABI_Aint size, MPIABI_Info info, void *baseptr); +int (*MPIABI_Comm_call_errhandler_ptr)(MPIABI_Comm comm, int errorcode); +int (*MPIABI_Comm_create_errhandler_ptr)( + MPIABI_Comm_errhandler_function *comm_errhandler_fn, + MPIABI_Errhandler *errhandler); +int (*MPIABI_Comm_get_errhandler_ptr)(MPIABI_Comm comm, + MPIABI_Errhandler *errhandler); +int (*MPIABI_Comm_set_errhandler_ptr)(MPIABI_Comm comm, + MPIABI_Errhandler errhandler); +int (*MPIABI_Errhandler_free_ptr)(MPIABI_Errhandler *errhandler); +int (*MPIABI_Error_class_ptr)(int errorcode, int *errorclass); +int (*MPIABI_Error_string_ptr)(int errorcode, char *string, int *resultlen); +int (*MPIABI_File_call_errhandler_ptr)(MPIABI_File fh, int errorcode); +int (*MPIABI_File_create_errhandler_ptr)( + MPIABI_File_errhandler_function *file_errhandler_fn, + MPIABI_Errhandler *errhandler); +int (*MPIABI_File_get_errhandler_ptr)(MPIABI_File file, + MPIABI_Errhandler *errhandler); +int (*MPIABI_File_set_errhandler_ptr)(MPIABI_File file, + MPIABI_Errhandler errhandler); +int (*MPIABI_Free_mem_ptr)(void *base); +int (*MPIABI_Get_hw_resource_info_ptr)(MPIABI_Info *hw_info); +int (*MPIABI_Get_library_version_ptr)(char *version, int *resultlen); +int (*MPIABI_Get_processor_name_ptr)(char *name, int *resultlen); +int (*MPIABI_Get_version_ptr)(int *version, int *subversion); +int (*MPIABI_Remove_error_class_ptr)(int errorclass); +int (*MPIABI_Remove_error_code_ptr)(int errorcode); +int (*MPIABI_Remove_error_string_ptr)(int errorcode); +int (*MPIABI_Session_call_errhandler_ptr)(MPIABI_Session session, + int errorcode); +int (*MPIABI_Session_create_errhandler_ptr)( + MPIABI_Session_errhandler_function *session_errhandler_fn, + MPIABI_Errhandler *errhandler); +int (*MPIABI_Session_get_errhandler_ptr)(MPIABI_Session session, + MPIABI_Errhandler *errhandler); +int (*MPIABI_Session_set_errhandler_ptr)(MPIABI_Session session, + MPIABI_Errhandler errhandler); +int (*MPIABI_Win_call_errhandler_ptr)(MPIABI_Win win, int errorcode); +int (*MPIABI_Win_create_errhandler_ptr)( + MPIABI_Win_errhandler_function *win_errhandler_fn, + MPIABI_Errhandler *errhandler); +int (*MPIABI_Win_get_errhandler_ptr)(MPIABI_Win win, + MPIABI_Errhandler *errhandler); +int (*MPIABI_Win_set_errhandler_ptr)(MPIABI_Win win, + MPIABI_Errhandler errhandler); +double (*MPIABI_Wtick_ptr)(void); +double (*MPIABI_Wtime_ptr)(void); + +// A.3.8 The Info Object C Bindings + +int (*MPIABI_Info_create_ptr)(MPIABI_Info *info); +int (*MPIABI_Info_create_env_ptr)(int argc, char *argv[], MPIABI_Info *info); +int (*MPIABI_Info_delete_ptr)(MPIABI_Info info, const char *key); +int (*MPIABI_Info_dup_ptr)(MPIABI_Info info, MPIABI_Info *newinfo); +int (*MPIABI_Info_free_ptr)(MPIABI_Info *info); +int (*MPIABI_Info_get_nkeys_ptr)(MPIABI_Info info, int *nkeys); +int (*MPIABI_Info_get_nthkey_ptr)(MPIABI_Info info, int n, char *key); +int (*MPIABI_Info_get_string_ptr)(MPIABI_Info info, const char *key, + int *buflen, char *value, int *flag); +int (*MPIABI_Info_set_ptr)(MPIABI_Info info, const char *key, + const char *value); + +// A.3.9 Process Creation and Management C Bindings + +int (*MPIABI_Abort_ptr)(MPIABI_Comm comm, int errorcode); +int (*MPIABI_Close_port_ptr)(const char *port_name); +int (*MPIABI_Comm_accept_ptr)(const char *port_name, MPIABI_Info info, int root, + MPIABI_Comm comm, MPIABI_Comm *newcomm); +int (*MPIABI_Comm_connect_ptr)(const char *port_name, MPIABI_Info info, + int root, MPIABI_Comm comm, + MPIABI_Comm *newcomm); +int (*MPIABI_Comm_disconnect_ptr)(MPIABI_Comm *comm); +int (*MPIABI_Comm_get_parent_ptr)(MPIABI_Comm *parent); +int (*MPIABI_Comm_join_ptr)(int fd, MPIABI_Comm *intercomm); +int (*MPIABI_Comm_spawn_ptr)(const char *command, char *argv[], int maxprocs, + MPIABI_Info info, int root, MPIABI_Comm comm, + MPIABI_Comm *intercomm, int array_of_errcodes[]); +int (*MPIABI_Comm_spawn_multiple_ptr)( + int count, char *array_of_commands[], char **array_of_argv[], + const int array_of_maxprocs[], const MPIABI_Info array_of_info[], int root, + MPIABI_Comm comm, MPIABI_Comm *intercomm, int array_of_errcodes[]); +int (*MPIABI_Finalize_ptr)(void); +int (*MPIABI_Finalized_ptr)(int *flag); +int (*MPIABI_Init_ptr)(int *argc, char ***argv); +int (*MPIABI_Init_thread_ptr)(int *argc, char ***argv, int required, + int *provided); +int (*MPIABI_Initialized_ptr)(int *flag); +int (*MPIABI_Is_thread_main_ptr)(int *flag); +int (*MPIABI_Lookup_name_ptr)(const char *service_name, MPIABI_Info info, + char *port_name); +int (*MPIABI_Open_port_ptr)(MPIABI_Info info, char *port_name); +int (*MPIABI_Publish_name_ptr)(const char *service_name, MPIABI_Info info, + const char *port_name); +int (*MPIABI_Query_thread_ptr)(int *provided); +int (*MPIABI_Session_finalize_ptr)(MPIABI_Session *session); +int (*MPIABI_Session_get_info_ptr)(MPIABI_Session session, + MPIABI_Info *info_used); +int (*MPIABI_Session_get_nth_pset_ptr)(MPIABI_Session session, MPIABI_Info info, + int n, int *pset_len, char *pset_name); +int (*MPIABI_Session_get_num_psets_ptr)(MPIABI_Session session, + MPIABI_Info info, int *npset_names); +int (*MPIABI_Session_get_pset_info_ptr)(MPIABI_Session session, + const char *pset_name, + MPIABI_Info *info); +int (*MPIABI_Session_init_ptr)(MPIABI_Info info, MPIABI_Errhandler errhandler, + MPIABI_Session *session); +int (*MPIABI_Unpublish_name_ptr)(const char *service_name, MPIABI_Info info, + const char *port_name); + +// A.3.10 One-Sided Communications C Bindings + +int (*MPIABI_Accumulate_ptr)(const void *origin_addr, int origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, int target_count, + MPIABI_Datatype target_datatype, MPIABI_Op op, + MPIABI_Win win); +int (*MPIABI_Accumulate_c_ptr)(const void *origin_addr, + MPIABI_Count origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, + MPIABI_Count target_count, + MPIABI_Datatype target_datatype, MPIABI_Op op, + MPIABI_Win win); +int (*MPIABI_Compare_and_swap_ptr)(const void *origin_addr, + const void *compare_addr, void *result_addr, + MPIABI_Datatype datatype, int target_rank, + MPIABI_Aint target_disp, MPIABI_Win win); +int (*MPIABI_Fetch_and_op_ptr)(const void *origin_addr, void *result_addr, + MPIABI_Datatype datatype, int target_rank, + MPIABI_Aint target_disp, MPIABI_Op op, + MPIABI_Win win); +int (*MPIABI_Get_ptr)(void *origin_addr, int origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, int target_count, + MPIABI_Datatype target_datatype, MPIABI_Win win); +int (*MPIABI_Get_accumulate_ptr)( + const void *origin_addr, int origin_count, MPIABI_Datatype origin_datatype, + void *result_addr, int result_count, MPIABI_Datatype result_datatype, + int target_rank, MPIABI_Aint target_disp, int target_count, + MPIABI_Datatype target_datatype, MPIABI_Op op, MPIABI_Win win); +int (*MPIABI_Get_accumulate_c_ptr)( + const void *origin_addr, MPIABI_Count origin_count, + MPIABI_Datatype origin_datatype, void *result_addr, + MPIABI_Count result_count, MPIABI_Datatype result_datatype, int target_rank, + MPIABI_Aint target_disp, MPIABI_Count target_count, + MPIABI_Datatype target_datatype, MPIABI_Op op, MPIABI_Win win); +int (*MPIABI_Get_c_ptr)(void *origin_addr, MPIABI_Count origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, MPIABI_Count target_count, + MPIABI_Datatype target_datatype, MPIABI_Win win); +int (*MPIABI_Put_ptr)(const void *origin_addr, int origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, int target_count, + MPIABI_Datatype target_datatype, MPIABI_Win win); +int (*MPIABI_Put_c_ptr)(const void *origin_addr, MPIABI_Count origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, MPIABI_Count target_count, + MPIABI_Datatype target_datatype, MPIABI_Win win); +int (*MPIABI_Raccumulate_ptr)(const void *origin_addr, int origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, int target_count, + MPIABI_Datatype target_datatype, MPIABI_Op op, + MPIABI_Win win, MPIABI_Request *request); +int (*MPIABI_Raccumulate_c_ptr)(const void *origin_addr, + MPIABI_Count origin_count, + MPIABI_Datatype origin_datatype, + int target_rank, MPIABI_Aint target_disp, + MPIABI_Count target_count, + MPIABI_Datatype target_datatype, MPIABI_Op op, + MPIABI_Win win, MPIABI_Request *request); +int (*MPIABI_Rget_ptr)(void *origin_addr, int origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, int target_count, + MPIABI_Datatype target_datatype, MPIABI_Win win, + MPIABI_Request *request); +int (*MPIABI_Rget_accumulate_ptr)(const void *origin_addr, int origin_count, + MPIABI_Datatype origin_datatype, + void *result_addr, int result_count, + MPIABI_Datatype result_datatype, + int target_rank, MPIABI_Aint target_disp, + int target_count, + MPIABI_Datatype target_datatype, MPIABI_Op op, + MPIABI_Win win, MPIABI_Request *request); +int (*MPIABI_Rget_accumulate_c_ptr)( + const void *origin_addr, MPIABI_Count origin_count, + MPIABI_Datatype origin_datatype, void *result_addr, + MPIABI_Count result_count, MPIABI_Datatype result_datatype, int target_rank, + MPIABI_Aint target_disp, MPIABI_Count target_count, + MPIABI_Datatype target_datatype, MPIABI_Op op, MPIABI_Win win, + MPIABI_Request *request); +int (*MPIABI_Rget_c_ptr)(void *origin_addr, MPIABI_Count origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, MPIABI_Count target_count, + MPIABI_Datatype target_datatype, MPIABI_Win win, + MPIABI_Request *request); +int (*MPIABI_Rput_ptr)(const void *origin_addr, int origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, int target_count, + MPIABI_Datatype target_datatype, MPIABI_Win win, + MPIABI_Request *request); +int (*MPIABI_Rput_c_ptr)(const void *origin_addr, MPIABI_Count origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, MPIABI_Count target_count, + MPIABI_Datatype target_datatype, MPIABI_Win win, + MPIABI_Request *request); +int (*MPIABI_Win_allocate_ptr)(MPIABI_Aint size, int disp_unit, + MPIABI_Info info, MPIABI_Comm comm, + void *baseptr, MPIABI_Win *win); +int (*MPIABI_Win_allocate_c_ptr)(MPIABI_Aint size, MPIABI_Aint disp_unit, + MPIABI_Info info, MPIABI_Comm comm, + void *baseptr, MPIABI_Win *win); +int (*MPIABI_Win_allocate_shared_ptr)(MPIABI_Aint size, int disp_unit, + MPIABI_Info info, MPIABI_Comm comm, + void *baseptr, MPIABI_Win *win); +int (*MPIABI_Win_allocate_shared_c_ptr)(MPIABI_Aint size, MPIABI_Aint disp_unit, + MPIABI_Info info, MPIABI_Comm comm, + void *baseptr, MPIABI_Win *win); +int (*MPIABI_Win_attach_ptr)(MPIABI_Win win, void *base, MPIABI_Aint size); +int (*MPIABI_Win_complete_ptr)(MPIABI_Win win); +int (*MPIABI_Win_create_ptr)(void *base, MPIABI_Aint size, int disp_unit, + MPIABI_Info info, MPIABI_Comm comm, + MPIABI_Win *win); +int (*MPIABI_Win_create_c_ptr)(void *base, MPIABI_Aint size, + MPIABI_Aint disp_unit, MPIABI_Info info, + MPIABI_Comm comm, MPIABI_Win *win); +int (*MPIABI_Win_create_dynamic_ptr)(MPIABI_Info info, MPIABI_Comm comm, + MPIABI_Win *win); +int (*MPIABI_Win_detach_ptr)(MPIABI_Win win, const void *base); +int (*MPIABI_Win_fence_ptr)(int assert, MPIABI_Win win); +int (*MPIABI_Win_flush_ptr)(int rank, MPIABI_Win win); +int (*MPIABI_Win_flush_all_ptr)(MPIABI_Win win); +int (*MPIABI_Win_flush_local_ptr)(int rank, MPIABI_Win win); +int (*MPIABI_Win_flush_local_all_ptr)(MPIABI_Win win); +int (*MPIABI_Win_free_ptr)(MPIABI_Win *win); +int (*MPIABI_Win_get_group_ptr)(MPIABI_Win win, MPIABI_Group *group); +int (*MPIABI_Win_get_info_ptr)(MPIABI_Win win, MPIABI_Info *info_used); +int (*MPIABI_Win_lock_ptr)(int lock_type, int rank, int assert, MPIABI_Win win); +int (*MPIABI_Win_lock_all_ptr)(int assert, MPIABI_Win win); +int (*MPIABI_Win_post_ptr)(MPIABI_Group group, int assert, MPIABI_Win win); +int (*MPIABI_Win_set_info_ptr)(MPIABI_Win win, MPIABI_Info info); +int (*MPIABI_Win_shared_query_ptr)(MPIABI_Win win, int rank, MPIABI_Aint *size, + int *disp_unit, void *baseptr); +int (*MPIABI_Win_shared_query_c_ptr)(MPIABI_Win win, int rank, + MPIABI_Aint *size, MPIABI_Aint *disp_unit, + void *baseptr); +int (*MPIABI_Win_start_ptr)(MPIABI_Group group, int assert, MPIABI_Win win); +int (*MPIABI_Win_sync_ptr)(MPIABI_Win win); +int (*MPIABI_Win_test_ptr)(MPIABI_Win win, int *flag); +int (*MPIABI_Win_unlock_ptr)(int rank, MPIABI_Win win); +int (*MPIABI_Win_unlock_all_ptr)(MPIABI_Win win); +int (*MPIABI_Win_wait_ptr)(MPIABI_Win win); + +// A.3.11 External Interfaces C Bindings + +int (*MPIABI_Grequest_complete_ptr)(MPIABI_Request request); +int (*MPIABI_Grequest_start_ptr)(MPIABI_Grequest_query_function *query_fn, + MPIABI_Grequest_free_function *free_fn, + MPIABI_Grequest_cancel_function *cancel_fn, + void *extra_state, MPIABI_Request *request); +int (*MPIABI_Status_set_cancelled_ptr)(MPIABI_Status *status, int flag); +int (*MPIABI_Status_set_elements_ptr)(MPIABI_Status *status, + MPIABI_Datatype datatype, int count); +int (*MPIABI_Status_set_elements_c_ptr)(MPIABI_Status *status, + MPIABI_Datatype datatype, + MPIABI_Count count); +int (*MPIABI_Status_set_error_ptr)(MPIABI_Status *status, int err); +int (*MPIABI_Status_set_source_ptr)(MPIABI_Status *status, int source); +int (*MPIABI_Status_set_tag_ptr)(MPIABI_Status *status, int tag); + +// A.3.12 I/O C Bindings + +int (*MPIABI_File_close_ptr)(MPIABI_File *fh); +int (*MPIABI_File_delete_ptr)(const char *filename, MPIABI_Info info); +int (*MPIABI_File_get_amode_ptr)(MPIABI_File fh, int *amode); +int (*MPIABI_File_get_atomicity_ptr)(MPIABI_File fh, int *flag); +int (*MPIABI_File_get_byte_offset_ptr)(MPIABI_File fh, MPIABI_Offset offset, + MPIABI_Offset *disp); +int (*MPIABI_File_get_group_ptr)(MPIABI_File fh, MPIABI_Group *group); +int (*MPIABI_File_get_info_ptr)(MPIABI_File fh, MPIABI_Info *info_used); +int (*MPIABI_File_get_position_ptr)(MPIABI_File fh, MPIABI_Offset *offset); +int (*MPIABI_File_get_position_shared_ptr)(MPIABI_File fh, + MPIABI_Offset *offset); +int (*MPIABI_File_get_size_ptr)(MPIABI_File fh, MPIABI_Offset *size); +int (*MPIABI_File_get_type_extent_ptr)(MPIABI_File fh, MPIABI_Datatype datatype, + MPIABI_Aint *extent); +int (*MPIABI_File_get_type_extent_c_ptr)(MPIABI_File fh, + MPIABI_Datatype datatype, + MPIABI_Count *extent); +int (*MPIABI_File_get_view_ptr)(MPIABI_File fh, MPIABI_Offset *disp, + MPIABI_Datatype *etype, + MPIABI_Datatype *filetype, char *datarep); +int (*MPIABI_File_iread_ptr)(MPIABI_File fh, void *buf, int count, + MPIABI_Datatype datatype, MPIABI_Request *request); +int (*MPIABI_File_iread_all_ptr)(MPIABI_File fh, void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Request *request); +int (*MPIABI_File_iread_all_c_ptr)(MPIABI_File fh, void *buf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Request *request); +int (*MPIABI_File_iread_at_ptr)(MPIABI_File fh, MPIABI_Offset offset, void *buf, + int count, MPIABI_Datatype datatype, + MPIABI_Request *request); +int (*MPIABI_File_iread_at_all_ptr)(MPIABI_File fh, MPIABI_Offset offset, + void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Request *request); +int (*MPIABI_File_iread_at_all_c_ptr)(MPIABI_File fh, MPIABI_Offset offset, + void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Request *request); +int (*MPIABI_File_iread_at_c_ptr)(MPIABI_File fh, MPIABI_Offset offset, + void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Request *request); +int (*MPIABI_File_iread_c_ptr)(MPIABI_File fh, void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Request *request); +int (*MPIABI_File_iread_shared_ptr)(MPIABI_File fh, void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Request *request); +int (*MPIABI_File_iread_shared_c_ptr)(MPIABI_File fh, void *buf, + MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Request *request); +int (*MPIABI_File_iwrite_ptr)(MPIABI_File fh, const void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Request *request); +int (*MPIABI_File_iwrite_all_ptr)(MPIABI_File fh, const void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Request *request); +int (*MPIABI_File_iwrite_all_c_ptr)(MPIABI_File fh, const void *buf, + MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Request *request); +int (*MPIABI_File_iwrite_at_ptr)(MPIABI_File fh, MPIABI_Offset offset, + const void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Request *request); +int (*MPIABI_File_iwrite_at_all_ptr)(MPIABI_File fh, MPIABI_Offset offset, + const void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Request *request); +int (*MPIABI_File_iwrite_at_all_c_ptr)(MPIABI_File fh, MPIABI_Offset offset, + const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Request *request); +int (*MPIABI_File_iwrite_at_c_ptr)(MPIABI_File fh, MPIABI_Offset offset, + const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Request *request); +int (*MPIABI_File_iwrite_c_ptr)(MPIABI_File fh, const void *buf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Request *request); +int (*MPIABI_File_iwrite_shared_ptr)(MPIABI_File fh, const void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Request *request); +int (*MPIABI_File_iwrite_shared_c_ptr)(MPIABI_File fh, const void *buf, + MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Request *request); +int (*MPIABI_File_open_ptr)(MPIABI_Comm comm, const char *filename, int amode, + MPIABI_Info info, MPIABI_File *fh); +int (*MPIABI_File_preallocate_ptr)(MPIABI_File fh, MPIABI_Offset size); +int (*MPIABI_File_read_ptr)(MPIABI_File fh, void *buf, int count, + MPIABI_Datatype datatype, MPIABI_Status *status); +int (*MPIABI_File_read_all_ptr)(MPIABI_File fh, void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Status *status); +int (*MPIABI_File_read_all_begin_ptr)(MPIABI_File fh, void *buf, int count, + MPIABI_Datatype datatype); +int (*MPIABI_File_read_all_begin_c_ptr)(MPIABI_File fh, void *buf, + MPIABI_Count count, + MPIABI_Datatype datatype); +int (*MPIABI_File_read_all_c_ptr)(MPIABI_File fh, void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Status *status); +int (*MPIABI_File_read_all_end_ptr)(MPIABI_File fh, void *buf, + MPIABI_Status *status); +int (*MPIABI_File_read_at_ptr)(MPIABI_File fh, MPIABI_Offset offset, void *buf, + int count, MPIABI_Datatype datatype, + MPIABI_Status *status); +int (*MPIABI_File_read_at_all_ptr)(MPIABI_File fh, MPIABI_Offset offset, + void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Status *status); +int (*MPIABI_File_read_at_all_begin_ptr)(MPIABI_File fh, MPIABI_Offset offset, + void *buf, int count, + MPIABI_Datatype datatype); +int (*MPIABI_File_read_at_all_begin_c_ptr)(MPIABI_File fh, MPIABI_Offset offset, + void *buf, MPIABI_Count count, + MPIABI_Datatype datatype); +int (*MPIABI_File_read_at_all_c_ptr)(MPIABI_File fh, MPIABI_Offset offset, + void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Status *status); +int (*MPIABI_File_read_at_all_end_ptr)(MPIABI_File fh, void *buf, + MPIABI_Status *status); +int (*MPIABI_File_read_at_c_ptr)(MPIABI_File fh, MPIABI_Offset offset, + void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Status *status); +int (*MPIABI_File_read_c_ptr)(MPIABI_File fh, void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Status *status); +int (*MPIABI_File_read_ordered_ptr)(MPIABI_File fh, void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Status *status); +int (*MPIABI_File_read_ordered_begin_ptr)(MPIABI_File fh, void *buf, int count, + MPIABI_Datatype datatype); +int (*MPIABI_File_read_ordered_begin_c_ptr)(MPIABI_File fh, void *buf, + MPIABI_Count count, + MPIABI_Datatype datatype); +int (*MPIABI_File_read_ordered_c_ptr)(MPIABI_File fh, void *buf, + MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Status *status); +int (*MPIABI_File_read_ordered_end_ptr)(MPIABI_File fh, void *buf, + MPIABI_Status *status); +int (*MPIABI_File_read_shared_ptr)(MPIABI_File fh, void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Status *status); +int (*MPIABI_File_read_shared_c_ptr)(MPIABI_File fh, void *buf, + MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Status *status); +int (*MPIABI_File_seek_ptr)(MPIABI_File fh, MPIABI_Offset offset, int whence); +int (*MPIABI_File_seek_shared_ptr)(MPIABI_File fh, MPIABI_Offset offset, + int whence); +int (*MPIABI_File_set_atomicity_ptr)(MPIABI_File fh, int flag); +int (*MPIABI_File_set_info_ptr)(MPIABI_File fh, MPIABI_Info info); +int (*MPIABI_File_set_size_ptr)(MPIABI_File fh, MPIABI_Offset size); +int (*MPIABI_File_set_view_ptr)(MPIABI_File fh, MPIABI_Offset disp, + MPIABI_Datatype etype, MPIABI_Datatype filetype, + const char *datarep, MPIABI_Info info); +int (*MPIABI_File_sync_ptr)(MPIABI_File fh); +int (*MPIABI_File_write_ptr)(MPIABI_File fh, const void *buf, int count, + MPIABI_Datatype datatype, MPIABI_Status *status); +int (*MPIABI_File_write_all_ptr)(MPIABI_File fh, const void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Status *status); +int (*MPIABI_File_write_all_begin_ptr)(MPIABI_File fh, const void *buf, + int count, MPIABI_Datatype datatype); +int (*MPIABI_File_write_all_begin_c_ptr)(MPIABI_File fh, const void *buf, + MPIABI_Count count, + MPIABI_Datatype datatype); +int (*MPIABI_File_write_all_c_ptr)(MPIABI_File fh, const void *buf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Status *status); +int (*MPIABI_File_write_all_end_ptr)(MPIABI_File fh, const void *buf, + MPIABI_Status *status); +int (*MPIABI_File_write_at_ptr)(MPIABI_File fh, MPIABI_Offset offset, + const void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Status *status); +int (*MPIABI_File_write_at_all_ptr)(MPIABI_File fh, MPIABI_Offset offset, + const void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Status *status); +int (*MPIABI_File_write_at_all_begin_ptr)(MPIABI_File fh, MPIABI_Offset offset, + const void *buf, int count, + MPIABI_Datatype datatype); +int (*MPIABI_File_write_at_all_begin_c_ptr)(MPIABI_File fh, + MPIABI_Offset offset, + const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype); +int (*MPIABI_File_write_at_all_c_ptr)(MPIABI_File fh, MPIABI_Offset offset, + const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Status *status); +int (*MPIABI_File_write_at_all_end_ptr)(MPIABI_File fh, const void *buf, + MPIABI_Status *status); +int (*MPIABI_File_write_at_c_ptr)(MPIABI_File fh, MPIABI_Offset offset, + const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Status *status); +int (*MPIABI_File_write_c_ptr)(MPIABI_File fh, const void *buf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Status *status); +int (*MPIABI_File_write_ordered_ptr)(MPIABI_File fh, const void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Status *status); +int (*MPIABI_File_write_ordered_begin_ptr)(MPIABI_File fh, const void *buf, + int count, MPIABI_Datatype datatype); +int (*MPIABI_File_write_ordered_begin_c_ptr)(MPIABI_File fh, const void *buf, + MPIABI_Count count, + MPIABI_Datatype datatype); +int (*MPIABI_File_write_ordered_c_ptr)(MPIABI_File fh, const void *buf, + MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Status *status); +int (*MPIABI_File_write_ordered_end_ptr)(MPIABI_File fh, const void *buf, + MPIABI_Status *status); +int (*MPIABI_File_write_shared_ptr)(MPIABI_File fh, const void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Status *status); +int (*MPIABI_File_write_shared_c_ptr)(MPIABI_File fh, const void *buf, + MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Status *status); +int (*MPIABI_Register_datarep_ptr)( + const char *datarep, MPIABI_Datarep_conversion_function *read_conversion_fn, + MPIABI_Datarep_conversion_function *write_conversion_fn, + MPIABI_Datarep_extent_function *dtype_file_extent_fn, void *extra_state); +int (*MPIABI_Register_datarep_c_ptr)( + const char *datarep, + MPIABI_Datarep_conversion_function_c *read_conversion_fn, + MPIABI_Datarep_conversion_function_c *write_conversion_fn, + MPIABI_Datarep_extent_function *dtype_file_extent_fn, void *extra_state); + +// A.3.13 Language Bindings C Bindings + +MPIABI_Fint (*MPIABI_Comm_c2f_ptr)(MPIABI_Comm comm); +MPIABI_Comm (*MPIABI_Comm_f2c_ptr)(MPIABI_Fint comm); +MPIABI_Fint (*MPIABI_Errhandler_c2f_ptr)(MPIABI_Errhandler errhandler); +MPIABI_Errhandler (*MPIABI_Errhandler_f2c_ptr)(MPIABI_Fint errhandler); +MPIABI_Fint (*MPIABI_File_c2f_ptr)(MPIABI_File file); +MPIABI_File (*MPIABI_File_f2c_ptr)(MPIABI_Fint file); +MPIABI_Fint (*MPIABI_Group_c2f_ptr)(MPIABI_Group group); +MPIABI_Group (*MPIABI_Group_f2c_ptr)(MPIABI_Fint group); +MPIABI_Fint (*MPIABI_Info_c2f_ptr)(MPIABI_Info info); +MPIABI_Info (*MPIABI_Info_f2c_ptr)(MPIABI_Fint info); +MPIABI_Fint (*MPIABI_Message_c2f_ptr)(MPIABI_Message message); +MPIABI_Message (*MPIABI_Message_f2c_ptr)(MPIABI_Fint message); +MPIABI_Fint (*MPIABI_Op_c2f_ptr)(MPIABI_Op op); +MPIABI_Op (*MPIABI_Op_f2c_ptr)(MPIABI_Fint op); +MPIABI_Fint (*MPIABI_Request_c2f_ptr)(MPIABI_Request request); +MPIABI_Request (*MPIABI_Request_f2c_ptr)(MPIABI_Fint request); +MPIABI_Fint (*MPIABI_Session_c2f_ptr)(MPIABI_Session session); +MPIABI_Session (*MPIABI_Session_f2c_ptr)(MPIABI_Fint session); +int (*MPIABI_Status_f082f_ptr)(const MPIABI_F08_status *f08_status, + MPIABI_Fint *f_status); +int (*MPIABI_Status_c2f_ptr)(const MPIABI_Status *c_status, + MPIABI_Fint *f_status); +int (*MPIABI_Status_c2f08_ptr)(const MPIABI_Status *c_status, + MPIABI_F08_status *f08_status); +int (*MPIABI_Status_f082c_ptr)(const MPIABI_F08_status *f08_status, + MPIABI_Status *c_status); +int (*MPIABI_Status_f2c_ptr)(const MPIABI_Fint *f_status, + MPIABI_Status *c_status); +int (*MPIABI_Status_f2f08_ptr)(const MPIABI_Fint *f_status, + MPIABI_F08_status *f08_status); +MPIABI_Fint (*MPIABI_Type_c2f_ptr)(MPIABI_Datatype datatype); +int (*MPIABI_Type_create_f90_complex_ptr)(int p, int r, + MPIABI_Datatype *newtype); +int (*MPIABI_Type_create_f90_integer_ptr)(int r, MPIABI_Datatype *newtype); +int (*MPIABI_Type_create_f90_real_ptr)(int p, int r, MPIABI_Datatype *newtype); +MPIABI_Datatype (*MPIABI_Type_f2c_ptr)(MPIABI_Fint datatype); +int (*MPIABI_Type_match_size_ptr)(int typeclass, int size, + MPIABI_Datatype *datatype); +MPIABI_Fint (*MPIABI_Win_c2f_ptr)(MPIABI_Win win); +MPIABI_Win (*MPIABI_Win_f2c_ptr)(MPIABI_Fint win); + +// A.3.14 Tools / Profiling Interface C Bindings + +int (*MPIABI_Pcontrol_ptr)(const int level, ...); + +// A.3.15 Tools / MPI Tool Information Interface C Bindings + +int (*MPIABI_T_category_changed_ptr)(int *update_number); +int (*MPIABI_T_category_get_categories_ptr)(int cat_index, int len, + int indices[]); +int (*MPIABI_T_category_get_cvars_ptr)(int cat_index, int len, int indices[]); +int (*MPIABI_T_category_get_events_ptr)(int cat_index, int len, int indices[]); +int (*MPIABI_T_category_get_index_ptr)(const char *name, int *cat_index); +int (*MPIABI_T_category_get_info_ptr)(int cat_index, char *name, int *name_len, + char *desc, int *desc_len, int *num_cvars, + int *num_pvars, int *num_categories); +int (*MPIABI_T_category_get_num_ptr)(int *num_cat); +int (*MPIABI_T_category_get_num_events_ptr)(int cat_index, int *num_events); +int (*MPIABI_T_category_get_pvars_ptr)(int cat_index, int len, int indices[]); +int (*MPIABI_T_cvar_get_index_ptr)(const char *name, int *cvar_index); +int (*MPIABI_T_cvar_get_info_ptr)(int cvar_index, char *name, int *name_len, + int *verbosity, MPIABI_Datatype *datatype, + MPIABI_T_enum *enumtype, char *desc, + int *desc_len, int *bind, int *scope); +int (*MPIABI_T_cvar_get_num_ptr)(int *num_cvar); +int (*MPIABI_T_cvar_handle_alloc_ptr)(int cvar_index, void *obj_handle, + MPIABI_T_cvar_handle *handle, int *count); +int (*MPIABI_T_cvar_handle_free_ptr)(MPIABI_T_cvar_handle *handle); +int (*MPIABI_T_cvar_read_ptr)(MPIABI_T_cvar_handle handle, void *buf); +int (*MPIABI_T_cvar_write_ptr)(MPIABI_T_cvar_handle handle, const void *buf); +int (*MPIABI_T_enum_get_info_ptr)(MPIABI_T_enum enumtype, int *num, char *name, + int *name_len); +int (*MPIABI_T_enum_get_item_ptr)(MPIABI_T_enum enumtype, int index, int *value, + char *name, int *name_len); +int (*MPIABI_T_event_callback_get_info_ptr)( + MPIABI_T_event_registration event_registration, + MPIABI_T_cb_safety cb_safety, MPIABI_Info *info_used); +int (*MPIABI_T_event_callback_set_info_ptr)( + MPIABI_T_event_registration event_registration, + MPIABI_T_cb_safety cb_safety, MPIABI_Info info); +int (*MPIABI_T_event_copy_ptr)(MPIABI_T_event_instance event_instance, + void *buffer); +int (*MPIABI_T_event_get_index_ptr)(const char *name, int *event_index); +int (*MPIABI_T_event_get_info_ptr)(int event_index, char *name, int *name_len, + int *verbosity, + MPIABI_Datatype array_of_datatypes[], + MPIABI_Aint array_of_displacements[], + int *num_elements, MPIABI_T_enum *enumtype, + MPIABI_Info *info, char *desc, int *desc_len, + int *bind); +int (*MPIABI_T_event_get_num_ptr)(int *num_events); +int (*MPIABI_T_event_get_source_ptr)(MPIABI_T_event_instance event_instance, + int *source_index); +int (*MPIABI_T_event_get_timestamp_ptr)(MPIABI_T_event_instance event_instance, + MPIABI_Count *event_timestamp); +int (*MPIABI_T_event_handle_alloc_ptr)( + int event_index, void *obj_handle, MPIABI_Info info, + MPIABI_T_event_registration *event_registration); +int (*MPIABI_T_event_handle_free_ptr)( + MPIABI_T_event_registration event_registration, void *user_data, + MPIABI_T_event_free_cb_function free_cb_function); +int (*MPIABI_T_event_handle_get_info_ptr)( + MPIABI_T_event_registration event_registration, MPIABI_Info *info_used); +int (*MPIABI_T_event_handle_set_info_ptr)( + MPIABI_T_event_registration event_registration, MPIABI_Info info); +int (*MPIABI_T_event_read_ptr)(MPIABI_T_event_instance event_instance, + int element_index, void *buffer); +int (*MPIABI_T_event_register_callback_ptr)( + MPIABI_T_event_registration event_registration, + MPIABI_T_cb_safety cb_safety, MPIABI_Info info, void *user_data, + MPIABI_T_event_cb_function event_cb_function); +int (*MPIABI_T_event_set_dropped_handler_ptr)( + MPIABI_T_event_registration event_registration, + MPIABI_T_event_dropped_cb_function dropped_cb_function); +int (*MPIABI_T_finalize_ptr)(void); +int (*MPIABI_T_init_thread_ptr)(int required, int *provided); +int (*MPIABI_T_pvar_get_index_ptr)(const char *name, int var_class, + int *pvar_index); +int (*MPIABI_T_pvar_get_info_ptr)(int pvar_index, char *name, int *name_len, + int *verbosity, int *var_class, + MPIABI_Datatype *datatype, + MPIABI_T_enum *enumtype, char *desc, + int *desc_len, int *bind, int *readonly, + int *continuous, int *atomic); +int (*MPIABI_T_pvar_get_num_ptr)(int *num_pvar); +int (*MPIABI_T_pvar_handle_alloc_ptr)(MPIABI_T_pvar_session pe_session, + int pvar_index, void *obj_handle, + MPIABI_T_pvar_handle *handle, int *count); +int (*MPIABI_T_pvar_handle_free_ptr)(MPIABI_T_pvar_session pe_session, + MPIABI_T_pvar_handle *handle); +int (*MPIABI_T_pvar_read_ptr)(MPIABI_T_pvar_session pe_session, + MPIABI_T_pvar_handle handle, void *buf); +int (*MPIABI_T_pvar_readreset_ptr)(MPIABI_T_pvar_session pe_session, + MPIABI_T_pvar_handle handle, void *buf); +int (*MPIABI_T_pvar_reset_ptr)(MPIABI_T_pvar_session pe_session, + MPIABI_T_pvar_handle handle); +int (*MPIABI_T_pvar_session_create_ptr)(MPIABI_T_pvar_session *pe_session); +int (*MPIABI_T_pvar_session_free_ptr)(MPIABI_T_pvar_session *pe_session); +int (*MPIABI_T_pvar_start_ptr)(MPIABI_T_pvar_session pe_session, + MPIABI_T_pvar_handle handle); +int (*MPIABI_T_pvar_stop_ptr)(MPIABI_T_pvar_session pe_session, + MPIABI_T_pvar_handle handle); +int (*MPIABI_T_pvar_write_ptr)(MPIABI_T_pvar_session pe_session, + MPIABI_T_pvar_handle handle, const void *buf); +int (*MPIABI_T_source_get_info_ptr)(int source_index, char *name, int *name_len, + char *desc, int *desc_len, + MPIABI_T_source_order *ordering, + MPIABI_Count *ticks_per_second, + MPIABI_Count *max_ticks, MPIABI_Info *info); +int (*MPIABI_T_source_get_num_ptr)(int *num_sources); +int (*MPIABI_T_source_get_timestamp_ptr)(int source_index, + MPIABI_Count *timestamp); + +// A.3.16 Deprecated C Bindings + +int (*MPIABI_Attr_delete_ptr)(MPIABI_Comm comm, int keyval); +int (*MPIABI_Attr_get_ptr)(MPIABI_Comm comm, int keyval, void *attribute_val, + int *flag); +int (*MPIABI_Attr_put_ptr)(MPIABI_Comm comm, int keyval, void *attribute_val); +int (*MPIABI_Get_elements_x_ptr)(const MPIABI_Status *status, + MPIABI_Datatype datatype, MPIABI_Count *count); +int (*MPIABI_Info_get_ptr)(MPIABI_Info info, const char *key, int valuelen, + char *value, int *flag); +int (*MPIABI_Info_get_valuelen_ptr)(MPIABI_Info info, const char *key, + int *valuelen, int *flag); +int (*MPIABI_Keyval_create_ptr)(MPIABI_Copy_function *copy_fn, + MPIABI_Delete_function *delete_fn, int *keyval, + void *extra_state); +int (*MPIABI_Keyval_free_ptr)(int *keyval); +int (*MPIABI_Status_set_elements_x_ptr)(MPIABI_Status *status, + MPIABI_Datatype datatype, + MPIABI_Count count); +int (*MPIABI_Type_get_extent_x_ptr)(MPIABI_Datatype datatype, MPIABI_Count *lb, + MPIABI_Count *extent); +int (*MPIABI_Type_get_true_extent_x_ptr)(MPIABI_Datatype datatype, + MPIABI_Count *true_lb, + MPIABI_Count *true_extent); +int (*MPIABI_Type_size_x_ptr)(MPIABI_Datatype datatype, MPIABI_Count *size); + +// Removed C Bindings + +int (*MPIABI_Address_ptr)(void *location, MPIABI_Aint *address); +int (*MPIABI_Type_hindexed_ptr)(int count, int *array_of_blocklengths, + MPIABI_Aint *array_of_displacements, + MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +int (*MPIABI_Type_hvector_ptr)(int count, int blocklength, MPIABI_Aint stride, + MPIABI_Datatype oldtype, + MPIABI_Datatype *newtype); +int (*MPIABI_Type_struct_ptr)(int count, int *array_of_blocklengths, + MPIABI_Aint *array_of_displacements, + MPIABI_Datatype *array_of_types, + MPIABI_Datatype *newtype); +int (*MPIABI_Type_extent_ptr)(MPIABI_Datatype datatype, MPIABI_Aint *extent); +int (*MPIABI_Type_lb_ptr)(MPIABI_Datatype datatype, MPIABI_Aint *displacement); +int (*MPIABI_Type_ub_ptr)(MPIABI_Datatype datatype, MPIABI_Aint *displacement); + +// MPIX + +int (*MPIXABI_Query_cuda_support_ptr)(void); +int (*MPIXABI_Query_hip_support_ptr)(void); +int (*MPIXABI_Query_rocm_support_ptr)(void); +int (*MPIXABI_Query_ze_support_ptr)(void); diff --git a/mpitrampoline/src/mpi_mpiabi_function_pointers_fortran.c b/mpitrampoline/src/mpi_mpiabi_function_pointers_fortran.c new file mode 100644 index 00000000..4f508052 --- /dev/null +++ b/mpitrampoline/src/mpi_mpiabi_function_pointers_fortran.c @@ -0,0 +1,3576 @@ +// MPIABI Fortran function pointers + +// This file has been generated automatically +// by `mpitrampoline/generate_trampoline.jl`. +// Do not modify this file, changes will be overwritten. + +#include +#include +#include + +void (*mpiabi_bsend_ptr)( + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *dest, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +void (*mpiabi_bsend_init_ptr)( + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *dest, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_buffer_attach_ptr)( + void *buffer, + const MPIABI_Fint *size, + MPIABI_Fint *ierror +); + +void (*mpiabi_buffer_detach_ptr)( + MPIABI_Aint *buffer_addr, + MPIABI_Fint *size, + MPIABI_Fint *ierror +); + +void (*mpiabi_buffer_flush_ptr)( + MPIABI_Fint *ierror +); + +void (*mpiabi_buffer_iflush_ptr)( + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_cancel_ptr)( + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_attach_buffer_ptr)( + const MPIABI_Fint *comm, + const void *buffer, + const MPIABI_Fint *size, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_detach_buffer_ptr)( + const MPIABI_Fint *comm, + MPIABI_Aint *buffer_addr, + MPIABI_Fint *size, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_flush_buffer_ptr)( + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_iflush_buffer_ptr)( + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_get_count_ptr)( + const MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + const MPIABI_Fint *datatype, + MPIABI_Fint *count, + MPIABI_Fint *ierror +); + +void (*mpiabi_ibsend_ptr)( + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *dest, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_improbe_ptr)( + const MPIABI_Fint *source, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + MPIABI_Fint *flag, + MPIABI_Fint *message, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +void (*mpiabi_imrecv_ptr)( + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *message, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_iprobe_ptr)( + const MPIABI_Fint *source, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + MPIABI_Fint *flag, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +void (*mpiabi_irecv_ptr)( + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *source, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_irsend_ptr)( + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *dest, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_isend_ptr)( + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *dest, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_isendrecv_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + const MPIABI_Fint *dest, + const MPIABI_Fint *sendtag, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *source, + const MPIABI_Fint *recvtag, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_isendrecv_replace_ptr)( + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *dest, + const MPIABI_Fint *sendtag, + const MPIABI_Fint *source, + const MPIABI_Fint *recvtag, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_issend_ptr)( + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *dest, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_mprobe_ptr)( + const MPIABI_Fint *source, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + MPIABI_Fint *message, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +void (*mpiabi_mrecv_ptr)( + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *message, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +void (*mpiabi_probe_ptr)( + const MPIABI_Fint *source, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +void (*mpiabi_recv_ptr)( + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *source, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +void (*mpiabi_recv_init_ptr)( + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *source, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_request_free_ptr)( + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_request_get_status_ptr)( + const MPIABI_Fint *request, + MPIABI_Fint *flag, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +void (*mpiabi_request_get_status_all_ptr)( + const MPIABI_Fint *count, + const MPIABI_Fint *array_of_requests, + MPIABI_Fint *flag, + MPIABI_Fint *array_of_statuses[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +void (*mpiabi_request_get_status_any_ptr)( + const MPIABI_Fint *count, + const MPIABI_Fint *array_of_requests, + MPIABI_Fint *index, + MPIABI_Fint *flag, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +void (*mpiabi_request_get_status_some_ptr)( + const MPIABI_Fint *incount, + const MPIABI_Fint *array_of_requests, + MPIABI_Fint *outcount, + MPIABI_Fint *array_of_indices, + MPIABI_Fint *array_of_statuses[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +void (*mpiabi_rsend_ptr)( + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *dest, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +void (*mpiabi_rsend_init_ptr)( + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *dest, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_send_ptr)( + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *dest, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +void (*mpiabi_send_init_ptr)( + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *dest, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_sendrecv_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + const MPIABI_Fint *dest, + const MPIABI_Fint *sendtag, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *source, + const MPIABI_Fint *recvtag, + const MPIABI_Fint *comm, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +void (*mpiabi_sendrecv_replace_ptr)( + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *dest, + const MPIABI_Fint *sendtag, + const MPIABI_Fint *source, + const MPIABI_Fint *recvtag, + const MPIABI_Fint *comm, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +void (*mpiabi_session_attach_buffer_ptr)( + const MPIABI_Fint *session, + const void *buffer, + const MPIABI_Fint *size, + MPIABI_Fint *ierror +); + +void (*mpiabi_session_detach_buffer_ptr)( + const MPIABI_Fint *session, + MPIABI_Aint *buffer_addr, + MPIABI_Fint *size, + MPIABI_Fint *ierror +); + +void (*mpiabi_session_flush_buffer_ptr)( + const MPIABI_Fint *session, + MPIABI_Fint *ierror +); + +void (*mpiabi_session_iflush_buffer_ptr)( + const MPIABI_Fint *session, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_ssend_ptr)( + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *dest, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +void (*mpiabi_ssend_init_ptr)( + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *dest, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_start_ptr)( + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_startall_ptr)( + const MPIABI_Fint *count, + MPIABI_Fint *array_of_requests, + MPIABI_Fint *ierror +); + +void (*mpiabi_status_get_error_ptr)( + const MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *err, + MPIABI_Fint *ierror +); + +void (*mpiabi_status_get_source_ptr)( + const MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *source, + MPIABI_Fint *ierror +); + +void (*mpiabi_status_get_tag_ptr)( + const MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *tag, + MPIABI_Fint *ierror +); + +void (*mpiabi_test_ptr)( + MPIABI_Fint *request, + MPIABI_Fint *flag, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +void (*mpiabi_test_cancelled_ptr)( + const MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *flag, + MPIABI_Fint *ierror +); + +void (*mpiabi_testall_ptr)( + const MPIABI_Fint *count, + MPIABI_Fint *array_of_requests, + MPIABI_Fint *flag, + MPIABI_Fint *array_of_statuses[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +void (*mpiabi_testany_ptr)( + const MPIABI_Fint *count, + MPIABI_Fint *array_of_requests, + MPIABI_Fint *index, + MPIABI_Fint *flag, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +void (*mpiabi_testsome_ptr)( + const MPIABI_Fint *incount, + MPIABI_Fint *array_of_requests, + MPIABI_Fint *outcount, + MPIABI_Fint *array_of_indices, + MPIABI_Fint *array_of_statuses[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +void (*mpiabi_wait_ptr)( + MPIABI_Fint *request, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +void (*mpiabi_waitall_ptr)( + const MPIABI_Fint *count, + MPIABI_Fint *array_of_requests, + MPIABI_Fint *array_of_statuses[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +void (*mpiabi_waitany_ptr)( + const MPIABI_Fint *count, + MPIABI_Fint *array_of_requests, + MPIABI_Fint *index, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +void (*mpiabi_waitsome_ptr)( + const MPIABI_Fint *incount, + MPIABI_Fint *array_of_requests, + MPIABI_Fint *outcount, + MPIABI_Fint *array_of_indices, + MPIABI_Fint *array_of_statuses[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +void (*mpiabi_parrived_ptr)( + const MPIABI_Fint *request, + const MPIABI_Fint *partition, + MPIABI_Fint *flag, + MPIABI_Fint *ierror +); + +void (*mpiabi_pready_ptr)( + const MPIABI_Fint *partition, + const MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_pready_list_ptr)( + const MPIABI_Fint *length, + const MPIABI_Fint *array_of_partitions, + const MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_pready_range_ptr)( + const MPIABI_Fint *partition_low, + const MPIABI_Fint *partition_high, + const MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_precv_init_ptr)( + void *buf, + const MPIABI_Fint *partitions, + const MPIABI_Count *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *source, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_psend_init_ptr)( + void *buf, + const MPIABI_Fint *partitions, + const MPIABI_Count *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *source, + const MPIABI_Fint *tag, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +MPIABI_Aint (*mpiabi_aint_add_ptr)( + const MPIABI_Aint *base, + const MPIABI_Aint *disp +); + +MPIABI_Aint (*mpiabi_aint_diff_ptr)( + const MPIABI_Aint *addr1, + const MPIABI_Aint *addr2 +); + +void (*mpiabi_get_address_ptr)( + const void *location, + MPIABI_Aint *address, + MPIABI_Fint *ierror +); + +void (*mpiabi_get_elements_ptr)( + const MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + const MPIABI_Fint *datatype, + MPIABI_Fint *count, + MPIABI_Fint *ierror +); + +void (*mpiabi_pack_ptr)( + const void *inbuf, + const MPIABI_Fint *incount, + const MPIABI_Fint *datatype, + void *outbuf, + const MPIABI_Fint *outsize, + MPIABI_Fint *position, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +void (*mpiabi_pack_external_ptr)( + const char **datarep, + const void *inbuf, + const MPIABI_Fint *incount, + const MPIABI_Fint *datatype, + void *outbuf, + const MPIABI_Aint *outsize, + MPIABI_Aint *position, + MPIABI_Fint *ierror +); + +void (*mpiabi_pack_external_size_ptr)( + const char **datarep, + const MPIABI_Count *incount, + const MPIABI_Fint *datatype, + MPIABI_Aint *size, + MPIABI_Fint *ierror +); + +void (*mpiabi_pack_size_ptr)( + const MPIABI_Fint *incount, + const MPIABI_Fint *datatype, + const MPIABI_Fint *comm, + MPIABI_Fint *size, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_commit_ptr)( + MPIABI_Fint *datatype, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_contiguous_ptr)( + const MPIABI_Fint *count, + const MPIABI_Fint *oldtype, + MPIABI_Fint *newtype, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_create_darray_ptr)( + const MPIABI_Fint *size, + const MPIABI_Fint *rank, + const MPIABI_Fint *ndims, + const MPIABI_Fint *array_of_gsizes, + const MPIABI_Fint *array_of_distribs, + const MPIABI_Fint *array_of_dargs, + const MPIABI_Fint *array_of_psizes, + const MPIABI_Fint *order, + const MPIABI_Fint *oldtype, + MPIABI_Fint *newtype, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_create_hindexed_ptr)( + const MPIABI_Fint *count, + const MPIABI_Fint *array_of_blocklengths, + const MPIABI_Aint *array_of_displacements, + const MPIABI_Fint *oldtype, + MPIABI_Fint *newtype, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_create_hindexed_block_ptr)( + const MPIABI_Fint *count, + const MPIABI_Fint *blocklength, + const MPIABI_Aint *array_of_displacements, + const MPIABI_Fint *oldtype, + MPIABI_Fint *newtype, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_create_hvector_ptr)( + const MPIABI_Fint *count, + const MPIABI_Fint *blocklength, + const MPIABI_Aint *stride, + const MPIABI_Fint *oldtype, + MPIABI_Fint *newtype, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_create_indexed_block_ptr)( + const MPIABI_Fint *count, + const MPIABI_Fint *blocklength, + const MPIABI_Fint *array_of_displacements, + const MPIABI_Fint *oldtype, + MPIABI_Fint *newtype, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_create_resized_ptr)( + const MPIABI_Fint *oldtype, + const MPIABI_Aint *lb, + const MPIABI_Aint *extent, + MPIABI_Fint *newtype, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_create_struct_ptr)( + const MPIABI_Fint *count, + const MPIABI_Fint *array_of_blocklengths, + const MPIABI_Aint *array_of_displacements, + const MPIABI_Fint *array_of_types, + MPIABI_Fint *newtype, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_create_subarray_ptr)( + const MPIABI_Fint *ndims, + const MPIABI_Fint *array_of_sizes, + const MPIABI_Fint *array_of_subsizes, + const MPIABI_Fint *array_of_starts, + const MPIABI_Fint *order, + const MPIABI_Fint *oldtype, + MPIABI_Fint *newtype, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_dup_ptr)( + const MPIABI_Fint *oldtype, + MPIABI_Fint *newtype, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_free_ptr)( + MPIABI_Fint *datatype, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_get_contents_ptr)( + const MPIABI_Fint *datatype, + const MPIABI_Fint *max_integers, + const MPIABI_Fint *max_addresses, + const MPIABI_Fint *max_datatypes, + MPIABI_Fint *array_of_integers, + MPIABI_Aint *array_of_addresses, + MPIABI_Fint *array_of_datatypes, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_get_envelope_ptr)( + const MPIABI_Fint *datatype, + MPIABI_Fint *num_integers, + MPIABI_Fint *num_addresses, + MPIABI_Fint *num_datatypes, + MPIABI_Fint *combiner, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_get_extent_ptr)( + const MPIABI_Fint *datatype, + MPIABI_Aint *lb, + MPIABI_Aint *extent, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_get_true_extent_ptr)( + const MPIABI_Fint *datatype, + MPIABI_Aint *true_lb, + MPIABI_Aint *true_extent, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_indexed_ptr)( + const MPIABI_Fint *count, + const MPIABI_Fint *array_of_blocklengths, + const MPIABI_Fint *array_of_displacements, + const MPIABI_Fint *oldtype, + MPIABI_Fint *newtype, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_size_ptr)( + const MPIABI_Fint *datatype, + MPIABI_Fint *size, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_vector_ptr)( + const MPIABI_Fint *count, + const MPIABI_Fint *blocklength, + const MPIABI_Fint *stride, + const MPIABI_Fint *oldtype, + MPIABI_Fint *newtype, + MPIABI_Fint *ierror +); + +void (*mpiabi_unpack_ptr)( + const void *inbuf, + const MPIABI_Fint *insize, + MPIABI_Fint *position, + void *outbuf, + const MPIABI_Fint *outcount, + const MPIABI_Fint *datatype, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +void (*mpiabi_unpack_external_ptr)( + const char **datarep, + const void *inbuf, + const MPIABI_Aint *insize, + MPIABI_Aint *position, + void *outbuf, + const MPIABI_Fint *outcount, + const MPIABI_Fint *datatype, + MPIABI_Fint *ierror +); + +void (*mpiabi_allgather_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +void (*mpiabi_allgather_init_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_allgatherv_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Fint *displs, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +void (*mpiabi_allgatherv_init_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Fint *displs, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_allreduce_ptr)( + const void *sendbuf, + void *recvbuf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +void (*mpiabi_allreduce_init_ptr)( + const void *sendbuf, + void *recvbuf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_alltoall_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +void (*mpiabi_alltoall_init_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_alltoallv_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcounts, + const MPIABI_Fint *sdispls, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Fint *rdispls, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +void (*mpiabi_alltoallv_init_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcounts, + const MPIABI_Fint *sdispls, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Fint *rdispls, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_alltoallw_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcounts, + const MPIABI_Fint *sdispls, + const MPIABI_Fint *sendtypes, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Fint *rdispls, + const MPIABI_Fint *recvtypes, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +void (*mpiabi_alltoallw_init_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcounts, + const MPIABI_Fint *sdispls, + const MPIABI_Fint *sendtypes, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Fint *rdispls, + const MPIABI_Fint *recvtypes, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_barrier_ptr)( + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +void (*mpiabi_barrier_init_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_bcast_ptr)( + void *buffer, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +void (*mpiabi_bcast_init_ptr)( + void *buffer, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_exscan_ptr)( + const void *sendbuf, + void *recvbuf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +void (*mpiabi_exscan_init_ptr)( + const void *sendbuf, + void *recvbuf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_gather_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +void (*mpiabi_gather_init_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_gatherv_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Fint *displs, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +void (*mpiabi_gatherv_init_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Fint *displs, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_iallgather_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_iallgatherv_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Fint *displs, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_iallreduce_ptr)( + const void *sendbuf, + void *recvbuf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_ialltoall_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_ialltoallv_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcounts, + const MPIABI_Fint *sdispls, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Fint *rdispls, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_ialltoallw_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcounts, + const MPIABI_Fint *sdispls, + const MPIABI_Fint *sendtypes, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Fint *rdispls, + const MPIABI_Fint *recvtypes, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_ibarrier_ptr)( + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_ibcast_ptr)( + void *buffer, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_iexscan_ptr)( + const void *sendbuf, + void *recvbuf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_igather_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_igatherv_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Fint *displs, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_ireduce_ptr)( + const void *sendbuf, + void *recvbuf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_ireduce_scatter_ptr)( + const void *sendbuf, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Fint *datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_ireduce_scatter_block_ptr)( + const void *sendbuf, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_iscan_ptr)( + const void *sendbuf, + void *recvbuf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_iscatter_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_iscatterv_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcounts, + const MPIABI_Fint *sdispls, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_op_commutative_ptr)( + const MPIABI_Fint *op, + MPIABI_Fint *commute, + MPIABI_Fint *ierror +); + +void (*mpiabi_op_create_ptr)( + const void (**user_fn)(void), + const MPIABI_Fint *commute, + MPIABI_Fint *op, + MPIABI_Fint *ierror +); + +void (*mpiabi_op_free_ptr)( + MPIABI_Fint *op, + MPIABI_Fint *ierror +); + +void (*mpiabi_reduce_ptr)( + const void *sendbuf, + void *recvbuf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +void (*mpiabi_reduce_init_ptr)( + const void *sendbuf, + void *recvbuf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_reduce_local_ptr)( + const void *inbuf, + void *inoutbuf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *op, + MPIABI_Fint *ierror +); + +void (*mpiabi_reduce_scatter_ptr)( + const void *sendbuf, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Fint *datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +void (*mpiabi_reduce_scatter_block_ptr)( + const void *sendbuf, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +void (*mpiabi_reduce_scatter_block_init_ptr)( + const void *sendbuf, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_reduce_scatter_init_ptr)( + const void *sendbuf, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Fint *datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_scan_ptr)( + const void *sendbuf, + void *recvbuf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +void (*mpiabi_scan_init_ptr)( + const void *sendbuf, + void *recvbuf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_scatter_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +void (*mpiabi_scatter_init_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_scatterv_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcounts, + const MPIABI_Fint *displs, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +void (*mpiabi_scatterv_init_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcounts, + const MPIABI_Fint *displs, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_get_value_index_ptr)( + const MPIABI_Fint *value_type, + const MPIABI_Fint *index_type, + MPIABI_Fint *pair_type, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_compare_ptr)( + const MPIABI_Fint *comm1, + const MPIABI_Fint *comm2, + MPIABI_Fint *result, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_create_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *group, + MPIABI_Fint *newcomm, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_create_from_group_ptr)( + const MPIABI_Fint *group, + const char **stringtag, + const MPIABI_Fint *info, + const MPIABI_Fint *errhandler, + MPIABI_Fint *newcomm, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_create_group_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *group, + const MPIABI_Fint *tag, + MPIABI_Fint *newcomm, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_create_keyval_ptr)( + const void (**comm_copy_attr_fn)(void), + const void (**comm_delete_attr_fn)(void), + MPIABI_Fint *comm_keyval, + void *extra_state, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_delete_attr_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *comm_keyval, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_dup_ptr)( + const MPIABI_Fint *comm, + MPIABI_Fint *newcomm, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_dup_with_info_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *newcomm, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_free_ptr)( + MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_get_name_ptr)( + const MPIABI_Fint *comm, + char **comm_name, + MPIABI_Fint *resultlen, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_free_keyval_ptr)( + MPIABI_Fint *comm_keyval, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_get_attr_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *comm_keyval, + void *attribute_val, + MPIABI_Fint *flag, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_get_info_ptr)( + const MPIABI_Fint *comm, + MPIABI_Fint *info_used, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_group_ptr)( + const MPIABI_Fint *comm, + MPIABI_Fint *group, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_idup_ptr)( + const MPIABI_Fint *comm, + MPIABI_Fint *newcomm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_idup_with_info_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *newcomm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_rank_ptr)( + const MPIABI_Fint *comm, + MPIABI_Fint *rank, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_remote_group_ptr)( + const MPIABI_Fint *comm, + MPIABI_Fint *group, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_remote_size_ptr)( + const MPIABI_Fint *comm, + MPIABI_Fint *size, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_set_attr_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *comm_keyval, + void *attribute_val, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_set_info_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_set_name_ptr)( + const MPIABI_Fint *comm, + const char **comm_name, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_size_ptr)( + const MPIABI_Fint *comm, + MPIABI_Fint *size, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_split_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *color, + const MPIABI_Fint *key, + MPIABI_Fint *newcomm, + MPIABI_Fint *ierror +); + +void (*mpiabi_group_free_ptr)( + MPIABI_Fint *group, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_split_type_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *split_type, + const MPIABI_Fint *key, + const MPIABI_Fint *info, + MPIABI_Fint *newcomm, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_test_inter_ptr)( + const MPIABI_Fint *comm, + MPIABI_Fint *flag, + MPIABI_Fint *ierror +); + +void (*mpiabi_group_compare_ptr)( + const MPIABI_Fint *group1, + const MPIABI_Fint *group2, + MPIABI_Fint *result, + MPIABI_Fint *ierror +); + +void (*mpiabi_group_difference_ptr)( + const MPIABI_Fint *group1, + const MPIABI_Fint *group2, + MPIABI_Fint *newgroup, + MPIABI_Fint *ierror +); + +void (*mpiabi_group_excl_ptr)( + const MPIABI_Fint *group, + const MPIABI_Fint *n, + const MPIABI_Fint *ranks, + MPIABI_Fint *newgroup, + MPIABI_Fint *ierror +); + +void (*mpiabi_group_from_session_pset_ptr)( + const MPIABI_Fint *session, + const char **pset_name, + MPIABI_Fint *newgroup, + MPIABI_Fint *ierror +); + +void (*mpiabi_group_incl_ptr)( + const MPIABI_Fint *group, + const MPIABI_Fint *n, + const MPIABI_Fint *ranks, + MPIABI_Fint *newgroup, + MPIABI_Fint *ierror +); + +void (*mpiabi_group_intersection_ptr)( + const MPIABI_Fint *group1, + const MPIABI_Fint *group2, + MPIABI_Fint *newgroup, + MPIABI_Fint *ierror +); + +void (*mpiabi_group_range_excl_ptr)( + const MPIABI_Fint *group, + const MPIABI_Fint *n, + const MPIABI_Fint *ranges, + MPIABI_Fint *newgroup, + MPIABI_Fint *ierror +); + +void (*mpiabi_group_range_incl_ptr)( + const MPIABI_Fint *group, + const MPIABI_Fint *n, + const MPIABI_Fint *ranges, + MPIABI_Fint *newgroup, + MPIABI_Fint *ierror +); + +void (*mpiabi_group_rank_ptr)( + const MPIABI_Fint *group, + MPIABI_Fint *rank, + MPIABI_Fint *ierror +); + +void (*mpiabi_group_size_ptr)( + const MPIABI_Fint *group, + MPIABI_Fint *size, + MPIABI_Fint *ierror +); + +void (*mpiabi_group_translate_ranks_ptr)( + const MPIABI_Fint *group1, + const MPIABI_Fint *n, + const MPIABI_Fint *ranks1, + const MPIABI_Fint *group2, + const MPIABI_Fint *ranks2, + MPIABI_Fint *ierror +); + +void (*mpiabi_group_union_ptr)( + const MPIABI_Fint *group1, + const MPIABI_Fint *group2, + MPIABI_Fint *newgroup, + MPIABI_Fint *ierror +); + +void (*mpiabi_intercomm_create_ptr)( + const MPIABI_Fint *local_comm, + const MPIABI_Fint *local_leader, + const MPIABI_Fint *peer_comm, + const MPIABI_Fint *remote_leader, + const MPIABI_Fint *tag, + MPIABI_Fint *newintercomm, + MPIABI_Fint *ierror +); + +void (*mpiabi_intercomm_create_from_groups_ptr)( + const MPIABI_Fint *local_group, + const MPIABI_Fint *local_leader, + const MPIABI_Fint *remote_group, + const MPIABI_Fint *remote_leader, + const char **stringtag, + const MPIABI_Fint *info, + const MPIABI_Fint *errhandler, + MPIABI_Fint *newintercomm, + MPIABI_Fint *ierror +); + +void (*mpiabi_intercomm_merge_ptr)( + const MPIABI_Fint *intercomm, + const MPIABI_Fint *high, + MPIABI_Fint *newintracomm, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_create_keyval_ptr)( + const void (**type_copy_attr_fn)(void), + const void (**type_delete_attr_fn)(void), + MPIABI_Fint *type_keyval, + void *extra_state, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_delete_attr_ptr)( + const MPIABI_Fint *datatype, + const MPIABI_Fint *type_keyval, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_free_keyval_ptr)( + MPIABI_Fint *type_keyval, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_get_attr_ptr)( + const MPIABI_Fint *datatype, + const MPIABI_Fint *type_keyval, + void *attribute_val, + MPIABI_Fint *flag, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_get_name_ptr)( + const MPIABI_Fint *datatype, + char **type_name, + MPIABI_Fint *resultlen, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_set_attr_ptr)( + const MPIABI_Fint *datatype, + const MPIABI_Fint *type_keyval, + void *attribute_val, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_set_name_ptr)( + const MPIABI_Fint *datatype, + const char **type_name, + MPIABI_Fint *ierror +); + +void (*mpiabi_win_create_keyval_ptr)( + const void (**win_copy_attr_fn)(void), + const void (**win_delete_attr_fn)(void), + MPIABI_Fint *win_keyval, + void *extra_state, + MPIABI_Fint *ierror +); + +void (*mpiabi_win_delete_attr_ptr)( + const MPIABI_Fint *win, + const MPIABI_Fint *win_keyval, + MPIABI_Fint *ierror +); + +void (*mpiabi_win_free_keyval_ptr)( + MPIABI_Fint *win_keyval, + MPIABI_Fint *ierror +); + +void (*mpiabi_win_get_attr_ptr)( + const MPIABI_Fint *win, + const MPIABI_Fint *win_keyval, + void *attribute_val, + MPIABI_Fint *flag, + MPIABI_Fint *ierror +); + +void (*mpiabi_win_get_name_ptr)( + const MPIABI_Fint *win, + char **win_name, + MPIABI_Fint *resultlen, + MPIABI_Fint *ierror +); + +void (*mpiabi_win_set_attr_ptr)( + const MPIABI_Fint *win, + const MPIABI_Fint *win_keyval, + void *attribute_val, + MPIABI_Fint *ierror +); + +void (*mpiabi_win_set_name_ptr)( + const MPIABI_Fint *win, + const char **win_name, + MPIABI_Fint *ierror +); + +void (*mpiabi_cart_coords_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *rank, + const MPIABI_Fint *maxdims, + MPIABI_Fint *coords, + MPIABI_Fint *ierror +); + +void (*mpiabi_cart_create_ptr)( + const MPIABI_Fint *comm_old, + const MPIABI_Fint *ndims, + const MPIABI_Fint *dims, + const MPIABI_Fint *periods, + const MPIABI_Fint *reorder, + MPIABI_Fint *comm_cart, + MPIABI_Fint *ierror +); + +void (*mpiabi_cart_get_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *maxdims, + MPIABI_Fint *dims, + MPIABI_Fint *periods, + MPIABI_Fint *coords, + MPIABI_Fint *ierror +); + +void (*mpiabi_cart_map_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *ndims, + const MPIABI_Fint *dims, + const MPIABI_Fint *periods, + MPIABI_Fint *newrank, + MPIABI_Fint *ierror +); + +void (*mpiabi_cart_rank_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *coords, + MPIABI_Fint *rank, + MPIABI_Fint *ierror +); + +void (*mpiabi_cart_shift_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *direction, + const MPIABI_Fint *disp, + MPIABI_Fint *rank_source, + MPIABI_Fint *rank_dest, + MPIABI_Fint *ierror +); + +void (*mpiabi_cart_sub_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *remain_dims, + MPIABI_Fint *newcomm, + MPIABI_Fint *ierror +); + +void (*mpiabi_cartdim_get_ptr)( + const MPIABI_Fint *comm, + MPIABI_Fint *ndims, + MPIABI_Fint *ierror +); + +void (*mpiabi_dims_create_ptr)( + const MPIABI_Fint *nnodes, + const MPIABI_Fint *ndims, + const MPIABI_Fint *dims, + MPIABI_Fint *ierror +); + +void (*mpiabi_dist_graph_create_ptr)( + const MPIABI_Fint *comm_old, + const MPIABI_Fint *n, + const MPIABI_Fint *sources, + const MPIABI_Fint *degrees, + const MPIABI_Fint *destinations, + const MPIABI_Fint *weights, + const MPIABI_Fint *info, + const MPIABI_Fint *reorder, + MPIABI_Fint *comm_dist_graph, + MPIABI_Fint *ierror +); + +void (*mpiabi_dist_graph_create_adjacent_ptr)( + const MPIABI_Fint *comm_old, + const MPIABI_Fint *indegree, + const MPIABI_Fint *sources, + const MPIABI_Fint *sourceweights, + const MPIABI_Fint *outdegree, + const MPIABI_Fint *destinations, + const MPIABI_Fint *destweights, + const MPIABI_Fint *info, + const MPIABI_Fint *reorder, + MPIABI_Fint *comm_dist_graph, + MPIABI_Fint *ierror +); + +void (*mpiabi_dist_graph_neighbors_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *maxindegree, + MPIABI_Fint *sources, + MPIABI_Fint *sourceweights, + const MPIABI_Fint *maxoutdegree, + MPIABI_Fint *destinations, + MPIABI_Fint *destweights, + MPIABI_Fint *ierror +); + +void (*mpiabi_dist_graph_neighbors_count_ptr)( + const MPIABI_Fint *comm, + MPIABI_Fint *indegree, + MPIABI_Fint *outdegree, + MPIABI_Fint *weighted, + MPIABI_Fint *ierror +); + +void (*mpiabi_graph_create_ptr)( + const MPIABI_Fint *comm_old, + const MPIABI_Fint *nnodes, + const MPIABI_Fint *index, + const MPIABI_Fint *edges, + const MPIABI_Fint *reorder, + MPIABI_Fint *comm_graph, + MPIABI_Fint *ierror +); + +void (*mpiabi_graph_get_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *maxindex, + const MPIABI_Fint *maxedges, + MPIABI_Fint *index, + MPIABI_Fint *edges, + MPIABI_Fint *ierror +); + +void (*mpiabi_graph_map_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *nnodes, + const MPIABI_Fint *index, + const MPIABI_Fint *edges, + MPIABI_Fint *newrank, + MPIABI_Fint *ierror +); + +void (*mpiabi_graph_neighbors_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *rank, + const MPIABI_Fint *maxneighbors, + MPIABI_Fint *neighbors, + MPIABI_Fint *ierror +); + +void (*mpiabi_graph_neighbors_count_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *rank, + MPIABI_Fint *nneighbors, + MPIABI_Fint *ierror +); + +void (*mpiabi_graphdims_get_ptr)( + const MPIABI_Fint *comm, + MPIABI_Fint *nnodes, + MPIABI_Fint *nedges, + MPIABI_Fint *ierror +); + +void (*mpiabi_ineighbor_allgather_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_ineighbor_allgatherv_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Fint *displs, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_ineighbor_alltoall_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_ineighbor_alltoallv_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcounts, + const MPIABI_Fint *sdispls, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Fint *rdispls, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_ineighbor_alltoallw_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcounts, + const MPIABI_Aint *sdispls, + const MPIABI_Fint *sendtypes, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Aint *rdispls, + const MPIABI_Fint *recvtypes, + const MPIABI_Fint *comm, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_neighbor_allgather_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +void (*mpiabi_neighbor_allgather_init_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_neighbor_allgatherv_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Aint *displs, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +void (*mpiabi_neighbor_allgatherv_init_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Aint *displs, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_neighbor_alltoall_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +void (*mpiabi_neighbor_alltoall_init_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcount, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcount, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_neighbor_alltoallv_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcounts, + const MPIABI_Fint *sdispls, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Fint *rdispls, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +void (*mpiabi_neighbor_alltoallv_init_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcounts, + const MPIABI_Fint *sdispls, + const MPIABI_Fint *sendtype, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Fint *rdispls, + const MPIABI_Fint *recvtype, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_neighbor_alltoallw_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcounts, + const MPIABI_Aint *sdispls, + const MPIABI_Fint *sendtypes, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Aint *rdispls, + const MPIABI_Fint *recvtypes, + const MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +void (*mpiabi_neighbor_alltoallw_init_ptr)( + const void *sendbuf, + const MPIABI_Fint *sendcounts, + const MPIABI_Aint *sdispls, + const MPIABI_Fint *sendtypes, + void *recvbuf, + const MPIABI_Fint *recvcounts, + const MPIABI_Aint *rdispls, + const MPIABI_Fint *recvtypes, + const MPIABI_Fint *comm, + const MPIABI_Fint *info, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_topo_test_ptr)( + const MPIABI_Fint *comm, + MPIABI_Fint *status, + MPIABI_Fint *ierror +); + +void (*mpiabi_add_error_class_ptr)( + MPIABI_Fint *errorclass, + MPIABI_Fint *ierror +); + +void (*mpiabi_add_error_code_ptr)( + const MPIABI_Fint *errorclass, + MPIABI_Fint *errorcode, + MPIABI_Fint *ierror +); + +void (*mpiabi_add_error_string_ptr)( + const MPIABI_Fint *errorcode, + const char **string, + MPIABI_Fint *ierror +); + +void (*mpiabi_alloc_mem_ptr)( + const MPIABI_Aint *size, + const MPIABI_Fint *info, + void *baseptr, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_call_errhandler_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *errorcode, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_create_errhandler_ptr)( + const void (**comm_errhandler_fn)(void), + MPIABI_Fint *errhandler, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_get_errhandler_ptr)( + const MPIABI_Fint *comm, + MPIABI_Fint *errhandler, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_set_errhandler_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *errhandler, + MPIABI_Fint *ierror +); + +void (*mpiabi_errhandler_free_ptr)( + MPIABI_Fint *errhandler, + MPIABI_Fint *ierror +); + +void (*mpiabi_error_class_ptr)( + const MPIABI_Fint *errorcode, + MPIABI_Fint *errorclass, + MPIABI_Fint *ierror +); + +void (*mpiabi_error_string_ptr)( + const MPIABI_Fint *errorcode, + char **string, + MPIABI_Fint *resultlen, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_call_errhandler_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Fint *errorcode, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_create_errhandler_ptr)( + const void (**file_errhandler_fn)(void), + MPIABI_Fint *errhandler, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_get_errhandler_ptr)( + const MPIABI_Fint *file, + MPIABI_Fint *errhandler, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_set_errhandler_ptr)( + const MPIABI_Fint *file, + const MPIABI_Fint *errhandler, + MPIABI_Fint *ierror +); + +void (*mpiabi_free_mem_ptr)( + void *base, + MPIABI_Fint *ierror +); + +void (*mpiabi_get_hw_resource_info_ptr)( + MPIABI_Fint *hw_info, + MPIABI_Fint *ierror +); + +void (*mpiabi_get_library_version_ptr)( + char **version, + MPIABI_Fint *resultlen, + MPIABI_Fint *ierror +); + +void (*mpiabi_get_processor_name_ptr)( + char **name, + MPIABI_Fint *resultlen, + MPIABI_Fint *ierror +); + +void (*mpiabi_get_version_ptr)( + MPIABI_Fint *version, + MPIABI_Fint *subversion, + MPIABI_Fint *ierror +); + +void (*mpiabi_remove_error_class_ptr)( + const MPIABI_Fint *errorclass, + MPIABI_Fint *ierror +); + +void (*mpiabi_remove_error_code_ptr)( + const MPIABI_Fint *errorcode, + MPIABI_Fint *ierror +); + +void (*mpiabi_remove_error_string_ptr)( + const MPIABI_Fint *errorcode, + MPIABI_Fint *ierror +); + +void (*mpiabi_session_call_errhandler_ptr)( + const MPIABI_Fint *session, + const MPIABI_Fint *errorcode, + MPIABI_Fint *ierror +); + +void (*mpiabi_session_create_errhandler_ptr)( + const void (**session_errhandler_fn)(void), + MPIABI_Fint *errhandler, + MPIABI_Fint *ierror +); + +void (*mpiabi_session_get_errhandler_ptr)( + const MPIABI_Fint *session, + MPIABI_Fint *errhandler, + MPIABI_Fint *ierror +); + +void (*mpiabi_session_set_errhandler_ptr)( + const MPIABI_Fint *session, + const MPIABI_Fint *errhandler, + MPIABI_Fint *ierror +); + +void (*mpiabi_win_call_errhandler_ptr)( + const MPIABI_Fint *win, + const MPIABI_Fint *errorcode, + MPIABI_Fint *ierror +); + +void (*mpiabi_win_create_errhandler_ptr)( + const void (**win_errhandler_fn)(void), + MPIABI_Fint *errhandler, + MPIABI_Fint *ierror +); + +void (*mpiabi_win_get_errhandler_ptr)( + const MPIABI_Fint *win, + MPIABI_Fint *errhandler, + MPIABI_Fint *ierror +); + +void (*mpiabi_win_set_errhandler_ptr)( + const MPIABI_Fint *win, + const MPIABI_Fint *errhandler, + MPIABI_Fint *ierror +); + +double (*mpiabi_wtick_ptr)( +); + +double (*mpiabi_wtime_ptr)( +); + +void (*mpiabi_info_create_ptr)( + MPIABI_Fint *info, + MPIABI_Fint *ierror +); + +void (*mpiabi_info_create_env_ptr)( + MPIABI_Fint *info, + MPIABI_Fint *ierror +); + +void (*mpiabi_info_delete_ptr)( + const MPIABI_Fint *info, + const char **key, + MPIABI_Fint *ierror +); + +void (*mpiabi_info_dup_ptr)( + const MPIABI_Fint *info, + MPIABI_Fint *newinfo, + MPIABI_Fint *ierror +); + +void (*mpiabi_info_free_ptr)( + MPIABI_Fint *info, + MPIABI_Fint *ierror +); + +void (*mpiabi_info_get_nkeys_ptr)( + const MPIABI_Fint *info, + MPIABI_Fint *nkeys, + MPIABI_Fint *ierror +); + +void (*mpiabi_info_get_nthkey_ptr)( + const MPIABI_Fint *info, + const MPIABI_Fint *n, + char **key, + MPIABI_Fint *ierror +); + +void (*mpiabi_info_get_string_ptr)( + const MPIABI_Fint *info, + const char **key, + MPIABI_Fint *buflen, + char **value, + MPIABI_Fint *flag, + MPIABI_Fint *ierror +); + +void (*mpiabi_info_set_ptr)( + const MPIABI_Fint *info, + const char **key, + const char **value, + MPIABI_Fint *ierror +); + +void (*mpiabi_abort_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *errorcode, + MPIABI_Fint *ierror +); + +void (*mpiabi_close_port_ptr)( + const char **port_name, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_accept_ptr)( + const char **port_name, + const MPIABI_Fint *info, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + MPIABI_Fint *newcomm, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_connect_ptr)( + const char **port_name, + const MPIABI_Fint *info, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + MPIABI_Fint *newcomm, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_disconnect_ptr)( + MPIABI_Fint *comm, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_get_parent_ptr)( + MPIABI_Fint *parent, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_join_ptr)( + const MPIABI_Fint *fd, + MPIABI_Fint *intercomm, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_spawn_ptr)( + const char **command, + const char **argv, + const MPIABI_Fint *maxprocs, + const MPIABI_Fint *info, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + MPIABI_Fint *intercomm, + MPIABI_Fint *array_of_errcodes, + MPIABI_Fint *ierror +); + +void (*mpiabi_comm_spawn_multiple_ptr)( + const MPIABI_Fint *count, + const char **array_of_commands, + const char **array_of_argv, + const MPIABI_Fint *array_of_maxprocs, + const MPIABI_Fint *array_of_info, + const MPIABI_Fint *root, + const MPIABI_Fint *comm, + MPIABI_Fint *intercomm, + MPIABI_Fint *array_of_errcodes, + MPIABI_Fint *ierror +); + +void (*mpiabi_finalize_ptr)( + MPIABI_Fint *ierror +); + +void (*mpiabi_finalized_ptr)( + MPIABI_Fint *flag, + MPIABI_Fint *ierror +); + +void (*mpiabi_init_ptr)( + MPIABI_Fint *ierror +); + +void (*mpiabi_init_thread_ptr)( + const MPIABI_Fint *required, + MPIABI_Fint *provided, + MPIABI_Fint *ierror +); + +void (*mpiabi_initialized_ptr)( + MPIABI_Fint *flag, + MPIABI_Fint *ierror +); + +void (*mpiabi_is_thread_main_ptr)( + MPIABI_Fint *flag, + MPIABI_Fint *ierror +); + +void (*mpiabi_lookup_name_ptr)( + const char **service_name, + const MPIABI_Fint *info, + char **port_name, + MPIABI_Fint *ierror +); + +void (*mpiabi_open_port_ptr)( + const MPIABI_Fint *info, + char **port_name, + MPIABI_Fint *ierror +); + +void (*mpiabi_publish_name_ptr)( + const char **service_name, + const MPIABI_Fint *info, + const char **port_name, + MPIABI_Fint *ierror +); + +void (*mpiabi_query_thread_ptr)( + MPIABI_Fint *provided, + MPIABI_Fint *ierror +); + +void (*mpiabi_session_finalize_ptr)( + MPIABI_Fint *session, + MPIABI_Fint *ierror +); + +void (*mpiabi_session_get_info_ptr)( + const MPIABI_Fint *session, + MPIABI_Fint *info_used, + MPIABI_Fint *ierror +); + +void (*mpiabi_session_get_nth_pset_ptr)( + const MPIABI_Fint *session, + const MPIABI_Fint *info, + const MPIABI_Fint *n, + MPIABI_Fint *pset_len, + char **pset_name, + MPIABI_Fint *ierror +); + +void (*mpiabi_session_get_num_psets_ptr)( + const MPIABI_Fint *session, + const MPIABI_Fint *info, + MPIABI_Fint *npset_names, + MPIABI_Fint *ierror +); + +void (*mpiabi_session_get_pset_info_ptr)( + const MPIABI_Fint *session, + const char **pset_name, + MPIABI_Fint *info, + MPIABI_Fint *ierror +); + +void (*mpiabi_session_init_ptr)( + const MPIABI_Fint *info, + const MPIABI_Fint *errhandler, + MPIABI_Fint *session, + MPIABI_Fint *ierror +); + +void (*mpiabi_unpublish_name_ptr)( + const char **service_name, + const MPIABI_Fint *info, + const char **port_name, + MPIABI_Fint *ierror +); + +void (*mpiabi_accumulate_ptr)( + const void *origin_addr, + const MPIABI_Fint *origin_count, + const MPIABI_Fint *origin_datatype, + const MPIABI_Fint *target_rank, + const MPIABI_Aint *target_disp, + const MPIABI_Fint *target_count, + const MPIABI_Fint *target_datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +void (*mpiabi_compare_and_swap_ptr)( + const void *origin_addr, + const void *compare_addr, + void *result_addr, + const MPIABI_Fint *datatype, + const MPIABI_Fint *target_rank, + const MPIABI_Aint *target_disp, + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +void (*mpiabi_fetch_and_op_ptr)( + const void *origin_addr, + void *result_addr, + const MPIABI_Fint *datatype, + const MPIABI_Fint *target_rank, + const MPIABI_Aint *target_disp, + const MPIABI_Fint *op, + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +void (*mpiabi_get_ptr)( + void *origin_addr, + const MPIABI_Fint *origin_count, + const MPIABI_Fint *origin_datatype, + const MPIABI_Fint *target_rank, + const MPIABI_Aint *target_disp, + const MPIABI_Fint *target_count, + const MPIABI_Fint *target_datatype, + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +void (*mpiabi_get_accumulate_ptr)( + const void *origin_addr, + const MPIABI_Fint *origin_count, + const MPIABI_Fint *origin_datatype, + void *result_addr, + const MPIABI_Fint *result_count, + const MPIABI_Fint *result_datatype, + const MPIABI_Fint *target_rank, + const MPIABI_Aint *target_disp, + const MPIABI_Fint *target_count, + const MPIABI_Fint *target_datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +void (*mpiabi_put_ptr)( + const void *origin_addr, + const MPIABI_Fint *origin_count, + const MPIABI_Fint *origin_datatype, + const MPIABI_Fint *target_rank, + const MPIABI_Aint *target_disp, + const MPIABI_Fint *target_count, + const MPIABI_Fint *target_datatype, + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +void (*mpiabi_raccumulate_ptr)( + const void *origin_addr, + const MPIABI_Fint *origin_count, + const MPIABI_Fint *origin_datatype, + const MPIABI_Fint *target_rank, + const MPIABI_Aint *target_disp, + const MPIABI_Fint *target_count, + const MPIABI_Fint *target_datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *win, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_rget_ptr)( + void *origin_addr, + const MPIABI_Fint *origin_count, + const MPIABI_Fint *origin_datatype, + const MPIABI_Fint *target_rank, + const MPIABI_Aint *target_disp, + const MPIABI_Fint *target_count, + const MPIABI_Fint *target_datatype, + const MPIABI_Fint *win, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_rget_accumulate_ptr)( + const void *origin_addr, + const MPIABI_Fint *origin_count, + const MPIABI_Fint *origin_datatype, + void *result_addr, + const MPIABI_Fint *result_count, + const MPIABI_Fint *result_datatype, + const MPIABI_Fint *target_rank, + const MPIABI_Aint *target_disp, + const MPIABI_Fint *target_count, + const MPIABI_Fint *target_datatype, + const MPIABI_Fint *op, + const MPIABI_Fint *win, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_rput_ptr)( + const void *origin_addr, + const MPIABI_Fint *origin_count, + const MPIABI_Fint *origin_datatype, + const MPIABI_Fint *target_rank, + const MPIABI_Aint *target_disp, + const MPIABI_Fint *target_count, + const MPIABI_Fint *target_datatype, + const MPIABI_Fint *win, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_win_allocate_ptr)( + const MPIABI_Aint *size, + const MPIABI_Fint *disp_unit, + const MPIABI_Fint *info, + const MPIABI_Fint *comm, + void *baseptr, + MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +void (*mpiabi_win_allocate_shared_ptr)( + const MPIABI_Aint *size, + const MPIABI_Fint *disp_unit, + const MPIABI_Fint *info, + const MPIABI_Fint *comm, + void *baseptr, + MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +void (*mpiabi_win_attach_ptr)( + const MPIABI_Fint *win, + void *base, + const MPIABI_Aint *size, + MPIABI_Fint *ierror +); + +void (*mpiabi_win_complete_ptr)( + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +void (*mpiabi_win_create_ptr)( + void *base, + const MPIABI_Aint *size, + const MPIABI_Fint *disp_unit, + const MPIABI_Fint *info, + const MPIABI_Fint *comm, + MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +void (*mpiabi_win_create_dynamic_ptr)( + const MPIABI_Fint *info, + const MPIABI_Fint *comm, + MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +void (*mpiabi_win_detach_ptr)( + const MPIABI_Fint *win, + const void *base, + MPIABI_Fint *ierror +); + +void (*mpiabi_win_fence_ptr)( + const MPIABI_Fint *assert, + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +void (*mpiabi_win_flush_ptr)( + const MPIABI_Fint *rank, + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +void (*mpiabi_win_flush_all_ptr)( + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +void (*mpiabi_win_flush_local_ptr)( + const MPIABI_Fint *rank, + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +void (*mpiabi_win_flush_local_all_ptr)( + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +void (*mpiabi_win_free_ptr)( + MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +void (*mpiabi_win_get_group_ptr)( + const MPIABI_Fint *win, + MPIABI_Fint *group, + MPIABI_Fint *ierror +); + +void (*mpiabi_win_get_info_ptr)( + const MPIABI_Fint *win, + MPIABI_Fint *info_used, + MPIABI_Fint *ierror +); + +void (*mpiabi_win_lock_ptr)( + const MPIABI_Fint *lock_type, + const MPIABI_Fint *rank, + const MPIABI_Fint *assert, + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +void (*mpiabi_win_lock_all_ptr)( + const MPIABI_Fint *assert, + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +void (*mpiabi_win_post_ptr)( + const MPIABI_Fint *group, + const MPIABI_Fint *assert, + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +void (*mpiabi_win_set_info_ptr)( + const MPIABI_Fint *win, + const MPIABI_Fint *info, + MPIABI_Fint *ierror +); + +void (*mpiabi_win_shared_query_ptr)( + const MPIABI_Fint *win, + const MPIABI_Fint *rank, + MPIABI_Aint *size, + MPIABI_Fint *disp_unit, + void *baseptr, + MPIABI_Fint *ierror +); + +void (*mpiabi_win_start_ptr)( + const MPIABI_Fint *group, + const MPIABI_Fint *assert, + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +void (*mpiabi_win_sync_ptr)( + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +void (*mpiabi_win_test_ptr)( + const MPIABI_Fint *win, + MPIABI_Fint *flag, + MPIABI_Fint *ierror +); + +void (*mpiabi_win_unlock_ptr)( + const MPIABI_Fint *rank, + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +void (*mpiabi_win_unlock_all_ptr)( + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +void (*mpiabi_win_wait_ptr)( + const MPIABI_Fint *win, + MPIABI_Fint *ierror +); + +void (*mpiabi_grequest_complete_ptr)( + const MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_grequest_start_ptr)( + const void (**query_fn)(void), + const void (**free_fn)(void), + const void (**cancel_fn)(void), + void *extra_state, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_status_set_cancelled_ptr)( + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + const MPIABI_Fint *flag, + MPIABI_Fint *ierror +); + +void (*mpiabi_status_set_elements_ptr)( + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + const MPIABI_Fint *datatype, + const MPIABI_Fint *count, + MPIABI_Fint *ierror +); + +void (*mpiabi_status_set_error_ptr)( + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + const MPIABI_Fint *err, + MPIABI_Fint *ierror +); + +void (*mpiabi_status_set_source_ptr)( + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + const MPIABI_Fint *source, + MPIABI_Fint *ierror +); + +void (*mpiabi_status_set_tag_ptr)( + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + const MPIABI_Fint *tag, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_close_ptr)( + MPIABI_Fint *fh, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_delete_ptr)( + const char **filename, + const MPIABI_Fint *info, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_get_amode_ptr)( + const MPIABI_Fint *fh, + MPIABI_Fint *amode, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_get_atomicity_ptr)( + const MPIABI_Fint *fh, + MPIABI_Fint *flag, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_get_byte_offset_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Offset *offset, + MPIABI_Offset *disp, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_get_group_ptr)( + const MPIABI_Fint *fh, + MPIABI_Fint *group, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_get_info_ptr)( + const MPIABI_Fint *fh, + MPIABI_Fint *info_used, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_get_position_ptr)( + const MPIABI_Fint *fh, + MPIABI_Offset *offset, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_get_position_shared_ptr)( + const MPIABI_Fint *fh, + MPIABI_Offset *offset, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_get_size_ptr)( + const MPIABI_Fint *fh, + MPIABI_Offset *size, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_get_type_extent_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Fint *datatype, + MPIABI_Aint *extent, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_get_view_ptr)( + const MPIABI_Fint *fh, + MPIABI_Offset *disp, + MPIABI_Fint *etype, + MPIABI_Fint *filetype, + char **datarep, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_iread_ptr)( + const MPIABI_Fint *fh, + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_iread_all_ptr)( + const MPIABI_Fint *fh, + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_iread_at_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Offset *offset, + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_iread_at_all_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Offset *offset, + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_iread_shared_ptr)( + const MPIABI_Fint *fh, + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_iwrite_ptr)( + const MPIABI_Fint *fh, + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_iwrite_all_ptr)( + const MPIABI_Fint *fh, + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_iwrite_at_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Offset *offset, + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_iwrite_at_all_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Offset *offset, + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_iwrite_shared_ptr)( + const MPIABI_Fint *fh, + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *request, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_open_ptr)( + const MPIABI_Fint *comm, + const char **filename, + const MPIABI_Fint *amode, + const MPIABI_Fint *info, + MPIABI_Fint *fh, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_preallocate_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Offset *size, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_read_ptr)( + const MPIABI_Fint *fh, + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +void (*mpiabi_file_read_all_ptr)( + const MPIABI_Fint *fh, + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +void (*mpiabi_file_read_all_begin_ptr)( + const MPIABI_Fint *fh, + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_read_all_end_ptr)( + const MPIABI_Fint *fh, + void *buf, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +void (*mpiabi_file_read_at_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Offset *offset, + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +void (*mpiabi_file_read_at_all_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Offset *offset, + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +void (*mpiabi_file_read_at_all_begin_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Offset *offset, + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_read_at_all_end_ptr)( + const MPIABI_Fint *fh, + void *buf, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +void (*mpiabi_file_read_ordered_ptr)( + const MPIABI_Fint *fh, + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +void (*mpiabi_file_read_ordered_begin_ptr)( + const MPIABI_Fint *fh, + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_read_ordered_end_ptr)( + const MPIABI_Fint *fh, + void *buf, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +void (*mpiabi_file_read_shared_ptr)( + const MPIABI_Fint *fh, + void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +void (*mpiabi_file_seek_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Offset *offset, + const MPIABI_Fint *whence, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_seek_shared_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Offset *offset, + const MPIABI_Fint *whence, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_set_atomicity_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Fint *flag, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_set_info_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Fint *info, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_set_size_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Offset *size, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_set_view_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Offset *disp, + const MPIABI_Fint *etype, + const MPIABI_Fint *filetype, + const char **datarep, + const MPIABI_Fint *info, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_sync_ptr)( + const MPIABI_Fint *fh, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_write_ptr)( + const MPIABI_Fint *fh, + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +void (*mpiabi_file_write_all_ptr)( + const MPIABI_Fint *fh, + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +void (*mpiabi_file_write_all_begin_ptr)( + const MPIABI_Fint *fh, + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_write_all_end_ptr)( + const MPIABI_Fint *fh, + const void *buf, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +void (*mpiabi_file_write_at_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Offset *offset, + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +void (*mpiabi_file_write_at_all_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Offset *offset, + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +void (*mpiabi_file_write_at_all_begin_ptr)( + const MPIABI_Fint *fh, + const MPIABI_Offset *offset, + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_write_at_all_end_ptr)( + const MPIABI_Fint *fh, + const void *buf, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +void (*mpiabi_file_write_ordered_ptr)( + const MPIABI_Fint *fh, + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +void (*mpiabi_file_write_ordered_begin_ptr)( + const MPIABI_Fint *fh, + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *ierror +); + +void (*mpiabi_file_write_ordered_end_ptr)( + const MPIABI_Fint *fh, + const void *buf, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +void (*mpiabi_file_write_shared_ptr)( + const MPIABI_Fint *fh, + const void *buf, + const MPIABI_Fint *count, + const MPIABI_Fint *datatype, + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + MPIABI_Fint *ierror +); + +void (*mpiabi_register_datarep_ptr)( + const char **datarep, + const void (**read_conversion_fn)(void), + const void (**write_conversion_fn)(void), + const void (**dtype_file_extent_fn)(void), + void *extra_state, + MPIABI_Fint *ierror +); + +void (*mpiabi_f_sync_reg_ptr)( + void *buf +); + +void (*mpiabi_type_create_f90_complex_ptr)( + const MPIABI_Fint *p, + const MPIABI_Fint *r, + MPIABI_Fint *newtype, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_create_f90_integer_ptr)( + const MPIABI_Fint *r, + MPIABI_Fint *newtype, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_create_f90_real_ptr)( + const MPIABI_Fint *p, + const MPIABI_Fint *r, + MPIABI_Fint *newtype, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_match_size_ptr)( + const MPIABI_Fint *typeclass, + const MPIABI_Fint *size, + MPIABI_Fint *newtype, + MPIABI_Fint *ierror +); + +void (*mpiabi_pcontrol_ptr)( + const MPIABI_Fint *level +); + +void (*mpiabi_attr_delete_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *keyval, + MPIABI_Fint *ierror +); + +void (*mpiabi_attr_get_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *keyval, + void *attribute_val, + MPIABI_Fint *flag, + MPIABI_Fint *ierror +); + +void (*mpiabi_attr_put_ptr)( + const MPIABI_Fint *comm, + const MPIABI_Fint *keyval, + void *attribute_val, + MPIABI_Fint *ierror +); + +void (*mpiabi_get_elements_x_ptr)( + const MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + const MPIABI_Fint *datatype, + MPIABI_Count *count, + MPIABI_Fint *ierror +); + +void (*mpiabi_info_get_ptr)( + const MPIABI_Fint *info, + const char **key, + const MPIABI_Fint *valuelen, + char **value, + MPIABI_Fint *flag, + MPIABI_Fint *ierror +); + +void (*mpiabi_info_get_valuelen_ptr)( + const MPIABI_Fint *info, + const char **key, + MPIABI_Fint *valuelen, + MPIABI_Fint *flag, + MPIABI_Fint *ierror +); + +void (*mpiabi_keyval_create_ptr)( + const void (**copy_fn)(void), + const void (**delete_fn)(void), + MPIABI_Fint *keyval, + void *extra_state, + MPIABI_Fint *ierror +); + +void (*mpiabi_keyval_free_ptr)( + MPIABI_Fint *keyval, + MPIABI_Fint *ierror +); + +void (*mpiabi_status_set_elements_x_ptr)( + MPIABI_Fint *status[MPIABI_F_STATUS_SIZE], + const MPIABI_Fint *datatype, + const MPIABI_Count *count, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_get_extent_x_ptr)( + const MPIABI_Fint *datatype, + MPIABI_Count *lb, + MPIABI_Count *extent, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_get_true_extent_x_ptr)( + const MPIABI_Fint *datatype, + MPIABI_Count *true_lb, + MPIABI_Count *true_extent, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_size_x_ptr)( + const MPIABI_Fint *datatype, + MPIABI_Count *size, + MPIABI_Fint *ierror +); + +void (*mpiabi_address_ptr)( + void *location, + MPIABI_Aint *address, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_hindexed_ptr)( + const MPIABI_Fint *count, + MPIABI_Fint *array_of_blocklengths, + MPIABI_Aint *array_of_displacements, + const MPIABI_Fint *oldtype, + MPIABI_Fint *newtype, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_hvector_ptr)( + const MPIABI_Fint *count, + const MPIABI_Fint *blocklength, + const MPIABI_Aint *stride, + const MPIABI_Fint *oldtype, + MPIABI_Fint *newtype, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_struct_ptr)( + const MPIABI_Fint *count, + MPIABI_Fint *array_of_blocklengths, + MPIABI_Aint *array_of_displacements, + MPIABI_Fint *array_of_types, + MPIABI_Fint *newtype, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_extent_ptr)( + const MPIABI_Fint *datatype, + MPIABI_Aint *extent, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_lb_ptr)( + const MPIABI_Fint *datatype, + MPIABI_Aint *displacement, + MPIABI_Fint *ierror +); + +void (*mpiabi_type_ub_ptr)( + const MPIABI_Fint *datatype, + MPIABI_Aint *displacement, + MPIABI_Fint *ierror +); + diff --git a/mpitrampoline/src/mpi_set_mpiabi_function_pointers.c b/mpitrampoline/src/mpi_set_mpiabi_function_pointers.c new file mode 100644 index 00000000..41bc1fb1 --- /dev/null +++ b/mpitrampoline/src/mpi_set_mpiabi_function_pointers.c @@ -0,0 +1,1236 @@ +// Declare pointers to MPIABI functions + +#include + +void *mpitrampoline_get_symbol(void *handle, const char *name); + +void mpi_set_mpiabi_function_pointers(void *handle) { + + // A.3 C Bindings + + // A.3.1 Point-to-Point Communication C Bindings + + MPIABI_Bsend_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Bsend"); + MPIABI_Bsend_c_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Bsend_c"); + MPIABI_Bsend_init_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Bsend_init"); + MPIABI_Bsend_init_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Bsend_init_c"); + MPIABI_Buffer_attach_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Buffer_attach"); + MPIABI_Buffer_attach_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Buffer_attach_c"); + MPIABI_Buffer_detach_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Buffer_detach"); + MPIABI_Buffer_detach_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Buffer_detach_c"); + MPIABI_Buffer_flush_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Buffer_flush"); + MPIABI_Buffer_iflush_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Buffer_iflush"); + MPIABI_Cancel_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Cancel"); + MPIABI_Comm_attach_buffer_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Comm_attach_buffer"); + MPIABI_Comm_attach_buffer_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Comm_attach_buffer_c"); + MPIABI_Comm_detach_buffer_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Comm_detach_buffer"); + MPIABI_Comm_detach_buffer_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Comm_detach_buffer_c"); + MPIABI_Comm_flush_buffer_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Comm_flush_buffer"); + MPIABI_Comm_iflush_buffer_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Comm_iflush_buffer"); + MPIABI_Get_count_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Get_count"); + MPIABI_Get_count_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Get_count_c"); + MPIABI_Ibsend_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Ibsend"); + MPIABI_Ibsend_c_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Ibsend_c"); + MPIABI_Improbe_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Improbe"); + MPIABI_Imrecv_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Imrecv"); + MPIABI_Imrecv_c_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Imrecv_c"); + MPIABI_Iprobe_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Iprobe"); + MPIABI_Irecv_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Irecv"); + MPIABI_Irecv_c_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Irecv_c"); + MPIABI_Irsend_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Irsend"); + MPIABI_Irsend_c_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Irsend_c"); + MPIABI_Isend_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Isend"); + MPIABI_Isend_c_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Isend_c"); + MPIABI_Isendrecv_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Isendrecv"); + MPIABI_Isendrecv_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Isendrecv_c"); + MPIABI_Isendrecv_replace_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Isendrecv_replace"); + MPIABI_Isendrecv_replace_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Isendrecv_replace_c"); + MPIABI_Issend_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Issend"); + MPIABI_Issend_c_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Issend_c"); + MPIABI_Mprobe_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Mprobe"); + MPIABI_Mrecv_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Mrecv"); + MPIABI_Mrecv_c_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Mrecv_c"); + MPIABI_Probe_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Probe"); + MPIABI_Recv_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Recv"); + MPIABI_Recv_c_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Recv_c"); + MPIABI_Recv_init_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Recv_init"); + MPIABI_Recv_init_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Recv_init_c"); + MPIABI_Request_free_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Request_free"); + MPIABI_Request_get_status_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Request_get_status"); + MPIABI_Request_get_status_all_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Request_get_status_all"); + MPIABI_Request_get_status_any_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Request_get_status_any"); + MPIABI_Request_get_status_some_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Request_get_status_some"); + MPIABI_Rsend_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Rsend"); + MPIABI_Rsend_c_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Rsend_c"); + MPIABI_Rsend_init_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Rsend_init"); + MPIABI_Rsend_init_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Rsend_init_c"); + MPIABI_Send_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Send"); + MPIABI_Send_c_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Send_c"); + MPIABI_Send_init_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Send_init"); + MPIABI_Send_init_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Send_init_c"); + MPIABI_Sendrecv_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Sendrecv"); + MPIABI_Sendrecv_c_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Sendrecv_c"); + MPIABI_Sendrecv_replace_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Sendrecv_replace"); + MPIABI_Sendrecv_replace_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Sendrecv_replace_c"); + MPIABI_Session_attach_buffer_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Session_attach_buffer"); + MPIABI_Session_attach_buffer_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Session_attach_buffer_c"); + MPIABI_Session_detach_buffer_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Session_detach_buffer"); + MPIABI_Session_detach_buffer_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Session_detach_buffer_c"); + MPIABI_Session_flush_buffer_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Session_flush_buffer"); + MPIABI_Session_iflush_buffer_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Session_iflush_buffer"); + MPIABI_Ssend_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Ssend"); + MPIABI_Ssend_c_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Ssend_c"); + MPIABI_Ssend_init_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Ssend_init"); + MPIABI_Ssend_init_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Ssend_init_c"); + MPIABI_Start_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Start"); + MPIABI_Startall_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Startall"); + MPIABI_Status_get_error_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Status_get_error"); + MPIABI_Status_get_source_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Status_get_source"); + MPIABI_Status_get_tag_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Status_get_tag"); + MPIABI_Test_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Test"); + MPIABI_Test_cancelled_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Test_cancelled"); + MPIABI_Testall_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Testall"); + MPIABI_Testany_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Testany"); + MPIABI_Testsome_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Testsome"); + MPIABI_Wait_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Wait"); + MPIABI_Waitall_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Waitall"); + MPIABI_Waitany_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Waitany"); + MPIABI_Waitsome_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Waitsome"); + + // A.3.2 Partitioned Communication C Bindings + + MPIABI_Parrived_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Parrived"); + MPIABI_Pready_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Pready"); + MPIABI_Pready_list_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Pready_list"); + MPIABI_Pready_range_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Pready_range"); + MPIABI_Precv_init_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Precv_init"); + MPIABI_Psend_init_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Psend_init"); + + // A.3.3 Datatypes C Bindings + + MPIABI_Aint_add_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Aint_add"); + MPIABI_Aint_diff_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Aint_diff"); + MPIABI_Get_address_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Get_address"); + MPIABI_Get_elements_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Get_elements"); + MPIABI_Get_elements_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Get_elements_c"); + MPIABI_Pack_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Pack"); + MPIABI_Pack_c_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Pack_c"); + MPIABI_Pack_external_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Pack_external"); + MPIABI_Pack_external_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Pack_external_c"); + MPIABI_Pack_external_size_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Pack_external_size"); + MPIABI_Pack_external_size_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Pack_external_size_c"); + MPIABI_Pack_size_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Pack_size"); + MPIABI_Pack_size_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Pack_size_c"); + MPIABI_Type_commit_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_commit"); + MPIABI_Type_contiguous_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_contiguous"); + MPIABI_Type_contiguous_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_contiguous_c"); + MPIABI_Type_create_darray_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_create_darray"); + MPIABI_Type_create_darray_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_create_darray_c"); + MPIABI_Type_create_hindexed_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_create_hindexed"); + MPIABI_Type_create_hindexed_block_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_create_hindexed_block"); + MPIABI_Type_create_hindexed_block_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_create_hindexed_block_c"); + MPIABI_Type_create_hindexed_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_create_hindexed_c"); + MPIABI_Type_create_hvector_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_create_hvector"); + MPIABI_Type_create_hvector_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_create_hvector_c"); + MPIABI_Type_create_indexed_block_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_create_indexed_block"); + MPIABI_Type_create_indexed_block_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_create_indexed_block_c"); + MPIABI_Type_create_resized_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_create_resized"); + MPIABI_Type_create_resized_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_create_resized_c"); + MPIABI_Type_create_struct_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_create_struct"); + MPIABI_Type_create_struct_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_create_struct_c"); + MPIABI_Type_create_subarray_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_create_subarray"); + MPIABI_Type_create_subarray_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_create_subarray_c"); + MPIABI_Type_dup_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Type_dup"); + MPIABI_Type_free_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Type_free"); + MPIABI_Type_get_contents_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_get_contents"); + MPIABI_Type_get_contents_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_get_contents_c"); + MPIABI_Type_get_envelope_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_get_envelope"); + MPIABI_Type_get_envelope_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_get_envelope_c"); + MPIABI_Type_get_extent_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_get_extent"); + MPIABI_Type_get_extent_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_get_extent_c"); + MPIABI_Type_get_true_extent_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_get_true_extent"); + MPIABI_Type_get_true_extent_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_get_true_extent_c"); + MPIABI_Type_indexed_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_indexed"); + MPIABI_Type_indexed_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_indexed_c"); + MPIABI_Type_size_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Type_size"); + MPIABI_Type_size_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_size_c"); + MPIABI_Type_vector_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_vector"); + MPIABI_Type_vector_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_vector_c"); + MPIABI_Unpack_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Unpack"); + MPIABI_Unpack_c_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Unpack_c"); + MPIABI_Unpack_external_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Unpack_external"); + MPIABI_Unpack_external_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Unpack_external_c"); + + // A.3.4 Collective Communication C Bindings + + MPIABI_Allgather_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Allgather"); + MPIABI_Allgather_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Allgather_c"); + MPIABI_Allgather_init_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Allgather_init"); + MPIABI_Allgather_init_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Allgather_init_c"); + MPIABI_Allgatherv_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Allgatherv"); + MPIABI_Allgatherv_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Allgatherv_c"); + MPIABI_Allgatherv_init_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Allgatherv_init"); + MPIABI_Allgatherv_init_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Allgatherv_init_c"); + MPIABI_Allreduce_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Allreduce"); + MPIABI_Allreduce_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Allreduce_c"); + MPIABI_Allreduce_init_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Allreduce_init"); + MPIABI_Allreduce_init_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Allreduce_init_c"); + MPIABI_Alltoall_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Alltoall"); + MPIABI_Alltoall_c_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Alltoall_c"); + MPIABI_Alltoall_init_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Alltoall_init"); + MPIABI_Alltoall_init_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Alltoall_init_c"); + MPIABI_Alltoallv_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Alltoallv"); + MPIABI_Alltoallv_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Alltoallv_c"); + MPIABI_Alltoallv_init_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Alltoallv_init"); + MPIABI_Alltoallv_init_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Alltoallv_init_c"); + MPIABI_Alltoallw_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Alltoallw"); + MPIABI_Alltoallw_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Alltoallw_c"); + MPIABI_Alltoallw_init_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Alltoallw_init"); + MPIABI_Alltoallw_init_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Alltoallw_init_c"); + MPIABI_Barrier_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Barrier"); + MPIABI_Barrier_init_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Barrier_init"); + MPIABI_Bcast_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Bcast"); + MPIABI_Bcast_c_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Bcast_c"); + MPIABI_Bcast_init_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Bcast_init"); + MPIABI_Bcast_init_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Bcast_init_c"); + MPIABI_Exscan_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Exscan"); + MPIABI_Exscan_c_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Exscan_c"); + MPIABI_Exscan_init_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Exscan_init"); + MPIABI_Exscan_init_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Exscan_init_c"); + MPIABI_Gather_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Gather"); + MPIABI_Gather_c_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Gather_c"); + MPIABI_Gather_init_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Gather_init"); + MPIABI_Gather_init_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Gather_init_c"); + MPIABI_Gatherv_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Gatherv"); + MPIABI_Gatherv_c_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Gatherv_c"); + MPIABI_Gatherv_init_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Gatherv_init"); + MPIABI_Gatherv_init_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Gatherv_init_c"); + MPIABI_Iallgather_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Iallgather"); + MPIABI_Iallgather_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Iallgather_c"); + MPIABI_Iallgatherv_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Iallgatherv"); + MPIABI_Iallgatherv_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Iallgatherv_c"); + MPIABI_Iallreduce_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Iallreduce"); + MPIABI_Iallreduce_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Iallreduce_c"); + MPIABI_Ialltoall_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Ialltoall"); + MPIABI_Ialltoall_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Ialltoall_c"); + MPIABI_Ialltoallv_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Ialltoallv"); + MPIABI_Ialltoallv_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Ialltoallv_c"); + MPIABI_Ialltoallw_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Ialltoallw"); + MPIABI_Ialltoallw_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Ialltoallw_c"); + MPIABI_Ibarrier_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Ibarrier"); + MPIABI_Ibcast_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Ibcast"); + MPIABI_Ibcast_c_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Ibcast_c"); + MPIABI_Iexscan_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Iexscan"); + MPIABI_Iexscan_c_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Iexscan_c"); + MPIABI_Igather_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Igather"); + MPIABI_Igather_c_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Igather_c"); + MPIABI_Igatherv_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Igatherv"); + MPIABI_Igatherv_c_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Igatherv_c"); + MPIABI_Ireduce_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Ireduce"); + MPIABI_Ireduce_c_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Ireduce_c"); + MPIABI_Ireduce_scatter_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Ireduce_scatter"); + MPIABI_Ireduce_scatter_block_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Ireduce_scatter_block"); + MPIABI_Ireduce_scatter_block_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Ireduce_scatter_block_c"); + MPIABI_Ireduce_scatter_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Ireduce_scatter_c"); + MPIABI_Iscan_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Iscan"); + MPIABI_Iscan_c_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Iscan_c"); + MPIABI_Iscatter_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Iscatter"); + MPIABI_Iscatter_c_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Iscatter_c"); + MPIABI_Iscatterv_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Iscatterv"); + MPIABI_Iscatterv_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Iscatterv_c"); + MPIABI_Op_commutative_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Op_commutative"); + MPIABI_Op_create_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Op_create"); + MPIABI_Op_create_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Op_create_c"); + MPIABI_Op_free_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Op_free"); + MPIABI_Reduce_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Reduce"); + MPIABI_Reduce_c_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Reduce_c"); + MPIABI_Reduce_init_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Reduce_init"); + MPIABI_Reduce_init_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Reduce_init_c"); + MPIABI_Reduce_local_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Reduce_local"); + MPIABI_Reduce_local_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Reduce_local_c"); + MPIABI_Reduce_scatter_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Reduce_scatter"); + MPIABI_Reduce_scatter_block_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Reduce_scatter_block"); + MPIABI_Reduce_scatter_block_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Reduce_scatter_block_c"); + MPIABI_Reduce_scatter_block_init_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Reduce_scatter_block_init"); + MPIABI_Reduce_scatter_block_init_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Reduce_scatter_block_init_c"); + MPIABI_Reduce_scatter_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Reduce_scatter_c"); + MPIABI_Reduce_scatter_init_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Reduce_scatter_init"); + MPIABI_Reduce_scatter_init_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Reduce_scatter_init_c"); + MPIABI_Scan_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Scan"); + MPIABI_Scan_c_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Scan_c"); + MPIABI_Scan_init_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Scan_init"); + MPIABI_Scan_init_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Scan_init_c"); + MPIABI_Scatter_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Scatter"); + MPIABI_Scatter_c_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Scatter_c"); + MPIABI_Scatter_init_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Scatter_init"); + MPIABI_Scatter_init_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Scatter_init_c"); + MPIABI_Scatterv_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Scatterv"); + MPIABI_Scatterv_c_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Scatterv_c"); + MPIABI_Scatterv_init_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Scatterv_init"); + MPIABI_Scatterv_init_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Scatterv_init_c"); + MPIABI_Type_get_value_index_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_get_value_index"); + + // A.3.5 Groups, Contexts, Communicators, and Caching C Bindings + + MPIABI_Comm_compare_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Comm_compare"); + MPIABI_Comm_create_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Comm_create"); + MPIABI_Comm_create_from_group_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Comm_create_from_group"); + MPIABI_Comm_create_group_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Comm_create_group"); + MPIABI_Comm_create_keyval_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Comm_create_keyval"); + MPIABI_Comm_delete_attr_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Comm_delete_attr"); + MPIABI_Comm_dup_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Comm_dup"); + MPIABI_Comm_dup_with_info_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Comm_dup_with_info"); + MPIABI_Comm_free_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Comm_free"); + MPIABI_Comm_get_name_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Comm_get_name"); + MPIABI_Comm_free_keyval_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Comm_free_keyval"); + MPIABI_Comm_get_attr_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Comm_get_attr"); + MPIABI_Comm_get_info_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Comm_get_info"); + MPIABI_Comm_group_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Comm_group"); + MPIABI_Comm_idup_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Comm_idup"); + MPIABI_Comm_idup_with_info_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Comm_idup_with_info"); + MPIABI_Comm_rank_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Comm_rank"); + MPIABI_Comm_remote_group_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Comm_remote_group"); + MPIABI_Comm_remote_size_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Comm_remote_size"); + MPIABI_Comm_set_attr_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Comm_set_attr"); + MPIABI_Comm_set_info_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Comm_set_info"); + MPIABI_Comm_set_name_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Comm_set_name"); + MPIABI_Comm_size_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Comm_size"); + MPIABI_Comm_split_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Comm_split"); + MPIABI_Group_free_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Group_free"); + MPIABI_Comm_split_type_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Comm_split_type"); + MPIABI_Comm_test_inter_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Comm_test_inter"); + MPIABI_Group_compare_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Group_compare"); + MPIABI_Group_difference_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Group_difference"); + MPIABI_Group_excl_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Group_excl"); + MPIABI_Group_from_session_pset_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Group_from_session_pset"); + MPIABI_Group_incl_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Group_incl"); + MPIABI_Group_intersection_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Group_intersection"); + MPIABI_Group_range_excl_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Group_range_excl"); + MPIABI_Group_range_incl_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Group_range_incl"); + MPIABI_Group_rank_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Group_rank"); + MPIABI_Group_size_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Group_size"); + MPIABI_Group_translate_ranks_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Group_translate_ranks"); + MPIABI_Group_union_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Group_union"); + MPIABI_Intercomm_create_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Intercomm_create"); + MPIABI_Intercomm_create_from_groups_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Intercomm_create_from_groups"); + MPIABI_Intercomm_merge_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Intercomm_merge"); + MPIABI_Type_create_keyval_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_create_keyval"); + MPIABI_Type_delete_attr_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_delete_attr"); + MPIABI_Type_free_keyval_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_free_keyval"); + MPIABI_Type_get_attr_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_get_attr"); + MPIABI_Type_get_name_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_get_name"); + MPIABI_Type_set_attr_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_set_attr"); + MPIABI_Type_set_name_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_set_name"); + MPIABI_Win_create_keyval_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Win_create_keyval"); + MPIABI_Win_delete_attr_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Win_delete_attr"); + MPIABI_Win_free_keyval_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Win_free_keyval"); + MPIABI_Win_get_attr_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Win_get_attr"); + MPIABI_Win_get_name_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Win_get_name"); + MPIABI_Win_set_attr_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Win_set_attr"); + MPIABI_Win_set_name_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Win_set_name"); + + // A.3.6 Virtual Topologies for MPI Processes C Bindings + + MPIABI_Cart_coords_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Cart_coords"); + MPIABI_Cart_create_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Cart_create"); + MPIABI_Cart_get_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Cart_get"); + MPIABI_Cart_map_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Cart_map"); + MPIABI_Cart_rank_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Cart_rank"); + MPIABI_Cart_shift_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Cart_shift"); + MPIABI_Cart_sub_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Cart_sub"); + MPIABI_Cartdim_get_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Cartdim_get"); + MPIABI_Dims_create_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Dims_create"); + MPIABI_Dist_graph_create_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Dist_graph_create"); + MPIABI_Dist_graph_create_adjacent_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Dist_graph_create_adjacent"); + MPIABI_Dist_graph_neighbors_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Dist_graph_neighbors"); + MPIABI_Dist_graph_neighbors_count_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Dist_graph_neighbors_count"); + MPIABI_Graph_create_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Graph_create"); + MPIABI_Graph_get_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Graph_get"); + MPIABI_Graph_map_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Graph_map"); + MPIABI_Graph_neighbors_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Graph_neighbors"); + MPIABI_Graph_neighbors_count_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Graph_neighbors_count"); + MPIABI_Graphdims_get_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Graphdims_get"); + MPIABI_Ineighbor_allgather_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Ineighbor_allgather"); + MPIABI_Ineighbor_allgather_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Ineighbor_allgather_c"); + MPIABI_Ineighbor_allgatherv_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Ineighbor_allgatherv"); + MPIABI_Ineighbor_allgatherv_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Ineighbor_allgatherv_c"); + MPIABI_Ineighbor_alltoall_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Ineighbor_alltoall"); + MPIABI_Ineighbor_alltoall_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Ineighbor_alltoall_c"); + MPIABI_Ineighbor_alltoallv_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Ineighbor_alltoallv"); + MPIABI_Ineighbor_alltoallv_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Ineighbor_alltoallv_c"); + MPIABI_Ineighbor_alltoallw_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Ineighbor_alltoallw"); + MPIABI_Ineighbor_alltoallw_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Ineighbor_alltoallw_c"); + MPIABI_Neighbor_allgather_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Neighbor_allgather"); + MPIABI_Neighbor_allgather_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Neighbor_allgather_c"); + MPIABI_Neighbor_allgather_init_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Neighbor_allgather_init"); + MPIABI_Neighbor_allgather_init_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Neighbor_allgather_init_c"); + MPIABI_Neighbor_allgatherv_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Neighbor_allgatherv"); + MPIABI_Neighbor_allgatherv_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Neighbor_allgatherv_c"); + MPIABI_Neighbor_allgatherv_init_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Neighbor_allgatherv_init"); + MPIABI_Neighbor_allgatherv_init_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Neighbor_allgatherv_init_c"); + MPIABI_Neighbor_alltoall_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Neighbor_alltoall"); + MPIABI_Neighbor_alltoall_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Neighbor_alltoall_c"); + MPIABI_Neighbor_alltoall_init_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Neighbor_alltoall_init"); + MPIABI_Neighbor_alltoall_init_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Neighbor_alltoall_init_c"); + MPIABI_Neighbor_alltoallv_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Neighbor_alltoallv"); + MPIABI_Neighbor_alltoallv_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Neighbor_alltoallv_c"); + MPIABI_Neighbor_alltoallv_init_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Neighbor_alltoallv_init"); + MPIABI_Neighbor_alltoallv_init_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Neighbor_alltoallv_init_c"); + MPIABI_Neighbor_alltoallw_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Neighbor_alltoallw"); + MPIABI_Neighbor_alltoallw_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Neighbor_alltoallw_c"); + MPIABI_Neighbor_alltoallw_init_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Neighbor_alltoallw_init"); + MPIABI_Neighbor_alltoallw_init_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Neighbor_alltoallw_init_c"); + MPIABI_Topo_test_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Topo_test"); + + // A.3.7 MPI Environmental Management C Bindings + + MPIABI_Add_error_class_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Add_error_class"); + MPIABI_Add_error_code_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Add_error_code"); + MPIABI_Add_error_string_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Add_error_string"); + MPIABI_Alloc_mem_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Alloc_mem"); + MPIABI_Comm_call_errhandler_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Comm_call_errhandler"); + MPIABI_Comm_create_errhandler_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Comm_create_errhandler"); + MPIABI_Comm_get_errhandler_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Comm_get_errhandler"); + MPIABI_Comm_set_errhandler_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Comm_set_errhandler"); + MPIABI_Errhandler_free_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Errhandler_free"); + MPIABI_Error_class_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Error_class"); + MPIABI_Error_string_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Error_string"); + MPIABI_File_call_errhandler_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_call_errhandler"); + MPIABI_File_create_errhandler_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_create_errhandler"); + MPIABI_File_get_errhandler_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_get_errhandler"); + MPIABI_File_set_errhandler_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_set_errhandler"); + MPIABI_Free_mem_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Free_mem"); + MPIABI_Get_hw_resource_info_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Get_hw_resource_info"); + MPIABI_Get_library_version_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Get_library_version"); + MPIABI_Get_processor_name_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Get_processor_name"); + MPIABI_Get_version_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Get_version"); + MPIABI_Remove_error_class_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Remove_error_class"); + MPIABI_Remove_error_code_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Remove_error_code"); + MPIABI_Remove_error_string_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Remove_error_string"); + MPIABI_Session_call_errhandler_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Session_call_errhandler"); + MPIABI_Session_create_errhandler_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Session_create_errhandler"); + MPIABI_Session_get_errhandler_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Session_get_errhandler"); + MPIABI_Session_set_errhandler_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Session_set_errhandler"); + MPIABI_Win_call_errhandler_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Win_call_errhandler"); + MPIABI_Win_create_errhandler_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Win_create_errhandler"); + MPIABI_Win_get_errhandler_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Win_get_errhandler"); + MPIABI_Win_set_errhandler_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Win_set_errhandler"); + MPIABI_Wtick_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Wtick"); + MPIABI_Wtime_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Wtime"); + + // A.3.8 The Info Object C Bindings + + MPIABI_Info_create_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Info_create"); + MPIABI_Info_create_env_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Info_create_env"); + MPIABI_Info_delete_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Info_delete"); + MPIABI_Info_dup_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Info_dup"); + MPIABI_Info_free_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Info_free"); + MPIABI_Info_get_nkeys_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Info_get_nkeys"); + MPIABI_Info_get_nthkey_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Info_get_nthkey"); + MPIABI_Info_get_string_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Info_get_string"); + MPIABI_Info_set_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Info_set"); + + // A.3.9 Process Creation and Management C Bindings + + MPIABI_Abort_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Abort"); + MPIABI_Close_port_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Close_port"); + MPIABI_Comm_accept_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Comm_accept"); + MPIABI_Comm_connect_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Comm_connect"); + MPIABI_Comm_disconnect_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Comm_disconnect"); + MPIABI_Comm_get_parent_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Comm_get_parent"); + MPIABI_Comm_join_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Comm_join"); + MPIABI_Comm_spawn_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Comm_spawn"); + MPIABI_Comm_spawn_multiple_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Comm_spawn_multiple"); + MPIABI_Finalize_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Finalize"); + MPIABI_Finalized_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Finalized"); + MPIABI_Init_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Init"); + MPIABI_Init_thread_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Init_thread"); + MPIABI_Initialized_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Initialized"); + MPIABI_Is_thread_main_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Is_thread_main"); + MPIABI_Lookup_name_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Lookup_name"); + MPIABI_Open_port_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Open_port"); + MPIABI_Publish_name_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Publish_name"); + MPIABI_Query_thread_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Query_thread"); + MPIABI_Session_finalize_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Session_finalize"); + MPIABI_Session_get_info_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Session_get_info"); + MPIABI_Session_get_nth_pset_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Session_get_nth_pset"); + MPIABI_Session_get_num_psets_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Session_get_num_psets"); + MPIABI_Session_get_pset_info_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Session_get_pset_info"); + MPIABI_Session_init_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Session_init"); + MPIABI_Unpublish_name_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Unpublish_name"); + + // A.3.10 One-Sided Communications C Bindings + + MPIABI_Accumulate_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Accumulate"); + MPIABI_Accumulate_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Accumulate_c"); + MPIABI_Compare_and_swap_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Compare_and_swap"); + MPIABI_Fetch_and_op_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Fetch_and_op"); + MPIABI_Get_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Get"); + MPIABI_Get_accumulate_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Get_accumulate"); + MPIABI_Get_accumulate_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Get_accumulate_c"); + MPIABI_Get_c_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Get_c"); + MPIABI_Put_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Put"); + MPIABI_Put_c_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Put_c"); + MPIABI_Raccumulate_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Raccumulate"); + MPIABI_Raccumulate_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Raccumulate_c"); + MPIABI_Rget_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Rget"); + MPIABI_Rget_accumulate_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Rget_accumulate"); + MPIABI_Rget_accumulate_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Rget_accumulate_c"); + MPIABI_Rget_c_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Rget_c"); + MPIABI_Rput_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Rput"); + MPIABI_Rput_c_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Rput_c"); + MPIABI_Win_allocate_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Win_allocate"); + MPIABI_Win_allocate_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Win_allocate_c"); + MPIABI_Win_allocate_shared_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Win_allocate_shared"); + MPIABI_Win_allocate_shared_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Win_allocate_shared_c"); + MPIABI_Win_attach_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Win_attach"); + MPIABI_Win_complete_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Win_complete"); + MPIABI_Win_create_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Win_create"); + MPIABI_Win_create_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Win_create_c"); + MPIABI_Win_create_dynamic_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Win_create_dynamic"); + MPIABI_Win_detach_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Win_detach"); + MPIABI_Win_fence_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Win_fence"); + MPIABI_Win_flush_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Win_flush"); + MPIABI_Win_flush_all_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Win_flush_all"); + MPIABI_Win_flush_local_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Win_flush_local"); + MPIABI_Win_flush_local_all_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Win_flush_local_all"); + MPIABI_Win_free_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Win_free"); + MPIABI_Win_get_group_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Win_get_group"); + MPIABI_Win_get_info_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Win_get_info"); + MPIABI_Win_lock_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Win_lock"); + MPIABI_Win_lock_all_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Win_lock_all"); + MPIABI_Win_post_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Win_post"); + MPIABI_Win_set_info_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Win_set_info"); + MPIABI_Win_shared_query_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Win_shared_query"); + MPIABI_Win_shared_query_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Win_shared_query_c"); + MPIABI_Win_start_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Win_start"); + MPIABI_Win_sync_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Win_sync"); + MPIABI_Win_test_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Win_test"); + MPIABI_Win_unlock_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Win_unlock"); + MPIABI_Win_unlock_all_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Win_unlock_all"); + MPIABI_Win_wait_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Win_wait"); + + // A.3.11 External Interfaces C Bindings + + MPIABI_Grequest_complete_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Grequest_complete"); + MPIABI_Grequest_start_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Grequest_start"); + MPIABI_Status_set_cancelled_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Status_set_cancelled"); + MPIABI_Status_set_elements_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Status_set_elements"); + MPIABI_Status_set_elements_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Status_set_elements_c"); + MPIABI_Status_set_error_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Status_set_error"); + MPIABI_Status_set_source_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Status_set_source"); + MPIABI_Status_set_tag_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Status_set_tag"); + + // A.3.12 I/O C Bindings + + MPIABI_File_close_ptr = mpitrampoline_get_symbol(handle, "MPIABI_File_close"); + MPIABI_File_delete_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_delete"); + MPIABI_File_get_amode_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_get_amode"); + MPIABI_File_get_atomicity_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_get_atomicity"); + MPIABI_File_get_byte_offset_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_get_byte_offset"); + MPIABI_File_get_group_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_get_group"); + MPIABI_File_get_info_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_get_info"); + MPIABI_File_get_position_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_get_position"); + MPIABI_File_get_position_shared_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_get_position_shared"); + MPIABI_File_get_size_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_get_size"); + MPIABI_File_get_type_extent_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_get_type_extent"); + MPIABI_File_get_type_extent_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_get_type_extent_c"); + MPIABI_File_get_view_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_get_view"); + MPIABI_File_iread_ptr = mpitrampoline_get_symbol(handle, "MPIABI_File_iread"); + MPIABI_File_iread_all_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_iread_all"); + MPIABI_File_iread_all_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_iread_all_c"); + MPIABI_File_iread_at_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_iread_at"); + MPIABI_File_iread_at_all_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_iread_at_all"); + MPIABI_File_iread_at_all_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_iread_at_all_c"); + MPIABI_File_iread_at_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_iread_at_c"); + MPIABI_File_iread_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_iread_c"); + MPIABI_File_iread_shared_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_iread_shared"); + MPIABI_File_iread_shared_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_iread_shared_c"); + MPIABI_File_iwrite_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_iwrite"); + MPIABI_File_iwrite_all_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_iwrite_all"); + MPIABI_File_iwrite_all_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_iwrite_all_c"); + MPIABI_File_iwrite_at_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_iwrite_at"); + MPIABI_File_iwrite_at_all_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_iwrite_at_all"); + MPIABI_File_iwrite_at_all_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_iwrite_at_all_c"); + MPIABI_File_iwrite_at_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_iwrite_at_c"); + MPIABI_File_iwrite_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_iwrite_c"); + MPIABI_File_iwrite_shared_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_iwrite_shared"); + MPIABI_File_iwrite_shared_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_iwrite_shared_c"); + MPIABI_File_open_ptr = mpitrampoline_get_symbol(handle, "MPIABI_File_open"); + MPIABI_File_preallocate_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_preallocate"); + MPIABI_File_read_ptr = mpitrampoline_get_symbol(handle, "MPIABI_File_read"); + MPIABI_File_read_all_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_read_all"); + MPIABI_File_read_all_begin_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_read_all_begin"); + MPIABI_File_read_all_begin_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_read_all_begin_c"); + MPIABI_File_read_all_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_read_all_c"); + MPIABI_File_read_all_end_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_read_all_end"); + MPIABI_File_read_at_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_read_at"); + MPIABI_File_read_at_all_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_read_at_all"); + MPIABI_File_read_at_all_begin_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_read_at_all_begin"); + MPIABI_File_read_at_all_begin_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_read_at_all_begin_c"); + MPIABI_File_read_at_all_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_read_at_all_c"); + MPIABI_File_read_at_all_end_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_read_at_all_end"); + MPIABI_File_read_at_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_read_at_c"); + MPIABI_File_read_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_read_c"); + MPIABI_File_read_ordered_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_read_ordered"); + MPIABI_File_read_ordered_begin_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_read_ordered_begin"); + MPIABI_File_read_ordered_begin_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_read_ordered_begin_c"); + MPIABI_File_read_ordered_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_read_ordered_c"); + MPIABI_File_read_ordered_end_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_read_ordered_end"); + MPIABI_File_read_shared_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_read_shared"); + MPIABI_File_read_shared_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_read_shared_c"); + MPIABI_File_seek_ptr = mpitrampoline_get_symbol(handle, "MPIABI_File_seek"); + MPIABI_File_seek_shared_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_seek_shared"); + MPIABI_File_set_atomicity_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_set_atomicity"); + MPIABI_File_set_info_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_set_info"); + MPIABI_File_set_size_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_set_size"); + MPIABI_File_set_view_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_set_view"); + MPIABI_File_sync_ptr = mpitrampoline_get_symbol(handle, "MPIABI_File_sync"); + MPIABI_File_write_ptr = mpitrampoline_get_symbol(handle, "MPIABI_File_write"); + MPIABI_File_write_all_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_write_all"); + MPIABI_File_write_all_begin_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_write_all_begin"); + MPIABI_File_write_all_begin_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_write_all_begin_c"); + MPIABI_File_write_all_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_write_all_c"); + MPIABI_File_write_all_end_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_write_all_end"); + MPIABI_File_write_at_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_write_at"); + MPIABI_File_write_at_all_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_write_at_all"); + MPIABI_File_write_at_all_begin_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_write_at_all_begin"); + MPIABI_File_write_at_all_begin_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_write_at_all_begin_c"); + MPIABI_File_write_at_all_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_write_at_all_c"); + MPIABI_File_write_at_all_end_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_write_at_all_end"); + MPIABI_File_write_at_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_write_at_c"); + MPIABI_File_write_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_write_c"); + MPIABI_File_write_ordered_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_write_ordered"); + MPIABI_File_write_ordered_begin_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_write_ordered_begin"); + MPIABI_File_write_ordered_begin_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_write_ordered_begin_c"); + MPIABI_File_write_ordered_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_write_ordered_c"); + MPIABI_File_write_ordered_end_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_write_ordered_end"); + MPIABI_File_write_shared_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_write_shared"); + MPIABI_File_write_shared_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_File_write_shared_c"); + MPIABI_Register_datarep_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Register_datarep"); + MPIABI_Register_datarep_c_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Register_datarep_c"); + + // TODO // A.3.13 Language Bindings C Bindings + // TODO + // TODO MPIABI_Comm_c2f_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_Comm_c2f"); + // TODO MPIABI_Comm_f2c_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_Comm_f2c"); + // TODO MPIABI_Errhandler_c2f_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_Errhandler_c2f"); + // TODO MPIABI_Errhandler_f2c_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_Errhandler_f2c"); + // TODO MPIABI_File_c2f_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_File_c2f"); + // TODO MPIABI_File_f2c_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_File_f2c"); + // TODO MPIABI_Group_c2f_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_Group_c2f"); + // TODO MPIABI_Group_f2c_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_Group_f2c"); + // TODO MPIABI_Info_c2f_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_Info_c2f"); + // TODO MPIABI_Info_f2c_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_Info_f2c"); + // TODO MPIABI_Message_c2f_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_Message_c2f"); + // TODO MPIABI_Message_f2c_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_Message_f2c"); + // TODO MPIABI_Op_c2f_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Op_c2f"); + // TODO MPIABI_Op_f2c_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Op_f2c"); + // TODO MPIABI_Request_c2f_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_Request_c2f"); + // TODO MPIABI_Request_f2c_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_Request_f2c"); + // TODO MPIABI_Session_c2f_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_Session_c2f"); + // TODO MPIABI_Session_f2c_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_Session_f2c"); + // TODO MPIABI_Status_f082f_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_Status_f082f"); + // TODO MPIABI_Status_c2f_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_Status_c2f"); + // TODO MPIABI_Status_c2f08_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_Status_c2f08"); + // TODO MPIABI_Status_f082c_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_Status_f082c"); + // TODO MPIABI_Status_f2c_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_Status_f2c"); + // TODO MPIABI_Status_f2f08_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_Status_f2f08"); + // TODO MPIABI_Type_c2f_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_Type_c2f"); + // TODO MPIABI_Type_create_f90_complex_ptr = + // TODO mpitrampoline_get_symbol(handle, + // "MPIABI_Type_create_f90_complex"); + // TODO MPIABI_Type_create_f90_integer_ptr = + // TODO mpitrampoline_get_symbol(handle, + // "MPIABI_Type_create_f90_integer"); + // TODO MPIABI_Type_create_f90_real_ptr = + // TODO mpitrampoline_get_symbol(handle, "MPIABI_Type_create_f90_real"); + // TODO MPIABI_Type_f2c_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_Type_f2c"); + // TODO MPIABI_Type_match_size_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_Type_match_size"); + // TODO MPIABI_Win_c2f_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_Win_c2f"); + // TODO MPIABI_Win_f2c_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_Win_f2c"); + + // A.3.14 Tools / Profiling Interface C Bindings + + MPIABI_Pcontrol_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Pcontrol"); + + // TODO // A.3.15 Tools / MPI Tool Information Interface C Bindings + // TODO + // TODO MPIABI_T_category_changed_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_T_category_changed"); + // TODO MPIABI_T_category_get_categories_ptr = + // TODO mpitrampoline_get_symbol(handle, + // "MPIABI_T_category_get_categories"); + // TODO MPIABI_T_category_get_cvars_ptr = + // TODO mpitrampoline_get_symbol(handle, "MPIABI_T_category_get_cvars"); + // TODO MPIABI_T_category_get_events_ptr = + // TODO mpitrampoline_get_symbol(handle, "MPIABI_T_category_get_events"); + // TODO MPIABI_T_category_get_index_ptr = + // TODO mpitrampoline_get_symbol(handle, "MPIABI_T_category_get_index"); + // TODO MPIABI_T_category_get_info_ptr = + // TODO mpitrampoline_get_symbol(handle, "MPIABI_T_category_get_info"); + // TODO MPIABI_T_category_get_num_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_T_category_get_num"); + // TODO MPIABI_T_category_get_num_events_ptr = + // TODO mpitrampoline_get_symbol(handle, + // "MPIABI_T_category_get_num_events"); + // TODO MPIABI_T_category_get_pvars_ptr = + // TODO mpitrampoline_get_symbol(handle, "MPIABI_T_category_get_pvars"); + // TODO MPIABI_T_cvar_get_index_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_T_cvar_get_index"); + // TODO MPIABI_T_cvar_get_info_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_T_cvar_get_info"); + // TODO MPIABI_T_cvar_get_num_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_T_cvar_get_num"); + // TODO MPIABI_T_cvar_handle_alloc_ptr = + // TODO mpitrampoline_get_symbol(handle, "MPIABI_T_cvar_handle_alloc"); + // TODO MPIABI_T_cvar_handle_free_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_T_cvar_handle_free"); + // TODO MPIABI_T_cvar_read_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_T_cvar_read"); + // TODO MPIABI_T_cvar_write_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_T_cvar_write"); + // TODO MPIABI_T_enum_get_info_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_T_enum_get_info"); + // TODO MPIABI_T_enum_get_item_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_T_enum_get_item"); + // TODO MPIABI_T_event_callback_get_info_ptr = + // TODO mpitrampoline_get_symbol(handle, + // "MPIABI_T_event_callback_get_info"); + // TODO MPIABI_T_event_callback_set_info_ptr = + // TODO mpitrampoline_get_symbol(handle, + // "MPIABI_T_event_callback_set_info"); + // TODO MPIABI_T_event_copy_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_T_event_copy"); + // TODO MPIABI_T_event_get_index_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_T_event_get_index"); + // TODO MPIABI_T_event_get_info_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_T_event_get_info"); + // TODO MPIABI_T_event_get_num_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_T_event_get_num"); + // TODO MPIABI_T_event_get_source_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_T_event_get_source"); + // TODO MPIABI_T_event_get_timestamp_ptr = + // TODO mpitrampoline_get_symbol(handle, "MPIABI_T_event_get_timestamp"); + // TODO MPIABI_T_event_handle_alloc_ptr = + // TODO mpitrampoline_get_symbol(handle, "MPIABI_T_event_handle_alloc"); + // TODO MPIABI_T_event_handle_free_ptr = + // TODO mpitrampoline_get_symbol(handle, "MPIABI_T_event_handle_free"); + // TODO MPIABI_T_event_handle_get_info_ptr = + // TODO mpitrampoline_get_symbol(handle, + // "MPIABI_T_event_handle_get_info"); + // TODO MPIABI_T_event_handle_set_info_ptr = + // TODO mpitrampoline_get_symbol(handle, + // "MPIABI_T_event_handle_set_info"); + // TODO MPIABI_T_event_read_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_T_event_read"); + // TODO MPIABI_T_event_register_callback_ptr = + // TODO mpitrampoline_get_symbol(handle, + // "MPIABI_T_event_register_callback"); + // TODO MPIABI_T_event_set_dropped_handler_ptr = + // TODO mpitrampoline_get_symbol(handle, + // "MPIABI_T_event_set_dropped_handler"); + // TODO MPIABI_T_finalize_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_T_finalize"); + // TODO MPIABI_T_init_thread_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_T_init_thread"); + // TODO MPIABI_T_pvar_get_index_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_T_pvar_get_index"); + // TODO MPIABI_T_pvar_get_info_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_T_pvar_get_info"); + // TODO MPIABI_T_pvar_get_num_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_T_pvar_get_num"); + // TODO MPIABI_T_pvar_handle_alloc_ptr = + // TODO mpitrampoline_get_symbol(handle, "MPIABI_T_pvar_handle_alloc"); + // TODO MPIABI_T_pvar_handle_free_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_T_pvar_handle_free"); + // TODO MPIABI_T_pvar_read_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_T_pvar_read"); + // TODO MPIABI_T_pvar_readreset_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_T_pvar_readreset"); + // TODO MPIABI_T_pvar_reset_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_T_pvar_reset"); + // TODO MPIABI_T_pvar_session_create_ptr = + // TODO mpitrampoline_get_symbol(handle, "MPIABI_T_pvar_session_create"); + // TODO MPIABI_T_pvar_session_free_ptr = + // TODO mpitrampoline_get_symbol(handle, "MPIABI_T_pvar_session_free"); + // TODO MPIABI_T_pvar_start_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_T_pvar_start"); + // TODO MPIABI_T_pvar_stop_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_T_pvar_stop"); + // TODO MPIABI_T_pvar_write_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_T_pvar_write"); + // TODO MPIABI_T_source_get_info_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_T_source_get_info"); + // TODO MPIABI_T_source_get_num_ptr = mpitrampoline_get_symbol(handle, + // "MPIABI_T_source_get_num"); + // TODO MPIABI_T_source_get_timestamp_ptr = + // TODO mpitrampoline_get_symbol(handle, "MPIABI_T_source_get_timestamp"); + + // A.3.16 Deprecated C Bindings + + MPIABI_Attr_delete_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Attr_delete"); + MPIABI_Attr_get_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Attr_get"); + MPIABI_Attr_put_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Attr_put"); + MPIABI_Get_elements_x_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Get_elements_x"); + MPIABI_Info_get_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Info_get"); + MPIABI_Info_get_valuelen_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Info_get_valuelen"); + MPIABI_Keyval_create_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Keyval_create"); + MPIABI_Keyval_free_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Keyval_free"); + MPIABI_Status_set_elements_x_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Status_set_elements_x"); + MPIABI_Type_get_extent_x_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_get_extent_x"); + MPIABI_Type_get_true_extent_x_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_get_true_extent_x"); + MPIABI_Type_size_x_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_size_x"); + + // Removed C Bindings + + MPIABI_Address_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Address"); + MPIABI_Type_hindexed_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_hindexed"); + MPIABI_Type_hvector_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_hvector"); + MPIABI_Type_struct_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_struct"); + MPIABI_Type_extent_ptr = + mpitrampoline_get_symbol(handle, "MPIABI_Type_extent"); + MPIABI_Type_lb_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Type_lb"); + MPIABI_Type_ub_ptr = mpitrampoline_get_symbol(handle, "MPIABI_Type_ub"); + + // MPIX + + MPIXABI_Query_cuda_support_ptr = + mpitrampoline_get_symbol(handle, "MPIXABI_Query_cuda_support"); + MPIXABI_Query_hip_support_ptr = + mpitrampoline_get_symbol(handle, "MPIXABI_Query_hip_support"); + MPIXABI_Query_rocm_support_ptr = + mpitrampoline_get_symbol(handle, "MPIXABI_Query_rocm_support"); + MPIXABI_Query_ze_support_ptr = + mpitrampoline_get_symbol(handle, "MPIXABI_Query_ze_support"); +} diff --git a/mpitrampoline/src/mpi_set_mpiabi_function_pointers_fortran.c b/mpitrampoline/src/mpi_set_mpiabi_function_pointers_fortran.c new file mode 100644 index 00000000..4e2c5c42 --- /dev/null +++ b/mpitrampoline/src/mpi_set_mpiabi_function_pointers_fortran.c @@ -0,0 +1,444 @@ +// Set MPIABI Fortran function pointers + +// This file has been generated automatically +// by `mpitrampoline/generate_trampoline.jl`. +// Do not modify this file, changes will be overwritten. + +#include + +void *mpitrampoline_get_symbol(void *handle, const char *name); + +void mpi_set_mpiabi_function_pointers_fortran(void *handle) { + mpiabi_bsend_ptr = mpitrampoline_get_symbol(handle, "mpiabi_bsend_"); + mpiabi_bsend_init_ptr = mpitrampoline_get_symbol(handle, "mpiabi_bsend_init_"); + mpiabi_buffer_attach_ptr = mpitrampoline_get_symbol(handle, "mpiabi_buffer_attach_"); + mpiabi_buffer_detach_ptr = mpitrampoline_get_symbol(handle, "mpiabi_buffer_detach_"); + mpiabi_buffer_flush_ptr = mpitrampoline_get_symbol(handle, "mpiabi_buffer_flush_"); + mpiabi_buffer_iflush_ptr = mpitrampoline_get_symbol(handle, "mpiabi_buffer_iflush_"); + mpiabi_cancel_ptr = mpitrampoline_get_symbol(handle, "mpiabi_cancel_"); + mpiabi_comm_attach_buffer_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_attach_buffer_"); + mpiabi_comm_detach_buffer_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_detach_buffer_"); + mpiabi_comm_flush_buffer_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_flush_buffer_"); + mpiabi_comm_iflush_buffer_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_iflush_buffer_"); + mpiabi_get_count_ptr = mpitrampoline_get_symbol(handle, "mpiabi_get_count_"); + mpiabi_ibsend_ptr = mpitrampoline_get_symbol(handle, "mpiabi_ibsend_"); + mpiabi_improbe_ptr = mpitrampoline_get_symbol(handle, "mpiabi_improbe_"); + mpiabi_imrecv_ptr = mpitrampoline_get_symbol(handle, "mpiabi_imrecv_"); + mpiabi_iprobe_ptr = mpitrampoline_get_symbol(handle, "mpiabi_iprobe_"); + mpiabi_irecv_ptr = mpitrampoline_get_symbol(handle, "mpiabi_irecv_"); + mpiabi_irsend_ptr = mpitrampoline_get_symbol(handle, "mpiabi_irsend_"); + mpiabi_isend_ptr = mpitrampoline_get_symbol(handle, "mpiabi_isend_"); + mpiabi_isendrecv_ptr = mpitrampoline_get_symbol(handle, "mpiabi_isendrecv_"); + mpiabi_isendrecv_replace_ptr = mpitrampoline_get_symbol(handle, "mpiabi_isendrecv_replace_"); + mpiabi_issend_ptr = mpitrampoline_get_symbol(handle, "mpiabi_issend_"); + mpiabi_mprobe_ptr = mpitrampoline_get_symbol(handle, "mpiabi_mprobe_"); + mpiabi_mrecv_ptr = mpitrampoline_get_symbol(handle, "mpiabi_mrecv_"); + mpiabi_probe_ptr = mpitrampoline_get_symbol(handle, "mpiabi_probe_"); + mpiabi_recv_ptr = mpitrampoline_get_symbol(handle, "mpiabi_recv_"); + mpiabi_recv_init_ptr = mpitrampoline_get_symbol(handle, "mpiabi_recv_init_"); + mpiabi_request_free_ptr = mpitrampoline_get_symbol(handle, "mpiabi_request_free_"); + mpiabi_request_get_status_ptr = mpitrampoline_get_symbol(handle, "mpiabi_request_get_status_"); + mpiabi_request_get_status_all_ptr = mpitrampoline_get_symbol(handle, "mpiabi_request_get_status_all_"); + mpiabi_request_get_status_any_ptr = mpitrampoline_get_symbol(handle, "mpiabi_request_get_status_any_"); + mpiabi_request_get_status_some_ptr = mpitrampoline_get_symbol(handle, "mpiabi_request_get_status_some_"); + mpiabi_rsend_ptr = mpitrampoline_get_symbol(handle, "mpiabi_rsend_"); + mpiabi_rsend_init_ptr = mpitrampoline_get_symbol(handle, "mpiabi_rsend_init_"); + mpiabi_send_ptr = mpitrampoline_get_symbol(handle, "mpiabi_send_"); + mpiabi_send_init_ptr = mpitrampoline_get_symbol(handle, "mpiabi_send_init_"); + mpiabi_sendrecv_ptr = mpitrampoline_get_symbol(handle, "mpiabi_sendrecv_"); + mpiabi_sendrecv_replace_ptr = mpitrampoline_get_symbol(handle, "mpiabi_sendrecv_replace_"); + mpiabi_session_attach_buffer_ptr = mpitrampoline_get_symbol(handle, "mpiabi_session_attach_buffer_"); + mpiabi_session_detach_buffer_ptr = mpitrampoline_get_symbol(handle, "mpiabi_session_detach_buffer_"); + mpiabi_session_flush_buffer_ptr = mpitrampoline_get_symbol(handle, "mpiabi_session_flush_buffer_"); + mpiabi_session_iflush_buffer_ptr = mpitrampoline_get_symbol(handle, "mpiabi_session_iflush_buffer_"); + mpiabi_ssend_ptr = mpitrampoline_get_symbol(handle, "mpiabi_ssend_"); + mpiabi_ssend_init_ptr = mpitrampoline_get_symbol(handle, "mpiabi_ssend_init_"); + mpiabi_start_ptr = mpitrampoline_get_symbol(handle, "mpiabi_start_"); + mpiabi_startall_ptr = mpitrampoline_get_symbol(handle, "mpiabi_startall_"); + mpiabi_status_get_error_ptr = mpitrampoline_get_symbol(handle, "mpiabi_status_get_error_"); + mpiabi_status_get_source_ptr = mpitrampoline_get_symbol(handle, "mpiabi_status_get_source_"); + mpiabi_status_get_tag_ptr = mpitrampoline_get_symbol(handle, "mpiabi_status_get_tag_"); + mpiabi_test_ptr = mpitrampoline_get_symbol(handle, "mpiabi_test_"); + mpiabi_test_cancelled_ptr = mpitrampoline_get_symbol(handle, "mpiabi_test_cancelled_"); + mpiabi_testall_ptr = mpitrampoline_get_symbol(handle, "mpiabi_testall_"); + mpiabi_testany_ptr = mpitrampoline_get_symbol(handle, "mpiabi_testany_"); + mpiabi_testsome_ptr = mpitrampoline_get_symbol(handle, "mpiabi_testsome_"); + mpiabi_wait_ptr = mpitrampoline_get_symbol(handle, "mpiabi_wait_"); + mpiabi_waitall_ptr = mpitrampoline_get_symbol(handle, "mpiabi_waitall_"); + mpiabi_waitany_ptr = mpitrampoline_get_symbol(handle, "mpiabi_waitany_"); + mpiabi_waitsome_ptr = mpitrampoline_get_symbol(handle, "mpiabi_waitsome_"); + mpiabi_parrived_ptr = mpitrampoline_get_symbol(handle, "mpiabi_parrived_"); + mpiabi_pready_ptr = mpitrampoline_get_symbol(handle, "mpiabi_pready_"); + mpiabi_pready_list_ptr = mpitrampoline_get_symbol(handle, "mpiabi_pready_list_"); + mpiabi_pready_range_ptr = mpitrampoline_get_symbol(handle, "mpiabi_pready_range_"); + mpiabi_precv_init_ptr = mpitrampoline_get_symbol(handle, "mpiabi_precv_init_"); + mpiabi_psend_init_ptr = mpitrampoline_get_symbol(handle, "mpiabi_psend_init_"); + mpiabi_aint_add_ptr = mpitrampoline_get_symbol(handle, "mpiabi_aint_add_"); + mpiabi_aint_diff_ptr = mpitrampoline_get_symbol(handle, "mpiabi_aint_diff_"); + mpiabi_get_address_ptr = mpitrampoline_get_symbol(handle, "mpiabi_get_address_"); + mpiabi_get_elements_ptr = mpitrampoline_get_symbol(handle, "mpiabi_get_elements_"); + mpiabi_pack_ptr = mpitrampoline_get_symbol(handle, "mpiabi_pack_"); + mpiabi_pack_external_ptr = mpitrampoline_get_symbol(handle, "mpiabi_pack_external_"); + mpiabi_pack_external_size_ptr = mpitrampoline_get_symbol(handle, "mpiabi_pack_external_size_"); + mpiabi_pack_size_ptr = mpitrampoline_get_symbol(handle, "mpiabi_pack_size_"); + mpiabi_type_commit_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_commit_"); + mpiabi_type_contiguous_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_contiguous_"); + mpiabi_type_create_darray_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_create_darray_"); + mpiabi_type_create_hindexed_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_create_hindexed_"); + mpiabi_type_create_hindexed_block_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_create_hindexed_block_"); + mpiabi_type_create_hvector_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_create_hvector_"); + mpiabi_type_create_indexed_block_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_create_indexed_block_"); + mpiabi_type_create_resized_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_create_resized_"); + mpiabi_type_create_struct_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_create_struct_"); + mpiabi_type_create_subarray_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_create_subarray_"); + mpiabi_type_dup_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_dup_"); + mpiabi_type_free_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_free_"); + mpiabi_type_get_contents_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_get_contents_"); + mpiabi_type_get_envelope_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_get_envelope_"); + mpiabi_type_get_extent_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_get_extent_"); + mpiabi_type_get_true_extent_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_get_true_extent_"); + mpiabi_type_indexed_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_indexed_"); + mpiabi_type_size_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_size_"); + mpiabi_type_vector_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_vector_"); + mpiabi_unpack_ptr = mpitrampoline_get_symbol(handle, "mpiabi_unpack_"); + mpiabi_unpack_external_ptr = mpitrampoline_get_symbol(handle, "mpiabi_unpack_external_"); + mpiabi_allgather_ptr = mpitrampoline_get_symbol(handle, "mpiabi_allgather_"); + mpiabi_allgather_init_ptr = mpitrampoline_get_symbol(handle, "mpiabi_allgather_init_"); + mpiabi_allgatherv_ptr = mpitrampoline_get_symbol(handle, "mpiabi_allgatherv_"); + mpiabi_allgatherv_init_ptr = mpitrampoline_get_symbol(handle, "mpiabi_allgatherv_init_"); + mpiabi_allreduce_ptr = mpitrampoline_get_symbol(handle, "mpiabi_allreduce_"); + mpiabi_allreduce_init_ptr = mpitrampoline_get_symbol(handle, "mpiabi_allreduce_init_"); + mpiabi_alltoall_ptr = mpitrampoline_get_symbol(handle, "mpiabi_alltoall_"); + mpiabi_alltoall_init_ptr = mpitrampoline_get_symbol(handle, "mpiabi_alltoall_init_"); + mpiabi_alltoallv_ptr = mpitrampoline_get_symbol(handle, "mpiabi_alltoallv_"); + mpiabi_alltoallv_init_ptr = mpitrampoline_get_symbol(handle, "mpiabi_alltoallv_init_"); + mpiabi_alltoallw_ptr = mpitrampoline_get_symbol(handle, "mpiabi_alltoallw_"); + mpiabi_alltoallw_init_ptr = mpitrampoline_get_symbol(handle, "mpiabi_alltoallw_init_"); + mpiabi_barrier_ptr = mpitrampoline_get_symbol(handle, "mpiabi_barrier_"); + mpiabi_barrier_init_ptr = mpitrampoline_get_symbol(handle, "mpiabi_barrier_init_"); + mpiabi_bcast_ptr = mpitrampoline_get_symbol(handle, "mpiabi_bcast_"); + mpiabi_bcast_init_ptr = mpitrampoline_get_symbol(handle, "mpiabi_bcast_init_"); + mpiabi_exscan_ptr = mpitrampoline_get_symbol(handle, "mpiabi_exscan_"); + mpiabi_exscan_init_ptr = mpitrampoline_get_symbol(handle, "mpiabi_exscan_init_"); + mpiabi_gather_ptr = mpitrampoline_get_symbol(handle, "mpiabi_gather_"); + mpiabi_gather_init_ptr = mpitrampoline_get_symbol(handle, "mpiabi_gather_init_"); + mpiabi_gatherv_ptr = mpitrampoline_get_symbol(handle, "mpiabi_gatherv_"); + mpiabi_gatherv_init_ptr = mpitrampoline_get_symbol(handle, "mpiabi_gatherv_init_"); + mpiabi_iallgather_ptr = mpitrampoline_get_symbol(handle, "mpiabi_iallgather_"); + mpiabi_iallgatherv_ptr = mpitrampoline_get_symbol(handle, "mpiabi_iallgatherv_"); + mpiabi_iallreduce_ptr = mpitrampoline_get_symbol(handle, "mpiabi_iallreduce_"); + mpiabi_ialltoall_ptr = mpitrampoline_get_symbol(handle, "mpiabi_ialltoall_"); + mpiabi_ialltoallv_ptr = mpitrampoline_get_symbol(handle, "mpiabi_ialltoallv_"); + mpiabi_ialltoallw_ptr = mpitrampoline_get_symbol(handle, "mpiabi_ialltoallw_"); + mpiabi_ibarrier_ptr = mpitrampoline_get_symbol(handle, "mpiabi_ibarrier_"); + mpiabi_ibcast_ptr = mpitrampoline_get_symbol(handle, "mpiabi_ibcast_"); + mpiabi_iexscan_ptr = mpitrampoline_get_symbol(handle, "mpiabi_iexscan_"); + mpiabi_igather_ptr = mpitrampoline_get_symbol(handle, "mpiabi_igather_"); + mpiabi_igatherv_ptr = mpitrampoline_get_symbol(handle, "mpiabi_igatherv_"); + mpiabi_ireduce_ptr = mpitrampoline_get_symbol(handle, "mpiabi_ireduce_"); + mpiabi_ireduce_scatter_ptr = mpitrampoline_get_symbol(handle, "mpiabi_ireduce_scatter_"); + mpiabi_ireduce_scatter_block_ptr = mpitrampoline_get_symbol(handle, "mpiabi_ireduce_scatter_block_"); + mpiabi_iscan_ptr = mpitrampoline_get_symbol(handle, "mpiabi_iscan_"); + mpiabi_iscatter_ptr = mpitrampoline_get_symbol(handle, "mpiabi_iscatter_"); + mpiabi_iscatterv_ptr = mpitrampoline_get_symbol(handle, "mpiabi_iscatterv_"); + mpiabi_op_commutative_ptr = mpitrampoline_get_symbol(handle, "mpiabi_op_commutative_"); + mpiabi_op_create_ptr = mpitrampoline_get_symbol(handle, "mpiabi_op_create_"); + mpiabi_op_free_ptr = mpitrampoline_get_symbol(handle, "mpiabi_op_free_"); + mpiabi_reduce_ptr = mpitrampoline_get_symbol(handle, "mpiabi_reduce_"); + mpiabi_reduce_init_ptr = mpitrampoline_get_symbol(handle, "mpiabi_reduce_init_"); + mpiabi_reduce_local_ptr = mpitrampoline_get_symbol(handle, "mpiabi_reduce_local_"); + mpiabi_reduce_scatter_ptr = mpitrampoline_get_symbol(handle, "mpiabi_reduce_scatter_"); + mpiabi_reduce_scatter_block_ptr = mpitrampoline_get_symbol(handle, "mpiabi_reduce_scatter_block_"); + mpiabi_reduce_scatter_block_init_ptr = mpitrampoline_get_symbol(handle, "mpiabi_reduce_scatter_block_init_"); + mpiabi_reduce_scatter_init_ptr = mpitrampoline_get_symbol(handle, "mpiabi_reduce_scatter_init_"); + mpiabi_scan_ptr = mpitrampoline_get_symbol(handle, "mpiabi_scan_"); + mpiabi_scan_init_ptr = mpitrampoline_get_symbol(handle, "mpiabi_scan_init_"); + mpiabi_scatter_ptr = mpitrampoline_get_symbol(handle, "mpiabi_scatter_"); + mpiabi_scatter_init_ptr = mpitrampoline_get_symbol(handle, "mpiabi_scatter_init_"); + mpiabi_scatterv_ptr = mpitrampoline_get_symbol(handle, "mpiabi_scatterv_"); + mpiabi_scatterv_init_ptr = mpitrampoline_get_symbol(handle, "mpiabi_scatterv_init_"); + mpiabi_type_get_value_index_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_get_value_index_"); + mpiabi_comm_compare_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_compare_"); + mpiabi_comm_create_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_create_"); + mpiabi_comm_create_from_group_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_create_from_group_"); + mpiabi_comm_create_group_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_create_group_"); + mpiabi_comm_create_keyval_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_create_keyval_"); + mpiabi_comm_delete_attr_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_delete_attr_"); + mpiabi_comm_dup_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_dup_"); + mpiabi_comm_dup_with_info_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_dup_with_info_"); + mpiabi_comm_free_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_free_"); + mpiabi_comm_get_name_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_get_name_"); + mpiabi_comm_free_keyval_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_free_keyval_"); + mpiabi_comm_get_attr_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_get_attr_"); + mpiabi_comm_get_info_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_get_info_"); + mpiabi_comm_group_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_group_"); + mpiabi_comm_idup_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_idup_"); + mpiabi_comm_idup_with_info_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_idup_with_info_"); + mpiabi_comm_rank_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_rank_"); + mpiabi_comm_remote_group_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_remote_group_"); + mpiabi_comm_remote_size_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_remote_size_"); + mpiabi_comm_set_attr_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_set_attr_"); + mpiabi_comm_set_info_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_set_info_"); + mpiabi_comm_set_name_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_set_name_"); + mpiabi_comm_size_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_size_"); + mpiabi_comm_split_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_split_"); + mpiabi_group_free_ptr = mpitrampoline_get_symbol(handle, "mpiabi_group_free_"); + mpiabi_comm_split_type_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_split_type_"); + mpiabi_comm_test_inter_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_test_inter_"); + mpiabi_group_compare_ptr = mpitrampoline_get_symbol(handle, "mpiabi_group_compare_"); + mpiabi_group_difference_ptr = mpitrampoline_get_symbol(handle, "mpiabi_group_difference_"); + mpiabi_group_excl_ptr = mpitrampoline_get_symbol(handle, "mpiabi_group_excl_"); + mpiabi_group_from_session_pset_ptr = mpitrampoline_get_symbol(handle, "mpiabi_group_from_session_pset_"); + mpiabi_group_incl_ptr = mpitrampoline_get_symbol(handle, "mpiabi_group_incl_"); + mpiabi_group_intersection_ptr = mpitrampoline_get_symbol(handle, "mpiabi_group_intersection_"); + mpiabi_group_range_excl_ptr = mpitrampoline_get_symbol(handle, "mpiabi_group_range_excl_"); + mpiabi_group_range_incl_ptr = mpitrampoline_get_symbol(handle, "mpiabi_group_range_incl_"); + mpiabi_group_rank_ptr = mpitrampoline_get_symbol(handle, "mpiabi_group_rank_"); + mpiabi_group_size_ptr = mpitrampoline_get_symbol(handle, "mpiabi_group_size_"); + mpiabi_group_translate_ranks_ptr = mpitrampoline_get_symbol(handle, "mpiabi_group_translate_ranks_"); + mpiabi_group_union_ptr = mpitrampoline_get_symbol(handle, "mpiabi_group_union_"); + mpiabi_intercomm_create_ptr = mpitrampoline_get_symbol(handle, "mpiabi_intercomm_create_"); + mpiabi_intercomm_create_from_groups_ptr = mpitrampoline_get_symbol(handle, "mpiabi_intercomm_create_from_groups_"); + mpiabi_intercomm_merge_ptr = mpitrampoline_get_symbol(handle, "mpiabi_intercomm_merge_"); + mpiabi_type_create_keyval_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_create_keyval_"); + mpiabi_type_delete_attr_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_delete_attr_"); + mpiabi_type_free_keyval_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_free_keyval_"); + mpiabi_type_get_attr_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_get_attr_"); + mpiabi_type_get_name_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_get_name_"); + mpiabi_type_set_attr_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_set_attr_"); + mpiabi_type_set_name_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_set_name_"); + mpiabi_win_create_keyval_ptr = mpitrampoline_get_symbol(handle, "mpiabi_win_create_keyval_"); + mpiabi_win_delete_attr_ptr = mpitrampoline_get_symbol(handle, "mpiabi_win_delete_attr_"); + mpiabi_win_free_keyval_ptr = mpitrampoline_get_symbol(handle, "mpiabi_win_free_keyval_"); + mpiabi_win_get_attr_ptr = mpitrampoline_get_symbol(handle, "mpiabi_win_get_attr_"); + mpiabi_win_get_name_ptr = mpitrampoline_get_symbol(handle, "mpiabi_win_get_name_"); + mpiabi_win_set_attr_ptr = mpitrampoline_get_symbol(handle, "mpiabi_win_set_attr_"); + mpiabi_win_set_name_ptr = mpitrampoline_get_symbol(handle, "mpiabi_win_set_name_"); + mpiabi_cart_coords_ptr = mpitrampoline_get_symbol(handle, "mpiabi_cart_coords_"); + mpiabi_cart_create_ptr = mpitrampoline_get_symbol(handle, "mpiabi_cart_create_"); + mpiabi_cart_get_ptr = mpitrampoline_get_symbol(handle, "mpiabi_cart_get_"); + mpiabi_cart_map_ptr = mpitrampoline_get_symbol(handle, "mpiabi_cart_map_"); + mpiabi_cart_rank_ptr = mpitrampoline_get_symbol(handle, "mpiabi_cart_rank_"); + mpiabi_cart_shift_ptr = mpitrampoline_get_symbol(handle, "mpiabi_cart_shift_"); + mpiabi_cart_sub_ptr = mpitrampoline_get_symbol(handle, "mpiabi_cart_sub_"); + mpiabi_cartdim_get_ptr = mpitrampoline_get_symbol(handle, "mpiabi_cartdim_get_"); + mpiabi_dims_create_ptr = mpitrampoline_get_symbol(handle, "mpiabi_dims_create_"); + mpiabi_dist_graph_create_ptr = mpitrampoline_get_symbol(handle, "mpiabi_dist_graph_create_"); + mpiabi_dist_graph_create_adjacent_ptr = mpitrampoline_get_symbol(handle, "mpiabi_dist_graph_create_adjacent_"); + mpiabi_dist_graph_neighbors_ptr = mpitrampoline_get_symbol(handle, "mpiabi_dist_graph_neighbors_"); + mpiabi_dist_graph_neighbors_count_ptr = mpitrampoline_get_symbol(handle, "mpiabi_dist_graph_neighbors_count_"); + mpiabi_graph_create_ptr = mpitrampoline_get_symbol(handle, "mpiabi_graph_create_"); + mpiabi_graph_get_ptr = mpitrampoline_get_symbol(handle, "mpiabi_graph_get_"); + mpiabi_graph_map_ptr = mpitrampoline_get_symbol(handle, "mpiabi_graph_map_"); + mpiabi_graph_neighbors_ptr = mpitrampoline_get_symbol(handle, "mpiabi_graph_neighbors_"); + mpiabi_graph_neighbors_count_ptr = mpitrampoline_get_symbol(handle, "mpiabi_graph_neighbors_count_"); + mpiabi_graphdims_get_ptr = mpitrampoline_get_symbol(handle, "mpiabi_graphdims_get_"); + mpiabi_ineighbor_allgather_ptr = mpitrampoline_get_symbol(handle, "mpiabi_ineighbor_allgather_"); + mpiabi_ineighbor_allgatherv_ptr = mpitrampoline_get_symbol(handle, "mpiabi_ineighbor_allgatherv_"); + mpiabi_ineighbor_alltoall_ptr = mpitrampoline_get_symbol(handle, "mpiabi_ineighbor_alltoall_"); + mpiabi_ineighbor_alltoallv_ptr = mpitrampoline_get_symbol(handle, "mpiabi_ineighbor_alltoallv_"); + mpiabi_ineighbor_alltoallw_ptr = mpitrampoline_get_symbol(handle, "mpiabi_ineighbor_alltoallw_"); + mpiabi_neighbor_allgather_ptr = mpitrampoline_get_symbol(handle, "mpiabi_neighbor_allgather_"); + mpiabi_neighbor_allgather_init_ptr = mpitrampoline_get_symbol(handle, "mpiabi_neighbor_allgather_init_"); + mpiabi_neighbor_allgatherv_ptr = mpitrampoline_get_symbol(handle, "mpiabi_neighbor_allgatherv_"); + mpiabi_neighbor_allgatherv_init_ptr = mpitrampoline_get_symbol(handle, "mpiabi_neighbor_allgatherv_init_"); + mpiabi_neighbor_alltoall_ptr = mpitrampoline_get_symbol(handle, "mpiabi_neighbor_alltoall_"); + mpiabi_neighbor_alltoall_init_ptr = mpitrampoline_get_symbol(handle, "mpiabi_neighbor_alltoall_init_"); + mpiabi_neighbor_alltoallv_ptr = mpitrampoline_get_symbol(handle, "mpiabi_neighbor_alltoallv_"); + mpiabi_neighbor_alltoallv_init_ptr = mpitrampoline_get_symbol(handle, "mpiabi_neighbor_alltoallv_init_"); + mpiabi_neighbor_alltoallw_ptr = mpitrampoline_get_symbol(handle, "mpiabi_neighbor_alltoallw_"); + mpiabi_neighbor_alltoallw_init_ptr = mpitrampoline_get_symbol(handle, "mpiabi_neighbor_alltoallw_init_"); + mpiabi_topo_test_ptr = mpitrampoline_get_symbol(handle, "mpiabi_topo_test_"); + mpiabi_add_error_class_ptr = mpitrampoline_get_symbol(handle, "mpiabi_add_error_class_"); + mpiabi_add_error_code_ptr = mpitrampoline_get_symbol(handle, "mpiabi_add_error_code_"); + mpiabi_add_error_string_ptr = mpitrampoline_get_symbol(handle, "mpiabi_add_error_string_"); + mpiabi_alloc_mem_ptr = mpitrampoline_get_symbol(handle, "mpiabi_alloc_mem_"); + mpiabi_comm_call_errhandler_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_call_errhandler_"); + mpiabi_comm_create_errhandler_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_create_errhandler_"); + mpiabi_comm_get_errhandler_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_get_errhandler_"); + mpiabi_comm_set_errhandler_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_set_errhandler_"); + mpiabi_errhandler_free_ptr = mpitrampoline_get_symbol(handle, "mpiabi_errhandler_free_"); + mpiabi_error_class_ptr = mpitrampoline_get_symbol(handle, "mpiabi_error_class_"); + mpiabi_error_string_ptr = mpitrampoline_get_symbol(handle, "mpiabi_error_string_"); + mpiabi_file_call_errhandler_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_call_errhandler_"); + mpiabi_file_create_errhandler_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_create_errhandler_"); + mpiabi_file_get_errhandler_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_get_errhandler_"); + mpiabi_file_set_errhandler_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_set_errhandler_"); + mpiabi_free_mem_ptr = mpitrampoline_get_symbol(handle, "mpiabi_free_mem_"); + mpiabi_get_hw_resource_info_ptr = mpitrampoline_get_symbol(handle, "mpiabi_get_hw_resource_info_"); + mpiabi_get_library_version_ptr = mpitrampoline_get_symbol(handle, "mpiabi_get_library_version_"); + mpiabi_get_processor_name_ptr = mpitrampoline_get_symbol(handle, "mpiabi_get_processor_name_"); + mpiabi_get_version_ptr = mpitrampoline_get_symbol(handle, "mpiabi_get_version_"); + mpiabi_remove_error_class_ptr = mpitrampoline_get_symbol(handle, "mpiabi_remove_error_class_"); + mpiabi_remove_error_code_ptr = mpitrampoline_get_symbol(handle, "mpiabi_remove_error_code_"); + mpiabi_remove_error_string_ptr = mpitrampoline_get_symbol(handle, "mpiabi_remove_error_string_"); + mpiabi_session_call_errhandler_ptr = mpitrampoline_get_symbol(handle, "mpiabi_session_call_errhandler_"); + mpiabi_session_create_errhandler_ptr = mpitrampoline_get_symbol(handle, "mpiabi_session_create_errhandler_"); + mpiabi_session_get_errhandler_ptr = mpitrampoline_get_symbol(handle, "mpiabi_session_get_errhandler_"); + mpiabi_session_set_errhandler_ptr = mpitrampoline_get_symbol(handle, "mpiabi_session_set_errhandler_"); + mpiabi_win_call_errhandler_ptr = mpitrampoline_get_symbol(handle, "mpiabi_win_call_errhandler_"); + mpiabi_win_create_errhandler_ptr = mpitrampoline_get_symbol(handle, "mpiabi_win_create_errhandler_"); + mpiabi_win_get_errhandler_ptr = mpitrampoline_get_symbol(handle, "mpiabi_win_get_errhandler_"); + mpiabi_win_set_errhandler_ptr = mpitrampoline_get_symbol(handle, "mpiabi_win_set_errhandler_"); + mpiabi_wtick_ptr = mpitrampoline_get_symbol(handle, "mpiabi_wtick_"); + mpiabi_wtime_ptr = mpitrampoline_get_symbol(handle, "mpiabi_wtime_"); + mpiabi_info_create_ptr = mpitrampoline_get_symbol(handle, "mpiabi_info_create_"); + mpiabi_info_create_env_ptr = mpitrampoline_get_symbol(handle, "mpiabi_info_create_env_"); + mpiabi_info_delete_ptr = mpitrampoline_get_symbol(handle, "mpiabi_info_delete_"); + mpiabi_info_dup_ptr = mpitrampoline_get_symbol(handle, "mpiabi_info_dup_"); + mpiabi_info_free_ptr = mpitrampoline_get_symbol(handle, "mpiabi_info_free_"); + mpiabi_info_get_nkeys_ptr = mpitrampoline_get_symbol(handle, "mpiabi_info_get_nkeys_"); + mpiabi_info_get_nthkey_ptr = mpitrampoline_get_symbol(handle, "mpiabi_info_get_nthkey_"); + mpiabi_info_get_string_ptr = mpitrampoline_get_symbol(handle, "mpiabi_info_get_string_"); + mpiabi_info_set_ptr = mpitrampoline_get_symbol(handle, "mpiabi_info_set_"); + mpiabi_abort_ptr = mpitrampoline_get_symbol(handle, "mpiabi_abort_"); + mpiabi_close_port_ptr = mpitrampoline_get_symbol(handle, "mpiabi_close_port_"); + mpiabi_comm_accept_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_accept_"); + mpiabi_comm_connect_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_connect_"); + mpiabi_comm_disconnect_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_disconnect_"); + mpiabi_comm_get_parent_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_get_parent_"); + mpiabi_comm_join_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_join_"); + mpiabi_comm_spawn_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_spawn_"); + mpiabi_comm_spawn_multiple_ptr = mpitrampoline_get_symbol(handle, "mpiabi_comm_spawn_multiple_"); + mpiabi_finalize_ptr = mpitrampoline_get_symbol(handle, "mpiabi_finalize_"); + mpiabi_finalized_ptr = mpitrampoline_get_symbol(handle, "mpiabi_finalized_"); + mpiabi_init_ptr = mpitrampoline_get_symbol(handle, "mpiabi_init_"); + mpiabi_init_thread_ptr = mpitrampoline_get_symbol(handle, "mpiabi_init_thread_"); + mpiabi_initialized_ptr = mpitrampoline_get_symbol(handle, "mpiabi_initialized_"); + mpiabi_is_thread_main_ptr = mpitrampoline_get_symbol(handle, "mpiabi_is_thread_main_"); + mpiabi_lookup_name_ptr = mpitrampoline_get_symbol(handle, "mpiabi_lookup_name_"); + mpiabi_open_port_ptr = mpitrampoline_get_symbol(handle, "mpiabi_open_port_"); + mpiabi_publish_name_ptr = mpitrampoline_get_symbol(handle, "mpiabi_publish_name_"); + mpiabi_query_thread_ptr = mpitrampoline_get_symbol(handle, "mpiabi_query_thread_"); + mpiabi_session_finalize_ptr = mpitrampoline_get_symbol(handle, "mpiabi_session_finalize_"); + mpiabi_session_get_info_ptr = mpitrampoline_get_symbol(handle, "mpiabi_session_get_info_"); + mpiabi_session_get_nth_pset_ptr = mpitrampoline_get_symbol(handle, "mpiabi_session_get_nth_pset_"); + mpiabi_session_get_num_psets_ptr = mpitrampoline_get_symbol(handle, "mpiabi_session_get_num_psets_"); + mpiabi_session_get_pset_info_ptr = mpitrampoline_get_symbol(handle, "mpiabi_session_get_pset_info_"); + mpiabi_session_init_ptr = mpitrampoline_get_symbol(handle, "mpiabi_session_init_"); + mpiabi_unpublish_name_ptr = mpitrampoline_get_symbol(handle, "mpiabi_unpublish_name_"); + mpiabi_accumulate_ptr = mpitrampoline_get_symbol(handle, "mpiabi_accumulate_"); + mpiabi_compare_and_swap_ptr = mpitrampoline_get_symbol(handle, "mpiabi_compare_and_swap_"); + mpiabi_fetch_and_op_ptr = mpitrampoline_get_symbol(handle, "mpiabi_fetch_and_op_"); + mpiabi_get_ptr = mpitrampoline_get_symbol(handle, "mpiabi_get_"); + mpiabi_get_accumulate_ptr = mpitrampoline_get_symbol(handle, "mpiabi_get_accumulate_"); + mpiabi_put_ptr = mpitrampoline_get_symbol(handle, "mpiabi_put_"); + mpiabi_raccumulate_ptr = mpitrampoline_get_symbol(handle, "mpiabi_raccumulate_"); + mpiabi_rget_ptr = mpitrampoline_get_symbol(handle, "mpiabi_rget_"); + mpiabi_rget_accumulate_ptr = mpitrampoline_get_symbol(handle, "mpiabi_rget_accumulate_"); + mpiabi_rput_ptr = mpitrampoline_get_symbol(handle, "mpiabi_rput_"); + mpiabi_win_allocate_ptr = mpitrampoline_get_symbol(handle, "mpiabi_win_allocate_"); + mpiabi_win_allocate_shared_ptr = mpitrampoline_get_symbol(handle, "mpiabi_win_allocate_shared_"); + mpiabi_win_attach_ptr = mpitrampoline_get_symbol(handle, "mpiabi_win_attach_"); + mpiabi_win_complete_ptr = mpitrampoline_get_symbol(handle, "mpiabi_win_complete_"); + mpiabi_win_create_ptr = mpitrampoline_get_symbol(handle, "mpiabi_win_create_"); + mpiabi_win_create_dynamic_ptr = mpitrampoline_get_symbol(handle, "mpiabi_win_create_dynamic_"); + mpiabi_win_detach_ptr = mpitrampoline_get_symbol(handle, "mpiabi_win_detach_"); + mpiabi_win_fence_ptr = mpitrampoline_get_symbol(handle, "mpiabi_win_fence_"); + mpiabi_win_flush_ptr = mpitrampoline_get_symbol(handle, "mpiabi_win_flush_"); + mpiabi_win_flush_all_ptr = mpitrampoline_get_symbol(handle, "mpiabi_win_flush_all_"); + mpiabi_win_flush_local_ptr = mpitrampoline_get_symbol(handle, "mpiabi_win_flush_local_"); + mpiabi_win_flush_local_all_ptr = mpitrampoline_get_symbol(handle, "mpiabi_win_flush_local_all_"); + mpiabi_win_free_ptr = mpitrampoline_get_symbol(handle, "mpiabi_win_free_"); + mpiabi_win_get_group_ptr = mpitrampoline_get_symbol(handle, "mpiabi_win_get_group_"); + mpiabi_win_get_info_ptr = mpitrampoline_get_symbol(handle, "mpiabi_win_get_info_"); + mpiabi_win_lock_ptr = mpitrampoline_get_symbol(handle, "mpiabi_win_lock_"); + mpiabi_win_lock_all_ptr = mpitrampoline_get_symbol(handle, "mpiabi_win_lock_all_"); + mpiabi_win_post_ptr = mpitrampoline_get_symbol(handle, "mpiabi_win_post_"); + mpiabi_win_set_info_ptr = mpitrampoline_get_symbol(handle, "mpiabi_win_set_info_"); + mpiabi_win_shared_query_ptr = mpitrampoline_get_symbol(handle, "mpiabi_win_shared_query_"); + mpiabi_win_start_ptr = mpitrampoline_get_symbol(handle, "mpiabi_win_start_"); + mpiabi_win_sync_ptr = mpitrampoline_get_symbol(handle, "mpiabi_win_sync_"); + mpiabi_win_test_ptr = mpitrampoline_get_symbol(handle, "mpiabi_win_test_"); + mpiabi_win_unlock_ptr = mpitrampoline_get_symbol(handle, "mpiabi_win_unlock_"); + mpiabi_win_unlock_all_ptr = mpitrampoline_get_symbol(handle, "mpiabi_win_unlock_all_"); + mpiabi_win_wait_ptr = mpitrampoline_get_symbol(handle, "mpiabi_win_wait_"); + mpiabi_grequest_complete_ptr = mpitrampoline_get_symbol(handle, "mpiabi_grequest_complete_"); + mpiabi_grequest_start_ptr = mpitrampoline_get_symbol(handle, "mpiabi_grequest_start_"); + mpiabi_status_set_cancelled_ptr = mpitrampoline_get_symbol(handle, "mpiabi_status_set_cancelled_"); + mpiabi_status_set_elements_ptr = mpitrampoline_get_symbol(handle, "mpiabi_status_set_elements_"); + mpiabi_status_set_error_ptr = mpitrampoline_get_symbol(handle, "mpiabi_status_set_error_"); + mpiabi_status_set_source_ptr = mpitrampoline_get_symbol(handle, "mpiabi_status_set_source_"); + mpiabi_status_set_tag_ptr = mpitrampoline_get_symbol(handle, "mpiabi_status_set_tag_"); + mpiabi_file_close_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_close_"); + mpiabi_file_delete_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_delete_"); + mpiabi_file_get_amode_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_get_amode_"); + mpiabi_file_get_atomicity_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_get_atomicity_"); + mpiabi_file_get_byte_offset_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_get_byte_offset_"); + mpiabi_file_get_group_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_get_group_"); + mpiabi_file_get_info_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_get_info_"); + mpiabi_file_get_position_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_get_position_"); + mpiabi_file_get_position_shared_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_get_position_shared_"); + mpiabi_file_get_size_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_get_size_"); + mpiabi_file_get_type_extent_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_get_type_extent_"); + mpiabi_file_get_view_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_get_view_"); + mpiabi_file_iread_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_iread_"); + mpiabi_file_iread_all_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_iread_all_"); + mpiabi_file_iread_at_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_iread_at_"); + mpiabi_file_iread_at_all_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_iread_at_all_"); + mpiabi_file_iread_shared_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_iread_shared_"); + mpiabi_file_iwrite_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_iwrite_"); + mpiabi_file_iwrite_all_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_iwrite_all_"); + mpiabi_file_iwrite_at_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_iwrite_at_"); + mpiabi_file_iwrite_at_all_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_iwrite_at_all_"); + mpiabi_file_iwrite_shared_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_iwrite_shared_"); + mpiabi_file_open_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_open_"); + mpiabi_file_preallocate_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_preallocate_"); + mpiabi_file_read_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_read_"); + mpiabi_file_read_all_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_read_all_"); + mpiabi_file_read_all_begin_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_read_all_begin_"); + mpiabi_file_read_all_end_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_read_all_end_"); + mpiabi_file_read_at_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_read_at_"); + mpiabi_file_read_at_all_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_read_at_all_"); + mpiabi_file_read_at_all_begin_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_read_at_all_begin_"); + mpiabi_file_read_at_all_end_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_read_at_all_end_"); + mpiabi_file_read_ordered_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_read_ordered_"); + mpiabi_file_read_ordered_begin_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_read_ordered_begin_"); + mpiabi_file_read_ordered_end_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_read_ordered_end_"); + mpiabi_file_read_shared_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_read_shared_"); + mpiabi_file_seek_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_seek_"); + mpiabi_file_seek_shared_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_seek_shared_"); + mpiabi_file_set_atomicity_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_set_atomicity_"); + mpiabi_file_set_info_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_set_info_"); + mpiabi_file_set_size_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_set_size_"); + mpiabi_file_set_view_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_set_view_"); + mpiabi_file_sync_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_sync_"); + mpiabi_file_write_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_write_"); + mpiabi_file_write_all_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_write_all_"); + mpiabi_file_write_all_begin_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_write_all_begin_"); + mpiabi_file_write_all_end_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_write_all_end_"); + mpiabi_file_write_at_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_write_at_"); + mpiabi_file_write_at_all_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_write_at_all_"); + mpiabi_file_write_at_all_begin_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_write_at_all_begin_"); + mpiabi_file_write_at_all_end_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_write_at_all_end_"); + mpiabi_file_write_ordered_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_write_ordered_"); + mpiabi_file_write_ordered_begin_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_write_ordered_begin_"); + mpiabi_file_write_ordered_end_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_write_ordered_end_"); + mpiabi_file_write_shared_ptr = mpitrampoline_get_symbol(handle, "mpiabi_file_write_shared_"); + mpiabi_register_datarep_ptr = mpitrampoline_get_symbol(handle, "mpiabi_register_datarep_"); + mpiabi_f_sync_reg_ptr = mpitrampoline_get_symbol(handle, "mpiabi_f_sync_reg_"); + mpiabi_type_create_f90_complex_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_create_f90_complex_"); + mpiabi_type_create_f90_integer_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_create_f90_integer_"); + mpiabi_type_create_f90_real_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_create_f90_real_"); + mpiabi_type_match_size_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_match_size_"); + mpiabi_pcontrol_ptr = mpitrampoline_get_symbol(handle, "mpiabi_pcontrol_"); + mpiabi_attr_delete_ptr = mpitrampoline_get_symbol(handle, "mpiabi_attr_delete_"); + mpiabi_attr_get_ptr = mpitrampoline_get_symbol(handle, "mpiabi_attr_get_"); + mpiabi_attr_put_ptr = mpitrampoline_get_symbol(handle, "mpiabi_attr_put_"); + mpiabi_get_elements_x_ptr = mpitrampoline_get_symbol(handle, "mpiabi_get_elements_x_"); + mpiabi_info_get_ptr = mpitrampoline_get_symbol(handle, "mpiabi_info_get_"); + mpiabi_info_get_valuelen_ptr = mpitrampoline_get_symbol(handle, "mpiabi_info_get_valuelen_"); + mpiabi_keyval_create_ptr = mpitrampoline_get_symbol(handle, "mpiabi_keyval_create_"); + mpiabi_keyval_free_ptr = mpitrampoline_get_symbol(handle, "mpiabi_keyval_free_"); + mpiabi_status_set_elements_x_ptr = mpitrampoline_get_symbol(handle, "mpiabi_status_set_elements_x_"); + mpiabi_type_get_extent_x_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_get_extent_x_"); + mpiabi_type_get_true_extent_x_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_get_true_extent_x_"); + mpiabi_type_size_x_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_size_x_"); + mpiabi_address_ptr = mpitrampoline_get_symbol(handle, "mpiabi_address_"); + mpiabi_type_hindexed_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_hindexed_"); + mpiabi_type_hvector_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_hvector_"); + mpiabi_type_struct_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_struct_"); + mpiabi_type_extent_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_extent_"); + mpiabi_type_lb_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_lb_"); + mpiabi_type_ub_ptr = mpitrampoline_get_symbol(handle, "mpiabi_type_ub_"); +} diff --git a/mpitrampoline/src/mpif_special_functions.F90 b/mpitrampoline/src/mpif_special_functions.F90 new file mode 100644 index 00000000..76aaf659 --- /dev/null +++ b/mpitrampoline/src/mpif_special_functions.F90 @@ -0,0 +1,149 @@ +subroutine MPI_COMM_NULL_COPY_FN(oldcomm, comm_keyval, extra_state, attribute_val_in, attribute_val_out, flag, ierror) + implicit none + include "mpif_constants.h" + integer oldcomm, comm_keyval + integer(MPI_ADDRESS_KIND) extra_state, attribute_val_in, attribute_val_out + logical flag + integer ierror + flag = .false. + ierror = MPI_SUCCESS +end subroutine MPI_COMM_NULL_COPY_FN + +subroutine MPI_COMM_DUP_FN(oldcomm, comm_keyval, extra_state, attribute_val_in, attribute_val_out, flag, ierror) + implicit none + include "mpif_constants.h" + integer oldcomm, comm_keyval + integer(MPI_ADDRESS_KIND) extra_state, attribute_val_in, attribute_val_out + logical flag + integer ierror + flag = .false. + ierror = MPI_SUCCESS +end subroutine MPI_COMM_DUP_FN + +subroutine MPI_COMM_NULL_DELETE_FN(comm, comm_keyval, attribute_val, extra_state, ierror) + implicit none + include "mpif_constants.h" + integer comm, comm_keyval + integer(MPI_ADDRESS_KIND) attribute_val, extra_state + integer ierror + ierror = MPI_SUCCESS +end subroutine MPI_COMM_NULL_DELETE_FN + +subroutine MPI_WIN_NULL_COPY_FN(oldwin, win_keyval, extra_state, attribute_val_in, attribute_val_out, flag, ierror) + implicit none + include "mpif_constants.h" + integer oldwin, win_keyval + integer(MPI_ADDRESS_KIND) extra_state, attribute_val_in, attribute_val_out + logical flag + integer ierror + flag = .false. + ierror = MPI_SUCCESS +end subroutine MPI_WIN_NULL_COPY_FN + +subroutine MPI_WIN_DUP_FN(oldwin, win_keyval, extra_state, attribute_val_in, attribute_val_out, flag, ierror) + implicit none + include "mpif_constants.h" + integer oldwin, win_keyval + integer(MPI_ADDRESS_KIND) extra_state, attribute_val_in, attribute_val_out + logical flag + integer ierror + flag = .false. + ierror = MPI_SUCCESS +end subroutine MPI_WIN_DUP_FN + +subroutine MPI_WIN_NULL_DELETE_FN(win, win_keyval, attribute_val, extra_state, ierror) + implicit none + include "mpif_constants.h" + integer win, win_keyval + integer(MPI_ADDRESS_KIND) attribute_val, extra_state + integer ierror + ierror = MPI_SUCCESS +end subroutine MPI_WIN_NULL_DELETE_FN + +subroutine MPI_TYPE_NULL_COPY_FN(oldtype, type_keyval, extra_state, attribute_val_in, attribute_val_out, flag, ierror) + implicit none + include "mpif_constants.h" + integer oldtype, type_keyval + integer(MPI_ADDRESS_KIND) extra_state, attribute_val_in, attribute_val_out + logical flag + integer ierror + flag = .false. + ierror = MPI_SUCCESS +end subroutine MPI_TYPE_NULL_COPY_FN + +subroutine MPI_TYPE_DUP_FN(oldtype, type_keyval, extra_state, attribute_val_in, attribute_val_out, flag, ierror) + implicit none + include "mpif_constants.h" + integer oldtype, type_keyval + integer(MPI_ADDRESS_KIND) extra_state, attribute_val_in, attribute_val_out + logical flag + integer ierror + flag = .false. + ierror = MPI_SUCCESS +end subroutine MPI_TYPE_DUP_FN + +subroutine MPI_TYPE_NULL_DELETE_FN(type, type_keyval, attribute_val, extra_state, ierror) + implicit none + include "mpif_constants.h" + integer type, type_keyval + integer(MPI_ADDRESS_KIND) attribute_val, extra_state + integer ierror + ierror = MPI_SUCCESS +end subroutine MPI_TYPE_NULL_DELETE_FN + +subroutine MPI_CONVERSION_FN_NULL(userbuf, datatype, count, filebuf, position, extra_state, ierror) + implicit none + include "mpif_constants.h" + integer(MPI_ADDRESS_KIND) userbuf + integer datatype + integer count + integer(MPI_ADDRESS_KIND) filebuf + integer(MPI_OFFSET_KIND) position + integer(MPI_ADDRESS_KIND) extra_state + integer ierror + ierror = MPI_SUCCESS +end subroutine MPI_CONVERSION_FN_NULL + +subroutine MPI_CONVERSION_FN_NULL_C(userbuf, datatype, count, filebuf, position, extra_state, ierror) + implicit none + include "mpif_constants.h" + integer(MPI_ADDRESS_KIND) userbuf + integer datatype + integer(MPI_COUNT_KIND) count + integer(MPI_ADDRESS_KIND) filebuf + integer(MPI_OFFSET_KIND) position + integer(MPI_ADDRESS_KIND) extra_state + integer ierror + ierror = MPI_SUCCESS +end subroutine MPI_CONVERSION_FN_NULL_C + +subroutine MPI_NULL_COPY_FN(oldcomm, keyval, extra_state, attribute_val_in, attribute_val_out, flag, ierror) + implicit none + include "mpif_constants.h" + integer oldcomm, keyval + integer(MPI_ADDRESS_KIND) extra_state, attribute_val_in, attribute_val_out + logical flag + integer ierror + flag = .false. + ierror = MPI_SUCCESS +end subroutine MPI_NULL_COPY_FN + +subroutine MPI_DUP_FN(oldcomm, keyval, extra_state, attribute_val_in, attribute_val_out, flag, ierror) + implicit none + include "mpif_constants.h" + integer oldcomm, keyval + integer(MPI_ADDRESS_KIND) extra_state, attribute_val_in, attribute_val_out + logical flag + integer ierror + flag = .false. + ierror = MPI_SUCCESS +end subroutine MPI_DUP_FN + +subroutine MPI_NULL_DELETE_FN(comm, keyval, attribute_val, extra_state, ierror) + implicit none + include "mpif_constants.h" + integer comm, keyval + integer(MPI_ADDRESS_KIND) attribute_val, extra_state + integer ierror + ierror = MPI_SUCCESS +end subroutine MPI_NULL_DELETE_FN diff --git a/mpitrampoline/src/mpitrampoline.c b/mpitrampoline/src/mpitrampoline.c new file mode 100644 index 00000000..13787da1 --- /dev/null +++ b/mpitrampoline/src/mpitrampoline.c @@ -0,0 +1,157 @@ +#include + +#include + +#ifdef __linux__ +#include +#endif +#include + +#include +#include +#include + +const int mpitrampoline_version_major = MPITRAMPOLINE_VERSION_MAJOR; +const int mpitrampoline_version_minor = MPITRAMPOLINE_VERSION_MINOR; +const int mpitrampoline_version_patch = MPITRAMPOLINE_VERSION_PATCH; + +const char *const mpitrampoline_version = MPITRAMPOLINE_VERSION; + +const int mpiabi_version_major = MPIABI_VERSION_MAJOR; +const int mpiabi_version_minor = MPIABI_VERSION_MINOR; +const int mpiabi_version_patch = MPIABI_VERSION_PATCH; + +int mpiwrapper_version_major = -1; +int mpiwrapper_version_minor = -1; +int mpiwrapper_version_patch = -1; + +int mpiabi_loaded_version_major = -1; +int mpiabi_loaded_version_minor = -1; +int mpiabi_loaded_version_patch = -1; + +void mpi_set_mpiabi_function_pointers(void *handle); +void mpi_set_mpiabi_function_pointers_fortran(void *handle); + +static bool did_init_mpitrampoline = false; + +static void *load_library(const char *const libname) { + void *handle; + +#if defined __APPLE__ + + fprintf(stderr, "[MPItrampoline] Calling dlopen\n"); + handle = dlopen(libname, RTLD_LOCAL); + +#elif defined __FreeBSD__ || defined __linux__ + + fprintf(stderr, "[MPItrampoline] Calling dlopen\n"); + handle = dlopen(libname, RTLD_LAZY | RTLD_LOCAL + // musl does not have `RTLD_DEEPBIND` +#ifdef RTLD_DEEPBIND + | RTLD_DEEPBIND +#endif + ); + +#else +#error "Unsupported operating system" +#endif + + if (!handle) { + fprintf(stderr, "MPItrampoline: Could not dlopen library \"%s\"\n", + libname); + const char *const error = dlerror(); + if (error) + fprintf(stderr, "MPItrampoline: dlerror: %s\n", error); + exit(1); + } + + return handle; +} + +void *mpitrampoline_get_symbol(void *handle, const char *name) { + void *ptr = dlsym(handle, name); + if (!ptr) { + fprintf(stderr, "MPItrampoline: Could not resolve symbol \"%s\"\n", name); + const char *const error = dlerror(); + if (error) + fprintf(stderr, "MPItrampoline: dlerror: %s\n", error); + exit(1); + } + return ptr; +} + +void mpitrampoline_init(void) { + if (did_init_mpitrampoline) + return; + did_init_mpitrampoline = true; + + fprintf(stderr, "[MPItrampoline] This is MPItrampoline %d.%d.%d\n", + MPITRAMPOLINE_VERSION_MAJOR, MPITRAMPOLINE_VERSION_MINOR, + MPITRAMPOLINE_VERSION_PATCH); + fprintf(stderr, "[MPItrampoline] Requiring MPI ABI version %d.%d.%d\n", + MPIABI_VERSION_MAJOR, MPIABI_VERSION_MINOR, MPIABI_VERSION_PATCH); + + const char *const libname = getenv("MPITRAMPOLINE_LIB"); + if (!libname || libname[0] == '\0') { + fprintf(stderr, + "[MPItrampoline] Environment variable \"MPITRAMPOLINE_LIB\" is not " + "set, cannot load MPIwrapper library\n"); + exit(1); + } + + void *handle = load_library(libname); + + mpiwrapper_version_major = *(int const *)mpitrampoline_get_symbol( + handle, "mpiwrapper_version_major"); + mpiwrapper_version_minor = *(int const *)mpitrampoline_get_symbol( + handle, "mpiwrapper_version_minor"); + mpiwrapper_version_patch = *(int const *)mpitrampoline_get_symbol( + handle, "mpiwrapper_version_patch"); + fprintf(stderr, "[MPItrampoline] Loaded MPIwrapper %d.%d.%d\n", + mpiwrapper_version_major, mpiwrapper_version_minor, + mpiwrapper_version_patch); + + mpiabi_loaded_version_major = + *(int const *)mpitrampoline_get_symbol(handle, "mpiabi_version_major"); + mpiabi_loaded_version_minor = + *(int const *)mpitrampoline_get_symbol(handle, "mpiabi_version_minor"); + mpiabi_loaded_version_patch = + *(int const *)mpitrampoline_get_symbol(handle, "mpiabi_version_patch"); + fprintf(stderr, "[MPItrampoline] Found MPI ABI version %d.%d.%d\n", + mpiabi_loaded_version_major, mpiabi_loaded_version_minor, + mpiabi_loaded_version_patch); + + if (mpiabi_loaded_version_major != mpiabi_version_major || + mpiabi_loaded_version_minor < mpiabi_version_minor) { + fprintf( + stderr, + "MPItrampoline: MPI ABI version mismatch:\n" + "This version of MPItrampoline requires MPI ABI version %d.%d.%d, " + "but the loaded MPIwrapper only provides MPI ABI version %d.%d.%d.\n" + "This is MPItrampoline version %d.%d.%d.\n" + "You loaded MPIwrapper version %d.%d.%d from file \"%s\".\n", + mpiabi_version_major, mpiabi_version_minor, mpiabi_version_patch, + mpiabi_loaded_version_major, mpiabi_loaded_version_minor, + mpiabi_loaded_version_patch, mpitrampoline_version_major, + mpitrampoline_version_minor, mpitrampoline_version_patch, + mpiwrapper_version_major, mpiwrapper_version_minor, + mpiwrapper_version_patch, libname); + exit(1); + } + + fprintf(stderr, "MPItrampoline: Setting C function pointers\n"); + mpi_set_mpiabi_function_pointers(handle); + fprintf(stderr, "MPItrampoline: Setting Fortran function pointers\n"); + mpi_set_mpiabi_function_pointers_fortran(handle); + fprintf(stderr, "MPItrampoline: Done setting Fortran pointers\n"); +} + +// #ifdef __APPLE__ +// #define CONSTRUCTOR_PRIORITY +// #else +// #define CONSTRUCTOR_PRIORITY (1000) +// #endif +// static void __attribute__((__constructor__ CONSTRUCTOR_PRIORITY)) +// mpitrampoline_init_auto(void) { +// mpitrampoline_init(); +// } diff --git a/mpiwrapper/.gitignore b/mpiwrapper/.gitignore new file mode 100644 index 00000000..9bc9260d --- /dev/null +++ b/mpiwrapper/.gitignore @@ -0,0 +1,10 @@ +a.c +b.c +c.c +d.c +mf1.f90 +mf2.f90 +mf3.f90 +mf6.f90 +mf8.f90 +mf9.f90 diff --git a/mpiwrapper/CMakeLists.txt b/mpiwrapper/CMakeLists.txt new file mode 100644 index 00000000..57424f9c --- /dev/null +++ b/mpiwrapper/CMakeLists.txt @@ -0,0 +1,480 @@ +cmake_minimum_required(VERSION 3.12...3.20) +project( + MPIwrapper VERSION 3.0.0 + DESCRIPTION "MPI wrapper" + HOMEPAGE_URL "https://github.com/eschnett/MPItrampoline" + LANGUAGES C Fortran + ) + +# SOVERSION is the ABI version of MPItrampoline. (That's different +# from the MPI_ABI version.) +# +# SOVERSION is handled differently under Linux and macOS. We are using +# a single-digit SOVERSION to avoid confusion between VERSION (which +# consists of 3 numbers) and SOVERSION. +# +# Different SOVERSIONs are incompatible; there is no need to have a +# major/minor version number. +set(SOVERSION 3) + +include(CheckLanguage) + +check_language(C) +if(NOT CMAKE_C_COMPILER) + message(FATAL_ERROR "No C language compiler") +endif() +# set(CMAKE_C_STANDARD 99) +set(CMAKE_C_STANDARD 11) # for atomics and mutexes; could use OpenMP instead +enable_language(C) + +check_language(Fortran) +if(NOT CMAKE_Fortran_COMPILER) + message(FATAL_ERROR "No Fortran language compiler") +endif() +enable_language(Fortran) + +include(GNUInstallDirs) + +find_package(MPI REQUIRED COMPONENTS C Fortran) +# include(FindOpenMP) +find_package(Threads REQUIRED) + +# include(CheckCSourceCompiles) +include(CheckFunctionExists) +include(CheckIncludeFile) +include(CheckIncludeFiles) +include(CheckSymbolExists) +include(CheckTypeSize) +include(CheckFortranSourceCompiles) + +list(APPEND CMAKE_REQUIRED_INCLUDES "${MPI_C_INCLUDE_DIRS}") +list(APPEND CMAKE_REQUIRED_LIBRARIES "${MPI_C_LIBRARIES}") +check_include_file(mpi.h HAVE_MPI_H) +# OpenMPI 5.0.0 does not allow including `mpi-ext.h` without first +# including `mpi.h` +# check_include_file(mpi-ext.h HAVE_MPI_EXT_H) +check_include_files("mpi.h;mpi-ext.h" HAVE_MPI_EXT_H) + +list(APPEND CMAKE_EXTRA_INCLUDE_FILES mpi.h) + +check_type_size(ptrdiff_t SIZEOF_PTRDIFF_T) + +check_type_size(MPI_Aint SIZEOF_MPI_AINT) +check_type_size(MPI_Count SIZEOF_MPI_COUNT) +check_type_size(MPI_Fint SIZEOF_MPI_FINT) +check_type_size(MPI_Offset SIZEOF_MPI_OFFSET) +# check_type_size(MPI_Status SIZEOF_MPI_STATUS) +# check_type_size(MPI_F08_status SIZEOF_MPI_F08_STATUS) + +# check_type_size(MPI_Comm SIZEOF_MPI_COMM) +# check_type_size(MPI_Datatype SIZEOF_MPI_DATATYPE) +# check_type_size(MPI_Errhandler SIZEOF_MPI_ERRHANDLER) +# check_type_size(MPI_File SIZEOF_MPI_FILE) +# check_type_size(MPI_Group SIZEOF_MPI_GROUP) +# check_type_size(MPI_Info SIZEOF_MPI_INFO) +# check_type_size(MPI_Message SIZEOF_MPI_MESSAGE) +# check_type_size(MPI_Op SIZEOF_MPI_OP) +# check_type_size(MPI_Request SIZEOF_MPI_REQUEST) +# check_type_size(MPI_Session SIZEOF_MPI_SESSION) +# check_type_size(MPI_Win SIZEOF_MPI_WIN) + +# check_symbol_exists(MPI_INTEGER mpi.h HAVE_MPI_INTEGER) +# check_symbol_exists(MPI_INTEGER1 mpi.h HAVE_MPI_INTEGER1) +# check_symbol_exists(MPI_INTEGER2 mpi.h HAVE_MPI_INTEGER2) +# check_symbol_exists(MPI_INTEGER4 mpi.h HAVE_MPI_INTEGER4) +# check_symbol_exists(MPI_INTEGER8 mpi.h HAVE_MPI_INTEGER8) +# check_symbol_exists(MPI_INTEGER16 mpi.h HAVE_MPI_INTEGER16) +# +# check_symbol_exists(MPI_REAL mpi.h HAVE_MPI_REAL) +# check_symbol_exists(MPI_REAL1 mpi.h HAVE_MPI_REAL1) +# check_symbol_exists(MPI_REAL2 mpi.h HAVE_MPI_REAL2) +# check_symbol_exists(MPI_REAL4 mpi.h HAVE_MPI_REAL4) +# check_symbol_exists(MPI_REAL8 mpi.h HAVE_MPI_REAL8) +# check_symbol_exists(MPI_REAL16 mpi.h HAVE_MPI_REAL16) +# +# check_symbol_exists(MPI_COMPLEX mpi.h HAVE_MPI_COMPLEX) +# check_symbol_exists(MPI_COMPLEX2 mpi.h HAVE_MPI_COMPLEX2) +# check_symbol_exists(MPI_COMPLEX4 mpi.h HAVE_MPI_COMPLEX4) +# check_symbol_exists(MPI_COMPLEX8 mpi.h HAVE_MPI_COMPLEX8) +# check_symbol_exists(MPI_COMPLEX16 mpi.h HAVE_MPI_COMPLEX16) +# check_symbol_exists(MPI_COMPLEX32 mpi.h HAVE_MPI_COMPLEX32) +# +# check_symbol_exists(MPI_LOGICAL mpi.h HAVE_MPI_LOGICAL) +# check_symbol_exists(MPI_LOGICAL1 mpi.h HAVE_MPI_LOGICAL1) +# check_symbol_exists(MPI_LOGICAL2 mpi.h HAVE_MPI_LOGICAL2) +# check_symbol_exists(MPI_LOGICAL4 mpi.h HAVE_MPI_LOGICAL4) +# check_symbol_exists(MPI_LOGICAL8 mpi.h HAVE_MPI_LOGICAL8) +# check_symbol_exists(MPI_LOGICAL16 mpi.h HAVE_MPI_LOGICAL16) + +check_fortran_source_compiles( + " + implicit none + include 'mpif.h' + integer, parameter :: dummy = 1 / (MPI_INTEGER - MPI_DATATYPE_NULL) + end + " + HAVE_USABLE_MPI_INTEGER + SRC_EXT .f90 +) +check_fortran_source_compiles( + " + implicit none + include 'mpif.h' + integer, parameter :: dummy = 1 / (MPI_INTEGER1 - MPI_DATATYPE_NULL) + end + " + HAVE_USABLE_MPI_INTEGER1 + SRC_EXT .f90 +) +check_fortran_source_compiles( + " + implicit none + include 'mpif.h' + integer, parameter :: dummy = 1 / (MPI_INTEGER2 - MPI_DATATYPE_NULL) + end + " + HAVE_USABLE_MPI_INTEGER2 + SRC_EXT .f90 +) +check_fortran_source_compiles( + " + implicit none + include 'mpif.h' + integer, parameter :: dummy = 1 / (MPI_INTEGER4 - MPI_DATATYPE_NULL) + end + " + HAVE_USABLE_MPI_INTEGER4 + SRC_EXT .f90 +) +check_fortran_source_compiles( + " + implicit none + include 'mpif.h' + integer, parameter :: dummy = 1 / (MPI_INTEGER8 - MPI_DATATYPE_NULL) + end + " + HAVE_USABLE_MPI_INTEGER8 + SRC_EXT .f90 +) +check_fortran_source_compiles( + " + implicit none + include 'mpif.h' + integer, parameter :: dummy = 1 / (MPI_INTEGER16 - MPI_DATATYPE_NULL) + end + " + HAVE_USABLE_MPI_INTEGER16 + SRC_EXT .f90 +) + +check_fortran_source_compiles( + " + implicit none + include 'mpif.h' + integer, parameter :: dummy = 1 / (MPI_REAL - MPI_DATATYPE_NULL) + end + " + HAVE_USABLE_MPI_REAL + SRC_EXT .f90 +) +check_fortran_source_compiles( + " + implicit none + include 'mpif.h' + integer, parameter :: dummy = 1 / (MPI_REAL1 - MPI_DATATYPE_NULL) + end + " + HAVE_USABLE_MPI_REAL1 + SRC_EXT .f90 +) +check_fortran_source_compiles( + " + implicit none + include 'mpif.h' + integer, parameter :: dummy = 1 / (MPI_REAL2 - MPI_DATATYPE_NULL) + end + " + HAVE_USABLE_MPI_REAL2 + SRC_EXT .f90 +) +check_fortran_source_compiles( + " + implicit none + include 'mpif.h' + integer, parameter :: dummy = 1 / (MPI_REAL4 - MPI_DATATYPE_NULL) + end + " + HAVE_USABLE_MPI_REAL4 + SRC_EXT .f90 +) +check_fortran_source_compiles( + " + implicit none + include 'mpif.h' + integer, parameter :: dummy = 1 / (MPI_REAL8 - MPI_DATATYPE_NULL) + end + " + HAVE_USABLE_MPI_REAL8 + SRC_EXT .f90 +) +check_fortran_source_compiles( + " + implicit none + include 'mpif.h' + integer, parameter :: dummy = 1 / (MPI_REAL16 - MPI_DATATYPE_NULL) + end + " + HAVE_USABLE_MPI_REAL16 + SRC_EXT .f90 +) + +check_fortran_source_compiles( + " + implicit none + include 'mpif.h' + integer, parameter :: dummy = 1 / (MPI_COMPLEX - MPI_DATATYPE_NULL) + end + " + HAVE_USABLE_MPI_COMPLEX + SRC_EXT .f90 +) +check_fortran_source_compiles( + " + implicit none + include 'mpif.h' + integer, parameter :: dummy = 1 / (MPI_COMPLEX2 - MPI_DATATYPE_NULL) + end + " + HAVE_USABLE_MPI_COMPLEX2 + SRC_EXT .f90 +) +check_fortran_source_compiles( + " + implicit none + include 'mpif.h' + integer, parameter :: dummy = 1 / (MPI_COMPLEX4 - MPI_DATATYPE_NULL) + end + " + HAVE_USABLE_MPI_COMPLEX4 + SRC_EXT .f90 +) +check_fortran_source_compiles( + " + implicit none + include 'mpif.h' + integer, parameter :: dummy = 1 / (MPI_COMPLEX8 - MPI_DATATYPE_NULL) + end + " + HAVE_USABLE_MPI_COMPLEX8 + SRC_EXT .f90 +) +check_fortran_source_compiles( + " + implicit none + include 'mpif.h' + integer, parameter :: dummy = 1 / (MPI_COMPLEX16 - MPI_DATATYPE_NULL) + end + " + HAVE_USABLE_MPI_COMPLEX16 + SRC_EXT .f90 +) +check_fortran_source_compiles( + " + implicit none + include 'mpif.h' + integer, parameter :: dummy = 1 / (MPI_COMPLEX32 - MPI_DATATYPE_NULL) + end + " + HAVE_USABLE_MPI_COMPLEX32 + SRC_EXT .f90 +) + +check_fortran_source_compiles( + " + implicit none + include 'mpif.h' + integer, parameter :: dummy = 1 / (MPI_LOGICAL - MPI_DATATYPE_NULL) + end + " + HAVE_USABLE_MPI_LOGICAL + SRC_EXT .f90 +) +check_fortran_source_compiles( + " + implicit none + include 'mpif.h' + integer, parameter :: dummy = 1 / (MPI_LOGICAL1 - MPI_DATATYPE_NULL) + end + " + HAVE_USABLE_MPI_LOGICAL1 + SRC_EXT .f90 +) +check_fortran_source_compiles( + " + implicit none + include 'mpif.h' + integer, parameter :: dummy = 1 / (MPI_LOGICAL2 - MPI_DATATYPE_NULL) + end + " + HAVE_USABLE_MPI_LOGICAL2 + SRC_EXT .f90 +) +check_fortran_source_compiles( + " + implicit none + include 'mpif.h' + integer, parameter :: dummy = 1 / (MPI_LOGICAL4 - MPI_DATATYPE_NULL) + end + " + HAVE_USABLE_MPI_LOGICAL4 + SRC_EXT .f90 +) +check_fortran_source_compiles( + " + implicit none + include 'mpif.h' + integer, parameter :: dummy = 1 / (MPI_LOGICAL8 - MPI_DATATYPE_NULL) + end + " + HAVE_USABLE_MPI_LOGICAL8 + SRC_EXT .f90 +) +check_fortran_source_compiles( + " + implicit none + include 'mpif.h' + integer, parameter :: dummy = 1 / (MPI_LOGICAL16 - MPI_DATATYPE_NULL) + end + " + HAVE_USABLE_MPI_LOGICAL16 + SRC_EXT .f90 +) + +if(NOT(${HAVE_USABLE_MPI_INTEGER})) + message(FATAL_ERROR "MPI Fortran datatype `MPI_INTEGER` is not usable") +endif() +if(NOT(${HAVE_USABLE_MPI_REAL})) + message(FATAL_ERROR "MPI Fortran datatype `MPI_REAL` is not usable") +endif() +if(NOT(${HAVE_USABLE_MPI_COMPLEX})) + message(FATAL_ERROR "MPI Fortran datatype `MPI_COMPLEX` is not usable") +endif() +if(NOT(${HAVE_USABLE_MPI_LOGICAL})) + message(FATAL_ERROR "MPI Fortran datatype `MPI_LOGICAL` is not usable") +endif() + + +check_symbol_exists(MPI_LB mpi.h HAVE_MPI_LB) +check_symbol_exists(MPI_UB mpi.h HAVE_MPI_UB) + +check_function_exists(MPIX_Query_cuda_support HAVE_MPIX_QUERY_CUDA_SUPPORT) +check_function_exists(MPIX_Query_hip_support HAVE_MPIX_QUERY_HIP_SUPPORT) +check_function_exists(MPIX_Query_rocm_support HAVE_MPIX_QUERY_ROCM_SUPPORT) +check_function_exists(MPIX_Query_ze_support HAVE_MPIX_QUERY_ZE_SUPPORT) + +list(APPEND CMAKE_REQUIRED_INCLUDES "${MPI_Fortran_INCLUDE_DIRS}") +list(APPEND CMAKE_REQUIRED_LIBRARIES "${MPI_Fortran_LIBRARIES}") +check_fortran_source_compiles( + " + implicit none + include 'mpif.h' + end + " + HAVE_FORTRAN_MPIF_H + SRC_EXT .f90 +) +check_fortran_source_compiles( + " + implicit none + include 'mpif.h' + integer(MPI_ADDRESS_KIND) i + i = 0 + i = MPI_Aint_add(i, i) + end + " + HAVE_FORTRAN_DECLARATION_MPI_AINT_ADD + SRC_EXT .f90 +) +check_fortran_source_compiles( + " + implicit none + include 'mpif.h' + integer(MPI_ADDRESS_KIND) i + i = 0 + i = MPI_Aint_diff(i, i) + end + " + HAVE_FORTRAN_DECLARATION_MPI_AINT_DIFF + SRC_EXT .f90 +) +check_fortran_source_compiles( + " + implicit none + include 'mpif.h' + integer session + session = MPI_SESSION_NULL + end + " + HAVE_FORTRAN_MPI_SESSION_NULL + SRC_EXT .f90 +) + +# Check level of MPI 4 support +## Constants +check_symbol_exists(MPI_BUFFER_AUTOMATIC mpi.h HAVE_MPI_BUFFER_AUTOMATIC) +check_symbol_exists(MPI_COMM_TYPE_HW_GUIDED mpi.h HAVE_MPI_COMM_TYPE_HW_GUIDED) +check_symbol_exists(MPI_COMM_TYPE_HW_UNGUIDED mpi.h HAVE_MPI_COMM_TYPE_HW_UNGUIDED) +check_symbol_exists(MPI_COMM_TYPE_RESOURCE_GUIDED mpi.h HAVE_MPI_COMM_TYPE_RESOURCE_GUIDED) +## Types +check_type_size(MPI_Session SIZEOF_MPI_SESSION) +check_type_size(MPI_User_function_c SIZEOF_MPI_USER_FUNCTION_C) + +configure_file(mpiwrapper.h.in mpiwrapper.h @ONLY) + +message(STATUS "MPI_FOUND=${MPI_FOUND}") +message(STATUS "MPI_C_FOUND=${MPI_C_FOUND}") +message(STATUS "MPI_Fortran_FOUND=${MPI_Fortran_FOUND}") +message(STATUS "MPI_VERSION=${MPI_VERSION}") +message(STATUS "MPI_C_VERSION=${MPI_C_VERSION}") +message(STATUS "MPI_C_VERSION_MAJOR=${MPI_C_VERSION_MAJOR}") +message(STATUS "MPI_C_VERSION_MINOR=${MPI_C_VERSION_MINOR}") +message(STATUS "MPI_Fortran_VERSION=${MPI_Fortran_VERSION}") +message(STATUS "MPI_Fortran_VERSION_MAJOR=${MPI_Fortran_VERSION_MAJOR}") +message(STATUS "MPI_Fortran_VERSION_MINOR=${MPI_Fortran_VERSION_MINOR}") + +add_library(mpiwrapper + MODULE + mpiwrapper.h + mpiwrapper.c + $<$:mpiwrapper-mpi3.c> + mpiwrapper.F90 + mpiwrapper_functions.F90 +) +# target_compile_options(mpiwrapper PRIVATE -Wall -Wextra -fdiagnostics-show-option) +target_compile_options(mpiwrapper PUBLIC -fcray-pointer) +target_include_directories( + mpiwrapper + PRIVATE ${CMAKE_CURRENT_BINARY_DIR} + PRIVATE ../mpiabi +) +target_link_libraries(mpiwrapper PRIVATE MPI::MPI_C MPI::MPI_Fortran Threads::Threads) +# This does not work on macOS with GCC +# set_target_properties(mpiwrapper PROPERTIES +# VERSION ${PROJECT_VERSION} +# SOVERSION ${SOVERSION} +# ) + +if(APPLE) + # On macOS, check that the plugin `libmpiwrapper.so` is built with a + # two-level namespace. If not, it will use the MPI functions + # provided by MPItrampoline instead of the "real" MPI, which will + # recurse infinitely, leading to a stack overflow and segfault. + add_custom_command( + TARGET mpiwrapper POST_BUILD + COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/check_twolevel.sh ${CMAKE_CURRENT_BINARY_DIR}/libmpiwrapper.so + COMMENT "Checking whether libmpiwrapper.so plugin uses a two-level namespace..." + VERBATIM + ) +endif() + +install(TARGETS mpiwrapper LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/mpiwrapper/check_twolevel.sh b/mpiwrapper/check_twolevel.sh new file mode 100755 index 00000000..dd6ec19e --- /dev/null +++ b/mpiwrapper/check_twolevel.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +set -euo pipefail + +plugin=$1 + +if test ! -f "$plugin"; then + echo "*** ERROR: plugin $plugin does not exist" + exit 1 +fi + +if ! otool -hV "$plugin" | grep -q ' TWOLEVEL\( \|$\)'; then + echo "*** ERROR: plugin $plugin does not use a two-level namespace" + echo otool -hV "$plugin" + otool -hV "$plugin" + exit 1 +fi diff --git a/mpiwrapper/generate_wrapper.jl b/mpiwrapper/generate_wrapper.jl new file mode 100644 index 00000000..d9cd9154 --- /dev/null +++ b/mpiwrapper/generate_wrapper.jl @@ -0,0 +1,266 @@ +include("../mpiabi/mpiabi_functions_fortran.jl") + +ishandle(type::Typ) = type in [comm, datatype, errhandler, file, group, info, message, session, op, request, win] +istyped(type::Typ) = type in [errorcode, proc, tag] +function fortran(type::Typ, dim::Union{Nothing,Symbol}; hide_comm_size=false) + if dim === nothing + type === address && return "integer(MPI_ADDRESS_KIND)", "" + type === buffer && return "integer", "(*)" + type === buffer_inplace && return "integer", "(*)" + type === count && return "integer(MPI_COUNT_KIND)", "" + type === character && return "character(*)", "" + type === double_precision && return "double precision", "" + type === external && return "external", "" + type === logical && return "logical", "" + type === offset && return "integer(MPI_OFFSET_KIND)", "" + type === status && return "integer", "(MPI_STATUS_SIZE)" + @assert type !== argv + @assert type !== argvs + @assert type !== void + @assert type !== weight + return "integer", "" + else + dim = hide_comm_size && dim === :comm_size ? "*" : dim + type === address && return "integer(MPI_ADDRESS_KIND)", "($dim)" + type === argv && return "character(*)", "($dim)" + type === argvs && return "character(*)", "(count, $dim)" # we cheat to know it's `count` + @assert !(type === buffer) + @assert !(type === buffer_inplace) + type === character && return "character(*)", "($dim)" + type === count && return "integer(MPI_COUNT_KIND)", "($dim)" + type === double_precision && return "double precision", "($dim)" + @assert !(type === external) + type === logical && return "logical", "($dim)" + type === offset && return "integer(MPI_OFFSET_KIND)", "($dim)" + type === status && return "integer", "(MPI_STATUS_SIZE, $dim)" + @assert type !== void + return "integer", "($dim)" + end +end + +@enum ArgConversion noconv onthefly inplace withtemp conv_argv conv_argvs conv_buffer conv_status conv_weight +function arg_conversion(arg::Arg) + arg.type === argv && return conv_argv + arg.type === argvs && return conv_argvs + arg.type === buffer_inplace && return conv_buffer + arg.type === status && return conv_status + arg.type === weight && return conv_weight + arg.type in [buffer, character, integer, logical, void] && return noconv + (ishandle(arg.type) || istyped(arg.type) || arg.type in [address, count, maybe_undefined, offset]) && + arg.dim === nothing && + arg.intent === in_ && + return onthefly + # We could handle the `arg.dim !== nothing` case in-place, but that is probably less efficient + (ishandle(arg.type) || istyped(arg.type)) && arg.dim == nothing && return inplace + return withtemp +end + +mpi2abi(str) = replace(str, "MPI" => "MPIABI") + +function generate_mpiwrapper_functions_f90(io::IO) + indent = " " + println(io, "! MPI Fortran function wrappers") + println(io) + println(io, "! This file has been generated automatically") + println(io, "! by `mpiwrapper/generate_wrappers.jl`.") + println(io, "! Do not modify this file, changes will be overwritten.") + println(io) + for fun in functions + # Function name + funtype = fun.result === void ? "subroutine" : "function" + funresult = fun.result === void ? "" : " result(result)" + println(io, mpi2abi("$funtype $(fun.name)( &")) + # Function argument names + for (n, arg) in enumerate(fun.args) + sep = n == length(fun.args) ? "" : "," + println(io, "$(indent)$(arg.name)$sep &") + end + println(io, ")$funresult") + println(io, "$(indent)use mpiwrapper") + println(io, "$(indent)implicit none") + # Function argument types + for arg in fun.args + type, dim = fortran(arg.type, arg.dim; hide_comm_size=true) + intent = fortran(arg.intent) + intent = isempty(intent) || arg.type === external ? "" : ", $intent" + # if arg.type === buffer + # println(io, "$(indent)DIR_IGNORE_TKR !dir\$ ignore_tkr(tkr) $(arg.name)") + # println(io, "$(indent)GCC_ATTRIBUTES_NO_ARG_CHECK !gcc\$ attributes no_arg_check :: $(arg.name)") + # if arg.intent === out + # intent = "" + # end + # end + println(io, mpi2abi("$(indent)$type$intent :: $(arg.name)$dim")) + end + if fun.result !== void + type, dim = fortran(fun.result, nothing) + println(io, mpi2abi("$(indent)$type :: result$dim")) + end + if fun.version > v"0" + version = 100 * fun.version.major + fun.version.minor + println(io, "#if MPI_VERSION_NUMBER < $version") + if fun.version == v"99999" + println(io, "$(indent)write(0, '(\"The Fortran function $(fun.name) is not available in MPItrampoline\")')") + else + println( + io, + "$(indent)write(0, '(\"The Fortran function $(fun.name) is not available in the wrapped MPI implementation\")')", + ) + end + println(io, "$(indent)call MPI_Abort(MPI_COMM_SELF, 1, ierror)") + println(io, "$(indent)stop") + println(io, "#else") + end + # Declare temporary variables + need_comm_size = false + need_loop_index = false + for arg in fun.args + if arg_conversion(arg) in [conv_buffer, conv_weight] + @assert arg.dim !== nothing + type, dim = fortran(arg.type, arg.dim) + println(io, "$(indent)integer(MPI_ADDRESS_KIND) :: ptr_$(arg.name)") + println(io, "$(indent)$type :: wrap_$(arg.name)$dim") + println(io, "$(indent)pointer(ptr_$(arg.name), wrap_$(arg.name))") + elseif arg_conversion(arg) === conv_status + type, dim = fortran(arg.type, arg.dim) + println(io, "$(indent)integer(MPI_ADDRESS_KIND) :: ptr_$(arg.name)") + println(io, "$(indent)$type :: wrap_$(arg.name)$dim") + println(io, "$(indent)pointer(ptr_$(arg.name), wrap_$(arg.name))") + println(io, "$(indent)$type :: tmp_$(arg.name)$dim") + elseif arg_conversion(arg) === withtemp + type, dim = fortran(arg.type, arg.dim) + if arg.dim === :comm_size + println(io, "$(indent)$type, allocatable :: wrap_$(arg.name)(:)") + need_comm_size = true + else + println(io, "$(indent)$type :: wrap_$(arg.name)$dim") + end + need_loop_index = need_loop_index || arg.dim !== nothing + end + end + if need_comm_size + println(io, "$(indent)integer :: comm_size") + end + if need_loop_index + println(io, "$(indent)integer :: i") + end + # Allocate temporary variables + if need_comm_size + println(io, "$(indent)call MPI_Comm_size(abi2mpi_comm(comm), comm_size, ierror)") + println(io, "$(indent)if (ierror /= MPI_SUCCESS) then") + println(io, "$(indent)$(indent)ierror = mpi2abi_errorcode(ierror)") + println(io, "$(indent)$(indent)return") + println(io, "$(indent)end if") + for arg in fun.args + if arg_conversion(arg) === withtemp + if arg.dim === :comm_size + println(io, "$(indent)allocate(wrap_$(arg.name)(comm_size))") + end + end + end + end + # Copy inputs into temporary variables + for arg in fun.args + if arg.intent in [in_, inout, unclear] + if arg_conversion(arg) in [conv_buffer, conv_weight] + @assert arg.dim !== nothing + println(io, "$(indent)ptr_$(arg.name) = abi2mpi_$(arg.type)_ptr(loc($(arg.name)))") + elseif arg_conversion(arg) === conv_status + @assert arg.dim === nothing + println(io, "$(indent)ptr_$(arg.name) = abi2mpi_status_ptr($(arg.name), tmp_$(arg.name))") + elseif arg_conversion(arg) === inplace + @assert arg.dim === nothing + println(io, "$(indent)$(arg.name) = abi2mpi_$(arg.type)($(arg.name))") + elseif arg_conversion(arg) === withtemp + if arg.dim === nothing + println(io, "$(indent)wrap_$(arg.name) = abi2mpi_$(arg.type)($(arg.name))") + else + println(io, "$(indent)do i = 1, $(arg.dim)") + println(io, "$(indent)$(indent)wrap_$(arg.name)(i) = abi2mpi_$(arg.type)($(arg.name)(i))") + println(io, "$(indent)end do") + end + end + else + if arg.type === status + if arg.dim === nothing + println(io, "$(indent)ptr_$(arg.name) = abi2mpi_status_ptr_uninitialized($(arg.name), tmp_$(arg.name))") + else + println( + io, + "$(indent)ptr_$(arg.name) = abi2mpi_statuses_ptr_uninitialized($(arg.name), tmp_$(arg.name), $(arg.dim))", + ) + end + end + end + end + # Forward call + call = fun.result === void ? "call " : "result = " + println(io, "$(indent)$call$(fun.name)( &") + # Forward call arguments + for (n, arg) in enumerate(fun.args) + name = arg.name + if arg_conversion(arg) in [withtemp, conv_buffer, conv_status, conv_weight] + name = "wrap_$name" + end + if arg_conversion(arg) === onthefly + name = "abi2mpi_$(arg.type)($name)" + end + sep = n == length(fun.args) ? "" : "," + println(io, "$(indent)$(indent)$name$sep &") + end + println(io, "$(indent))") + # Convert outputs + for arg in fun.args + if arg.intent in [out, inout, unclear] + cond = arg.cond !== nothing ? "if ($(arg.cond)) " : "" + if arg_conversion(arg) === conv_buffer + # no conversion necessary + @assert arg.dim === nothing + elseif arg_conversion(arg) === conv_status + if arg.dim === nothing + println(io, "$(indent)$(cond)call mpi2abi_status_ptr(wrap_$(arg.name), $(arg.name))") + else + dim = arg.useddim !== nothing ? arg.useddim : arg.dim + println(io, "$(indent)$(cond)call mpi2abi_statuses_ptr(wrap_$(arg.name), $(arg.name), $dim)") + end + elseif arg_conversion(arg) === conv_weight + # no conversion necessary + @assert arg.dim !== nothing + elseif arg_conversion(arg) === inplace + @assert arg.dim === nothing + println(io, "$(indent)$(cond)$(arg.name) = mpi2abi_$(arg.type)($(arg.name))") + elseif arg_conversion(arg) === withtemp + if arg.dim === nothing + println(io, "$(indent)$(cond)$(arg.name) = mpi2abi_$(arg.type)(wrap_$(arg.name))") + else + dim = arg.useddim !== nothing ? arg.useddim : arg.dim + println(io, "$(indent)do i = 1, $dim") + println(io, "$(indent)$(indent)$(cond)$(arg.name)(i) = mpi2abi_$(arg.type)(wrap_$(arg.name)(i))") + println(io, "$(indent)end do") + end + end + end + end + # Deallocate temporary variables + if need_comm_size + for arg in fun.args + if arg_conversion(arg) === withtemp + if arg.dim === :comm_size + println(io, "$(indent)deallocate(wrap_$(arg.name))") + end + end + end + end + if fun.version > v"0" + println(io, "#endif") + end + println(io, mpi2abi("end $funtype $(fun.name)")) + println(io) + end + return nothing +end + +open("mpiwrapper_functions.F90", "w") do fh + generate_mpiwrapper_functions_f90(fh) + nothing +end diff --git a/mpiwrapper/mpiwrapper-mpi3.c b/mpiwrapper/mpiwrapper-mpi3.c new file mode 100644 index 00000000..ec4c0e35 --- /dev/null +++ b/mpiwrapper/mpiwrapper-mpi3.c @@ -0,0 +1,264 @@ +// Fake MPI 4 support, just enough to make the linker happy + +#include + +// C functions + +void MPI_Accumulate_c(void) { abort(); } +void MPI_Allgather_c(void) { abort(); } +void MPI_Allgather_init(void) { abort(); } +void MPI_Allgather_init_c(void) { abort(); } +void MPI_Allgatherv_c(void) { abort(); } +void MPI_Allgatherv_init(void) { abort(); } +void MPI_Allgatherv_init_c(void) { abort(); } +void MPI_Allreduce_c(void) { abort(); } +void MPI_Allreduce_init(void) { abort(); } +void MPI_Allreduce_init_c(void) { abort(); } +void MPI_Alltoall_c(void) { abort(); } +void MPI_Alltoall_init(void) { abort(); } +void MPI_Alltoall_init_c(void) { abort(); } +void MPI_Alltoallv_c(void) { abort(); } +void MPI_Alltoallv_init(void) { abort(); } +void MPI_Alltoallv_init_c(void) { abort(); } +void MPI_Alltoallw_c(void) { abort(); } +void MPI_Alltoallw_init(void) { abort(); } +void MPI_Alltoallw_init_c(void) { abort(); } +void MPI_Barrier_init(void) { abort(); } +void MPI_Bcast_c(void) { abort(); } +void MPI_Bcast_init(void) { abort(); } +void MPI_Bcast_init_c(void) { abort(); } +void MPI_Bsend_c(void) { abort(); } +void MPI_Bsend_init_c(void) { abort(); } +void MPI_Buffer_attach_c(void) { abort(); } +void MPI_Buffer_detach_c(void) { abort(); } +void MPI_Comm_create_from_group(void) { abort(); } +void MPI_Comm_idup_with_info(void) { abort(); } +void MPI_Exscan_c(void) { abort(); } +void MPI_Exscan_init(void) { abort(); } +void MPI_Exscan_init_c(void) { abort(); } +void MPI_File_get_type_extent_c(void) { abort(); } +void MPI_File_iread_all_c(void) { abort(); } +void MPI_File_iread_at_all_c(void) { abort(); } +void MPI_File_iread_at_c(void) { abort(); } +void MPI_File_iread_c(void) { abort(); } +void MPI_File_iread_shared_c(void) { abort(); } +void MPI_File_iwrite_all_c(void) { abort(); } +void MPI_File_iwrite_at_all_c(void) { abort(); } +void MPI_File_iwrite_at_c(void) { abort(); } +void MPI_File_iwrite_c(void) { abort(); } +void MPI_File_iwrite_shared_c(void) { abort(); } +void MPI_File_read_all_begin_c(void) { abort(); } +void MPI_File_read_all_c(void) { abort(); } +void MPI_File_read_at_all_begin_c(void) { abort(); } +void MPI_File_read_at_all_c(void) { abort(); } +void MPI_File_read_ordered_begin_c(void) { abort(); } +void MPI_File_read_ordered_c(void) { abort(); } +void MPI_File_read_shared_c(void) { abort(); } +void MPI_File_write_all_begin_c(void) { abort(); } +void MPI_File_write_all_c(void) { abort(); } +void MPI_File_write_at_all_begin_c(void) { abort(); } +void MPI_File_write_at_all_c(void) { abort(); } +void MPI_File_write_ordered_begin_c(void) { abort(); } +void MPI_File_write_ordered_c(void) { abort(); } +void MPI_File_write_shared_c(void) { abort(); } +void MPI_Gather_c(void) { abort(); } +void MPI_Gather_init(void) { abort(); } +void MPI_Gather_init_c(void) { abort(); } +void MPI_Gatherv_c(void) { abort(); } +void MPI_Gatherv_init(void) { abort(); } +void MPI_Gatherv_init_c(void) { abort(); } +void MPI_Get_accumulate_c(void) { abort(); } +void MPI_Get_c(void) { abort(); } +void MPI_Get_count_c(void) { abort(); } +void MPI_Get_elements_c(void) { abort(); } +void MPI_Group_from_session_pset(void) { abort(); } +void MPI_Iallgather_c(void) { abort(); } +void MPI_Iallgatherv_c(void) { abort(); } +void MPI_Iallreduce_c(void) { abort(); } +void MPI_Ialltoall_c(void) { abort(); } +void MPI_Ialltoallv_c(void) { abort(); } +void MPI_Ialltoallw_c(void) { abort(); } +void MPI_Ibcast_c(void) { abort(); } +void MPI_Ibsend_c(void) { abort(); } +void MPI_Iexscan_c(void) { abort(); } +void MPI_Igather_c(void) { abort(); } +void MPI_Igatherv_c(void) { abort(); } +void MPI_Imrecv_c(void) { abort(); } +void MPI_Ineighbor_allgather_c(void) { abort(); } +void MPI_Ineighbor_allgatherv_c(void) { abort(); } +void MPI_Ineighbor_alltoall_c(void) { abort(); } +void MPI_Ineighbor_alltoallv_c(void) { abort(); } +void MPI_Ineighbor_alltoallw_c(void) { abort(); } +void MPI_Info_create_env(void) { abort(); } +void MPI_Info_get_string(void) { abort(); } +void MPI_Intercomm_create_from_groups(void) { abort(); } +void MPI_Irecv_c(void) { abort(); } +void MPI_Ireduce_c(void) { abort(); } +void MPI_Ireduce_scatter_block_c(void) { abort(); } +void MPI_Ireduce_scatter_c(void) { abort(); } +void MPI_Irsend_c(void) { abort(); } +void MPI_Iscan_c(void) { abort(); } +void MPI_Iscatter_c(void) { abort(); } +void MPI_Iscatterv_c(void) { abort(); } +void MPI_Isend_c(void) { abort(); } +void MPI_Isendrecv(void) { abort(); } +void MPI_Isendrecv_c(void) { abort(); } +void MPI_Isendrecv_replace(void) { abort(); } +void MPI_Isendrecv_replace_c(void) { abort(); } +void MPI_Issend_c(void) { abort(); } +void MPI_Mrecv_c(void) { abort(); } +void MPI_Neighbor_allgather_c(void) { abort(); } +void MPI_Neighbor_allgather_init(void) { abort(); } +void MPI_Neighbor_allgather_init_c(void) { abort(); } +void MPI_Neighbor_allgatherv_c(void) { abort(); } +void MPI_Neighbor_allgatherv_init(void) { abort(); } +void MPI_Neighbor_allgatherv_init_c(void) { abort(); } +void MPI_Neighbor_alltoall_c(void) { abort(); } +void MPI_Neighbor_alltoall_init(void) { abort(); } +void MPI_Neighbor_alltoall_init_c(void) { abort(); } +void MPI_Neighbor_alltoallv_c(void) { abort(); } +void MPI_Neighbor_alltoallv_init(void) { abort(); } +void MPI_Neighbor_alltoallv_init_c(void) { abort(); } +void MPI_Neighbor_alltoallw_c(void) { abort(); } +void MPI_Neighbor_alltoallw_init(void) { abort(); } +void MPI_Neighbor_alltoallw_init_c(void) { abort(); } +void MPI_Op_create_c(void) { abort(); } +void MPI_Pack_c(void) { abort(); } +void MPI_Pack_external_c(void) { abort(); } +void MPI_Pack_external_size_c(void) { abort(); } +void MPI_Pack_size_c(void) { abort(); } +void MPI_Parrived(void) { abort(); } +void MPI_Pready(void) { abort(); } +void MPI_Pready_list(void) { abort(); } +void MPI_Pready_range(void) { abort(); } +void MPI_Precv_init(void) { abort(); } +void MPI_Psend_init(void) { abort(); } +void MPI_Raccumulate_c(void) { abort(); } +void MPI_Recv_c(void) { abort(); } +void MPI_Recv_init_c(void) { abort(); } +void MPI_Reduce_c(void) { abort(); } +void MPI_Reduce_init(void) { abort(); } +void MPI_Reduce_init_c(void) { abort(); } +void MPI_Reduce_local_c(void) { abort(); } +void MPI_Reduce_scatter_block_c(void) { abort(); } +void MPI_Reduce_scatter_block_init(void) { abort(); } +void MPI_Reduce_scatter_block_init_c(void) { abort(); } +void MPI_Reduce_scatter_c(void) { abort(); } +void MPI_Reduce_scatter_init(void) { abort(); } +void MPI_Reduce_scatter_init_c(void) { abort(); } +void MPI_Register_datarep_c(void) { abort(); } +void MPI_Rget_accumulate_c(void) { abort(); } +void MPI_Rget_c(void) { abort(); } +void MPI_Rput_c(void) { abort(); } +void MPI_Rsend_c(void) { abort(); } +void MPI_Rsend_init_c(void) { abort(); } +void MPI_Scan_c(void) { abort(); } +void MPI_Scan_init(void) { abort(); } +void MPI_Scan_init_c(void) { abort(); } +void MPI_Scatter_c(void) { abort(); } +void MPI_Scatter_init(void) { abort(); } +void MPI_Scatter_init_c(void) { abort(); } +void MPI_Scatterv_c(void) { abort(); } +void MPI_Scatterv_init(void) { abort(); } +void MPI_Scatterv_init_c(void) { abort(); } +void MPI_Send_c(void) { abort(); } +void MPI_Send_init_c(void) { abort(); } +void MPI_Sendrecv_c(void) { abort(); } +void MPI_Sendrecv_replace_c(void) { abort(); } +void MPI_Session_call_errhandler(void) { abort(); } +void MPI_Session_finalize(void) { abort(); } +void MPI_Session_get_errhandler(void) { abort(); } +void MPI_Session_get_info(void) { abort(); } +void MPI_Session_get_nth_pset(void) { abort(); } +void MPI_Session_get_num_psets(void) { abort(); } +void MPI_Session_get_pset_info(void) { abort(); } +void MPI_Session_init(void) { abort(); } +void MPI_Session_set_errhandler(void) { abort(); } +void MPI_Ssend_c(void) { abort(); } +void MPI_Ssend_init_c(void) { abort(); } +void MPI_Status_set_elements_c(void) { abort(); } +void MPI_Type_contiguous_c(void) { abort(); } +void MPI_Type_create_darray_c(void) { abort(); } +void MPI_Type_create_hindexed_block_c(void) { abort(); } +void MPI_Type_create_hindexed_c(void) { abort(); } +void MPI_Type_create_hvector_c(void) { abort(); } +void MPI_Type_create_indexed_block_c(void) { abort(); } +void MPI_Type_create_resized_c(void) { abort(); } +void MPI_Type_create_struct_c(void) { abort(); } +void MPI_Type_create_subarray_c(void) { abort(); } +void MPI_Type_get_contents_c(void) { abort(); } +void MPI_Type_get_envelope_c(void) { abort(); } +void MPI_Type_get_extent_c(void) { abort(); } +void MPI_Type_get_true_extent_c(void) { abort(); } +void MPI_Type_indexed_c(void) { abort(); } +void MPI_Type_size_c(void) { abort(); } +void MPI_Type_vector_c(void) { abort(); } +void MPI_Unpack_c(void) { abort(); } +void MPI_Unpack_external_c(void) { abort(); } +void MPI_Win_allocate_shared_c(void) { abort(); } +void MPI_Win_create_c(void) { abort(); } +void MPI_Win_shared_query_c(void) { abort(); } + +// Fortran functions + +void mpi_allgather_init_(void) { abort(); } +void mpi_allgatherv_init_(void) { abort(); } +void mpi_allreduce_init_(void) { abort(); } +void mpi_alltoall_init_(void) { abort(); } +void mpi_alltoallv_init_(void) { abort(); } +void mpi_alltoallw_init_(void) { abort(); } +void mpi_barrier_init_(void) { abort(); } +void mpi_bcast_init_(void) { abort(); } +void mpi_buffer_flush_(void) { abort(); } +void mpi_buffer_iflush_(void) { abort(); } +void mpi_comm_attach_buffer_(void) { abort(); } +void mpi_comm_create_from_group_(void) { abort(); } +void mpi_comm_detach_buffer_(void) { abort(); } +void mpi_comm_flush_buffer_(void) { abort(); } +void mpi_comm_idup_with_info_(void) { abort(); } +void mpi_comm_iflush_buffer_(void) { abort(); } +void mpi_exscan_init_(void) { abort(); } +void mpi_gather_init_(void) { abort(); } +void mpi_gatherv_init_(void) { abort(); } +void mpi_group_from_session_pset_(void) { abort(); } +void mpi_info_create_env_(void) { abort(); } +void mpi_info_get_string_(void) { abort(); } +void mpi_intercomm_create_from_groups_(void) { abort(); } +void mpi_isendrecv_(void) { abort(); } +void mpi_isendrecv_replace_(void) { abort(); } +void mpi_neighbor_allgather_init_(void) { abort(); } +void mpi_neighbor_allgatherv_init_(void) { abort(); } +void mpi_neighbor_alltoall_init_(void) { abort(); } +void mpi_neighbor_alltoallv_init_(void) { abort(); } +void mpi_neighbor_alltoallw_init_(void) { abort(); } +void mpi_parrived_(void) { abort(); } +void mpi_pready_(void) { abort(); } +void mpi_pready_list_(void) { abort(); } +void mpi_pready_range_(void) { abort(); } +void mpi_precv_init_(void) { abort(); } +void mpi_psend_init_(void) { abort(); } +void mpi_reduce_init_(void) { abort(); } +void mpi_reduce_scatter_block_init_(void) { abort(); } +void mpi_reduce_scatter_init_(void) { abort(); } +void mpi_request_get_status_all_(void) { abort(); } +void mpi_request_get_status_any_(void) { abort(); } +void mpi_request_get_status_some_(void) { abort(); } +void mpi_scan_init_(void) { abort(); } +void mpi_scatter_init_(void) { abort(); } +void mpi_scatterv_init_(void) { abort(); } +void mpi_session_attach_buffer_(void) { abort(); } +void mpi_session_call_errhandler_(void) { abort(); } +void mpi_session_detach_buffer_(void) { abort(); } +void mpi_session_finalize_(void) { abort(); } +void mpi_session_flush_buffer_(void) { abort(); } +void mpi_session_get_errhandler_(void) { abort(); } +void mpi_session_get_info_(void) { abort(); } +void mpi_session_get_nth_pset_(void) { abort(); } +void mpi_session_get_num_psets_(void) { abort(); } +void mpi_session_get_pset_info_(void) { abort(); } +void mpi_session_iflush_buffer_(void) { abort(); } +void mpi_session_init_(void) { abort(); } +void mpi_session_set_errhandler_(void) { abort(); } +void mpi_status_get_error_(void) { abort(); } +void mpi_status_get_source_(void) { abort(); } +void mpi_status_get_tag_(void) { abort(); } diff --git a/mpiwrapper/mpiwrapper.F90 b/mpiwrapper/mpiwrapper.F90 new file mode 100644 index 00000000..356debdc --- /dev/null +++ b/mpiwrapper/mpiwrapper.F90 @@ -0,0 +1,1493 @@ +#include "mpiwrapper.h" + +! Work around a bug in MPICH 4.1.4 +#ifndef HAVE_FORTRAN_MPI_SESSION_NULL +! This is only valid for MPICH +#define MPI_SESSION_NULL 939524096 +#endif + +module mpiwrapper + ! use mpi + implicit none + include "mpif.h" + include "mpiabif_constants.h" + + public + private :: assert + +#ifndef HAVE_FORTRAN_DECLARATION_MPI_AINT_ADD + integer(MPI_ADDRESS_KIND), external :: MPI_Aint_add +#endif +#ifndef HAVE_FORTRAN_DECLARATION_MPI_AINT_DIFF + integer(MPI_ADDRESS_KIND), external :: MPI_Aint_diff +#endif + + integer, parameter :: MAX_RESERVED_HANDLE = int(b'111111111111') + +contains + + ! Error handling + + subroutine assert(cond) + logical, intent(in) :: cond + integer ierror + if (cond) return + write(0, '("Assertion failure")') + call MPI_Abort(MPI_COMM_SELF, 1, ierror) + stop + end subroutine assert + + ! Conversions between MPI and MPIABI + + logical function handle_is_reserved(abi_handle) + integer, intent(in) :: abi_handle + handle_is_reserved = abi_handle <= MAX_RESERVED_HANDLE + end function handle_is_reserved + integer function abi2mpi_unreserved(abi_handle) + integer, intent(in) :: abi_handle + integer mpi_handle + call assert(.not.handle_is_reserved(abi_handle)) + mpi_handle = abi_handle - (MAX_RESERVED_HANDLE + 1) + abi2mpi_unreserved = mpi_handle + end function abi2mpi_unreserved + integer function mpi2abi_unreserved(mpi_handle) + integer, intent(in) :: mpi_handle + integer abi_handle + abi_handle = mpi_handle + (MAX_RESERVED_HANDLE + 1) + call assert(.not.handle_is_reserved(abi_handle)) + mpi2abi_unreserved = abi_handle + end function mpi2abi_unreserved + + ! Translate integers + + integer(MPI_ADDRESS_KIND) function abi2mpi_address(address) + integer(MPIABI_ADDRESS_KIND), intent(in) :: address + abi2mpi_address = address + end function abi2mpi_address + + integer(MPIABI_ADDRESS_KIND) function mpi2abi_address(address) + integer(MPI_ADDRESS_KIND), intent(in) :: address + mpi2abi_address = address + end function mpi2abi_address + + integer(MPI_COUNT_KIND) function abi2mpi_count(count) + integer(MPIABI_COUNT_KIND), intent(in) :: count + abi2mpi_count = count + end function abi2mpi_count + + integer(MPIABI_COUNT_KIND) function mpi2abi_count(count) + integer(MPI_COUNT_KIND), intent(in) :: count + mpi2abi_count = count + end function mpi2abi_count + + integer(MPI_OFFSET_KIND) function abi2mpi_offset(offset) + integer(MPIABI_OFFSET_KIND), intent(in) :: offset + abi2mpi_offset = offset + end function abi2mpi_offset + + integer(MPIABI_OFFSET_KIND) function mpi2abi_offset(offset) + integer(MPI_OFFSET_KIND), intent(in) :: offset + mpi2abi_offset = offset + end function mpi2abi_offset + + ! Translate (non-handle) integers + + integer function mpi2abi_combiner(combiner) + integer, intent(in) :: combiner + select case (combiner) + case (MPI_COMBINER_CONTIGUOUS) + mpi2abi_combiner = MPIABI_COMBINER_CONTIGUOUS + case (MPI_COMBINER_DARRAY) + mpi2abi_combiner = MPIABI_COMBINER_DARRAY + case (MPI_COMBINER_DUP) + mpi2abi_combiner = MPIABI_COMBINER_DUP + case (MPI_COMBINER_F90_COMPLEX) + mpi2abi_combiner = MPIABI_COMBINER_F90_COMPLEX + case (MPI_COMBINER_F90_INTEGER) + mpi2abi_combiner = MPIABI_COMBINER_F90_INTEGER + case (MPI_COMBINER_F90_REAL) + mpi2abi_combiner = MPIABI_COMBINER_F90_REAL + case (MPI_COMBINER_HINDEXED) + mpi2abi_combiner = MPIABI_COMBINER_HINDEXED + case (MPI_COMBINER_HVECTOR) + mpi2abi_combiner = MPIABI_COMBINER_HVECTOR + case (MPI_COMBINER_INDEXED_BLOCK) + mpi2abi_combiner = MPIABI_COMBINER_INDEXED_BLOCK + case (MPI_COMBINER_HINDEXED_BLOCK) + mpi2abi_combiner = MPIABI_COMBINER_HINDEXED_BLOCK + case (MPI_COMBINER_INDEXED) + mpi2abi_combiner = MPIABI_COMBINER_INDEXED + case (MPI_COMBINER_NAMED) + mpi2abi_combiner = MPIABI_COMBINER_NAMED + case (MPI_COMBINER_RESIZED) + mpi2abi_combiner = MPIABI_COMBINER_RESIZED + case (MPI_COMBINER_STRUCT) + mpi2abi_combiner = MPIABI_COMBINER_STRUCT + case (MPI_COMBINER_SUBARRAY) + mpi2abi_combiner = MPIABI_COMBINER_SUBARRAY + case (MPI_COMBINER_VECTOR) + mpi2abi_combiner = MPIABI_COMBINER_VECTOR + case default + call assert(.false.) + end select + end function mpi2abi_combiner + + integer function abi2mpi_distrib(distrib) + integer, intent(in) :: distrib + select case (distrib) + case (MPIABI_DISTRIBUTE_BLOCK) + abi2mpi_distrib = MPI_DISTRIBUTE_BLOCK + case (MPIABI_DISTRIBUTE_CYCLIC) + abi2mpi_distrib = MPI_DISTRIBUTE_CYCLIC + case (MPIABI_DISTRIBUTE_NONE) + abi2mpi_distrib = MPI_DISTRIBUTE_NONE + case default + call assert(.false.) + end select + end function abi2mpi_distrib + + elemental integer function abi2mpi_errorcode(errorcode) + integer, intent(in) :: errorcode + ! Fast path + if (errorcode == MPIABI_SUCCESS) then + abi2mpi_errorcode = MPIABI_SUCCESS + return + end if + select case (errorcode) + case (MPI_ERR_ACCESS) + abi2mpi_errorcode = MPIABI_ERR_ACCESS + case (MPI_ERR_AMODE) + abi2mpi_errorcode = MPIABI_ERR_AMODE + case (MPI_ERR_ARG) + abi2mpi_errorcode = MPIABI_ERR_ARG + case (MPI_ERR_ASSERT) + abi2mpi_errorcode = MPIABI_ERR_ASSERT + case (MPI_ERR_BAD_FILE) + abi2mpi_errorcode = MPIABI_ERR_BAD_FILE + case (MPI_ERR_BASE) + abi2mpi_errorcode = MPIABI_ERR_BASE + case (MPI_ERR_BUFFER) + abi2mpi_errorcode = MPIABI_ERR_BUFFER + case (MPI_ERR_COMM) + abi2mpi_errorcode = MPIABI_ERR_COMM + case (MPI_ERR_CONVERSION) + abi2mpi_errorcode = MPIABI_ERR_CONVERSION + case (MPI_ERR_COUNT) + abi2mpi_errorcode = MPIABI_ERR_COUNT + case (MPI_ERR_DIMS) + abi2mpi_errorcode = MPIABI_ERR_DIMS + case (MPI_ERR_DISP) + abi2mpi_errorcode = MPIABI_ERR_DISP + case (MPI_ERR_DUP_DATAREP) + abi2mpi_errorcode = MPIABI_ERR_DUP_DATAREP + case (MPI_ERR_FILE) + abi2mpi_errorcode = MPIABI_ERR_FILE + case (MPI_ERR_FILE_EXISTS) + abi2mpi_errorcode = MPIABI_ERR_FILE_EXISTS + case (MPI_ERR_FILE_IN_USE) + abi2mpi_errorcode = MPIABI_ERR_FILE_IN_USE + case (MPI_ERR_GROUP) + abi2mpi_errorcode = MPIABI_ERR_GROUP + case (MPI_ERR_INFO) + abi2mpi_errorcode = MPIABI_ERR_INFO + case (MPI_ERR_INFO_KEY) + abi2mpi_errorcode = MPIABI_ERR_INFO_KEY + case (MPI_ERR_INFO_NOKEY) + abi2mpi_errorcode = MPIABI_ERR_INFO_NOKEY + case (MPI_ERR_INFO_VALUE) + abi2mpi_errorcode = MPIABI_ERR_INFO_VALUE + case (MPI_ERR_INTERN) + abi2mpi_errorcode = MPIABI_ERR_INTERN + case (MPI_ERR_IN_STATUS) + abi2mpi_errorcode = MPIABI_ERR_IN_STATUS + case (MPI_ERR_IO) + abi2mpi_errorcode = MPIABI_ERR_IO + case (MPI_ERR_KEYVAL) + abi2mpi_errorcode = MPIABI_ERR_KEYVAL + case (MPI_ERR_LOCKTYPE) + abi2mpi_errorcode = MPIABI_ERR_LOCKTYPE + case (MPI_ERR_NAME) + abi2mpi_errorcode = MPIABI_ERR_NAME + case (MPI_ERR_NOT_SAME) + abi2mpi_errorcode = MPIABI_ERR_NOT_SAME + case (MPI_ERR_NO_MEM) + abi2mpi_errorcode = MPIABI_ERR_NO_MEM + case (MPI_ERR_NO_SPACE) + abi2mpi_errorcode = MPIABI_ERR_NO_SPACE + case (MPI_ERR_NO_SUCH_FILE) + abi2mpi_errorcode = MPIABI_ERR_NO_SUCH_FILE + case (MPI_ERR_OP) + abi2mpi_errorcode = MPIABI_ERR_OP + case (MPI_ERR_OTHER) + abi2mpi_errorcode = MPIABI_ERR_OTHER + case (MPI_ERR_PENDING) + abi2mpi_errorcode = MPIABI_ERR_PENDING + case (MPI_ERR_PORT) + abi2mpi_errorcode = MPIABI_ERR_PORT +#if MPI_VERSION_NUMBER >= 400 + case (MPI_ERR_PROC_ABORTED) + abi2mpi_errorcode = MPIABI_ERR_PROC_ABORTED +#endif + case (MPI_ERR_QUOTA) + abi2mpi_errorcode = MPIABI_ERR_QUOTA + case (MPI_ERR_RANK) + abi2mpi_errorcode = MPIABI_ERR_RANK + case (MPI_ERR_READ_ONLY) + abi2mpi_errorcode = MPIABI_ERR_READ_ONLY + case (MPI_ERR_REQUEST) + abi2mpi_errorcode = MPIABI_ERR_REQUEST + case (MPI_ERR_RMA_ATTACH) + abi2mpi_errorcode = MPIABI_ERR_RMA_ATTACH + case (MPI_ERR_RMA_CONFLICT) + abi2mpi_errorcode = MPIABI_ERR_RMA_CONFLICT + case (MPI_ERR_RMA_FLAVOR) + abi2mpi_errorcode = MPIABI_ERR_RMA_FLAVOR + case (MPI_ERR_RMA_RANGE) + abi2mpi_errorcode = MPIABI_ERR_RMA_RANGE + case (MPI_ERR_RMA_SHARED) + abi2mpi_errorcode = MPIABI_ERR_RMA_SHARED + case (MPI_ERR_RMA_SYNC) + abi2mpi_errorcode = MPIABI_ERR_RMA_SYNC + case (MPI_ERR_ROOT) + abi2mpi_errorcode = MPIABI_ERR_ROOT + case (MPI_ERR_SERVICE) + abi2mpi_errorcode = MPIABI_ERR_SERVICE +#if MPI_VERSION_NUMBER >= 400 + case (MPI_ERR_SESSION) + abi2mpi_errorcode = MPIABI_ERR_SESSION +#endif + case (MPI_ERR_SIZE) + abi2mpi_errorcode = MPIABI_ERR_SIZE + case (MPI_ERR_SPAWN) + abi2mpi_errorcode = MPIABI_ERR_SPAWN + case (MPI_ERR_TAG) + abi2mpi_errorcode = MPIABI_ERR_TAG + case (MPI_ERR_TOPOLOGY) + abi2mpi_errorcode = MPIABI_ERR_TOPOLOGY + case (MPI_ERR_TRUNCATE) + abi2mpi_errorcode = MPIABI_ERR_TRUNCATE + case (MPI_ERR_TYPE) + abi2mpi_errorcode = MPIABI_ERR_TYPE + case (MPI_ERR_UNKNOWN) + abi2mpi_errorcode = MPIABI_ERR_UNKNOWN + case (MPI_ERR_UNSUPPORTED_DATAREP) + abi2mpi_errorcode = MPIABI_ERR_UNSUPPORTED_DATAREP + case (MPI_ERR_UNSUPPORTED_OPERATION) + abi2mpi_errorcode = MPIABI_ERR_UNSUPPORTED_OPERATION +#if MPI_VERSION_NUMBER >= 400 + case (MPI_ERR_VALUE_TOO_LARGE) + abi2mpi_errorcode = MPIABI_ERR_VALUE_TOO_LARGE +#endif + case (MPI_ERR_WIN) + abi2mpi_errorcode = MPIABI_ERR_WIN + case default + !/ unknown error code + ! call assert(.false.) + abi2mpi_errorcode = errorcode + end select + end function abi2mpi_errorcode + + elemental integer function mpi2abi_errorcode(errorcode) + integer, intent(in) :: errorcode + ! Fast path + if (errorcode == MPI_SUCCESS) then + mpi2abi_errorcode = MPIABI_SUCCESS + return + end if + select case (errorcode) + case (MPIABI_ERR_ACCESS) + mpi2abi_errorcode = MPI_ERR_ACCESS + case (MPIABI_ERR_AMODE) + mpi2abi_errorcode = MPI_ERR_AMODE + case (MPIABI_ERR_ARG) + mpi2abi_errorcode = MPI_ERR_ARG + case (MPIABI_ERR_ASSERT) + mpi2abi_errorcode = MPI_ERR_ASSERT + case (MPIABI_ERR_BAD_FILE) + mpi2abi_errorcode = MPI_ERR_BAD_FILE + case (MPIABI_ERR_BASE) + mpi2abi_errorcode = MPI_ERR_BASE + case (MPIABI_ERR_BUFFER) + mpi2abi_errorcode = MPI_ERR_BUFFER + case (MPIABI_ERR_COMM) + mpi2abi_errorcode = MPI_ERR_COMM + case (MPIABI_ERR_CONVERSION) + mpi2abi_errorcode = MPI_ERR_CONVERSION + case (MPIABI_ERR_COUNT) + mpi2abi_errorcode = MPI_ERR_COUNT + case (MPIABI_ERR_DIMS) + mpi2abi_errorcode = MPI_ERR_DIMS + case (MPIABI_ERR_DISP) + mpi2abi_errorcode = MPI_ERR_DISP + case (MPIABI_ERR_DUP_DATAREP) + mpi2abi_errorcode = MPI_ERR_DUP_DATAREP + case (MPIABI_ERR_FILE) + mpi2abi_errorcode = MPI_ERR_FILE + case (MPIABI_ERR_FILE_EXISTS) + mpi2abi_errorcode = MPI_ERR_FILE_EXISTS + case (MPIABI_ERR_FILE_IN_USE) + mpi2abi_errorcode = MPI_ERR_FILE_IN_USE + case (MPIABI_ERR_GROUP) + mpi2abi_errorcode = MPI_ERR_GROUP + case (MPIABI_ERR_INFO) + mpi2abi_errorcode = MPI_ERR_INFO + case (MPIABI_ERR_INFO_KEY) + mpi2abi_errorcode = MPI_ERR_INFO_KEY + case (MPIABI_ERR_INFO_NOKEY) + mpi2abi_errorcode = MPI_ERR_INFO_NOKEY + case (MPIABI_ERR_INFO_VALUE) + mpi2abi_errorcode = MPI_ERR_INFO_VALUE + case (MPIABI_ERR_INTERN) + mpi2abi_errorcode = MPI_ERR_INTERN + case (MPIABI_ERR_IN_STATUS) + mpi2abi_errorcode = MPI_ERR_IN_STATUS + case (MPIABI_ERR_IO) + mpi2abi_errorcode = MPI_ERR_IO + case (MPIABI_ERR_KEYVAL) + mpi2abi_errorcode = MPI_ERR_KEYVAL + case (MPIABI_ERR_LOCKTYPE) + mpi2abi_errorcode = MPI_ERR_LOCKTYPE + case (MPIABI_ERR_NAME) + mpi2abi_errorcode = MPI_ERR_NAME + case (MPIABI_ERR_NOT_SAME) + mpi2abi_errorcode = MPI_ERR_NOT_SAME + case (MPIABI_ERR_NO_MEM) + mpi2abi_errorcode = MPI_ERR_NO_MEM + case (MPIABI_ERR_NO_SPACE) + mpi2abi_errorcode = MPI_ERR_NO_SPACE + case (MPIABI_ERR_NO_SUCH_FILE) + mpi2abi_errorcode = MPI_ERR_NO_SUCH_FILE + case (MPIABI_ERR_OP) + mpi2abi_errorcode = MPI_ERR_OP + case (MPIABI_ERR_OTHER) + mpi2abi_errorcode = MPI_ERR_OTHER + case (MPIABI_ERR_PENDING) + mpi2abi_errorcode = MPI_ERR_PENDING + case (MPIABI_ERR_PORT) + mpi2abi_errorcode = MPI_ERR_PORT +#if MPI_VERSION_NUMBER >= 400 + case (MPIABI_ERR_PROC_ABORTED) + mpi2abi_errorcode = MPI_ERR_PROC_ABORTED +#endif + case (MPIABI_ERR_QUOTA) + mpi2abi_errorcode = MPI_ERR_QUOTA + case (MPIABI_ERR_RANK) + mpi2abi_errorcode = MPI_ERR_RANK + case (MPIABI_ERR_READ_ONLY) + mpi2abi_errorcode = MPI_ERR_READ_ONLY + case (MPIABI_ERR_REQUEST) + mpi2abi_errorcode = MPI_ERR_REQUEST + case (MPIABI_ERR_RMA_ATTACH) + mpi2abi_errorcode = MPI_ERR_RMA_ATTACH + case (MPIABI_ERR_RMA_CONFLICT) + mpi2abi_errorcode = MPI_ERR_RMA_CONFLICT + case (MPIABI_ERR_RMA_FLAVOR) + mpi2abi_errorcode = MPI_ERR_RMA_FLAVOR + case (MPIABI_ERR_RMA_RANGE) + mpi2abi_errorcode = MPI_ERR_RMA_RANGE + case (MPIABI_ERR_RMA_SHARED) + mpi2abi_errorcode = MPI_ERR_RMA_SHARED + case (MPIABI_ERR_RMA_SYNC) + mpi2abi_errorcode = MPI_ERR_RMA_SYNC + case (MPIABI_ERR_ROOT) + mpi2abi_errorcode = MPI_ERR_ROOT + case (MPIABI_ERR_SERVICE) + mpi2abi_errorcode = MPI_ERR_SERVICE +#if MPI_VERSION_NUMBER >= 400 + case (MPIABI_ERR_SESSION) + mpi2abi_errorcode = MPI_ERR_SESSION +#endif + case (MPIABI_ERR_SIZE) + mpi2abi_errorcode = MPI_ERR_SIZE + case (MPIABI_ERR_SPAWN) + mpi2abi_errorcode = MPI_ERR_SPAWN + case (MPIABI_ERR_TAG) + mpi2abi_errorcode = MPI_ERR_TAG + case (MPIABI_ERR_TOPOLOGY) + mpi2abi_errorcode = MPI_ERR_TOPOLOGY + case (MPIABI_ERR_TRUNCATE) + mpi2abi_errorcode = MPI_ERR_TRUNCATE + case (MPIABI_ERR_TYPE) + mpi2abi_errorcode = MPI_ERR_TYPE + case (MPIABI_ERR_UNKNOWN) + mpi2abi_errorcode = MPI_ERR_UNKNOWN + case (MPIABI_ERR_UNSUPPORTED_DATAREP) + mpi2abi_errorcode = MPI_ERR_UNSUPPORTED_DATAREP + case (MPIABI_ERR_UNSUPPORTED_OPERATION) + mpi2abi_errorcode = MPI_ERR_UNSUPPORTED_OPERATION +#if MPI_VERSION_NUMBER >= 400 + case (MPIABI_ERR_VALUE_TOO_LARGE) + mpi2abi_errorcode = MPI_ERR_VALUE_TOO_LARGE +#endif + case (MPIABI_ERR_WIN) + mpi2abi_errorcode = MPI_ERR_WIN + case default + !/ unknown error code + ! call assert(.false.) + mpi2abi_errorcode = errorcode + end select + end function mpi2abi_errorcode + + integer function abi2mpi_maybe_undefined(maybe_undefined) + integer, intent(in) :: maybe_undefined + select case (maybe_undefined) + case (MPIABI_UNDEFINED) + abi2mpi_maybe_undefined = MPI_UNDEFINED + case default + abi2mpi_maybe_undefined = maybe_undefined + end select + end function abi2mpi_maybe_undefined + + integer function mpi2abi_maybe_undefined(maybe_undefined) + integer, intent(in) :: maybe_undefined + select case (maybe_undefined) + case (MPI_UNDEFINED) + mpi2abi_maybe_undefined = MPIABI_UNDEFINED + case default + mpi2abi_maybe_undefined = maybe_undefined + end select + end function mpi2abi_maybe_undefined + + integer function abi2mpi_order(order) + integer, intent(in) :: order + select case (order) + case (MPIABI_ORDER_C) + abi2mpi_order = MPI_ORDER_C + case (MPIABI_ORDER_Fortran) + abi2mpi_order = MPI_ORDER_Fortran + case default + call assert(.false.) + end select + end function abi2mpi_order + + integer function mpi2abi_order(order) + integer, intent(in) :: order + select case (order) + case (MPI_ORDER_C) + mpi2abi_order = MPIABI_ORDER_C + case (MPI_ORDER_Fortran) + mpi2abi_order = MPIABI_ORDER_Fortran + case default + call assert(.false.) + end select + end function mpi2abi_order + + integer function abi2mpi_proc(proc) + integer, intent(in) :: proc + select case (proc) + case (MPIABI_ANY_SOURCE) + abi2mpi_proc = MPI_ANY_SOURCE + case (MPIABI_PROC_NULL) + abi2mpi_proc = MPI_PROC_NULL + case default + call assert(proc >= 0) + abi2mpi_proc = proc + end select + end function abi2mpi_proc + + integer function mpi2abi_proc(proc) + integer, intent(in) :: proc + select case (proc) + case (MPI_ANY_SOURCE) + mpi2abi_proc = MPIABI_ANY_SOURCE + case (MPI_PROC_NULL) + mpi2abi_proc = MPIABI_PROC_NULL + case default + call assert(proc >= 0) + mpi2abi_proc = proc + end select + end function mpi2abi_proc + + elemental integer function abi2mpi_root(root) + integer, intent(in) :: root + select case (root) + case (MPIABI_ROOT) + abi2mpi_root = MPI_ROOT + case default + abi2mpi_root = root + end select + end function abi2mpi_root + + elemental integer function abi2mpi_source(source) + integer, intent(in) :: source + select case (source) + case (MPIABI_ANY_SOURCE) + abi2mpi_source = MPI_ANY_SOURCE + case default + abi2mpi_source = source + end select + end function abi2mpi_source + + elemental integer function abi2mpi_tag(tag) + integer, intent(in) ::tag + select case (tag) + case (MPIABI_ANY_TAG) + abi2mpi_tag = MPI_ANY_TAG + case default + abi2mpi_tag = tag + end select + end function abi2mpi_tag + + elemental integer function mpi2abi_tag(tag) + integer, intent(in) ::tag + select case (tag) + case (MPI_ANY_TAG) + mpi2abi_tag = MPIABI_ANY_TAG + case default + mpi2abi_tag = tag + end select + end function mpi2abi_tag + + integer function abi2mpi_threadlevel(threadlevel) + integer, intent(in) ::threadlevel + select case (threadlevel) + case (MPIABI_THREAD_FUNNELED) + abi2mpi_threadlevel = MPI_THREAD_FUNNELED + case (MPIABI_THREAD_MULTIPLE) + abi2mpi_threadlevel = MPI_THREAD_MULTIPLE + case (MPIABI_THREAD_SERIALIZED) + abi2mpi_threadlevel = MPI_THREAD_SERIALIZED + case (MPIABI_THREAD_SINGLE) + abi2mpi_threadlevel = MPI_THREAD_SINGLE + case default + call assert(.false.) + end select + end function abi2mpi_threadlevel + + integer function mpi2abi_threadlevel(threadlevel) + integer, intent(in) ::threadlevel + select case (threadlevel) + case (MPI_THREAD_FUNNELED) + mpi2abi_threadlevel = MPIABI_THREAD_FUNNELED + case (MPI_THREAD_MULTIPLE) + mpi2abi_threadlevel = MPIABI_THREAD_MULTIPLE + case (MPI_THREAD_SERIALIZED) + mpi2abi_threadlevel = MPIABI_THREAD_SERIALIZED + case (MPI_THREAD_SINGLE) + mpi2abi_threadlevel = MPIABI_THREAD_SINGLE + case default + call assert(.false.) + end select + end function mpi2abi_threadlevel + + ! Translate addresses + + integer(MPI_ADDRESS_KIND) function abi2mpi_argv_ptr(argv_ptr) + integer(MPIABI_ADDRESS_KIND), intent(in) :: argv_ptr + if (argv_ptr == loc(MPIABI_ARGV_NULL)) then + abi2mpi_argv_ptr = loc(MPI_ARGV_NULL) + return + end if + abi2mpi_argv_ptr = argv_ptr + end function abi2mpi_argv_ptr + + integer(MPI_ADDRESS_KIND) function abi2mpi_argvs_ptr(argvs_ptr) + integer(MPIABI_ADDRESS_KIND), intent(in) :: argvs_ptr + if (argvs_ptr == loc(MPIABI_ARGVS_NULL)) then + abi2mpi_argvs_ptr = loc(MPI_ARGVS_NULL) + return + end if + abi2mpi_argvs_ptr = argvs_ptr + end function abi2mpi_argvs_ptr + + integer(MPI_ADDRESS_KIND) function abi2mpi_buffer_ptr(buffer_ptr) + integer(MPIABI_ADDRESS_KIND), intent(in) :: buffer_ptr + if (buffer_ptr == loc(MPIABI_IN_PLACE)) then + abi2mpi_buffer_ptr = loc(MPI_IN_PLACE) + return + end if + abi2mpi_buffer_ptr = buffer_ptr + end function abi2mpi_buffer_ptr + + integer(MPIABI_ADDRESS_KIND) function mpi2abi_buffer_ptr(buffer_ptr) + integer(MPI_ADDRESS_KIND), intent(in) :: buffer_ptr + if (buffer_ptr == loc(MPI_IN_PLACE)) then + mpi2abi_buffer_ptr = loc(MPIABI_IN_PLACE) + return + end if + mpi2abi_buffer_ptr = buffer_ptr + end function mpi2abi_buffer_ptr + + integer(MPI_ADDRESS_KIND) function abi2mpi_weight_ptr(weight_ptr) + integer(MPIABI_ADDRESS_KIND), intent(in) :: weight_ptr + if (weight_ptr == loc(MPIABI_UNWEIGHTED)) then + abi2mpi_weight_ptr = loc(MPI_UNWEIGHTED) + return + end if + if (weight_ptr == loc(MPIABI_WEIGHTS_EMPTY)) then + abi2mpi_weight_ptr = loc(MPI_WEIGHTS_EMPTY) + return + end if + abi2mpi_weight_ptr = weight_ptr + end function abi2mpi_weight_ptr + + integer(MPIABI_ADDRESS_KIND) function mpi2abi_weight_ptr(weight_ptr) + integer(MPI_ADDRESS_KIND), intent(in) :: weight_ptr + if (weight_ptr == loc(MPI_UNWEIGHTED)) then + mpi2abi_weight_ptr = loc(MPIABI_UNWEIGHTED) + return + end if + if (weight_ptr == loc(MPI_WEIGHTS_EMPTY)) then + mpi2abi_weight_ptr = loc(MPIABI_WEIGHTS_EMPTY) + return + end if + mpi2abi_weight_ptr = weight_ptr + end function mpi2abi_weight_ptr + + ! Translate handles + + integer function abi2mpi_comm(comm) + integer, intent(in) :: comm + if (.not.handle_is_reserved(comm)) then + abi2mpi_comm = abi2mpi_unreserved(comm) + return + end if + select case (comm) + case (MPIABI_COMM_NULL) + abi2mpi_comm = MPI_COMM_NULL + case (MPIABI_COMM_SELF) + abi2mpi_comm = MPI_COMM_SELF + case (MPIABI_COMM_WORLD) + abi2mpi_comm = MPI_COMM_WORLD + case default + call assert(.false.) + end select + end function abi2mpi_comm + + integer function mpi2abi_comm(comm) + integer, intent(in) :: comm + select case (comm) + case (MPI_COMM_NULL) + mpi2abi_comm = MPIABI_COMM_NULL + case (MPI_COMM_SELF) + mpi2abi_comm = MPIABI_COMM_SELF + case (MPI_COMM_WORLD) + mpi2abi_comm = MPIABI_COMM_WORLD + case default + mpi2abi_comm = mpi2abi_unreserved(comm) + end select + end function mpi2abi_comm + + integer function abi2mpi_datatype(datatype) + integer, intent(in) :: datatype + if (.not.handle_is_reserved(datatype)) then + abi2mpi_datatype = abi2mpi_unreserved(datatype) + return + end if + select case (datatype) + case (MPIABI_DATATYPE_NULL) + abi2mpi_datatype = MPI_DATATYPE_NULL + ! [C types] + case (MPIABI_CHAR) + abi2mpi_datatype = MPI_CHAR + case (MPIABI_SHORT) + abi2mpi_datatype = MPI_SHORT + case (MPIABI_INT) + abi2mpi_datatype = MPI_INT + case (MPIABI_LONG) + abi2mpi_datatype = MPI_LONG + case (MPIABI_LONG_LONG_INT) + abi2mpi_datatype = MPI_LONG_LONG_INT + ! case (MPIABI_LONG_LONG) + ! abi2mpi_datatype = MPI_LONG_LONG + case (MPIABI_SIGNED_CHAR) + abi2mpi_datatype = MPI_SIGNED_CHAR + case (MPIABI_UNSIGNED_CHAR) + abi2mpi_datatype = MPI_UNSIGNED_CHAR + case (MPIABI_UNSIGNED_SHORT) + abi2mpi_datatype = MPI_UNSIGNED_SHORT + case (MPIABI_UNSIGNED) + abi2mpi_datatype = MPI_UNSIGNED + case (MPIABI_UNSIGNED_LONG) + abi2mpi_datatype = MPI_UNSIGNED_LONG + case (MPIABI_UNSIGNED_LONG_LONG) + abi2mpi_datatype = MPI_UNSIGNED_LONG_LONG + case (MPIABI_FLOAT) + abi2mpi_datatype = MPI_FLOAT + case (MPIABI_DOUBLE) + abi2mpi_datatype = MPI_DOUBLE + case (MPIABI_LONG_DOUBLE) + abi2mpi_datatype = MPI_LONG_DOUBLE + case (MPIABI_WCHAR) + abi2mpi_datatype = MPI_WCHAR + case (MPIABI_C_BOOL) + abi2mpi_datatype = MPI_C_BOOL + case (MPIABI_INT8_T) + abi2mpi_datatype = MPI_INT8_T + case (MPIABI_INT16_T) + abi2mpi_datatype = MPI_INT16_T + case (MPIABI_INT32_T) + abi2mpi_datatype = MPI_INT32_T + case (MPIABI_INT64_T) + abi2mpi_datatype = MPI_INT64_T + case (MPIABI_UINT8_T) + abi2mpi_datatype = MPI_UINT8_T + case (MPIABI_UINT16_T) + abi2mpi_datatype = MPI_UINT16_T + case (MPIABI_UINT32_T) + abi2mpi_datatype = MPI_UINT32_T + case (MPIABI_UINT64_T) + abi2mpi_datatype = MPI_UINT64_T + case (MPIABI_AINT) + abi2mpi_datatype = MPI_AINT + case (MPIABI_COUNT) + abi2mpi_datatype = MPI_COUNT + case (MPIABI_OFFSET) + abi2mpi_datatype = MPI_OFFSET + case (MPIABI_C_COMPLEX) + abi2mpi_datatype = MPI_C_COMPLEX + ! case (MPIABI_C_FLOAT_COMPLEX) + ! abi2mpi_datatype = MPI_C_FLOAT_COMPLEX + case (MPIABI_C_DOUBLE_COMPLEX) + abi2mpi_datatype = MPI_C_DOUBLE_COMPLEX + case (MPIABI_C_LONG_DOUBLE_COMPLEX) + abi2mpi_datatype = MPI_C_LONG_DOUBLE_COMPLEX + case (MPIABI_BYTE) + abi2mpi_datatype = MPI_BYTE + case (MPIABI_PACKED) + abi2mpi_datatype = MPI_PACKED + ! [Fortran types] + case (MPIABI_INTEGER) + abi2mpi_datatype = MPI_INTEGER + case (MPIABI_REAL) + abi2mpi_datatype = MPI_REAL + case (MPIABI_DOUBLE_PRECISION) + abi2mpi_datatype = MPI_DOUBLE_PRECISION + case (MPIABI_COMPLEX) + abi2mpi_datatype = MPI_COMPLEX + case (MPIABI_LOGICAL) + abi2mpi_datatype = MPI_LOGICAL + case (MPIABI_CHARACTER) + abi2mpi_datatype = MPI_CHARACTER + ! [C++ types] + case (MPIABI_CXX_BOOL) + abi2mpi_datatype = MPI_CXX_BOOL + case (MPIABI_CXX_FLOAT_COMPLEX) + abi2mpi_datatype = MPI_CXX_FLOAT_COMPLEX + case (MPIABI_CXX_DOUBLE_COMPLEX) + abi2mpi_datatype = MPI_CXX_DOUBLE_COMPLEX + case (MPIABI_CXX_LONG_DOUBLE_COMPLEX) + abi2mpi_datatype = MPI_CXX_LONG_DOUBLE_COMPLEX + ! [Optional datatypes (Fortran)] + case (MPIABI_DOUBLE_COMPLEX) + abi2mpi_datatype = MPI_DOUBLE_COMPLEX +#ifdef HAVE_MPI_INTEGER1 + case (MPIABI_INTEGER1) + abi2mpi_datatype = MPI_INTEGER1 +#endif +#ifdef HAVE_MPI_INTEGER2 + case (MPIABI_INTEGER2) + abi2mpi_datatype = MPI_INTEGER2 +#endif +#ifdef HAVE_MPI_INTEGER4 + case (MPIABI_INTEGER4) + abi2mpi_datatype = MPI_INTEGER4 +#endif +#ifdef HAVE_MPI_INTEGER8 + case (MPIABI_INTEGER8) + abi2mpi_datatype = MPI_INTEGER8 +#endif +#ifdef HAVE_MPI_INTEGER16 + case (MPIABI_INTEGER16) + abi2mpi_datatype = MPI_INTEGER16 +#endif +#ifdef HAVE_MPI_REAL2 + case (MPIABI_REAL2) + abi2mpi_datatype = MPI_REAL2 +#endif +#ifdef HAVE_MPI_REAL4 + case (MPIABI_REAL4) + abi2mpi_datatype = MPI_REAL4 +#endif +#ifdef HAVE_MPI_REAL8 + case (MPIABI_REAL8) + abi2mpi_datatype = MPI_REAL8 +#endif +#ifdef HAVE_MPI_REAL16 + case (MPIABI_REAL16) + abi2mpi_datatype = MPI_REAL16 +#endif +#ifdef HAVE_MPI_COMPLEX2 + case (MPIABI_COMPLEX2) + abi2mpi_datatype = MPI_COMPLEX2 +#endif +#ifdef HAVE_MPI_COMPLEX4 + case (MPIABI_COMPLEX4) + abi2mpi_datatype = MPI_COMPLEX4 +#endif +#ifdef HAVE_MPI_COMPLEX8 + case (MPIABI_COMPLEX8) + abi2mpi_datatype = MPI_COMPLEX8 +#endif +#ifdef HAVE_MPI_COMPLEX16 + case (MPIABI_COMPLEX16) + abi2mpi_datatype = MPI_COMPLEX16 +#endif +#ifdef HAVE_MPI_COMPLEX32 + case (MPIABI_COMPLEX32) + abi2mpi_datatype = MPI_COMPLEX32 +#endif + ! [Extensions] +#ifdef HAVE_MPI_REAL1 + case (MPIABI_REAL1) + abi2mpi_datatype = MPI_REAL1 +#endif +#ifdef HAVE_MPI_LOGICAL1 + case (MPIABI_LOGICAL1) + abi2mpi_datatype = MPI_LOGICAL1 +#endif +#ifdef HAVE_MPI_LOGICAL2 + case (MPIABI_LOGICAL2) + abi2mpi_datatype = MPI_LOGICAL2 +#endif +#ifdef HAVE_MPI_LOGICAL4 + case (MPIABI_LOGICAL4) + abi2mpi_datatype = MPI_LOGICAL4 +#endif +#ifdef HAVE_MPI_LOGICAL8 + case (MPIABI_LOGICAL8) + abi2mpi_datatype = MPI_LOGICAL8 +#endif +#ifdef HAVE_MPI_LOGICAL16 + case (MPIABI_LOGICAL16) + abi2mpi_datatype = MPI_LOGICAL8 +#endif + ! [Datatypes for reduction functions (C)] + case (MPIABI_FLOAT_INT) + abi2mpi_datatype = MPI_FLOAT_INT + case (MPIABI_DOUBLE_INT) + abi2mpi_datatype = MPI_DOUBLE_INT + case (MPIABI_LONG_INT) + abi2mpi_datatype = MPI_LONG_INT + case (MPIABI_2INT) + abi2mpi_datatype = MPI_2INT + case (MPIABI_SHORT_INT) + abi2mpi_datatype = MPI_SHORT_INT + case (MPIABI_LONG_DOUBLE_INT) + abi2mpi_datatype = MPI_LONG_DOUBLE_INT + ! [Datatypes for reduction functions (Fortran)] + case (MPIABI_2REAL) + abi2mpi_datatype = MPI_2REAL + case (MPIABI_2DOUBLE_PRECISION) + abi2mpi_datatype = MPI_2DOUBLE_PRECISION + case (MPIABI_2INTEGER) + abi2mpi_datatype = MPI_2INTEGER + ! [Removed constructs] +#ifdef HAVE_MPI_LB + case (MPIABI_LB) + abi2mpi_datatype = MPI_LB +#endif +#ifdef HAVE_MPI_UB + case (MPIABI_UB) + abi2mpi_datatype = MPI_UB +#endif + case default + call assert(.false.) + end select + end function abi2mpi_datatype + + integer function mpi2abi_datatype(datatype) + integer, intent(in) :: datatype + select case (datatype) + case (MPI_DATATYPE_NULL) + mpi2abi_datatype = MPIABI_DATATYPE_NULL + ! [C types] + case (MPI_CHAR) + mpi2abi_datatype = MPIABI_CHAR + case (MPI_SHORT) + mpi2abi_datatype = MPIABI_SHORT + case (MPI_INT) + mpi2abi_datatype = MPIABI_INT + case (MPI_LONG) + mpi2abi_datatype = MPIABI_LONG + case (MPI_LONG_LONG_INT) + mpi2abi_datatype = MPIABI_LONG_LONG_INT + ! case (MPI_LONG_LONG) + ! mpi2abi_datatype = MPIABI_LONG_LONG + case (MPI_SIGNED_CHAR) + mpi2abi_datatype = MPIABI_SIGNED_CHAR + case (MPI_UNSIGNED_CHAR) + mpi2abi_datatype = MPIABI_UNSIGNED_CHAR + case (MPI_UNSIGNED_SHORT) + mpi2abi_datatype = MPIABI_UNSIGNED_SHORT + case (MPI_UNSIGNED) + mpi2abi_datatype = MPIABI_UNSIGNED + case (MPI_UNSIGNED_LONG) + mpi2abi_datatype = MPIABI_UNSIGNED_LONG + case (MPI_UNSIGNED_LONG_LONG) + mpi2abi_datatype = MPIABI_UNSIGNED_LONG_LONG + case (MPI_FLOAT) + mpi2abi_datatype = MPIABI_FLOAT + case (MPI_DOUBLE) + mpi2abi_datatype = MPIABI_DOUBLE + case (MPI_LONG_DOUBLE) + mpi2abi_datatype = MPIABI_LONG_DOUBLE + case (MPI_WCHAR) + mpi2abi_datatype = MPIABI_WCHAR + case (MPI_C_BOOL) + mpi2abi_datatype = MPIABI_C_BOOL + case (MPI_INT8_T) + mpi2abi_datatype = MPIABI_INT8_T + case (MPI_INT16_T) + mpi2abi_datatype = MPIABI_INT16_T + case (MPI_INT32_T) + mpi2abi_datatype = MPIABI_INT32_T + case (MPI_INT64_T) + mpi2abi_datatype = MPIABI_INT64_T + case (MPI_UINT8_T) + mpi2abi_datatype = MPIABI_UINT8_T + case (MPI_UINT16_T) + mpi2abi_datatype = MPIABI_UINT16_T + case (MPI_UINT32_T) + mpi2abi_datatype = MPIABI_UINT32_T + case (MPI_UINT64_T) + mpi2abi_datatype = MPIABI_UINT64_T + case (MPI_AINT) + mpi2abi_datatype = MPIABI_AINT + case (MPI_COUNT) + mpi2abi_datatype = MPIABI_COUNT + case (MPI_OFFSET) + mpi2abi_datatype = MPIABI_OFFSET + case (MPI_C_COMPLEX) + mpi2abi_datatype = MPIABI_C_COMPLEX + ! case (MPI_C_FLOAT_COMPLEX) + ! mpi2abi_datatype = MPIABI_C_FLOAT_COMPLEX + case (MPI_C_DOUBLE_COMPLEX) + mpi2abi_datatype = MPIABI_C_DOUBLE_COMPLEX + case (MPI_C_LONG_DOUBLE_COMPLEX) + mpi2abi_datatype = MPIABI_C_LONG_DOUBLE_COMPLEX + case (MPI_BYTE) + mpi2abi_datatype = MPIABI_BYTE + case (MPI_PACKED) + mpi2abi_datatype = MPIABI_PACKED + ! [Fortran types] + case (MPI_INTEGER) + mpi2abi_datatype = MPIABI_INTEGER + case (MPI_REAL) + mpi2abi_datatype = MPIABI_REAL + case (MPI_DOUBLE_PRECISION) + mpi2abi_datatype = MPIABI_DOUBLE_PRECISION + case (MPI_COMPLEX) + mpi2abi_datatype = MPIABI_COMPLEX + case (MPI_LOGICAL) + mpi2abi_datatype = MPIABI_LOGICAL + case (MPI_CHARACTER) + mpi2abi_datatype = MPIABI_CHARACTER + ! [C++ types] + case (MPI_CXX_BOOL) + mpi2abi_datatype = MPIABI_CXX_BOOL + case (MPI_CXX_FLOAT_COMPLEX) + mpi2abi_datatype = MPIABI_CXX_FLOAT_COMPLEX + case (MPI_CXX_DOUBLE_COMPLEX) + mpi2abi_datatype = MPIABI_CXX_DOUBLE_COMPLEX + case (MPI_CXX_LONG_DOUBLE_COMPLEX) + mpi2abi_datatype = MPIABI_CXX_LONG_DOUBLE_COMPLEX + ! [Optional datatypes (Fortran)] + case (MPI_DOUBLE_COMPLEX) + mpi2abi_datatype = MPIABI_DOUBLE_COMPLEX +#ifdef HAVE_USABLE_MPI_INTEGER1 + case (MPI_INTEGER1) + mpi2abi_datatype = MPIABI_INTEGER1 +#endif +#ifdef HAVE_USABLE_MPI_INTEGER2 + case (MPI_INTEGER2) + mpi2abi_datatype = MPIABI_INTEGER2 +#endif +#ifdef HAVE_USABLE_MPI_INTEGER4 + case (MPI_INTEGER4) + mpi2abi_datatype = MPIABI_INTEGER4 +#endif +#ifdef HAVE_USABLE_MPI_INTEGER8 + case (MPI_INTEGER8) + mpi2abi_datatype = MPIABI_INTEGER8 +#endif +#ifdef HAVE_USABLE_MPI_INTEGER16 + case (MPI_INTEGER16) + mpi2abi_datatype = MPIABI_INTEGER16 +#endif +#ifdef HAVE_USABLE_MPI_REAL2 + case (MPI_REAL2) + mpi2abi_datatype = MPIABI_REAL2 +#endif +#ifdef HAVE_USABLE_MPI_REAL4 + case (MPI_REAL4) + mpi2abi_datatype = MPIABI_REAL4 +#endif +#ifdef HAVE_USABLE_MPI_REAL8 + case (MPI_REAL8) + mpi2abi_datatype = MPIABI_REAL8 +#endif +#ifdef HAVE_USABLE_MPI_REAL16 + case (MPI_REAL16) + mpi2abi_datatype = MPIABI_REAL16 +#endif +#ifdef HAVE_USABLE_MPI_COMPLEX2 + case (MPI_COMPLEX2) + mpi2abi_datatype = MPIABI_COMPLEX2 +#endif +#ifdef HAVE_USABLE_MPI_COMPLEX4 + case (MPI_COMPLEX4) + mpi2abi_datatype = MPIABI_COMPLEX4 +#endif +#ifdef HAVE_USABLE_MPI_COMPLEX8 + case (MPI_COMPLEX8) + mpi2abi_datatype = MPIABI_COMPLEX8 +#endif +#ifdef HAVE_USABLE_MPI_COMPLEX16 + case (MPI_COMPLEX16) + mpi2abi_datatype = MPIABI_COMPLEX16 +#endif +#ifdef HAVE_USABLE_MPI_COMPLEX32 + case (MPI_COMPLEX32) + mpi2abi_datatype = MPIABI_COMPLEX32 +#endif + ! [Extensions] +#ifdef HAVE_USABLE_MPI_REAL1 + case (MPI_REAL1) + mpi2abi_datatype = MPIABI_REAL1 +#endif +#ifdef HAVE_USABLE_MPI_LOGICAL1 + case (MPI_LOGICAL1) + mpi2abi_datatype = MPIABI_LOGICAL1 +#endif +#ifdef HAVE_USABLE_MPI_LOGICAL2 + case (MPI_LOGICAL2) + mpi2abi_datatype = MPIABI_LOGICAL2 +#endif +#ifdef HAVE_USABLE_MPI_LOGICAL4 + case (MPI_LOGICAL4) + mpi2abi_datatype = MPIABI_LOGICAL4 +#endif +#ifdef HAVE_USABLE_MPI_LOGICAL8 + case (MPI_LOGICAL8) + mpi2abi_datatype = MPIABI_LOGICAL8 +#endif +#ifdef HAVE_USABLE_MPI_LOGICAL16 + case (MPI_LOGICAL16) + mpi2abi_datatype = MPIABI_LOGICAL16 +#endif + ! [Datatypes for reduction functions (C)] + case (MPI_FLOAT_INT) + mpi2abi_datatype = MPIABI_FLOAT_INT + case (MPI_DOUBLE_INT) + mpi2abi_datatype = MPIABI_DOUBLE_INT + case (MPI_LONG_INT) + mpi2abi_datatype = MPIABI_LONG_INT + case (MPI_2INT) + mpi2abi_datatype = MPIABI_2INT + case (MPI_SHORT_INT) + mpi2abi_datatype = MPIABI_SHORT_INT + case (MPI_LONG_DOUBLE_INT) + mpi2abi_datatype = MPIABI_LONG_DOUBLE_INT + ! [Datatypes for reduction functions (Fortran)] + case (MPI_2REAL) + mpi2abi_datatype = MPIABI_2REAL + case (MPI_2DOUBLE_PRECISION) + mpi2abi_datatype = MPIABI_2DOUBLE_PRECISION + case (MPI_2INTEGER) + mpi2abi_datatype = MPIABI_2INTEGER + ! [Removed constructs] +#ifdef HAVE_MPI_LB + case (MPI_LB) + mpi2abi_datatype = MPIABI_LB +#endif +#ifdef HAVE_MPI_UB + case (MPI_UB) + mpi2abi_datatype = MPIABI_UB +#endif + case default + mpi2abi_datatype = mpi2abi_unreserved(datatype) + end select + end function mpi2abi_datatype + + integer function abi2mpi_errhandler(errhandler) + integer, intent(in) :: errhandler + if (.not.handle_is_reserved(errhandler)) then + abi2mpi_errhandler = abi2mpi_unreserved(errhandler) + return + end if + select case (errhandler) + case (MPIABI_ERRHANDLER_NULL) + abi2mpi_errhandler = MPI_ERRHANDLER_NULL +#if MPI_VERSION_NUMBER >= 400 + case (MPIABI_ERRORS_ABORT) + abi2mpi_errhandler = MPI_ERRORS_ABORT +#endif + case (MPIABI_ERRORS_ARE_FATAL) + abi2mpi_errhandler = MPI_ERRORS_ARE_FATAL + case (MPIABI_ERRORS_RETURN) + abi2mpi_errhandler = MPI_ERRORS_RETURN + case default + call assert(.false.) + end select + end function abi2mpi_errhandler + + integer function mpi2abi_errhandler(errhandler) + integer, intent(in) :: errhandler + select case (errhandler) + case (MPI_ERRHANDLER_NULL) + mpi2abi_errhandler = MPIABI_ERRHANDLER_NULL +#if MPI_VERSION_NUMBER >= 400 + case (MPI_ERRORS_ABORT) + mpi2abi_errhandler = MPIABI_ERRORS_ABORT +#endif + case (MPI_ERRORS_ARE_FATAL) + mpi2abi_errhandler = MPIABI_ERRORS_ARE_FATAL + case (MPI_ERRORS_RETURN) + mpi2abi_errhandler = MPIABI_ERRORS_RETURN + case default + mpi2abi_errhandler = mpi2abi_unreserved(errhandler) + end select + end function mpi2abi_errhandler + + integer function abi2mpi_file(file) + integer, intent(in) :: file + if (.not.handle_is_reserved(file)) then + abi2mpi_file = abi2mpi_unreserved(file) + return + end if + select case (file) + case (MPIABI_FILE_NULL) + abi2mpi_file = MPI_FILE_NULL + case default + call assert(.false.) + end select + end function abi2mpi_file + + integer function mpi2abi_file(file) + integer, intent(in) :: file + select case (file) + case (MPI_FILE_NULL) + mpi2abi_file = MPIABI_FILE_NULL + case default + mpi2abi_file = mpi2abi_unreserved(file) + end select + end function mpi2abi_file + + integer function abi2mpi_group(group) + integer, intent(in) :: group + if (.not.handle_is_reserved(group)) then + abi2mpi_group = abi2mpi_unreserved(group) + return + end if + select case (group) + case (MPIABI_GROUP_EMPTY) + abi2mpi_group = MPI_GROUP_EMPTY + case (MPIABI_GROUP_NULL) + abi2mpi_group = MPI_GROUP_NULL + case default + call assert(.false.) + end select + end function abi2mpi_group + + integer function mpi2abi_group(group) + integer, intent(in) :: group + select case (group) + case (MPI_GROUP_EMPTY) + mpi2abi_group = MPIABI_GROUP_EMPTY + case (MPI_GROUP_NULL) + mpi2abi_group = MPIABI_GROUP_NULL + case default + mpi2abi_group = mpi2abi_unreserved(group) + end select + end function mpi2abi_group + + integer function abi2mpi_info(info) + integer, intent(in) :: info + if (.not.handle_is_reserved(info)) then + abi2mpi_info = abi2mpi_unreserved(info) + return + end if + select case (info) + case (MPIABI_INFO_ENV) + abi2mpi_info = MPI_INFO_ENV + case (MPIABI_INFO_NULL) + abi2mpi_info = MPI_INFO_NULL + case default + call assert(.false.) + end select + end function abi2mpi_info + + integer function mpi2abi_info(info) + integer, intent(in) :: info + select case (info) + case (MPI_INFO_ENV) + mpi2abi_info = MPIABI_INFO_ENV + case (MPI_INFO_NULL) + mpi2abi_info = MPIABI_INFO_NULL + case default + mpi2abi_info = mpi2abi_unreserved(info) + end select + end function mpi2abi_info + + integer function abi2mpi_message(message) + integer, intent(in) :: message + select case (message) + case (MPIABI_MESSAGE_NO_PROC) + abi2mpi_message = MPI_MESSAGE_NO_PROC + case (MPIABI_MESSAGE_NULL) + abi2mpi_message = MPI_MESSAGE_NULL + case default + abi2mpi_message = abi2mpi_unreserved(message) + end select + end function abi2mpi_message + + integer function mpi2abi_message(message) + integer, intent(in) :: message + select case (message) + case (MPI_MESSAGE_NO_PROC) + mpi2abi_message = MPIABI_MESSAGE_NO_PROC + case (MPI_MESSAGE_NULL) + mpi2abi_message = MPIABI_MESSAGE_NULL + case default + mpi2abi_message = mpi2abi_unreserved(message) + end select + end function mpi2abi_message + + integer function abi2mpi_op(op) + integer, intent(in) :: op + if (.not.handle_is_reserved(op)) then + abi2mpi_op = abi2mpi_unreserved(op) + return + end if + select case (op) + case (MPIABI_OP_NULL) + abi2mpi_op = MPI_OP_NULL + case (MPIABI_MAX) + abi2mpi_op = MPI_MAX + case (MPIABI_MIN) + abi2mpi_op = MPI_MIN + case (MPIABI_SUM) + abi2mpi_op = MPI_SUM + case (MPIABI_PROD) + abi2mpi_op = MPI_PROD + case (MPIABI_MAXLOC) + abi2mpi_op = MPI_MAXLOC + case (MPIABI_MINLOC) + abi2mpi_op = MPI_MINLOC + case (MPIABI_BAND) + abi2mpi_op = MPI_BAND + case (MPIABI_BOR) + abi2mpi_op = MPI_BOR + case (MPIABI_BXOR) + abi2mpi_op = MPI_BXOR + case (MPIABI_LAND) + abi2mpi_op = MPI_LAND + case (MPIABI_LOR) + abi2mpi_op = MPI_LOR + case (MPIABI_LXOR) + abi2mpi_op = MPI_LXOR + case (MPIABI_REPLACE) + abi2mpi_op = MPI_REPLACE + case (MPIABI_NO_OP) + abi2mpi_op = MPI_NO_OP + case default + call assert(.false.) + end select + end function abi2mpi_op + + integer function mpi2abi_op(op) + integer, intent(in) :: op + select case (op) + case (MPI_OP_NULL) + mpi2abi_op = MPIABI_OP_NULL + case (MPI_MAX) + mpi2abi_op = MPIABI_MAX + case (MPI_MIN) + mpi2abi_op = MPIABI_MIN + case (MPI_SUM) + mpi2abi_op = MPIABI_SUM + case (MPI_PROD) + mpi2abi_op = MPIABI_PROD + case (MPI_MAXLOC) + mpi2abi_op = MPIABI_MAXLOC + case (MPI_MINLOC) + mpi2abi_op = MPIABI_MINLOC + case (MPI_BAND) + mpi2abi_op = MPIABI_BAND + case (MPI_BOR) + mpi2abi_op = MPIABI_BOR + case (MPI_BXOR) + mpi2abi_op = MPIABI_BXOR + case (MPI_LAND) + mpi2abi_op = MPIABI_LAND + case (MPI_LOR) + mpi2abi_op = MPIABI_LOR + case (MPI_LXOR) + mpi2abi_op = MPIABI_LXOR + case (MPI_REPLACE) + mpi2abi_op = MPIABI_REPLACE + case (MPI_NO_OP) + mpi2abi_op = MPIABI_NO_OP + case default + mpi2abi_op = mpi2abi_unreserved(op) + end select + end function mpi2abi_op + + integer function abi2mpi_request(request) + integer, intent(in) :: request + if (.not.handle_is_reserved(request)) then + abi2mpi_request = abi2mpi_unreserved(request) + return + end if + select case (request) + case (MPI_REQUEST_NULL) + abi2mpi_request = MPIABI_REQUEST_NULL + case default + call assert(.false.) + end select + end function abi2mpi_request + + elemental integer function mpi2abi_request(request) + integer, intent(in) :: request + if (request == MPIABI_REQUEST_NULL) then + mpi2abi_request = MPI_REQUEST_NULL + return + end if + mpi2abi_request = request + end function mpi2abi_request + + integer function abi2mpi_session(session) + integer, intent(in) :: session + if (.not.handle_is_reserved(session)) then + abi2mpi_session = abi2mpi_unreserved(session) + return + end if + select case (session) + case (MPIABI_SESSION_NULL) + abi2mpi_session = MPI_SESSION_NULL + case default + call assert(.false.) + end select + end function abi2mpi_session + + integer function mpi2abi_session(session) + integer, intent(in) :: session + select case (session) + case (MPI_SESSION_NULL) + mpi2abi_session = MPIABI_SESSION_NULL + case default + mpi2abi_session = mpi2abi_unreserved(session) + end select + end function mpi2abi_session + + integer function abi2mpi_win(win) + integer, intent(in) :: win + if (.not.handle_is_reserved(win)) then + abi2mpi_win = abi2mpi_unreserved(win) + return + end if + select case (win) + case (MPIABI_WIN_NULL) + abi2mpi_win = MPI_WIN_NULL + case default + call assert(.false.) + end select + end function abi2mpi_win + + integer function mpi2abi_win(win) + integer, intent(in) :: win + select case (win) + case (MPI_WIN_NULL) + mpi2abi_win = MPIABI_WIN_NULL + case default + mpi2abi_win = mpi2abi_unreserved(win) + end select + end function mpi2abi_win + + ! Translate statuses + + subroutine abi2mpi_status(abi_status, mpi_status) + integer, intent(in) :: abi_status(MPIABI_STATUS_SIZE) + integer, intent(out) :: mpi_status(MPI_STATUS_SIZE) + integer :: src, dest + mpi_status(MPI_SOURCE) = abi_status(MPIABI_SOURCE) + mpi_status(MPI_TAG) = abi_status(MPIABI_TAG) + mpi_status(MPI_ERROR) = abi_status(MPIABI_ERROR) + src = 4 + do dest = 1, MPI_STATUS_SIZE + if (src /= MPI_SOURCE .and. src /= MPI_TAG .and. src /= MPI_ERROR) then + mpi_status(dest) = abi_status(src) + src = src + 1 + end if + end do + end subroutine abi2mpi_status + + subroutine mpi2abi_status(mpi_status, abi_status) + integer, intent(in) :: mpi_status(MPI_STATUS_SIZE) + integer, intent(out) :: abi_status(MPIABI_STATUS_SIZE) + integer :: src, dest + abi_status(MPIABI_SOURCE) = mpi_status(MPI_SOURCE) + abi_status(MPIABI_TAG) = mpi_status(MPI_TAG) + abi_status(MPIABI_ERROR) = mpi_status(MPI_ERROR) + dest = 4 + do src = 1, MPI_STATUS_SIZE + if (src /= MPI_SOURCE .and. src /= MPI_TAG .and. src /= MPI_ERROR) then + abi_status(dest) = mpi_status(src) + dest = dest + 1 + end if + end do + end subroutine mpi2abi_status + + integer(MPI_ADDRESS_KIND) function abi2mpi_status_ptr_uninitialized(abi_status, mpi_status_storage) + integer, intent(in) :: abi_status(MPIABI_STATUS_SIZE) + integer, intent(out) :: mpi_status_storage(MPI_STATUS_SIZE) + if (loc(abi_status) == loc(MPIABI_STATUS_IGNORE)) then + abi2mpi_status_ptr_uninitialized = loc(MPI_STATUS_IGNORE) + else + abi2mpi_status_ptr_uninitialized = loc(mpi_status_storage) + end if + end function abi2mpi_status_ptr_uninitialized + + integer(MPI_ADDRESS_KIND) function abi2mpi_status_ptr(abi_status, mpi_status_storage) + integer, intent(in) :: abi_status(MPIABI_STATUS_SIZE) + integer, intent(out) :: mpi_status_storage(MPI_STATUS_SIZE) + if (loc(abi_status) == loc(MPIABI_STATUS_IGNORE)) then + abi2mpi_status_ptr = loc(MPI_STATUS_IGNORE) + else + abi2mpi_status_ptr = loc(mpi_status_storage) + call abi2mpi_status(abi_status, mpi_status_storage) + end if + end function abi2mpi_status_ptr + + subroutine mpi2abi_status_ptr(mpi_status, abi_status) + integer, intent(in) :: mpi_status(MPI_STATUS_SIZE) + integer, intent(out) :: abi_status(MPIABI_STATUS_SIZE) + if (loc(abi_status) == loc(MPIABI_STATUS_IGNORE)) return + call mpi2abi_status(mpi_status, abi_status) + end subroutine mpi2abi_status_ptr + + integer(MPI_ADDRESS_KIND) function abi2mpi_statuses_ptr_uninitialized(abi_status, mpi_status_storage, count) + integer, intent(in) :: count + integer, intent(in) :: abi_status(MPIABI_STATUS_SIZE, count) + integer, intent(out) :: mpi_status_storage(MPI_STATUS_SIZE, count) + if (loc(abi_status) == loc(MPIABI_STATUSES_IGNORE)) then + abi2mpi_statuses_ptr_uninitialized = loc(MPI_STATUSES_IGNORE) + else + abi2mpi_statuses_ptr_uninitialized = loc(mpi_status_storage) + end if + end function abi2mpi_statuses_ptr_uninitialized + + ! integer(MPI_ADDRESS_KIND) function abi2mpi_statuses_ptr(abi_status, mpi_status_storage) + ! integer, intent(in) :: abi_status(MPIABI_STATUS_SIZE) + ! integer, intent(out) :: mpi_status_storage(MPI_STATUS_SIZE) + ! if (loc(abi_status) == loc(MPIABI_STATUS_IGNORE)) then + ! abi2mpi_status_ptr = loc(MPI_STATUS_IGNORE) + ! else + ! abi2mpi_status_ptr = loc(mpi_status_storage) + ! call abi2mpi_status(abi_status, mpi_status_storage) + ! end if + ! end function abi2mpi_status_ptr + + subroutine mpi2abi_statuses_ptr(mpi_status, abi_status, count) + integer, intent(in) :: count + integer, intent(in) :: mpi_status(MPI_STATUS_SIZE, count) + integer, intent(out) :: abi_status(MPIABI_STATUS_SIZE, count) + integer n + if (loc(abi_status) == loc(MPIABI_STATUS_IGNORE)) return + do n = 1, count + call mpi2abi_status(mpi_status(:, n), abi_status(:, n)) + end do + end subroutine mpi2abi_statuses_ptr + +end module mpiwrapper diff --git a/mpiwrapper/mpiwrapper.c b/mpiwrapper/mpiwrapper.c new file mode 100644 index 00000000..d00e3514 --- /dev/null +++ b/mpiwrapper/mpiwrapper.c @@ -0,0 +1,8589 @@ +#include "mpiwrapper.h" + +#include + +#include +#ifdef HAVE_MPI_EXT_H +#include +#endif + +#include + +#include +#include +#include +#include +#include +#include +#include + +//////////////////////////////////////////////////////////////////////////////// + +#define MPI_VERSION_NUMBER (100 * MPI_VERSION + MPI_SUBVERSION) + +// #if MPI_VERSION_NUMBER >= 400 +// // All is fine +// #else +// #error "MPItrampoline requires at least MPI standard 4.0" +// #endif + +// Fake MPI 4 support, just enough to make the compiler happy + +#ifndef HAVE_MPI_BUFFER_AUTOMATIC +#define MPI_BUFFER_AUTOMATIC MPIABI_BUFFER_AUTOMATIC +#endif + +#ifndef HAVE_MPI_COMM_TYPE_HW_GUIDED +#define MPI_COMM_TYPE_HW_GUIDED MPIABI_COMM_TYPE_HW_GUIDED +#endif + +#ifndef HAVE_MPI_COMM_TYPE_HW_UNGUIDED +#define MPI_COMM_TYPE_HW_UNGUIDED MPIABI_COMM_TYPE_HW_UNGUIDED +#endif + +#ifndef HAVE_MPI_COMM_TYPE_RESOURCE_GUIDED +#define MPI_COMM_TYPE_RESOURCE_GUIDED MPIABI_COMM_TYPE_RESOURCE_GUIDED +#endif + +#ifndef HAVE_SIZEOF_MPI_SESSION +#define MPI_Session MPI_Comm +#define MPI_SESSION_NULL MPI_COMM_NULL +#endif + +#ifndef HAVE_SIZEOF_MPI_USER_FUNCTION_C +#define MPI_User_function_c MPI_User_function +#endif + +//////////////////////////////////////////////////////////////////////////////// + +// Consistency checks + +#if SIZEOF_MPI_AINT == SIZEOF_PTRDIFF_T +_Static_assert(sizeof(MPI_Aint) == sizeof(MPIABI_Aint), ""); +#endif + +#if SIZEOF_MPI_COUNT == SIZEOF_PTRDIFF_T +_Static_assert(sizeof(MPI_Count) == sizeof(MPIABI_Count), ""); +#endif + +#if SIZEOF_MPI_OFFSET == SIZEOF_PTRDIFF_T +_Static_assert(sizeof(MPI_Offset) == sizeof(MPIABI_Offset), ""); +#endif + +// Version numbers + +const int mpiwrapper_version_major = MPIWRAPPER_VERSION_MAJOR; +const int mpiwrapper_version_minor = MPIWRAPPER_VERSION_MINOR; +const int mpiwrapper_version_patch = MPIWRAPPER_VERSION_PATCH; + +const char *const mpiwrapper_version = MPIWRAPPER_VERSION; + +const int mpiabi_version_major = MPIABI_VERSION_MAJOR; +const int mpiabi_version_minor = MPIABI_VERSION_MINOR; +const int mpiabi_version_patch = MPIABI_VERSION_PATCH; + +// Conversions between MPI and MPIABI + +// We do not translate `MPI_BOTTOM`. We assume this constant is zero +// in all implementations. +_Static_assert((uintptr_t)MPI_BOTTOM == 0, ""); +// We do not translate `MPI_ARGVS_NULL` nor `MPI_ARGV_NULL`. We assume +// these constants are zero in all implementations. +_Static_assert((uintptr_t)MPIABI_ARGVS_NULL == 0, ""); +_Static_assert((uintptr_t)MPIABI_ARGV_NULL == 0, ""); + +#define MAX_RESERVED_HANDLE 0b111111111111 +static inline bool handle_is_reserved(uintptr_t abi_handle) { + return abi_handle <= MAX_RESERVED_HANDLE; +} +static inline uintptr_t abi2mpi_unreserved(uintptr_t abi_handle) { + assert(!handle_is_reserved(abi_handle)); + uintptr_t mpi_handle = abi_handle - (MAX_RESERVED_HANDLE + 1); + return mpi_handle; +} +static inline uintptr_t mpi2abi_unreserved(uintptr_t mpi_handle) { + uintptr_t abi_handle = mpi_handle + (MAX_RESERVED_HANDLE + 1); + assert(!handle_is_reserved(abi_handle)); + return abi_handle; +} + +static int mpi2abi_combiner(int combiner) { + switch (combiner) { + case MPI_COMBINER_CONTIGUOUS: + return MPIABI_COMBINER_CONTIGUOUS; + case MPI_COMBINER_DARRAY: + return MPIABI_COMBINER_DARRAY; + case MPI_COMBINER_DUP: + return MPIABI_COMBINER_DUP; + case MPI_COMBINER_F90_COMPLEX: + return MPIABI_COMBINER_F90_COMPLEX; + case MPI_COMBINER_F90_INTEGER: + return MPIABI_COMBINER_F90_INTEGER; + case MPI_COMBINER_F90_REAL: + return MPIABI_COMBINER_F90_REAL; + case MPI_COMBINER_HINDEXED: + return MPIABI_COMBINER_HINDEXED; + case MPI_COMBINER_HVECTOR: + return MPIABI_COMBINER_HVECTOR; + case MPI_COMBINER_INDEXED_BLOCK: + return MPIABI_COMBINER_INDEXED_BLOCK; + case MPI_COMBINER_HINDEXED_BLOCK: + return MPIABI_COMBINER_HINDEXED_BLOCK; + case MPI_COMBINER_INDEXED: + return MPIABI_COMBINER_INDEXED; + case MPI_COMBINER_NAMED: + return MPIABI_COMBINER_NAMED; + case MPI_COMBINER_RESIZED: + return MPIABI_COMBINER_RESIZED; + case MPI_COMBINER_STRUCT: + return MPIABI_COMBINER_STRUCT; + case MPI_COMBINER_SUBARRAY: + return MPIABI_COMBINER_SUBARRAY; + case MPI_COMBINER_VECTOR: + return MPIABI_COMBINER_VECTOR; + default: + assert(false); + } +} + +static int mpi2abi_count(int count) { + if (count == MPI_UNDEFINED) + return MPIABI_UNDEFINED; + return count; +} + +static int abi2mpi_distrib(int distrib) { + switch (distrib) { + case MPIABI_DISTRIBUTE_BLOCK: + return MPI_DISTRIBUTE_BLOCK; + case MPIABI_DISTRIBUTE_CYCLIC: + return MPI_DISTRIBUTE_CYCLIC; + case MPIABI_DISTRIBUTE_NONE: + return MPI_DISTRIBUTE_NONE; + default: + assert(false); + } +} + +static int abi2mpi_errorcode(int errorcode) { + // Fast path + if (__builtin_expect(errorcode == MPIABI_SUCCESS, true)) + return MPIABI_SUCCESS; + switch (errorcode) { + case MPIABI_ERR_ACCESS: + return MPI_ERR_ACCESS; + case MPIABI_ERR_AMODE: + return MPI_ERR_AMODE; + case MPIABI_ERR_ARG: + return MPI_ERR_ARG; + case MPIABI_ERR_ASSERT: + return MPI_ERR_ASSERT; + case MPIABI_ERR_BAD_FILE: + return MPI_ERR_BAD_FILE; + case MPIABI_ERR_BASE: + return MPI_ERR_BASE; + case MPIABI_ERR_BUFFER: + return MPI_ERR_BUFFER; + case MPIABI_ERR_COMM: + return MPI_ERR_COMM; + case MPIABI_ERR_CONVERSION: + return MPI_ERR_CONVERSION; + case MPIABI_ERR_COUNT: + return MPI_ERR_COUNT; + case MPIABI_ERR_DIMS: + return MPI_ERR_DIMS; + case MPIABI_ERR_DISP: + return MPI_ERR_DISP; + case MPIABI_ERR_DUP_DATAREP: + return MPI_ERR_DUP_DATAREP; + case MPIABI_ERR_FILE: + return MPI_ERR_FILE; + case MPIABI_ERR_FILE_EXISTS: + return MPI_ERR_FILE_EXISTS; + case MPIABI_ERR_FILE_IN_USE: + return MPI_ERR_FILE_IN_USE; + case MPIABI_ERR_GROUP: + return MPI_ERR_GROUP; + case MPIABI_ERR_INFO: + return MPI_ERR_INFO; + case MPIABI_ERR_INFO_KEY: + return MPI_ERR_INFO_KEY; + case MPIABI_ERR_INFO_NOKEY: + return MPI_ERR_INFO_NOKEY; + case MPIABI_ERR_INFO_VALUE: + return MPI_ERR_INFO_VALUE; + case MPIABI_ERR_INTERN: + return MPI_ERR_INTERN; + case MPIABI_ERR_IN_STATUS: + return MPI_ERR_IN_STATUS; + case MPIABI_ERR_IO: + return MPI_ERR_IO; + case MPIABI_ERR_KEYVAL: + return MPI_ERR_KEYVAL; + case MPIABI_ERR_LOCKTYPE: + return MPI_ERR_LOCKTYPE; + case MPIABI_ERR_NAME: + return MPI_ERR_NAME; + case MPIABI_ERR_NOT_SAME: + return MPI_ERR_NOT_SAME; + case MPIABI_ERR_NO_MEM: + return MPI_ERR_NO_MEM; + case MPIABI_ERR_NO_SPACE: + return MPI_ERR_NO_SPACE; + case MPIABI_ERR_NO_SUCH_FILE: + return MPI_ERR_NO_SUCH_FILE; + case MPIABI_ERR_OP: + return MPI_ERR_OP; + case MPIABI_ERR_OTHER: + return MPI_ERR_OTHER; + case MPIABI_ERR_PENDING: + return MPI_ERR_PENDING; + case MPIABI_ERR_PORT: + return MPI_ERR_PORT; + case MPIABI_ERR_PROC_ABORTED: +#if MPI_VERSION_NUMBER >= 400 + return MPI_ERR_PROC_ABORTED; +#else + assert(false); +#endif + case MPIABI_ERR_QUOTA: + return MPI_ERR_QUOTA; + case MPIABI_ERR_RANK: + return MPI_ERR_RANK; + case MPIABI_ERR_READ_ONLY: + return MPI_ERR_READ_ONLY; + case MPIABI_ERR_REQUEST: + return MPI_ERR_REQUEST; + case MPIABI_ERR_RMA_ATTACH: + return MPI_ERR_RMA_ATTACH; + case MPIABI_ERR_RMA_CONFLICT: + return MPI_ERR_RMA_CONFLICT; + case MPIABI_ERR_RMA_FLAVOR: + return MPI_ERR_RMA_FLAVOR; + case MPIABI_ERR_RMA_RANGE: + return MPI_ERR_RMA_RANGE; + case MPIABI_ERR_RMA_SHARED: + return MPI_ERR_RMA_SHARED; + case MPIABI_ERR_RMA_SYNC: + return MPI_ERR_RMA_SYNC; + case MPIABI_ERR_ROOT: + return MPI_ERR_ROOT; + case MPIABI_ERR_SERVICE: + return MPI_ERR_SERVICE; + case MPIABI_ERR_SESSION: + // #if MPI_VERSION_NUMBER >= 400 +#ifdef MPI_ERR_SESSION + return MPI_ERR_SESSION; +#else + assert(false); +#endif + case MPIABI_ERR_SIZE: + return MPI_ERR_SIZE; + case MPIABI_ERR_SPAWN: + return MPI_ERR_SPAWN; + case MPIABI_ERR_TAG: + return MPI_ERR_TAG; + case MPIABI_ERR_TOPOLOGY: + return MPI_ERR_TOPOLOGY; + case MPIABI_ERR_TRUNCATE: + return MPI_ERR_TRUNCATE; + case MPIABI_ERR_TYPE: + return MPI_ERR_TYPE; + case MPIABI_ERR_UNKNOWN: + return MPI_ERR_UNKNOWN; + case MPIABI_ERR_UNSUPPORTED_DATAREP: + return MPI_ERR_UNSUPPORTED_DATAREP; + case MPIABI_ERR_UNSUPPORTED_OPERATION: + return MPI_ERR_UNSUPPORTED_OPERATION; + case MPIABI_ERR_VALUE_TOO_LARGE: + // #if MPI_VERSION_NUMBER >= 400 +#ifdef MPI_ERR_VALUE_TOO_LARGE + return MPI_ERR_VALUE_TOO_LARGE; +#else + assert(false); +#endif + case MPIABI_ERR_WIN: + return MPI_ERR_WIN; + default: + // unknown error code + // assert(false); + return errorcode; + } +} + +static int mpi2abi_errorcode(int errorcode) { + // Fast path + if (__builtin_expect(errorcode == MPI_SUCCESS, true)) + return MPIABI_SUCCESS; + switch (errorcode) { + case MPI_ERR_ACCESS: + return MPIABI_ERR_ACCESS; + case MPI_ERR_AMODE: + return MPIABI_ERR_AMODE; + case MPI_ERR_ARG: + return MPIABI_ERR_ARG; + case MPI_ERR_ASSERT: + return MPIABI_ERR_ASSERT; + case MPI_ERR_BAD_FILE: + return MPIABI_ERR_BAD_FILE; + case MPI_ERR_BASE: + return MPIABI_ERR_BASE; + case MPI_ERR_BUFFER: + return MPIABI_ERR_BUFFER; + case MPI_ERR_COMM: + return MPIABI_ERR_COMM; + case MPI_ERR_CONVERSION: + return MPIABI_ERR_CONVERSION; + case MPI_ERR_COUNT: + return MPIABI_ERR_COUNT; + case MPI_ERR_DIMS: + return MPIABI_ERR_DIMS; + case MPI_ERR_DISP: + return MPIABI_ERR_DISP; + case MPI_ERR_DUP_DATAREP: + return MPIABI_ERR_DUP_DATAREP; + case MPI_ERR_FILE: + return MPIABI_ERR_FILE; + case MPI_ERR_FILE_EXISTS: + return MPIABI_ERR_FILE_EXISTS; + case MPI_ERR_FILE_IN_USE: + return MPIABI_ERR_FILE_IN_USE; + case MPI_ERR_GROUP: + return MPIABI_ERR_GROUP; + case MPI_ERR_INFO: + return MPIABI_ERR_INFO; + case MPI_ERR_INFO_KEY: + return MPIABI_ERR_INFO_KEY; + case MPI_ERR_INFO_NOKEY: + return MPIABI_ERR_INFO_NOKEY; + case MPI_ERR_INFO_VALUE: + return MPIABI_ERR_INFO_VALUE; + case MPI_ERR_INTERN: + return MPIABI_ERR_INTERN; + case MPI_ERR_IN_STATUS: + return MPIABI_ERR_IN_STATUS; + case MPI_ERR_IO: + return MPIABI_ERR_IO; + case MPI_ERR_KEYVAL: + return MPIABI_ERR_KEYVAL; + case MPI_ERR_LOCKTYPE: + return MPIABI_ERR_LOCKTYPE; + case MPI_ERR_NAME: + return MPIABI_ERR_NAME; + case MPI_ERR_NOT_SAME: + return MPIABI_ERR_NOT_SAME; + case MPI_ERR_NO_MEM: + return MPIABI_ERR_NO_MEM; + case MPI_ERR_NO_SPACE: + return MPIABI_ERR_NO_SPACE; + case MPI_ERR_NO_SUCH_FILE: + return MPIABI_ERR_NO_SUCH_FILE; + case MPI_ERR_OP: + return MPIABI_ERR_OP; + case MPI_ERR_OTHER: + return MPIABI_ERR_OTHER; + case MPI_ERR_PENDING: + return MPIABI_ERR_PENDING; + case MPI_ERR_PORT: + return MPIABI_ERR_PORT; + // #if MPI_VERSION_NUMBER >= 400 +#ifdef MPI_ERR_PROC_ABORTED + case MPI_ERR_PROC_ABORTED: + return MPIABI_ERR_PROC_ABORTED; +#endif + case MPI_ERR_QUOTA: + return MPIABI_ERR_QUOTA; + case MPI_ERR_RANK: + return MPIABI_ERR_RANK; + case MPI_ERR_READ_ONLY: + return MPIABI_ERR_READ_ONLY; + case MPI_ERR_REQUEST: + return MPIABI_ERR_REQUEST; + case MPI_ERR_RMA_ATTACH: + return MPIABI_ERR_RMA_ATTACH; + case MPI_ERR_RMA_CONFLICT: + return MPIABI_ERR_RMA_CONFLICT; + case MPI_ERR_RMA_FLAVOR: + return MPIABI_ERR_RMA_FLAVOR; + case MPI_ERR_RMA_RANGE: + return MPIABI_ERR_RMA_RANGE; + case MPI_ERR_RMA_SHARED: + return MPIABI_ERR_RMA_SHARED; + case MPI_ERR_RMA_SYNC: + return MPIABI_ERR_RMA_SYNC; + case MPI_ERR_ROOT: + return MPIABI_ERR_ROOT; + case MPI_ERR_SERVICE: + return MPIABI_ERR_SERVICE; + // #if MPI_VERSION_NUMBER >= 400 +#ifdef MPI_ERR_SESSION + case MPI_ERR_SESSION: + return MPIABI_ERR_SESSION; +#endif + case MPI_ERR_SIZE: + return MPIABI_ERR_SIZE; + case MPI_ERR_SPAWN: + return MPIABI_ERR_SPAWN; + case MPI_ERR_TAG: + return MPIABI_ERR_TAG; + case MPI_ERR_TOPOLOGY: + return MPIABI_ERR_TOPOLOGY; + case MPI_ERR_TRUNCATE: + return MPIABI_ERR_TRUNCATE; + case MPI_ERR_TYPE: + return MPIABI_ERR_TYPE; + case MPI_ERR_UNKNOWN: + return MPIABI_ERR_UNKNOWN; + case MPI_ERR_UNSUPPORTED_DATAREP: + return MPIABI_ERR_UNSUPPORTED_DATAREP; + case MPI_ERR_UNSUPPORTED_OPERATION: + return MPIABI_ERR_UNSUPPORTED_OPERATION; +/* #if MPI_VERSION_NUMBER >= 400 */ +#ifdef MPI_ERR_VALUE_TOO_LARGE + case MPI_ERR_VALUE_TOO_LARGE: + return MPIABI_ERR_VALUE_TOO_LARGE; +#endif + case MPI_ERR_WIN: + return MPIABI_ERR_WIN; + default: + // unknown error code + // assert(false); + return errorcode; + } +} + +static int abi2mpi_keyval(int keyval) { + switch (keyval) { + case MPIABI_KEYVAL_INVALID: + return MPI_KEYVAL_INVALID; + case MPIABI_TAG_UB: + return MPI_TAG_UB; + case MPIABI_IO: + return MPI_IO; + case MPIABI_HOST: + return MPI_HOST; + case MPIABI_WTIME_IS_GLOBAL: + return MPI_WTIME_IS_GLOBAL; + case MPIABI_APPNUM: + return MPI_APPNUM; + case MPIABI_LASTUSEDCODE: + return MPI_LASTUSEDCODE; + case MPIABI_UNIVERSE_SIZE: + return MPI_UNIVERSE_SIZE; + case MPIABI_WIN_BASE: + return MPI_WIN_BASE; + case MPIABI_WIN_DISP_UNIT: + return MPI_WIN_DISP_UNIT; + case MPIABI_WIN_SIZE: + return MPI_WIN_SIZE; + case MPIABI_WIN_CREATE_FLAVOR: + return MPI_WIN_CREATE_FLAVOR; + case MPIABI_WIN_MODEL: + return MPI_WIN_MODEL; + default: + return keyval; + } +} + +static int mpi2abi_keyval(int keyval) { + switch (keyval) { + case MPI_KEYVAL_INVALID: + return MPIABI_KEYVAL_INVALID; + case MPI_TAG_UB: + return MPIABI_TAG_UB; + case MPI_IO: + return MPIABI_IO; + case MPI_HOST: + return MPIABI_HOST; + case MPI_WTIME_IS_GLOBAL: + return MPIABI_WTIME_IS_GLOBAL; + case MPI_APPNUM: + return MPIABI_APPNUM; + case MPI_LASTUSEDCODE: + return MPIABI_LASTUSEDCODE; + case MPI_UNIVERSE_SIZE: + return MPIABI_UNIVERSE_SIZE; + case MPI_WIN_BASE: + return MPIABI_WIN_BASE; + case MPI_WIN_DISP_UNIT: + return MPIABI_WIN_DISP_UNIT; + case MPI_WIN_SIZE: + return MPIABI_WIN_SIZE; + case MPI_WIN_CREATE_FLAVOR: + return MPIABI_WIN_CREATE_FLAVOR; + case MPI_WIN_MODEL: + return MPIABI_WIN_MODEL; + default: + return keyval; + } +} + +static int abi2mpi_mode(int abi_mode) { + int mpi_mode = 0; + if (abi_mode & MPIABI_MODE_APPEND) + mpi_mode |= MPI_MODE_APPEND; + if (abi_mode & MPIABI_MODE_CREATE) + mpi_mode |= MPI_MODE_CREATE; + if (abi_mode & MPIABI_MODE_DELETE_ON_CLOSE) + mpi_mode |= MPI_MODE_DELETE_ON_CLOSE; + if (abi_mode & MPIABI_MODE_EXCL) + mpi_mode |= MPI_MODE_EXCL; + if (abi_mode & MPIABI_MODE_NOCHECK) + mpi_mode |= MPI_MODE_NOCHECK; + if (abi_mode & MPIABI_MODE_NOPRECEDE) + mpi_mode |= MPI_MODE_NOPRECEDE; + if (abi_mode & MPIABI_MODE_NOPUT) + mpi_mode |= MPI_MODE_NOPUT; + if (abi_mode & MPIABI_MODE_NOSTORE) + mpi_mode |= MPI_MODE_NOSTORE; + if (abi_mode & MPIABI_MODE_NOSUCCEED) + mpi_mode |= MPI_MODE_NOSUCCEED; + if (abi_mode & MPIABI_MODE_RDONLY) + mpi_mode |= MPI_MODE_RDONLY; + if (abi_mode & MPIABI_MODE_RDWR) + mpi_mode |= MPI_MODE_RDWR; + if (abi_mode & MPIABI_MODE_SEQUENTIAL) + mpi_mode |= MPI_MODE_SEQUENTIAL; + if (abi_mode & MPIABI_MODE_UNIQUE_OPEN) + mpi_mode |= MPI_MODE_UNIQUE_OPEN; + if (abi_mode & MPIABI_MODE_WRONLY) + mpi_mode |= MPI_MODE_WRONLY; + return mpi_mode; +} + +static int abi2mpi_order(int order) { + switch (order) { + case MPIABI_ORDER_C: + return MPI_ORDER_C; + case MPIABI_ORDER_FORTRAN: + return MPI_ORDER_FORTRAN; + default: + assert(false); + } +} + +static int abi2mpi_proc(int proc) { + switch (proc) { + case MPIABI_ANY_SOURCE: + return MPI_ANY_SOURCE; + case MPIABI_PROC_NULL: + return MPI_PROC_NULL; + case MPIABI_UNDEFINED: + return MPI_UNDEFINED; + default: + assert(proc >= 0); + return proc; + } +} + +static int mpi2abi_proc(int proc) { + _Static_assert(MPI_ANY_SOURCE != MPI_PROC_NULL, ""); + _Static_assert(MPI_ANY_SOURCE != MPI_UNDEFINED, ""); + _Static_assert(MPI_PROC_NULL != MPI_UNDEFINED, ""); + switch (proc) { + case MPI_ANY_SOURCE: + return MPIABI_ANY_SOURCE; + case MPI_PROC_NULL: + return MPIABI_PROC_NULL; + case MPI_UNDEFINED: + return MPIABI_UNDEFINED; + default: + assert(proc >= 0); + return proc; + } +} + +static int abi2mpi_root(int root) { + switch (root) { + case MPIABI_ROOT: + return MPI_ROOT; + default: + assert(root >= 0); + return root; + } +} + +static int abi2mpi_tag(int tag) { + switch (tag) { + case MPIABI_ANY_TAG: + return MPI_ANY_TAG; + default: + assert(tag >= 0); + return tag; + } +} + +static int mpi2abi_tag(int tag) { + switch (tag) { + case MPI_ANY_TAG: + return MPIABI_ANY_TAG; + default: + assert(tag >= 0); + return tag; + } +} + +static int abi2mpi_threadlevel(int threadlevel) { + switch (threadlevel) { + case MPIABI_THREAD_FUNNELED: + return MPI_THREAD_FUNNELED; + case MPIABI_THREAD_MULTIPLE: + return MPI_THREAD_MULTIPLE; + case MPIABI_THREAD_SERIALIZED: + return MPI_THREAD_SERIALIZED; + case MPIABI_THREAD_SINGLE: + return MPI_THREAD_SINGLE; + default: + assert(false); + } +} + +static int mpi2abi_threadlevel(int threadlevel) { + switch (threadlevel) { + case MPI_THREAD_FUNNELED: + return MPIABI_THREAD_FUNNELED; + case MPI_THREAD_MULTIPLE: + return MPIABI_THREAD_MULTIPLE; + case MPI_THREAD_SERIALIZED: + return MPIABI_THREAD_SERIALIZED; + case MPI_THREAD_SINGLE: + return MPIABI_THREAD_SINGLE; + default: + assert(false); + } +} + +static int abi2mpi_whence(int whence) { + switch (whence) { + case MPIABI_SEEK_CUR: + return MPI_SEEK_CUR; + case MPIABI_SEEK_END: + return MPI_SEEK_END; + case MPIABI_SEEK_SET: + return MPI_SEEK_SET; + default: + assert(false); + } +} + +static const void *abi2mpi_buffer(const void *buffer) { + if (buffer == MPIABI_IN_PLACE) + return MPI_IN_PLACE; + return buffer; +} + +static MPI_Comm abi2mpi_comm(MPIABI_Comm comm) { + if (!handle_is_reserved((uintptr_t)comm)) + return (MPI_Comm)abi2mpi_unreserved((uintptr_t)comm); + switch ((uintptr_t)comm) { + case (uintptr_t)MPIABI_COMM_NULL: + return MPI_COMM_NULL; + case (uintptr_t)MPIABI_COMM_SELF: + return MPI_COMM_SELF; + case (uintptr_t)MPIABI_COMM_WORLD: + return MPI_COMM_WORLD; + default: + assert(false); + } +} + +static MPIABI_Comm mpi2abi_comm(MPI_Comm comm) { + if (comm == MPI_COMM_NULL) + return MPIABI_COMM_NULL; + if (comm == MPI_COMM_SELF) + return MPIABI_COMM_SELF; + if (comm == MPI_COMM_WORLD) + return MPIABI_COMM_WORLD; + return (MPIABI_Comm)mpi2abi_unreserved((uintptr_t)comm); +} + +static MPI_Datatype abi2mpi_datatype(MPIABI_Datatype datatype) { + if (!handle_is_reserved((uintptr_t)datatype)) + return (MPI_Datatype)abi2mpi_unreserved((uintptr_t)datatype); + switch ((uintptr_t)datatype) { + case (uintptr_t)MPIABI_DATATYPE_NULL: + return MPI_DATATYPE_NULL; + // [C types] + case (uintptr_t)MPIABI_CHAR: + return MPI_CHAR; + case (uintptr_t)MPIABI_SHORT: + return MPI_SHORT; + case (uintptr_t)MPIABI_INT: + return MPI_INT; + case (uintptr_t)MPIABI_LONG: + return MPI_LONG; + case (uintptr_t)MPIABI_LONG_LONG_INT: + return MPI_LONG_LONG_INT; + // case (uintptr_t)MPIABI_LONG_LONG: + // return MPI_LONG_LONG; + case (uintptr_t)MPIABI_SIGNED_CHAR: + return MPI_SIGNED_CHAR; + case (uintptr_t)MPIABI_UNSIGNED_CHAR: + return MPI_UNSIGNED_CHAR; + case (uintptr_t)MPIABI_UNSIGNED_SHORT: + return MPI_UNSIGNED_SHORT; + case (uintptr_t)MPIABI_UNSIGNED: + return MPI_UNSIGNED; + case (uintptr_t)MPIABI_UNSIGNED_LONG: + return MPI_UNSIGNED_LONG; + case (uintptr_t)MPIABI_UNSIGNED_LONG_LONG: + return MPI_UNSIGNED_LONG_LONG; + case (uintptr_t)MPIABI_FLOAT: + return MPI_FLOAT; + case (uintptr_t)MPIABI_DOUBLE: + return MPI_DOUBLE; + case (uintptr_t)MPIABI_LONG_DOUBLE: + return MPI_LONG_DOUBLE; + case (uintptr_t)MPIABI_WCHAR: + return MPI_WCHAR; + case (uintptr_t)MPIABI_C_BOOL: + return MPI_C_BOOL; + case (uintptr_t)MPIABI_INT8_T: + return MPI_INT8_T; + case (uintptr_t)MPIABI_INT16_T: + return MPI_INT16_T; + case (uintptr_t)MPIABI_INT32_T: + return MPI_INT32_T; + case (uintptr_t)MPIABI_INT64_T: + return MPI_INT64_T; + case (uintptr_t)MPIABI_UINT8_T: + return MPI_UINT8_T; + case (uintptr_t)MPIABI_UINT16_T: + return MPI_UINT16_T; + case (uintptr_t)MPIABI_UINT32_T: + return MPI_UINT32_T; + case (uintptr_t)MPIABI_UINT64_T: + return MPI_UINT64_T; + case (uintptr_t)MPIABI_AINT: + return MPI_AINT; + case (uintptr_t)MPIABI_COUNT: + return MPI_COUNT; + case (uintptr_t)MPIABI_OFFSET: + return MPI_OFFSET; + case (uintptr_t)MPIABI_C_COMPLEX: + return MPI_C_COMPLEX; + // case (uintptr_t)MPIABI_C_FLOAT_COMPLEX: + // return MPI_C_FLOAT_COMPLEX; + case (uintptr_t)MPIABI_C_DOUBLE_COMPLEX: + return MPI_C_DOUBLE_COMPLEX; + case (uintptr_t)MPIABI_C_LONG_DOUBLE_COMPLEX: + return MPI_C_LONG_DOUBLE_COMPLEX; + case (uintptr_t)MPIABI_BYTE: + return MPI_BYTE; + case (uintptr_t)MPIABI_PACKED: + return MPI_PACKED; + // [Fortran types] + case (uintptr_t)MPIABI_INTEGER: + return MPI_INTEGER; + case (uintptr_t)MPIABI_REAL: + return MPI_REAL; + case (uintptr_t)MPIABI_DOUBLE_PRECISION: + return MPI_DOUBLE_PRECISION; + case (uintptr_t)MPIABI_COMPLEX: + return MPI_COMPLEX; + case (uintptr_t)MPIABI_LOGICAL: + return MPI_LOGICAL; + case (uintptr_t)MPIABI_CHARACTER: + return MPI_CHARACTER; + // [C++ types] + case (uintptr_t)MPIABI_CXX_BOOL: + return MPI_CXX_BOOL; + case (uintptr_t)MPIABI_CXX_FLOAT_COMPLEX: + return MPI_CXX_FLOAT_COMPLEX; + case (uintptr_t)MPIABI_CXX_DOUBLE_COMPLEX: + return MPI_CXX_DOUBLE_COMPLEX; + case (uintptr_t)MPIABI_CXX_LONG_DOUBLE_COMPLEX: + return MPI_CXX_LONG_DOUBLE_COMPLEX; + // [Optional datatypes (Fortran)] + case (uintptr_t)MPIABI_DOUBLE_COMPLEX: + return MPI_DOUBLE_COMPLEX; +#ifdef HAVE_MPI_INTEGER1 + case (uintptr_t)MPIABI_INTEGER1: + return MPI_INTEGER1; +#endif +#ifdef HAVE_MPI_INTEGER2 + case (uintptr_t)MPIABI_INTEGER2: + return MPI_INTEGER2; +#endif +#ifdef HAVE_MPI_INTEGER4 + case (uintptr_t)MPIABI_INTEGER4: + return MPI_INTEGER4; +#endif +#ifdef HAVE_MPI_INTEGER8 + case (uintptr_t)MPIABI_INTEGER8: + return MPI_INTEGER8; +#endif +#ifdef HAVE_MPI_INTEGER16 + case (uintptr_t)MPIABI_INTEGER16: + return MPI_INTEGER16; +#endif +#ifdef HAVE_MPI_REAL2 + case (uintptr_t)MPIABI_REAL2: + return MPI_REAL2; +#endif +#ifdef HAVE_MPI_REAL4 + case (uintptr_t)MPIABI_REAL4: + return MPI_REAL4; +#endif +#ifdef HAVE_MPI_REAL8 + case (uintptr_t)MPIABI_REAL8: + return MPI_REAL8; +#endif +#ifdef HAVE_MPI_REAL16 + case (uintptr_t)MPIABI_REAL16: + return MPI_REAL16; +#endif +#ifdef HAVE_MPI_COMPLEX2 + case (uintptr_t)MPIABI_COMPLEX2: + return MPI_COMPLEX2; +#endif +#ifdef HAVE_MPI_COMPLEX4 + case (uintptr_t)MPIABI_COMPLEX4: + return MPI_COMPLEX4; +#endif +#ifdef HAVE_MPI_COMPLEX8 + case (uintptr_t)MPIABI_COMPLEX8: + return MPI_COMPLEX8; +#endif +#ifdef HAVE_MPI_COMPLEX16 + case (uintptr_t)MPIABI_COMPLEX16: + return MPI_COMPLEX16; +#endif +#ifdef HAVE_MPI_COMPLEX32 + case (uintptr_t)MPIABI_COMPLEX32: + return MPI_COMPLEX32; +#endif + // [Extensions] +#ifdef HAVE_MPI_REAL1 + case (uintptr_t)MPIABI_REAL1: + return MPI_REAL1; +#endif +#ifdef HAVE_MPI_LOGICAL1 + case (uintptr_t)MPIABI_LOGICAL1: + return MPI_LOGICAL1; +#endif +#ifdef HAVE_MPI_LOGICAL2 + case (uintptr_t)MPIABI_LOGICAL2: + return MPI_LOGICAL2; +#endif +#ifdef HAVE_MPI_LOGICAL4 + case (uintptr_t)MPIABI_LOGICAL4: + return MPI_LOGICAL4; +#endif +#ifdef HAVE_MPI_LOGICAL8 + case (uintptr_t)MPIABI_LOGICAL8: + return MPI_LOGICAL8; +#endif + // [Datatypes for reduction functions (C)] + case (uintptr_t)MPIABI_FLOAT_INT: + return MPI_FLOAT_INT; + case (uintptr_t)MPIABI_DOUBLE_INT: + return MPI_DOUBLE_INT; + case (uintptr_t)MPIABI_LONG_INT: + return MPI_LONG_INT; + case (uintptr_t)MPIABI_2INT: + return MPI_2INT; + case (uintptr_t)MPIABI_SHORT_INT: + return MPI_SHORT_INT; + case (uintptr_t)MPIABI_LONG_DOUBLE_INT: + return MPI_LONG_DOUBLE_INT; + // [Datatypes for reduction functions (Fortran)] + case (uintptr_t)MPIABI_2REAL: + return MPI_2REAL; + case (uintptr_t)MPIABI_2DOUBLE_PRECISION: + return MPI_2DOUBLE_PRECISION; + case (uintptr_t)MPIABI_2INTEGER: + return MPI_2INTEGER; + // [Removed constructs] +#ifdef HAVE_MPI_LB + case (uintptr_t)MPIABI_LB: + return MPI_LB; +#endif +#ifdef HAVE_MPI_UB + case (uintptr_t)MPIABI_UB: + return MPI_UB; +#endif + default: + assert(false); + } +} + +static MPIABI_Datatype mpi2abi_datatype(MPI_Datatype datatype) { + if (datatype == MPI_DATATYPE_NULL) + return MPIABI_DATATYPE_NULL; + // [C types] + if (datatype == MPI_CHAR) + return MPIABI_CHAR; + if (datatype == MPI_SHORT) + return MPIABI_SHORT; + if (datatype == MPI_INT) + return MPIABI_INT; + if (datatype == MPI_LONG) + return MPIABI_LONG; + if (datatype == MPI_LONG_LONG_INT) + return MPIABI_LONG_LONG_INT; + if (datatype == MPI_LONG_LONG) + return MPIABI_LONG_LONG; + if (datatype == MPI_SIGNED_CHAR) + return MPIABI_SIGNED_CHAR; + if (datatype == MPI_UNSIGNED_CHAR) + return MPIABI_UNSIGNED_CHAR; + if (datatype == MPI_UNSIGNED_SHORT) + return MPIABI_UNSIGNED_SHORT; + if (datatype == MPI_UNSIGNED) + return MPIABI_UNSIGNED; + if (datatype == MPI_UNSIGNED_LONG) + return MPIABI_UNSIGNED_LONG; + if (datatype == MPI_UNSIGNED_LONG_LONG) + return MPIABI_UNSIGNED_LONG_LONG; + if (datatype == MPI_FLOAT) + return MPIABI_FLOAT; + if (datatype == MPI_DOUBLE) + return MPIABI_DOUBLE; + if (datatype == MPI_LONG_DOUBLE) + return MPIABI_LONG_DOUBLE; + if (datatype == MPI_WCHAR) + return MPIABI_WCHAR; + if (datatype == MPI_C_BOOL) + return MPIABI_C_BOOL; + if (datatype == MPI_INT8_T) + return MPIABI_INT8_T; + if (datatype == MPI_INT16_T) + return MPIABI_INT16_T; + if (datatype == MPI_INT32_T) + return MPIABI_INT32_T; + if (datatype == MPI_INT64_T) + return MPIABI_INT64_T; + if (datatype == MPI_UINT8_T) + return MPIABI_UINT8_T; + if (datatype == MPI_UINT16_T) + return MPIABI_UINT16_T; + if (datatype == MPI_UINT32_T) + return MPIABI_UINT32_T; + if (datatype == MPI_UINT64_T) + return MPIABI_UINT64_T; + if (datatype == MPI_AINT) + return MPIABI_AINT; + if (datatype == MPI_COUNT) + return MPIABI_COUNT; + if (datatype == MPI_OFFSET) + return MPIABI_OFFSET; + if (datatype == MPI_C_COMPLEX) + return MPIABI_C_COMPLEX; + if (datatype == MPI_C_FLOAT_COMPLEX) + return MPIABI_C_FLOAT_COMPLEX; + if (datatype == MPI_C_DOUBLE_COMPLEX) + return MPIABI_C_DOUBLE_COMPLEX; + if (datatype == MPI_C_LONG_DOUBLE_COMPLEX) + return MPIABI_C_LONG_DOUBLE_COMPLEX; + if (datatype == MPI_BYTE) + return MPIABI_BYTE; + if (datatype == MPI_PACKED) + return MPIABI_PACKED; + // [Fortran types] + if (datatype == MPI_INTEGER) + return MPIABI_INTEGER; + if (datatype == MPI_REAL) + return MPIABI_REAL; + if (datatype == MPI_DOUBLE_PRECISION) + return MPIABI_DOUBLE_PRECISION; + if (datatype == MPI_COMPLEX) + return MPIABI_COMPLEX; + if (datatype == MPI_LOGICAL) + return MPIABI_LOGICAL; + if (datatype == MPI_CHARACTER) + return MPIABI_CHARACTER; + // [C++ types] + if (datatype == MPI_CXX_BOOL) + return MPIABI_CXX_BOOL; + if (datatype == MPI_CXX_FLOAT_COMPLEX) + return MPIABI_CXX_FLOAT_COMPLEX; + if (datatype == MPI_CXX_DOUBLE_COMPLEX) + return MPIABI_CXX_DOUBLE_COMPLEX; + if (datatype == MPI_CXX_LONG_DOUBLE_COMPLEX) + return MPIABI_CXX_LONG_DOUBLE_COMPLEX; + // [Optional datatypes (Fortran)] + if (datatype == MPI_DOUBLE_COMPLEX) + return MPIABI_DOUBLE_COMPLEX; +#ifdef HAVE_MPI_INTEGER1 + if (datatype == MPI_INTEGER1) + return MPIABI_INTEGER1; +#endif +#ifdef HAVE_MPI_INTEGER2 + if (datatype == MPI_INTEGER2) + return MPIABI_INTEGER2; +#endif +#ifdef HAVE_MPI_INTEGER4 + if (datatype == MPI_INTEGER4) + return MPIABI_INTEGER4; +#endif +#ifdef HAVE_MPI_INTEGER8 + if (datatype == MPI_INTEGER8) + return MPIABI_INTEGER8; +#endif +#ifdef HAVE_MPI_INTEGER16 + if (datatype == MPI_INTEGER16) + return MPIABI_INTEGER16; +#endif +#ifdef HAVE_MPI_REAL2 + if (datatype == MPI_REAL2) + return MPIABI_REAL2; +#endif +#ifdef HAVE_MPI_REAL4 + if (datatype == MPI_REAL4) + return MPIABI_REAL4; +#endif +#ifdef HAVE_MPI_REAL8 + if (datatype == MPI_REAL8) + return MPIABI_REAL8; +#endif +#ifdef HAVE_MPI_REAL16 + if (datatype == MPI_REAL16) + return MPIABI_REAL16; +#endif +#ifdef HAVE_MPI_COMPLEX4 + if (datatype == MPI_COMPLEX4) + return MPIABI_COMPLEX4; +#endif +#ifdef HAVE_MPI_COMPLEX8 + if (datatype == MPI_COMPLEX8) + return MPIABI_COMPLEX8; +#endif +#ifdef HAVE_MPI_COMPLEX16 + if (datatype == MPI_COMPLEX16) + return MPIABI_COMPLEX16; +#endif +#ifdef HAVE_MPI_COMPLEX32 + if (datatype == MPI_COMPLEX32) + return MPIABI_COMPLEX32; +#endif +// [Extensions] +#ifdef HAVE_MPI_REAL1 + if (datatype == MPI_REAL1) + return MPIABI_REAL1; +#endif +#ifdef HAVE_MPI_COMPLEX2 + if (datatype == MPI_COMPLEX2) + return MPIABI_COMPLEX2; +#endif +#ifdef HAVE_MPI_LOGICAL1 + if (datatype == MPI_LOGICAL1) + return MPIABI_LOGICAL1; +#endif +#ifdef HAVE_MPI_LOGICAL2 + if (datatype == MPI_LOGICAL2) + return MPIABI_LOGICAL2; +#endif +#ifdef HAVE_MPI_LOGICAL4 + if (datatype == MPI_LOGICAL4) + return MPIABI_LOGICAL4; +#endif +#ifdef HAVE_MPI_LOGICAL8 + if (datatype == MPI_LOGICAL8) + return MPIABI_LOGICAL8; +#endif +#ifdef HAVE_MPI_LOGICAL16 + if (datatype == MPI_LOGICAL16) + return MPIABI_LOGICAL16; +#endif + // [Datatypes for reduction functions (C)] + if (datatype == MPI_FLOAT_INT) + return MPIABI_FLOAT_INT; + if (datatype == MPI_DOUBLE_INT) + return MPIABI_DOUBLE_INT; + if (datatype == MPI_LONG_INT) + return MPIABI_LONG_INT; + if (datatype == MPI_2INT) + return MPIABI_2INT; + if (datatype == MPI_SHORT_INT) + return MPIABI_SHORT_INT; + if (datatype == MPI_LONG_DOUBLE_INT) + return MPIABI_LONG_DOUBLE_INT; + // [Datatypes for reduction functions (Fortran)] + if (datatype == MPI_2REAL) + return MPIABI_2REAL; + if (datatype == MPI_2DOUBLE_PRECISION) + return MPIABI_2DOUBLE_PRECISION; + if (datatype == MPI_2INTEGER) + return MPIABI_2INTEGER; + // [Removed constructs] +#ifdef HAVE_MPI_LB + if (datatype == MPI_LB) + return MPIABI_LB; +#endif +#ifdef HAVE_MPI_UB + if (datatype == MPI_UB) + return MPIABI_UB; +#endif + return (MPIABI_Datatype)mpi2abi_unreserved((uintptr_t)datatype); +} + +static MPI_Errhandler abi2mpi_errhandler(MPIABI_Errhandler errhandler) { + if (!handle_is_reserved((uintptr_t)errhandler)) + return (MPI_Errhandler)abi2mpi_unreserved((uintptr_t)errhandler); + switch ((uintptr_t)errhandler) { + case (uintptr_t)MPIABI_ERRHANDLER_NULL: + return MPI_ERRHANDLER_NULL; + case (uintptr_t)MPIABI_ERRORS_ABORT: +#if MPI_VERSION_NUMBER >= 400 + return MPI_ERRORS_ABORT; +#else + assert(false); +#endif + case (uintptr_t)MPIABI_ERRORS_ARE_FATAL: + return MPI_ERRORS_ARE_FATAL; + case (uintptr_t)MPIABI_ERRORS_RETURN: + return MPI_ERRORS_RETURN; + default: + assert(false); + } +} + +static MPIABI_Errhandler mpi2abi_errhandler(MPI_Errhandler errhandler) { + if (errhandler == MPI_ERRHANDLER_NULL) + return MPIABI_ERRHANDLER_NULL; +#if MPI_VERSION_NUMBER >= 400 + if (errhandler == MPI_ERRORS_ABORT) + return MPIABI_ERRORS_ABORT; +#endif + if (errhandler == MPI_ERRORS_ARE_FATAL) + return MPIABI_ERRORS_ARE_FATAL; + if (errhandler == MPI_ERRORS_RETURN) + return MPIABI_ERRORS_RETURN; + return (MPIABI_Errhandler)mpi2abi_unreserved((uintptr_t)errhandler); +} + +static MPI_File abi2mpi_file(MPIABI_File file) { + if (!handle_is_reserved((uintptr_t)file)) + return (MPI_File)abi2mpi_unreserved((uintptr_t)file); + switch ((uintptr_t)file) { + case (uintptr_t)MPIABI_FILE_NULL: + return MPI_FILE_NULL; + default: + assert(false); + } +} + +static MPIABI_File mpi2abi_file(MPI_File file) { + if (file == MPI_FILE_NULL) + return MPIABI_FILE_NULL; + return (MPIABI_File)mpi2abi_unreserved((uintptr_t)file); +} + +static MPI_Group abi2mpi_group(MPIABI_Group group) { + if (!handle_is_reserved((uintptr_t)group)) + return (MPI_Group)abi2mpi_unreserved((uintptr_t)group); + switch ((uintptr_t)group) { + case (uintptr_t)MPIABI_GROUP_EMPTY: + return MPI_GROUP_EMPTY; + case (uintptr_t)MPIABI_GROUP_NULL: + return MPI_GROUP_NULL; + default: + assert(false); + } +} + +static MPIABI_Group mpi2abi_group(MPI_Group group) { + if (group == MPI_GROUP_EMPTY) + return MPIABI_GROUP_EMPTY; + if (group == MPI_GROUP_NULL) + return MPIABI_GROUP_NULL; + return (MPIABI_Group)mpi2abi_unreserved((uintptr_t)group); +} + +static MPI_Info abi2mpi_info(MPIABI_Info info) { + if (!handle_is_reserved((uintptr_t)info)) + return (MPI_Info)abi2mpi_unreserved((uintptr_t)info); + switch ((uintptr_t)info) { + case (uintptr_t)MPIABI_INFO_ENV: + return MPI_INFO_ENV; + case (uintptr_t)MPIABI_INFO_NULL: + return MPI_INFO_NULL; + default: + assert(false); + } +} + +static MPIABI_Info mpi2abi_info(MPI_Info info) { + if (info == MPI_INFO_ENV) + return MPIABI_INFO_ENV; + if (info == MPI_INFO_NULL) + return MPIABI_INFO_NULL; + return (MPIABI_Info)mpi2abi_unreserved((uintptr_t)info); +} + +static MPI_Message abi2mpi_message(MPIABI_Message message) { + if (!handle_is_reserved((uintptr_t)message)) + return (MPI_Message)abi2mpi_unreserved((uintptr_t)message); + switch ((uintptr_t)message) { + case (uintptr_t)MPIABI_MESSAGE_NO_PROC: + return MPI_MESSAGE_NO_PROC; + case (uintptr_t)MPIABI_MESSAGE_NULL: + return MPI_MESSAGE_NULL; + default: + assert(false); + } +} + +static MPIABI_Message mpi2abi_message(MPI_Message message) { + if (message == MPI_MESSAGE_NO_PROC) + return MPIABI_MESSAGE_NO_PROC; + if (message == MPI_MESSAGE_NULL) + return MPIABI_MESSAGE_NULL; + assert((uintptr_t)message > MAX_RESERVED_HANDLE); + return (MPIABI_Message)mpi2abi_unreserved((uintptr_t)message); +} + +static MPI_Op abi2mpi_op(MPIABI_Op op) { + if (!handle_is_reserved((uintptr_t)op)) + return (MPI_Op)abi2mpi_unreserved((uintptr_t)op); + switch ((uintptr_t)op) { + case (uintptr_t)MPIABI_OP_NULL: + return MPI_OP_NULL; + case (uintptr_t)MPIABI_MAX: + return MPI_MAX; + case (uintptr_t)MPIABI_MIN: + return MPI_MIN; + case (uintptr_t)MPIABI_SUM: + return MPI_SUM; + case (uintptr_t)MPIABI_PROD: + return MPI_PROD; + case (uintptr_t)MPIABI_MAXLOC: + return MPI_MAXLOC; + case (uintptr_t)MPIABI_MINLOC: + return MPI_MINLOC; + case (uintptr_t)MPIABI_BAND: + return MPI_BAND; + case (uintptr_t)MPIABI_BOR: + return MPI_BOR; + case (uintptr_t)MPIABI_BXOR: + return MPI_BXOR; + case (uintptr_t)MPIABI_LAND: + return MPI_LAND; + case (uintptr_t)MPIABI_LOR: + return MPI_LOR; + case (uintptr_t)MPIABI_LXOR: + return MPI_LXOR; + case (uintptr_t)MPIABI_REPLACE: + return MPI_REPLACE; + case (uintptr_t)MPIABI_NO_OP: + return MPI_NO_OP; + default: + assert(false); + } +} + +static MPIABI_Op mpi2abi_op(MPI_Op op) { + if (op == MPI_OP_NULL) + return MPIABI_OP_NULL; + if (op == MPI_MAX) + return MPIABI_MAX; + if (op == MPI_MIN) + return MPIABI_MIN; + if (op == MPI_SUM) + return MPIABI_SUM; + if (op == MPI_PROD) + return MPIABI_PROD; + if (op == MPI_MAXLOC) + return MPIABI_MAXLOC; + if (op == MPI_MINLOC) + return MPIABI_MINLOC; + if (op == MPI_BAND) + return MPIABI_BAND; + if (op == MPI_BOR) + return MPIABI_BOR; + if (op == MPI_BXOR) + return MPIABI_BXOR; + if (op == MPI_LAND) + return MPIABI_LAND; + if (op == MPI_LOR) + return MPIABI_LOR; + if (op == MPI_LXOR) + return MPIABI_LXOR; + if (op == MPI_REPLACE) + return MPIABI_REPLACE; + if (op == MPI_NO_OP) + return MPIABI_NO_OP; + return (MPIABI_Op)mpi2abi_unreserved((uintptr_t)op); +} + +static MPI_Request abi2mpi_request(MPIABI_Request request) { + if (!handle_is_reserved((uintptr_t)request)) + return (MPI_Request)abi2mpi_unreserved((uintptr_t)request); + switch ((uintptr_t)request) { + case (uintptr_t)MPIABI_REQUEST_NULL: + return MPI_REQUEST_NULL; + default: + assert(false); + } +} + +static MPIABI_Request mpi2abi_request(MPI_Request request) { + if (request == MPI_REQUEST_NULL) + return MPIABI_REQUEST_NULL; + return (MPIABI_Request)mpi2abi_unreserved((uintptr_t)request); +} + +static MPI_Session abi2mpi_session(MPIABI_Session session) { + if (!handle_is_reserved((uintptr_t)session)) + return (MPI_Session)abi2mpi_unreserved((uintptr_t)session); + switch ((uintptr_t)session) { + case (uintptr_t)MPIABI_SESSION_NULL: + return MPI_SESSION_NULL; + default: + assert(false); + } +} + +static MPIABI_Session mpi2abi_session(MPI_Session session) { + if (session == MPI_SESSION_NULL) + return MPIABI_SESSION_NULL; + return (MPIABI_Session)mpi2abi_unreserved((uintptr_t)session); +} + +static MPI_Win abi2mpi_win(MPIABI_Win win) { + if (!handle_is_reserved((uintptr_t)win)) + return (MPI_Win)abi2mpi_unreserved((uintptr_t)win); + switch ((uintptr_t)win) { + case (uintptr_t)MPIABI_WIN_NULL: + return MPI_WIN_NULL; + default: + assert(false); + } +} + +static MPIABI_Win mpi2abi_win(MPI_Win win) { + if (win == MPI_WIN_NULL) + return MPIABI_WIN_NULL; + return (MPIABI_Win)mpi2abi_unreserved((uintptr_t)win); +} + +static MPI_Status abi2mpi_status(MPIABI_Status abi_status) { + MPI_Status mpi_status; + // Copy named status fields + mpi_status.MPI_SOURCE = abi2mpi_proc(abi_status.MPI_SOURCE); + mpi_status.MPI_TAG = abi2mpi_tag(abi_status.MPI_TAG); + mpi_status.MPI_ERROR = abi2mpi_errorcode(abi_status.MPI_ERROR); + // Copy internal status fields + _Static_assert(sizeof(MPI_Status) <= sizeof(MPIABI_Status), ""); + _Static_assert(sizeof(MPI_Status) % sizeof(int) == 0, ""); + _Static_assert(offsetof(MPI_Status, MPI_SOURCE) % sizeof(int) == 0, ""); + _Static_assert(offsetof(MPI_Status, MPI_TAG) % sizeof(int) == 0, ""); + _Static_assert(offsetof(MPI_Status, MPI_ERROR) % sizeof(int) == 0, ""); + size_t src = 0; + for (size_t dest = 0; dest < sizeof(MPI_Status) / sizeof(int); ++dest) + if (dest != offsetof(MPI_Status, MPI_SOURCE) / sizeof(int) && + dest != offsetof(MPI_Status, MPI_TAG) / sizeof(int) && + dest != offsetof(MPI_Status, MPI_ERROR) / sizeof(int)) + ((int *)&mpi_status)[dest] = abi_status.mpi_reserved[src++]; + return mpi_status; +} + +static MPIABI_Status mpi2abi_status(MPI_Status mpi_status) { + MPIABI_Status abi_status; + // Copy named status fields + abi_status.MPI_SOURCE = mpi2abi_proc(mpi_status.MPI_SOURCE); + abi_status.MPI_TAG = mpi2abi_tag(mpi_status.MPI_TAG); + abi_status.MPI_ERROR = mpi2abi_errorcode(mpi_status.MPI_ERROR); + // Copy internal status fields + _Static_assert(sizeof(MPI_Status) <= sizeof(MPIABI_Status), ""); + _Static_assert(sizeof(MPI_Status) % sizeof(int) == 0, ""); + _Static_assert(offsetof(MPI_Status, MPI_SOURCE) % sizeof(int) == 0, ""); + _Static_assert(offsetof(MPI_Status, MPI_TAG) % sizeof(int) == 0, ""); + _Static_assert(offsetof(MPI_Status, MPI_ERROR) % sizeof(int) == 0, ""); + size_t dest = 0; + for (size_t src = 0; src < sizeof(MPI_Status) / sizeof(int); ++src) + if (src != offsetof(MPI_Status, MPI_SOURCE) / sizeof(int) && + src != offsetof(MPI_Status, MPI_TAG) / sizeof(int) && + src != offsetof(MPI_Status, MPI_ERROR) / sizeof(int)) + abi_status.mpi_reserved[dest++] = ((const int *)&mpi_status)[src]; + return abi_status; +} + +// Convert an `MPIABI_Status*` to an `MPI_Status*`. To avoid +// allocating memory, this reuses the storage for the `MPIABI_Status` +// object. We assume that `sizeof(MPIABI_Status) >= +// sizeof(MPI_Status)`. +static MPI_Status *abi2mpi_statusptr(MPIABI_Status *abi_status) { + if (abi_status == MPIABI_STATUS_IGNORE) + return MPI_STATUS_IGNORE; + *(MPI_Status *)abi_status = abi2mpi_status(*abi_status); + return (MPI_Status *)abi_status; +} + +// Same as `abi2mpi_statusptr`, but skip initializing the `MPI_Status` +// object because the `MPIABI_Status` object is expected to be +// undefined. +static MPI_Status *abi2mpi_statusptr_uninitialized(MPIABI_Status *abi_status) { + if (abi_status == MPIABI_STATUS_IGNORE) + return MPI_STATUS_IGNORE; + return (MPI_Status *)abi_status; +} + +// Convert an `MPI_Status*` to an `MPIABI_Status*`. To avoid +// allocating memory, this reuses the storage for the `MPI_Status` +// object. We assume that the storage allocated for the `MPI_Status` +// object is large enough. This is the case if the `MPI_Status` is a +// reinterpreted `MPIABI_Status` as returned by `abi2mpi_statusptr`. +static MPIABI_Status *mpi2abi_statusptr(MPI_Status *mpi_status) { + if (mpi_status == MPI_STATUS_IGNORE) + return MPIABI_STATUS_IGNORE; + *(MPIABI_Status *)mpi_status = mpi2abi_status(*mpi_status); + return (MPIABI_Status *)mpi_status; +} + +//////////////////////////////////////////////////////////////////////////////// + +// Prototype because this function is called by other functions + +int MPIABI_Comm_size(MPIABI_Comm comm, int *rank); + +//////////////////////////////////////////////////////////////////////////////// + +// A C lambda function (aka callback) + +struct lambda { + void (*function)(void *argument); + void *argument; +}; + +//////////////////////////////////////////////////////////////////////////////// + +// We need to attach actions to MPI requests. These actions are run +// when the MPI request has completed. They are run after the MPI +// request has completed but before the MPIABI request has completed. + +// This does not work for persistent requests. + +#define MAX_NUM_REQUEST_ACTIONS 10 +static atomic_int num_request_actions = 0; +static pthread_mutex_t request_actions_mutex = PTHREAD_MUTEX_INITIALIZER; +static MPIABI_Request request_action_keys[MAX_NUM_REQUEST_ACTIONS] = { + MPIABI_REQUEST_NULL, MPIABI_REQUEST_NULL, MPIABI_REQUEST_NULL, + MPIABI_REQUEST_NULL, MPIABI_REQUEST_NULL, MPIABI_REQUEST_NULL, + MPIABI_REQUEST_NULL, MPIABI_REQUEST_NULL, MPIABI_REQUEST_NULL, + MPIABI_REQUEST_NULL, +}; +static struct lambda request_action_values[MAX_NUM_REQUEST_ACTIONS]; + +static void request_action_insert(MPIABI_Request request, + struct lambda action) { + pthread_mutex_lock(&request_actions_mutex); + const int my_action = + atomic_fetch_add_explicit(&num_request_actions, 1, memory_order_relaxed); + assert(my_action < MAX_NUM_REQUEST_ACTIONS); + request_action_keys[my_action] = request; + request_action_values[my_action] = action; + pthread_mutex_unlock(&request_actions_mutex); +} + +static void request_action_find(MPIABI_Request request, bool *restrict found, + struct lambda *restrict action) { + *found = false; + pthread_mutex_lock(&request_actions_mutex); + for (int my_action = 0; my_action < num_request_actions; ++my_action) { + if (request_action_keys[my_action] == request) { + *found = true; + *action = request_action_values[my_action]; + const int other_action = + atomic_load_explicit(&num_request_actions, memory_order_relaxed) - 1; + if (my_action < other_action) { + request_action_keys[my_action] = request_action_keys[other_action]; + request_action_values[my_action] = request_action_values[other_action]; + } + atomic_store_explicit(&num_request_actions, other_action, + memory_order_relaxed); + break; + } + } + pthread_mutex_unlock(&request_actions_mutex); +} + +static void request_action_apply_slow(MPIABI_Request request) { + bool found; + struct lambda action; + request_action_find(request, &found, &action); + if (found) + action.function(action.argument); +} + +static inline bool request_actions_empty() { + return __builtin_expect(atomic_load(&num_request_actions) == 0, true); +} + +static inline void request_action_apply(MPIABI_Request request) { + if (request == MPIABI_REQUEST_NULL) + return; + if (__builtin_expect(atomic_load(&num_request_actions) == 0, true)) + return; + request_action_apply_slow(request); +} + +//////////////////////////////////////////////////////////////////////////////// + +// Define MPIABI functions + +// A.3 C Bindings + +// A.3.1 Point-to-Point Communication C Bindings + +int MPIABI_Bsend(const void *buf, int count, MPIABI_Datatype datatype, int dest, + int tag, MPIABI_Comm comm) { + int ierr = + MPI_Bsend(buf, count, abi2mpi_datatype(datatype), abi2mpi_proc(dest), + abi2mpi_tag(tag), abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Bsend_c(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm) { + int ierr = + MPI_Bsend_c(buf, count, abi2mpi_datatype(datatype), abi2mpi_proc(dest), + abi2mpi_tag(tag), abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Bsend_init(const void *buf, int count, MPIABI_Datatype datatype, + int dest, int tag, MPIABI_Comm comm, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = + MPI_Bsend_init(buf, count, abi2mpi_datatype(datatype), abi2mpi_proc(dest), + abi2mpi_tag(tag), abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Bsend_init_c(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Bsend_init_c(buf, count, abi2mpi_datatype(datatype), + abi2mpi_proc(dest), abi2mpi_tag(tag), + abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Buffer_attach(void *buffer, int size) { + if (buffer == MPIABI_BUFFER_AUTOMATIC) + buffer = MPI_BUFFER_AUTOMATIC; + int ierr = MPI_Buffer_attach(buffer, size); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Buffer_attach_c(void *buffer, MPIABI_Count size) { + if (buffer == MPIABI_BUFFER_AUTOMATIC) + buffer = MPI_BUFFER_AUTOMATIC; + int ierr = MPI_Buffer_attach_c(buffer, size); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Buffer_detach(void *buffer_addr, int *restrict size) { + int ierr = MPI_Buffer_detach(buffer_addr, size); + if (*(void **)buffer_addr == MPI_BUFFER_AUTOMATIC) + *(void **)buffer_addr = MPIABI_BUFFER_AUTOMATIC; + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Buffer_detach_c(void *buffer_addr, MPIABI_Count *restrict size) { + MPI_Count mpi_size; + int ierr = MPI_Buffer_detach_c(buffer_addr, &mpi_size); + if (*(void **)buffer_addr == MPI_BUFFER_AUTOMATIC) + *(void **)buffer_addr = MPIABI_BUFFER_AUTOMATIC; + *size = mpi_size; + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Buffer_flush(void) { +#if MPI_VERSION_NUMBER >= 410 + int ierr = MPI_Buffer_flush(); + return mpi2abi_errorcode(ierr); +#else + assert(0); +#endif +} + +int MPIABI_Buffer_iflush(MPIABI_Request *restrict request) { +#if MPI_VERSION_NUMBER >= 410 + MPI_Request mpi_request; + int ierr = MPI_Buffer_iflush(&mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +#else + assert(0); +#endif +} + +int MPIABI_Cancel(MPIABI_Request *restrict request) { + MPI_Request mpi_request = abi2mpi_request(*request); + int ierr = MPI_Cancel(&mpi_request); + request_action_apply(*request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Comm_attach_buffer(MPIABI_Comm comm, void *buffer, int size) { +#if MPI_VERSION_NUMBER >= 410 + if (buffer == MPIABI_BUFFER_AUTOMATIC) + buffer = MPI_BUFFER_AUTOMATIC; + int ierr = MPI_Comm_attach_buffer(abi2mpi_comm(comm), buffer, size); + return mpi2abi_errorcode(ierr); +#else + assert(0); +#endif +} + +int MPIABI_Comm_attach_buffer_c(MPIABI_Comm comm, void *buffer, + MPIABI_Count size) { +#if MPI_VERSION_NUMBER >= 410 + if (buffer == MPIABI_BUFFER_AUTOMATIC) + buffer = MPI_BUFFER_AUTOMATIC; + int ierr = MPI_Comm_attach_buffer_c(abi2mpi_comm(comm), buffer, size); + return mpi2abi_errorcode(ierr); +#else + assert(0); +#endif +} + +int MPIABI_Comm_detach_buffer(MPIABI_Comm comm, void *buffer_addr, + int *restrict size) { +#if MPI_VERSION_NUMBER >= 410 + int ierr = MPI_Comm_detach_buffer(abi2mpi_comm(comm), buffer_addr, size); + if (*(void **)buffer_addr == MPI_BUFFER_AUTOMATIC) + *(void **)buffer_addr = MPIABI_BUFFER_AUTOMATIC; + return mpi2abi_errorcode(ierr); +#else + assert(0); +#endif +} + +int MPIABI_Comm_detach_buffer_c(MPIABI_Comm comm, void *buffer_addr, + MPIABI_Count *restrict size) { +#if MPI_VERSION_NUMBER >= 410 + MPI_Count mpi_size; + int ierr = + MPI_Comm_detach_buffer_c(abi2mpi_comm(comm), buffer_addr, &mpi_size); + if (*(void **)buffer_addr == MPI_BUFFER_AUTOMATIC) + *(void **)buffer_addr = MPIABI_BUFFER_AUTOMATIC; + *size = mpi_size; + return mpi2abi_errorcode(ierr); +#else + assert(0); +#endif +} + +int MPIABI_Comm_flush_buffer(MPIABI_Comm comm) { +#if MPI_VERSION_NUMBER >= 410 + int ierr = MPI_Comm_flush_buffer(abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +#else + assert(0); +#endif +} + +int MPIABI_Comm_iflush_buffer(MPIABI_Comm comm, + MPIABI_Request *restrict request) { +#if MPI_VERSION_NUMBER >= 410 + MPI_Request mpi_request; + int ierr = MPI_Comm_iflush_buffer(abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +#else + assert(0); +#endif +} + +int MPIABI_Get_count(const MPIABI_Status *restrict status, + MPIABI_Datatype datatype, int *restrict count) { + const MPI_Status mpi_status = abi2mpi_status(*status); + int ierr = MPI_Get_count(&mpi_status, abi2mpi_datatype(datatype), count); + *count = mpi2abi_count(*count); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Get_count_c(const MPIABI_Status *restrict status, + MPIABI_Datatype datatype, MPIABI_Count *restrict count) { + const MPI_Status mpi_status = abi2mpi_status(*status); + MPI_Count mpi_count; + int ierr = + MPI_Get_count_c(&mpi_status, abi2mpi_datatype(datatype), &mpi_count); + *count = mpi_count; + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Ibsend(const void *buf, int count, MPIABI_Datatype datatype, + int dest, int tag, MPIABI_Comm comm, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = + MPI_Ibsend(buf, count, abi2mpi_datatype(datatype), abi2mpi_proc(dest), + abi2mpi_tag(tag), abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Ibsend_c(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = + MPI_Ibsend_c(buf, count, abi2mpi_datatype(datatype), abi2mpi_proc(dest), + abi2mpi_tag(tag), abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Improbe(int source, int tag, MPIABI_Comm comm, int *restrict flag, + MPIABI_Message *restrict message, + MPIABI_Status *restrict status) { + MPI_Message mpi_message; + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_Improbe(abi2mpi_proc(source), abi2mpi_tag(tag), + abi2mpi_comm(comm), flag, &mpi_message, mpi_status); + *message = mpi2abi_message(mpi_message); + if (*flag) + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Imrecv(void *buf, int count, MPIABI_Datatype datatype, + MPIABI_Message *restrict message, + MPIABI_Request *restrict request) { + MPI_Message mpi_message; + MPI_Request mpi_request; + int ierr = MPI_Imrecv(buf, count, abi2mpi_datatype(datatype), &mpi_message, + &mpi_request); + *message = mpi2abi_message(mpi_message); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Imrecv_c(void *buf, MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Message *restrict message, + MPIABI_Request *restrict request) { + MPI_Message mpi_message; + MPI_Request mpi_request; + int ierr = MPI_Imrecv_c(buf, count, abi2mpi_datatype(datatype), &mpi_message, + &mpi_request); + *message = mpi2abi_message(mpi_message); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Iprobe(int source, int tag, MPIABI_Comm comm, int *restrict flag, + MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_Iprobe(abi2mpi_proc(source), abi2mpi_tag(tag), + abi2mpi_comm(comm), flag, mpi_status); + if (*flag) + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Irecv(void *buf, int count, MPIABI_Datatype datatype, int source, + int tag, MPIABI_Comm comm, MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = + MPI_Irecv(buf, count, abi2mpi_datatype(datatype), abi2mpi_proc(source), + abi2mpi_tag(tag), abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Irecv_c(void *buf, MPIABI_Count count, MPIABI_Datatype datatype, + int source, int tag, MPIABI_Comm comm, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = + MPI_Irecv_c(buf, count, abi2mpi_datatype(datatype), abi2mpi_proc(source), + abi2mpi_tag(tag), abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Irsend(const void *buf, int count, MPIABI_Datatype datatype, + int dest, int tag, MPIABI_Comm comm, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = + MPI_Irsend(buf, count, abi2mpi_datatype(datatype), abi2mpi_proc(dest), + abi2mpi_tag(tag), abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Irsend_c(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = + MPI_Irsend_c(buf, count, abi2mpi_datatype(datatype), abi2mpi_proc(dest), + abi2mpi_tag(tag), abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Isend(const void *buf, int count, MPIABI_Datatype datatype, int dest, + int tag, MPIABI_Comm comm, MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = + MPI_Isend(buf, count, abi2mpi_datatype(datatype), abi2mpi_proc(dest), + abi2mpi_tag(tag), abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Isend_c(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = + MPI_Isend_c(buf, count, abi2mpi_datatype(datatype), abi2mpi_proc(dest), + abi2mpi_tag(tag), abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Isendrecv(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, int dest, int sendtag, + void *recvbuf, int recvcount, MPIABI_Datatype recvtype, + int source, int recvtag, MPIABI_Comm comm, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = + MPI_Isendrecv(sendbuf, sendcount, abi2mpi_datatype(sendtype), + abi2mpi_proc(dest), sendtag, recvbuf, recvcount, + abi2mpi_datatype(recvtype), abi2mpi_proc(source), + abi2mpi_tag(recvtag), abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Isendrecv_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, int dest, int sendtag, + void *recvbuf, MPIABI_Count recvcount, + MPIABI_Datatype recvtype, int source, int recvtag, + MPIABI_Comm comm, MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = + MPI_Isendrecv_c(sendbuf, sendcount, abi2mpi_datatype(sendtype), + abi2mpi_proc(dest), sendtag, recvbuf, recvcount, + abi2mpi_datatype(recvtype), abi2mpi_proc(source), + abi2mpi_tag(recvtag), abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Isendrecv_replace(void *buf, int count, MPIABI_Datatype datatype, + int dest, int sendtag, int source, int recvtag, + MPIABI_Comm comm, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Isendrecv_replace(buf, count, abi2mpi_datatype(datatype), + abi2mpi_proc(dest), sendtag, + abi2mpi_proc(source), abi2mpi_tag(recvtag), + abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Isendrecv_replace_c(void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int sendtag, + int source, int recvtag, MPIABI_Comm comm, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Isendrecv_replace_c(buf, count, abi2mpi_datatype(datatype), + abi2mpi_proc(dest), sendtag, + abi2mpi_proc(source), abi2mpi_tag(recvtag), + abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Issend(const void *buf, int count, MPIABI_Datatype datatype, + int dest, int tag, MPIABI_Comm comm, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = + MPI_Issend(buf, count, abi2mpi_datatype(datatype), abi2mpi_proc(dest), + tag, abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Issend_c(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = + MPI_Issend_c(buf, count, abi2mpi_datatype(datatype), abi2mpi_proc(dest), + tag, abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Mprobe(int source, int tag, MPIABI_Comm comm, + MPIABI_Message *restrict message, + MPIABI_Status *restrict status) { + MPI_Message mpi_message; + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_Mprobe(abi2mpi_proc(source), abi2mpi_tag(tag), + abi2mpi_comm(comm), &mpi_message, mpi_status); + *message = mpi2abi_message(mpi_message); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Mrecv(void *buf, int count, MPIABI_Datatype datatype, + MPIABI_Message *restrict message, + MPIABI_Status *restrict status) { + MPI_Message mpi_message; + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_Mrecv(buf, count, abi2mpi_datatype(datatype), &mpi_message, + mpi_status); + *message = mpi2abi_message(mpi_message); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Mrecv_c(void *buf, MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Message *restrict message, + MPIABI_Status *restrict status) { + MPI_Message mpi_message; + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_Mrecv_c(buf, count, abi2mpi_datatype(datatype), &mpi_message, + mpi_status); + *message = mpi2abi_message(mpi_message); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Probe(int source, int tag, MPIABI_Comm comm, + MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_Probe(abi2mpi_proc(source), abi2mpi_tag(tag), + abi2mpi_comm(comm), mpi_status); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Recv(void *buf, int count, MPIABI_Datatype datatype, int source, + int tag, MPIABI_Comm comm, MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = + MPI_Recv(buf, count, abi2mpi_datatype(datatype), abi2mpi_proc(source), + abi2mpi_tag(tag), abi2mpi_comm(comm), mpi_status); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Recv_c(void *buf, MPIABI_Count count, MPIABI_Datatype datatype, + int source, int tag, MPIABI_Comm comm, + MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = + MPI_Recv_c(buf, count, abi2mpi_datatype(datatype), abi2mpi_proc(source), + abi2mpi_tag(tag), abi2mpi_comm(comm), mpi_status); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Recv_init(void *buf, int count, MPIABI_Datatype datatype, int source, + int tag, MPIABI_Comm comm, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Recv_init(buf, count, abi2mpi_datatype(datatype), + abi2mpi_proc(source), abi2mpi_tag(tag), + abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Recv_init_c(void *buf, MPIABI_Count count, MPIABI_Datatype datatype, + int source, int tag, MPIABI_Comm comm, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Recv_init_c(buf, count, abi2mpi_datatype(datatype), + abi2mpi_proc(source), abi2mpi_tag(tag), + abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Request_free(MPIABI_Request *restrict request) { + MPI_Request mpi_request = abi2mpi_request(*request); + int ierr = MPI_Request_free(&mpi_request); + request_action_apply(*request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Request_get_status(MPIABI_Request request, int *restrict flag, + MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_Request_get_status(abi2mpi_request(request), flag, mpi_status); + if (*flag) + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Request_get_status_all(int count, + const MPIABI_Request array_of_requests[], + int *restrict flag, + MPIABI_Status array_of_statuses[]) { +#if MPI_VERSION_NUMBER >= 410 + MPI_Request array_of_mpi_requests[count]; + for (int n = 0; n < count; ++n) + array_of_mpi_requests[n] = abi2mpi_request(array_of_requests[n]); + bool ignore_statuses = array_of_statuses == MPIABI_STATUSES_IGNORE; + int ierr = MPI_Request_get_status_all( + count, array_of_mpi_requests, flag, + ignore_statuses ? MPI_STATUSES_IGNORE : (MPI_Status *)array_of_statuses); + if (!ignore_statuses && *flag) + for (int n = count - 1; n >= 0; --n) + array_of_statuses[n] = + mpi2abi_status(((MPI_Status *)array_of_statuses)[n]); + return mpi2abi_errorcode(ierr); +#else + assert(0); +#endif +} + +int MPIABI_Request_get_status_any(int count, + const MPIABI_Request array_of_requests[], + int *restrict index, int *restrict flag, + MPIABI_Status *restrict status) { +#if MPI_VERSION_NUMBER >= 410 + MPI_Request array_of_mpi_requests[count]; + for (int n = 0; n < count; ++n) + array_of_mpi_requests[n] = abi2mpi_request(array_of_requests[n]); + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_Request_get_status_any(count, array_of_mpi_requests, index, + flag, mpi_status); + if (*flag) + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +#else + assert(0); +#endif +} + +int MPIABI_Request_get_status_some(int incount, + const MPIABI_Request array_of_requests[], + int *restrict outcount, + int array_of_indices[], + MPIABI_Status array_of_statuses[]) { +#if MPI_VERSION_NUMBER >= 410 + MPI_Request array_of_mpi_requests[incount]; + for (int n = 0; n < incount; ++n) + array_of_mpi_requests[n] = abi2mpi_request(array_of_requests[n]); + bool ignore_statuses = array_of_statuses == MPIABI_STATUSES_IGNORE; + int ierr = MPI_Request_get_status_some( + incount, array_of_mpi_requests, outcount, array_of_indices, + ignore_statuses ? MPI_STATUSES_IGNORE : (MPI_Status *)array_of_statuses); + *outcount = mpi2abi_count(*outcount); + if (!ignore_statuses && *outcount != MPIABI_UNDEFINED) + for (int n = *outcount - 1; n >= 0; --n) + array_of_statuses[n] = + mpi2abi_status(((MPI_Status *)array_of_statuses)[n]); + return mpi2abi_errorcode(ierr); +#else + assert(0); +#endif +} + +int MPIABI_Rsend(const void *buf, int count, MPIABI_Datatype datatype, int dest, + int tag, MPIABI_Comm comm) { + int ierr = MPI_Rsend(buf, count, abi2mpi_datatype(datatype), + abi2mpi_proc(dest), tag, abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Rsend_c(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm) { + int ierr = MPI_Rsend_c(buf, count, abi2mpi_datatype(datatype), + abi2mpi_proc(dest), tag, abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Rsend_init(const void *buf, int count, MPIABI_Datatype datatype, + int dest, int tag, MPIABI_Comm comm, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = + MPI_Rsend_init(buf, count, abi2mpi_datatype(datatype), abi2mpi_proc(dest), + tag, abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Rsend_init_c(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Rsend_init_c(buf, count, abi2mpi_datatype(datatype), + abi2mpi_proc(dest), tag, abi2mpi_comm(comm), + &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Send(const void *buf, int count, MPIABI_Datatype datatype, int dest, + int tag, MPIABI_Comm comm) { + int ierr = MPI_Send(buf, count, abi2mpi_datatype(datatype), + abi2mpi_proc(dest), tag, abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Send_c(const void *buf, MPIABI_Count count, MPIABI_Datatype datatype, + int dest, int tag, MPIABI_Comm comm) { + int ierr = MPI_Send_c(buf, count, abi2mpi_datatype(datatype), + abi2mpi_proc(dest), tag, abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Send_init(const void *buf, int count, MPIABI_Datatype datatype, + int dest, int tag, MPIABI_Comm comm, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = + MPI_Send_init(buf, count, abi2mpi_datatype(datatype), abi2mpi_proc(dest), + tag, abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Send_init_c(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Send_init_c(buf, count, abi2mpi_datatype(datatype), + abi2mpi_proc(dest), tag, abi2mpi_comm(comm), + &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Sendrecv(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, int dest, int sendtag, + void *recvbuf, int recvcount, MPIABI_Datatype recvtype, + int source, int recvtag, MPIABI_Comm comm, + MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_Sendrecv(sendbuf, sendcount, abi2mpi_datatype(sendtype), + abi2mpi_proc(dest), sendtag, recvbuf, recvcount, + abi2mpi_datatype(recvtype), abi2mpi_proc(source), + abi2mpi_tag(recvtag), abi2mpi_comm(comm), mpi_status); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Sendrecv_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, int dest, int sendtag, + void *recvbuf, MPIABI_Count recvcount, + MPIABI_Datatype recvtype, int source, int recvtag, + MPIABI_Comm comm, MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = + MPI_Sendrecv_c(sendbuf, sendcount, abi2mpi_datatype(sendtype), + abi2mpi_proc(dest), sendtag, recvbuf, recvcount, + abi2mpi_datatype(recvtype), abi2mpi_proc(source), + abi2mpi_tag(recvtag), abi2mpi_comm(comm), mpi_status); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Sendrecv_replace(void *buf, int count, MPIABI_Datatype datatype, + int dest, int sendtag, int source, int recvtag, + MPIABI_Comm comm, MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_Sendrecv_replace(buf, count, abi2mpi_datatype(datatype), + abi2mpi_proc(dest), sendtag, + abi2mpi_proc(source), abi2mpi_tag(recvtag), + abi2mpi_comm(comm), mpi_status); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Sendrecv_replace_c(void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int sendtag, + int source, int recvtag, MPIABI_Comm comm, + MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_Sendrecv_replace_c(buf, count, abi2mpi_datatype(datatype), + abi2mpi_proc(dest), sendtag, + abi2mpi_proc(source), abi2mpi_tag(recvtag), + abi2mpi_comm(comm), mpi_status); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Session_attach_buffer(MPIABI_Session session, void *buffer, + int size) { +#if MPI_VERSION_NUMBER >= 410 + if (buffer == MPIABI_BUFFER_AUTOMATIC) + buffer = MPI_BUFFER_AUTOMATIC; + int ierr = MPI_Session_attach_buffer(abi2mpi_session(session), buffer, size); + return mpi2abi_errorcode(ierr); +#else + assert(0); +#endif +} + +int MPIABI_Session_attach_buffer_c(MPIABI_Session session, void *buffer, + MPIABI_Count size) { +#if MPI_VERSION_NUMBER >= 410 + if (buffer == MPIABI_BUFFER_AUTOMATIC) + buffer = MPI_BUFFER_AUTOMATIC; + int ierr = + MPI_Session_attach_buffer_c(abi2mpi_session(session), buffer, size); + return mpi2abi_errorcode(ierr); +#else + assert(0); +#endif +} + +int MPIABI_Session_detach_buffer(MPIABI_Session session, void *buffer_addr, + int *restrict size) { +#if MPI_VERSION_NUMBER >= 410 + int ierr = + MPI_Session_detach_buffer(abi2mpi_session(session), buffer_addr, size); + if (*(void **)buffer_addr == MPI_BUFFER_AUTOMATIC) + *(void **)buffer_addr = MPIABI_BUFFER_AUTOMATIC; + return mpi2abi_errorcode(ierr); +#else + assert(0); +#endif +} + +int MPIABI_Session_detach_buffer_c(MPIABI_Session session, void *buffer_addr, + MPIABI_Count *restrict size) { +#if MPI_VERSION_NUMBER >= 410 + MPI_Count mpi_size; + int ierr = MPI_Session_detach_buffer_c(abi2mpi_session(session), buffer_addr, + &mpi_size); + if (*(void **)buffer_addr == MPI_BUFFER_AUTOMATIC) + *(void **)buffer_addr = MPIABI_BUFFER_AUTOMATIC; + *size = mpi_size; + return mpi2abi_errorcode(ierr); +#else + assert(0); +#endif +} + +int MPIABI_Session_flush_buffer(MPIABI_Session session) { +#if MPI_VERSION_NUMBER >= 410 + int ierr = MPI_Session_flush_buffer(abi2mpi_session(session)); + return mpi2abi_errorcode(ierr); +#else + assert(0); +#endif +} + +int MPIABI_Session_iflush_buffer(MPIABI_Session session, + MPIABI_Request *restrict request) { +#if MPI_VERSION_NUMBER >= 410 + MPI_Request mpi_request; + int ierr = MPI_Session_iflush_buffer(abi2mpi_session(session), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +#else + assert(0); +#endif +} + +int MPIABI_Ssend(const void *buf, int count, MPIABI_Datatype datatype, int dest, + int tag, MPIABI_Comm comm) { + int ierr = MPI_Ssend(buf, count, abi2mpi_datatype(datatype), + abi2mpi_proc(dest), tag, abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Ssend_c(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm) { + int ierr = MPI_Ssend_c(buf, count, abi2mpi_datatype(datatype), + abi2mpi_proc(dest), tag, abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Ssend_init(const void *buf, int count, MPIABI_Datatype datatype, + int dest, int tag, MPIABI_Comm comm, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = + MPI_Ssend_init(buf, count, abi2mpi_datatype(datatype), abi2mpi_proc(dest), + tag, abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Ssend_init_c(const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Ssend_init_c(buf, count, abi2mpi_datatype(datatype), + abi2mpi_proc(dest), tag, abi2mpi_comm(comm), + &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Start(MPIABI_Request *restrict request) { + MPI_Request mpi_request = abi2mpi_request(*request); + int ierr = MPI_Start(&mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Startall(int count, MPIABI_Request array_of_requests[]) { + for (int n = 0; n < count; ++n) + ((MPI_Request *)array_of_requests)[n] = + abi2mpi_request(array_of_requests[n]); + int ierr = MPI_Startall(count, (MPI_Request *)array_of_requests); + for (int n = count - 1; n >= 0; --n) + array_of_requests[n] = + mpi2abi_request(((MPI_Request *)array_of_requests)[n]); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Status_get_error(MPIABI_Status *restrict status, int *restrict err) { +#if MPI_VERSION_NUMBER >= 410 + MPI_Status mpi_status = abi2mpi_status(*status); + int ierr = MPI_Status_get_error(&mpi_status, err); + *err = mpi2abi_errorcode(*err); + return mpi2abi_errorcode(ierr); +#else + assert(0); +#endif +} + +int MPIABI_Status_get_source(MPIABI_Status *restrict status, + int *restrict source) { +#if MPI_VERSION_NUMBER >= 410 + MPI_Status mpi_status = abi2mpi_status(*status); + int ierr = MPI_Status_get_source(&mpi_status, source); + *source = mpi2abi_proc(*source); + return mpi2abi_errorcode(ierr); +#else + assert(0); +#endif +} + +int MPIABI_Status_get_tag(MPIABI_Status *restrict status, int *restrict tag) { +#if MPI_VERSION_NUMBER >= 410 + MPI_Status mpi_status = abi2mpi_status(*status); + int ierr = MPI_Status_get_tag(&mpi_status, tag); + *tag = mpi2abi_tag(*tag); + return mpi2abi_errorcode(ierr); +#else + assert(0); +#endif +} + +int MPIABI_Test(MPIABI_Request *restrict request, int *restrict flag, + MPIABI_Status *restrict status) { + MPI_Request mpi_request = abi2mpi_request(*request); + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_Test(&mpi_request, flag, mpi_status); + if (*flag) { + request_action_apply(*request); + *request = mpi2abi_request(mpi_request); + mpi2abi_statusptr(mpi_status); + } + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Test_cancelled(const MPIABI_Status *restrict status, + int *restrict flag) { + MPI_Status mpi_status = abi2mpi_status(*status); + int ierr = MPI_Test_cancelled(&mpi_status, flag); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Testall(int count, MPIABI_Request array_of_requests[], + int *restrict flag, MPIABI_Status array_of_statuses[]) { + MPI_Request mpi_array_of_requests[count]; + for (int n = 0; n < count; ++n) + mpi_array_of_requests[n] = abi2mpi_request(array_of_requests[n]); + bool ignore_statuses = array_of_statuses == MPIABI_STATUSES_IGNORE; + int ierr = MPI_Testall(count, mpi_array_of_requests, flag, + ignore_statuses ? MPI_STATUSES_IGNORE + : (MPI_Status *)array_of_statuses); + if (*flag) { + const bool skip_request_actions = request_actions_empty(); + for (int n = 0; n < count; ++n) { + if (!skip_request_actions) + request_action_apply(array_of_requests[n]); + array_of_requests[n] = mpi2abi_request(mpi_array_of_requests[n]); + } + if (!ignore_statuses) + for (int n = count - 1; n >= 0; --n) + array_of_statuses[n] = + mpi2abi_status(((MPI_Status *)array_of_statuses)[n]); + } + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Testany(int count, MPIABI_Request array_of_requests[], + int *restrict index, int *restrict flag, + MPIABI_Status *restrict status) { + MPI_Request mpi_array_of_requests[count]; + for (int n = 0; n < count; ++n) + mpi_array_of_requests[n] = abi2mpi_request(array_of_requests[n]); + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_Testany(count, mpi_array_of_requests, index, flag, mpi_status); + if (*flag) { + request_action_apply(array_of_requests[*index]); + array_of_requests[*index] = mpi2abi_request(mpi_array_of_requests[*index]); + mpi2abi_statusptr(mpi_status); + } + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Testsome(int incount, MPIABI_Request array_of_requests[], + int *restrict outcount, int array_of_indices[], + MPIABI_Status array_of_statuses[]) { + MPI_Request mpi_array_of_requests[incount]; + for (int n = 0; n < incount; ++n) + mpi_array_of_requests[n] = abi2mpi_request(array_of_requests[n]); + bool ignore_statuses = array_of_statuses == MPIABI_STATUSES_IGNORE; + int ierr = MPI_Testsome( + incount, mpi_array_of_requests, outcount, array_of_indices, + ignore_statuses ? MPI_STATUSES_IGNORE : (MPI_Status *)array_of_statuses); + *outcount = mpi2abi_count(*outcount); + if (*outcount != MPIABI_UNDEFINED && *outcount > 0) { + const bool skip_request_actions = request_actions_empty(); + for (int n = 0; n < *outcount; ++n) { + const int index = array_of_indices[n]; + if (!skip_request_actions) + request_action_apply(array_of_requests[index]); + array_of_requests[index] = mpi2abi_request(mpi_array_of_requests[index]); + } + if (!ignore_statuses) + for (int n = *outcount - 1; n >= 0; --n) + array_of_statuses[n] = + mpi2abi_status(((MPI_Status *)array_of_statuses)[n]); + } + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Wait(MPIABI_Request *restrict request, + MPIABI_Status *restrict status) { + MPI_Request mpi_request = abi2mpi_request(*request); + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_Wait(&mpi_request, mpi_status); + request_action_apply(*request); + *request = mpi2abi_request(mpi_request); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Waitall(int count, MPIABI_Request array_of_requests[], + MPIABI_Status array_of_statuses[]) { + MPI_Request mpi_array_of_requests[count]; + for (int n = 0; n < count; ++n) + mpi_array_of_requests[n] = abi2mpi_request(array_of_requests[n]); + bool ignore_statuses = array_of_statuses == MPIABI_STATUSES_IGNORE; + int ierr = MPI_Waitall(count, mpi_array_of_requests, + ignore_statuses ? MPI_STATUSES_IGNORE + : (MPI_Status *)array_of_statuses); + const bool skip_request_actions = request_actions_empty(); + for (int n = 0; n < count; ++n) { + if (!skip_request_actions) + request_action_apply(array_of_requests[n]); + array_of_requests[n] = mpi2abi_request(mpi_array_of_requests[n]); + } + if (!ignore_statuses) + for (int n = count - 1; n >= 0; --n) + array_of_statuses[n] = + mpi2abi_status(((MPI_Status *)array_of_statuses)[n]); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Waitany(int count, MPIABI_Request array_of_requests[], + int *restrict index, MPIABI_Status *restrict status) { + MPI_Request mpi_array_of_requests[count]; + for (int n = 0; n < count; ++n) + mpi_array_of_requests[n] = abi2mpi_request(array_of_requests[n]); + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_Waitany(count, mpi_array_of_requests, index, mpi_status); + request_action_apply(array_of_requests[*index]); + array_of_requests[*index] = mpi2abi_request(mpi_array_of_requests[*index]); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Waitsome(int incount, MPIABI_Request array_of_requests[], + int *restrict outcount, int array_of_indices[], + MPIABI_Status array_of_statuses[]) { + MPI_Request mpi_array_of_requests[incount]; + for (int n = 0; n < incount; ++n) + mpi_array_of_requests[n] = abi2mpi_request(array_of_requests[n]); + bool ignore_statuses = array_of_statuses == MPIABI_STATUSES_IGNORE; + int ierr = MPI_Waitsome( + incount, mpi_array_of_requests, outcount, array_of_indices, + ignore_statuses ? MPI_STATUSES_IGNORE : (MPI_Status *)array_of_statuses); + *outcount = mpi2abi_count(*outcount); + if (*outcount != MPIABI_UNDEFINED && *outcount > 0) { + const bool skip_request_actions = request_actions_empty(); + for (int n = 0; n < *outcount; ++n) { + const int index = array_of_indices[n]; + if (!skip_request_actions) + request_action_apply(array_of_requests[index]); + array_of_requests[index] = mpi2abi_request(mpi_array_of_requests[index]); + } + if (!ignore_statuses) + for (int n = *outcount - 1; n >= 0; --n) + array_of_statuses[n] = + mpi2abi_status(((MPI_Status *)array_of_statuses)[n]); + } + return mpi2abi_errorcode(ierr); +} + +// A.3.2 Partitioned Communication C Bindings + +int MPIABI_Parrived(MPIABI_Request request, int partition, int *restrict flag) { + int ierr = MPI_Parrived(abi2mpi_request(request), partition, flag); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Pready(int partition, MPIABI_Request request) { + int ierr = MPI_Pready(partition, abi2mpi_request(request)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Pready_list(int length, const int array_of_partitions[], + MPIABI_Request request) { + int ierr = + MPI_Pready_list(length, array_of_partitions, abi2mpi_request(request)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Pready_range(int partition_low, int partition_high, + MPIABI_Request request) { + int ierr = + MPI_Pready_range(partition_low, partition_high, abi2mpi_request(request)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Precv_init(void *buf, int partitions, MPIABI_Count count, + MPIABI_Datatype datatype, int source, int tag, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Precv_init( + buf, partitions, count, abi2mpi_datatype(datatype), abi2mpi_proc(source), + abi2mpi_tag(tag), abi2mpi_comm(comm), abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Psend_init(const void *buf, int partitions, MPIABI_Count count, + MPIABI_Datatype datatype, int dest, int tag, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Psend_init(buf, partitions, count, abi2mpi_datatype(datatype), + abi2mpi_proc(dest), tag, abi2mpi_comm(comm), + abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +// A.3.3 Datatypes C Bindings + +MPIABI_Aint MPIABI_Aint_add(MPIABI_Aint base, MPIABI_Aint disp) { + return MPI_Aint_add(base, disp); +} + +MPIABI_Aint MPIABI_Aint_diff(MPIABI_Aint addr1, MPIABI_Aint addr2) { + return MPI_Aint_diff(addr1, addr2); +} + +int MPIABI_Get_address(const void *location, MPIABI_Aint *restrict address) { + MPI_Aint mpi_address; + int ierr = MPI_Get_address(location, &mpi_address); + *address = mpi_address; + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Get_elements(const MPIABI_Status *restrict status, + MPIABI_Datatype datatype, int *restrict count) { + const MPI_Status mpi_status = abi2mpi_status(*status); + int ierr = MPI_Get_elements(&mpi_status, abi2mpi_datatype(datatype), count); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Get_elements_c(const MPIABI_Status *restrict status, + MPIABI_Datatype datatype, + MPIABI_Count *restrict count) { + const MPI_Status mpi_status = abi2mpi_status(*status); + MPI_Count mpi_count; + int ierr = + MPI_Get_elements_c(&mpi_status, abi2mpi_datatype(datatype), &mpi_count); + *count = mpi_count; + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Pack(const void *inbuf, int incount, MPIABI_Datatype datatype, + void *outbuf, int outsize, int *restrict position, + MPIABI_Comm comm) { + int ierr = MPI_Pack(inbuf, incount, abi2mpi_datatype(datatype), outbuf, + outsize, position, abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Pack_c(const void *inbuf, MPIABI_Count incount, + MPIABI_Datatype datatype, void *outbuf, MPIABI_Count outsize, + MPIABI_Count *restrict position, MPIABI_Comm comm) { + MPI_Count mpi_position = *position; + int ierr = MPI_Pack_c(inbuf, incount, abi2mpi_datatype(datatype), outbuf, + outsize, &mpi_position, abi2mpi_comm(comm)); + *position = mpi_position; + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Pack_external(const char datarep[], const void *inbuf, int incount, + MPIABI_Datatype datatype, void *outbuf, + MPIABI_Aint outsize, MPIABI_Aint *restrict position) { + MPI_Aint mpi_position = *position; + int ierr = + MPI_Pack_external(datarep, inbuf, incount, abi2mpi_datatype(datatype), + outbuf, outsize, &mpi_position); + *position = mpi_position; + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Pack_external_c(const char datarep[], const void *inbuf, + MPIABI_Count incount, MPIABI_Datatype datatype, + void *outbuf, MPIABI_Count outsize, + MPIABI_Count *restrict position) { + MPI_Count mpi_position = *position; + int ierr = + MPI_Pack_external_c(datarep, inbuf, incount, abi2mpi_datatype(datatype), + outbuf, outsize, &mpi_position); + *position = mpi_position; + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Pack_external_size(const char datarep[], MPIABI_Count incount, + MPIABI_Datatype datatype, + MPIABI_Aint *restrict size) { + MPI_Aint mpi_size; + int ierr = MPI_Pack_external_size(datarep, incount, + abi2mpi_datatype(datatype), &mpi_size); + *size = mpi_size; + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Pack_external_size_c(const char datarep[], MPIABI_Count incount, + MPIABI_Datatype datatype, + MPIABI_Count *restrict size) { + MPI_Count mpi_size; + int ierr = MPI_Pack_external_size_c(datarep, incount, + abi2mpi_datatype(datatype), &mpi_size); + *size = mpi_size; + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Pack_size(int incount, MPIABI_Datatype datatype, MPIABI_Comm comm, + int *restrict size) { + int ierr = MPI_Pack_size(incount, abi2mpi_datatype(datatype), + abi2mpi_comm(comm), size); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Pack_size_c(MPIABI_Count incount, MPIABI_Datatype datatype, + MPIABI_Comm comm, MPIABI_Count *restrict size) { + + MPI_Count mpi_size; + int ierr = MPI_Pack_size_c(incount, abi2mpi_datatype(datatype), + abi2mpi_comm(comm), &mpi_size); + *size = mpi_size; + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_commit(MPIABI_Datatype *restrict datatype) { + MPI_Datatype mpi_datatype = abi2mpi_datatype(*datatype); + int ierr = MPI_Type_commit(&mpi_datatype); + *datatype = mpi2abi_datatype(mpi_datatype); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_contiguous(int count, MPIABI_Datatype oldtype, + MPIABI_Datatype *restrict newtype) { + MPI_Datatype mpi_newtype; + int ierr = + MPI_Type_contiguous(count, abi2mpi_datatype(oldtype), &mpi_newtype); + *newtype = mpi2abi_datatype(mpi_newtype); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_contiguous_c(MPIABI_Count count, MPIABI_Datatype oldtype, + MPIABI_Datatype *restrict newtype) { + MPI_Datatype mpi_newtype; + int ierr = + MPI_Type_contiguous_c(count, abi2mpi_datatype(oldtype), &mpi_newtype); + *newtype = mpi2abi_datatype(mpi_newtype); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_create_darray(int size, int rank, int ndims, + const int array_of_gsizes[], + const int array_of_distribs[], + const int array_of_dargs[], + const int array_of_psizes[], int order, + MPIABI_Datatype oldtype, + MPIABI_Datatype *restrict newtype) { + int mpi_array_of_distribs[ndims]; + for (int n = 0; n < ndims; ++n) + mpi_array_of_distribs[n] = abi2mpi_distrib(array_of_distribs[n]); + MPI_Datatype mpi_newtype; + int ierr = MPI_Type_create_darray(size, rank, ndims, array_of_gsizes, + mpi_array_of_distribs, array_of_dargs, + array_of_psizes, abi2mpi_order(order), + abi2mpi_datatype(oldtype), &mpi_newtype); + *newtype = mpi2abi_datatype(mpi_newtype); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_create_darray_c(int size, int rank, int ndims, + const MPIABI_Count array_of_gsizes[], + const int array_of_distribs[], + const int array_of_dargs[], + const int array_of_psizes[], int order, + MPIABI_Datatype oldtype, + MPIABI_Datatype *restrict newtype) { + MPI_Count mpi_array_of_gsizes[ndims]; + for (int n = 0; n < ndims; ++n) + mpi_array_of_gsizes[n] = array_of_gsizes[n]; + int mpi_array_of_distribs[ndims]; + for (int n = 0; n < ndims; ++n) + mpi_array_of_distribs[n] = abi2mpi_distrib(array_of_distribs[n]); + MPI_Datatype mpi_newtype; + int ierr = MPI_Type_create_darray_c(size, rank, ndims, mpi_array_of_gsizes, + mpi_array_of_distribs, array_of_dargs, + array_of_psizes, abi2mpi_order(order), + abi2mpi_datatype(oldtype), &mpi_newtype); + *newtype = mpi2abi_datatype(mpi_newtype); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_create_hindexed(int count, const int array_of_blocklengths[], + const MPIABI_Aint array_of_displacements[], + MPIABI_Datatype oldtype, + MPIABI_Datatype *restrict newtype) { + MPI_Aint mpi_array_of_displacements[count]; + for (int n = 0; n < count; ++n) + mpi_array_of_displacements[n] = array_of_displacements[n]; + MPI_Datatype mpi_newtype; + int ierr = MPI_Type_create_hindexed(count, array_of_blocklengths, + mpi_array_of_displacements, + abi2mpi_datatype(oldtype), &mpi_newtype); + *newtype = mpi2abi_datatype(mpi_newtype); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_create_hindexed_block( + int count, int blocklength, const MPIABI_Aint array_of_displacements[], + MPIABI_Datatype oldtype, MPIABI_Datatype *restrict newtype) { + MPI_Aint mpi_array_of_displacements[count]; + for (int n = 0; n < count; ++n) + mpi_array_of_displacements[n] = array_of_displacements[n]; + MPI_Datatype mpi_newtype; + int ierr = MPI_Type_create_hindexed_block( + count, blocklength, mpi_array_of_displacements, abi2mpi_datatype(oldtype), + &mpi_newtype); + *newtype = mpi2abi_datatype(mpi_newtype); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_create_hindexed_block_c( + MPIABI_Count count, MPIABI_Count blocklength, + const MPIABI_Count array_of_displacements[], MPIABI_Datatype oldtype, + MPIABI_Datatype *restrict newtype) { + MPI_Count mpi_array_of_displacements[count]; + for (int n = 0; n < count; ++n) + mpi_array_of_displacements[n] = array_of_displacements[n]; + MPI_Datatype mpi_newtype; + int ierr = MPI_Type_create_hindexed_block_c( + count, blocklength, mpi_array_of_displacements, abi2mpi_datatype(oldtype), + &mpi_newtype); + *newtype = mpi2abi_datatype(mpi_newtype); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_create_hindexed_c(MPIABI_Count count, + const MPIABI_Count array_of_blocklengths[], + const MPIABI_Count array_of_displacements[], + MPIABI_Datatype oldtype, + MPIABI_Datatype *restrict newtype) { + MPI_Count mpi_array_of_blocklengths[count]; + for (int n = 0; n < count; ++n) + mpi_array_of_blocklengths[n] = array_of_blocklengths[n]; + MPI_Count mpi_array_of_displacements[count]; + for (int n = 0; n < count; ++n) + mpi_array_of_displacements[n] = array_of_displacements[n]; + MPI_Datatype mpi_newtype; + int ierr = MPI_Type_create_hindexed_c( + count, mpi_array_of_blocklengths, mpi_array_of_displacements, + abi2mpi_datatype(oldtype), &mpi_newtype); + *newtype = mpi2abi_datatype(mpi_newtype); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_create_hvector(int count, int blocklength, MPIABI_Aint stride, + MPIABI_Datatype oldtype, + MPIABI_Datatype *restrict newtype) { + MPI_Datatype mpi_newtype; + int ierr = MPI_Type_create_hvector(count, blocklength, stride, + abi2mpi_datatype(oldtype), &mpi_newtype); + *newtype = mpi2abi_datatype(mpi_newtype); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_create_hvector_c(MPIABI_Count count, MPIABI_Count blocklength, + MPIABI_Count stride, MPIABI_Datatype oldtype, + MPIABI_Datatype *restrict newtype) { + MPI_Datatype mpi_newtype; + int ierr = MPI_Type_create_hvector_c(count, blocklength, stride, + abi2mpi_datatype(oldtype), &mpi_newtype); + *newtype = mpi2abi_datatype(mpi_newtype); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_create_indexed_block(int count, int blocklength, + const int array_of_displacements[], + MPIABI_Datatype oldtype, + MPIABI_Datatype *restrict newtype) { + MPI_Datatype mpi_newtype; + int ierr = + MPI_Type_create_indexed_block(count, blocklength, array_of_displacements, + abi2mpi_datatype(oldtype), &mpi_newtype); + *newtype = mpi2abi_datatype(mpi_newtype); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_create_indexed_block_c( + MPIABI_Count count, MPIABI_Count blocklength, + const MPIABI_Count array_of_displacements[], MPIABI_Datatype oldtype, + MPIABI_Datatype *restrict newtype) { + MPI_Count mpi_array_of_displacements[count]; + for (int n = 0; n < count; ++n) + mpi_array_of_displacements[n] = array_of_displacements[n]; + MPI_Datatype mpi_newtype; + int ierr = MPI_Type_create_indexed_block_c( + count, blocklength, mpi_array_of_displacements, abi2mpi_datatype(oldtype), + &mpi_newtype); + *newtype = mpi2abi_datatype(mpi_newtype); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_create_resized(MPIABI_Datatype oldtype, MPIABI_Aint lb, + MPIABI_Aint extent, + MPIABI_Datatype *restrict newtype) { + MPI_Datatype mpi_newtype; + int ierr = MPI_Type_create_resized(abi2mpi_datatype(oldtype), lb, extent, + &mpi_newtype); + *newtype = mpi2abi_datatype(mpi_newtype); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_create_resized_c(MPIABI_Datatype oldtype, MPIABI_Count lb, + MPIABI_Count extent, + MPIABI_Datatype *restrict newtype) { + MPI_Datatype mpi_newtype; + int ierr = MPI_Type_create_resized_c(abi2mpi_datatype(oldtype), lb, extent, + &mpi_newtype); + *newtype = mpi2abi_datatype(mpi_newtype); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_create_struct(int count, const int array_of_blocklengths[], + const MPIABI_Aint array_of_displacements[], + const MPIABI_Datatype array_of_types[], + MPIABI_Datatype *restrict newtype) { + MPI_Aint mpi_array_of_displacements[count]; + for (int n = 0; n < count; ++n) + mpi_array_of_displacements[n] = array_of_displacements[n]; + MPI_Datatype mpi_array_of_types[count]; + for (int n = 0; n < count; ++n) + mpi_array_of_types[n] = abi2mpi_datatype(array_of_types[n]); + MPI_Datatype mpi_newtype; + int ierr = MPI_Type_create_struct(count, array_of_blocklengths, + mpi_array_of_displacements, + mpi_array_of_types, &mpi_newtype); + *newtype = mpi2abi_datatype(mpi_newtype); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_create_struct_c(MPIABI_Count count, + const MPIABI_Count array_of_blocklengths[], + const MPIABI_Count array_of_displacements[], + const MPIABI_Datatype array_of_types[], + MPIABI_Datatype *restrict newtype) { + MPI_Count mpi_array_of_blocklengths[count]; + for (int n = 0; n < count; ++n) + mpi_array_of_blocklengths[n] = array_of_blocklengths[n]; + MPI_Count mpi_array_of_displacements[count]; + for (int n = 0; n < count; ++n) + mpi_array_of_displacements[n] = array_of_displacements[n]; + MPI_Datatype mpi_array_of_types[count]; + for (int n = 0; n < count; ++n) + mpi_array_of_types[n] = abi2mpi_datatype(array_of_types[n]); + MPI_Datatype mpi_newtype; + int ierr = MPI_Type_create_struct_c(count, mpi_array_of_blocklengths, + mpi_array_of_displacements, + mpi_array_of_types, &mpi_newtype); + *newtype = mpi2abi_datatype(mpi_newtype); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_create_subarray(int ndims, const int array_of_sizes[], + const int array_of_subsizes[], + const int array_of_starts[], int order, + MPIABI_Datatype oldtype, + MPIABI_Datatype *restrict newtype) { + MPI_Datatype mpi_newtype; + int ierr = MPI_Type_create_subarray(ndims, array_of_sizes, array_of_subsizes, + array_of_starts, abi2mpi_order(order), + abi2mpi_datatype(oldtype), &mpi_newtype); + *newtype = mpi2abi_datatype(mpi_newtype); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_create_subarray_c(int ndims, + const MPIABI_Count array_of_sizes[], + const MPIABI_Count array_of_subsizes[], + const MPIABI_Count array_of_starts[], + int order, MPIABI_Datatype oldtype, + MPIABI_Datatype *restrict newtype) { + MPI_Count mpi_array_of_sizes[ndims]; + for (int n = 0; n < ndims; ++n) + mpi_array_of_sizes[n] = array_of_sizes[n]; + MPI_Count mpi_array_of_subsizes[ndims]; + for (int n = 0; n < ndims; ++n) + mpi_array_of_subsizes[n] = array_of_subsizes[n]; + MPI_Count mpi_array_of_starts[ndims]; + for (int n = 0; n < ndims; ++n) + mpi_array_of_starts[n] = array_of_starts[n]; + MPI_Datatype mpi_newtype; + int ierr = MPI_Type_create_subarray_c( + ndims, mpi_array_of_sizes, mpi_array_of_subsizes, mpi_array_of_starts, + abi2mpi_order(order), abi2mpi_datatype(oldtype), &mpi_newtype); + *newtype = mpi2abi_datatype(mpi_newtype); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_dup(MPIABI_Datatype oldtype, + MPIABI_Datatype *restrict newtype) { + MPI_Datatype mpi_newtype; + int ierr = MPI_Type_dup(abi2mpi_datatype(oldtype), &mpi_newtype); + *newtype = mpi2abi_datatype(mpi_newtype); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_free(MPIABI_Datatype *restrict datatype) { + MPI_Datatype mpi_datatype = abi2mpi_datatype(*datatype); + int ierr = MPI_Type_free(&mpi_datatype); + *datatype = mpi2abi_datatype(mpi_datatype); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_get_contents(MPIABI_Datatype datatype, int max_integers, + int max_addresses, int max_datatypes, + int array_of_integers[], + MPIABI_Aint array_of_addresses[], + MPIABI_Datatype array_of_datatypes[]) { + int ierr = MPI_Type_get_contents( + abi2mpi_datatype(datatype), max_integers, max_addresses, max_datatypes, + array_of_integers, (MPI_Aint *)array_of_addresses, + (MPI_Datatype *)array_of_datatypes); + for (int n = max_addresses - 1; n >= 0; --n) + array_of_addresses[n] = ((MPI_Aint *)array_of_addresses)[n]; + for (int n = max_datatypes - 1; n >= 0; --n) + array_of_datatypes[n] = + mpi2abi_datatype(((MPI_Datatype *)array_of_datatypes)[n]); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_get_contents_c( + MPIABI_Datatype datatype, MPIABI_Count max_integers, + MPIABI_Count max_addresses, MPIABI_Count max_large_counts, + MPIABI_Count max_datatypes, int array_of_integers[], + MPIABI_Aint array_of_addresses[], MPIABI_Count array_of_large_counts[], + MPIABI_Datatype array_of_datatypes[]) { + int ierr = MPI_Type_get_contents_c( + abi2mpi_datatype(datatype), max_integers, max_addresses, max_large_counts, + max_datatypes, array_of_integers, (MPI_Aint *)array_of_addresses, + (MPI_Count *)array_of_large_counts, (MPI_Datatype *)array_of_datatypes); + for (int n = max_addresses - 1; n >= 0; --n) + array_of_addresses[n] = ((MPI_Aint *)array_of_addresses)[n]; + for (int n = max_large_counts - 1; n >= 0; --n) + array_of_large_counts[n] = ((MPI_Count *)array_of_large_counts)[n]; + for (int n = max_datatypes - 1; n >= 0; --n) + array_of_datatypes[n] = + mpi2abi_datatype(((MPI_Datatype *)array_of_datatypes)[n]); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_get_envelope(MPIABI_Datatype datatype, + int *restrict num_integers, + int *restrict num_addresses, + int *restrict num_datatypes, + int *restrict combiner) { + int ierr = MPI_Type_get_envelope(abi2mpi_datatype(datatype), num_integers, + num_addresses, num_datatypes, combiner); + *combiner = mpi2abi_combiner(*combiner); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_get_envelope_c(MPIABI_Datatype datatype, + MPIABI_Count *restrict num_integers, + MPIABI_Count *restrict num_addresses, + MPIABI_Count *restrict num_large_counts, + MPIABI_Count *restrict num_datatypes, + int *restrict combiner) { + MPI_Count mpi_num_integers; + MPI_Count mpi_num_addresses; + MPI_Count mpi_num_large_counts; + MPI_Count mpi_num_datatypes; + int ierr = MPI_Type_get_envelope_c( + abi2mpi_datatype(datatype), &mpi_num_integers, &mpi_num_addresses, + &mpi_num_large_counts, &mpi_num_datatypes, combiner); + *num_integers = mpi_num_integers; + *num_addresses = mpi_num_addresses; + *num_large_counts = mpi_num_large_counts; + *num_datatypes = mpi_num_datatypes; + *combiner = mpi2abi_combiner(*combiner); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_get_extent(MPIABI_Datatype datatype, MPIABI_Aint *restrict lb, + MPIABI_Aint *restrict extent) { + MPI_Aint mpi_lb; + MPI_Aint mpi_extent; + int ierr = + MPI_Type_get_extent(abi2mpi_datatype(datatype), &mpi_lb, &mpi_extent); + *lb = mpi_lb == MPI_UNDEFINED ? MPIABI_UNDEFINED : mpi_lb; + *extent = mpi_extent == MPI_UNDEFINED ? MPIABI_UNDEFINED : mpi_extent; + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_get_extent_c(MPIABI_Datatype datatype, + MPIABI_Count *restrict lb, + MPIABI_Count *restrict extent) { + MPI_Count mpi_lb; + MPI_Count mpi_extent; + int ierr = + MPI_Type_get_extent_c(abi2mpi_datatype(datatype), &mpi_lb, &mpi_extent); + *lb = mpi_lb; + *extent = mpi_extent; + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_get_true_extent(MPIABI_Datatype datatype, + MPIABI_Aint *restrict true_lb, + MPIABI_Aint *restrict true_extent) { + MPI_Aint mpi_true_lb; + MPI_Aint mpi_true_extent; + int ierr = MPI_Type_get_true_extent(abi2mpi_datatype(datatype), &mpi_true_lb, + &mpi_true_extent); + *true_lb = mpi_true_lb; + *true_extent = mpi_true_extent; + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_get_true_extent_c(MPIABI_Datatype datatype, + MPIABI_Count *restrict true_lb, + MPIABI_Count *restrict true_extent) { + + MPI_Count mpi_true_lb; + MPI_Count mpi_true_extent; + int ierr = MPI_Type_get_true_extent_c(abi2mpi_datatype(datatype), + &mpi_true_lb, &mpi_true_extent); + *true_lb = mpi_true_lb; + *true_extent = mpi_true_extent; + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_indexed(int count, const int array_of_blocklengths[], + const int array_of_displacements[], + MPIABI_Datatype oldtype, + MPIABI_Datatype *restrict newtype) { + MPI_Datatype mpi_newtype; + int ierr = + MPI_Type_indexed(count, array_of_blocklengths, array_of_displacements, + abi2mpi_datatype(oldtype), &mpi_newtype); + *newtype = mpi2abi_datatype(mpi_newtype); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_indexed_c(MPIABI_Count count, + const MPIABI_Count array_of_blocklengths[], + const MPIABI_Count array_of_displacements[], + MPIABI_Datatype oldtype, + MPIABI_Datatype *restrict newtype) { + MPI_Count mpi_array_of_blocklengths[count]; + for (int n = 0; n < count; ++n) + mpi_array_of_blocklengths[n] = array_of_blocklengths[n]; + MPI_Count mpi_array_of_displacements[count]; + for (int n = 0; n < count; ++n) + mpi_array_of_displacements[n] = array_of_displacements[n]; + MPI_Datatype mpi_newtype; + int ierr = MPI_Type_indexed_c(count, mpi_array_of_blocklengths, + mpi_array_of_displacements, + abi2mpi_datatype(oldtype), &mpi_newtype); + *newtype = mpi2abi_datatype(mpi_newtype); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_size(MPIABI_Datatype datatype, int *restrict size) { + int ierr = MPI_Type_size(abi2mpi_datatype(datatype), size); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_size_c(MPIABI_Datatype datatype, MPIABI_Count *restrict size) { + MPI_Count mpi_size; + int ierr = MPI_Type_size_c(abi2mpi_datatype(datatype), &mpi_size); + *size = mpi_size; + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_vector(int count, int blocklength, int stride, + MPIABI_Datatype oldtype, + MPIABI_Datatype *restrict newtype) { + MPI_Datatype mpi_newtype; + int ierr = MPI_Type_vector(count, blocklength, stride, + abi2mpi_datatype(oldtype), &mpi_newtype); + *newtype = mpi2abi_datatype(mpi_newtype); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_vector_c(MPIABI_Count count, MPIABI_Count blocklength, + MPIABI_Count stride, MPIABI_Datatype oldtype, + MPIABI_Datatype *restrict newtype) { + MPI_Datatype mpi_newtype; + int ierr = MPI_Type_vector_c(count, blocklength, stride, + abi2mpi_datatype(oldtype), &mpi_newtype); + *newtype = mpi2abi_datatype(mpi_newtype); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Unpack(const void *inbuf, int insize, int *restrict position, + void *outbuf, int outcount, MPIABI_Datatype datatype, + MPIABI_Comm comm) { + int ierr = MPI_Unpack(inbuf, insize, position, outbuf, outcount, + abi2mpi_datatype(datatype), abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Unpack_c(const void *inbuf, MPIABI_Count insize, + MPIABI_Count *restrict position, void *outbuf, + MPIABI_Count outcount, MPIABI_Datatype datatype, + MPIABI_Comm comm) { + MPI_Count mpi_position; + int ierr = MPI_Unpack_c(inbuf, insize, &mpi_position, outbuf, outcount, + abi2mpi_datatype(datatype), abi2mpi_comm(comm)); + *position = mpi_position; + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Unpack_external(const char datarep[], const void *inbuf, + MPIABI_Aint insize, MPIABI_Aint *restrict position, + void *outbuf, int outcount, + MPIABI_Datatype datatype) { + MPI_Aint mpi_position = *position; + int ierr = MPI_Unpack_external(datarep, inbuf, insize, &mpi_position, outbuf, + outcount, abi2mpi_datatype(datatype)); + *position = mpi_position; + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Unpack_external_c(const char datarep[], const void *inbuf, + MPIABI_Count insize, + MPIABI_Count *restrict position, void *outbuf, + MPIABI_Count outcount, MPIABI_Datatype datatype) { + MPI_Count mpi_position = *position; + int ierr = + MPI_Unpack_external_c(datarep, inbuf, insize, &mpi_position, outbuf, + outcount, abi2mpi_datatype(datatype)); + *position = mpi_position; + return mpi2abi_errorcode(ierr); +} + +// A.3.4 Collective Communication C Bindings + +int MPIABI_Allgather(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, int recvcount, + MPIABI_Datatype recvtype, MPIABI_Comm comm) { + int ierr = MPI_Allgather(abi2mpi_buffer(sendbuf), sendcount, + abi2mpi_datatype(sendtype), recvbuf, recvcount, + abi2mpi_datatype(recvtype), abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Allgather_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm) { + int ierr = MPI_Allgather_c(abi2mpi_buffer(sendbuf), sendcount, + abi2mpi_datatype(sendtype), recvbuf, recvcount, + abi2mpi_datatype(recvtype), abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Allgather_init(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Allgather_init(abi2mpi_buffer(sendbuf), sendcount, + abi2mpi_datatype(sendtype), recvbuf, recvcount, + abi2mpi_datatype(recvtype), abi2mpi_comm(comm), + abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Allgather_init_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Allgather_init_c( + abi2mpi_buffer(sendbuf), sendcount, abi2mpi_datatype(sendtype), recvbuf, + recvcount, abi2mpi_datatype(recvtype), abi2mpi_comm(comm), + abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Allgatherv(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPIABI_Datatype recvtype, MPIABI_Comm comm) { + int ierr = MPI_Allgatherv( + abi2mpi_buffer(sendbuf), sendcount, abi2mpi_datatype(sendtype), recvbuf, + recvcounts, displs, abi2mpi_datatype(recvtype), abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Allgatherv_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], + const MPIABI_Aint displs[], MPIABI_Datatype recvtype, + MPIABI_Comm comm) { +#if SIZEOF_MPI_COUNT == SIZEOF_PTRDIFF_T && SIZEOF_MPI_AINT == SIZEOF_PTRDIFF_T + const MPI_Count *mpi_recvcounts = (const MPI_Count *)recvcounts; + const MPI_Aint *mpi_displs = (const MPI_Aint *)displs; +#else + int size; + int ierr1 = MPIABI_Comm_size(comm, &size); + if (ierr1) + return ierr1; + MPI_Count mpi_recvcounts[size]; + for (int n = 0; n < size; ++n) + mpi_recvcounts[n] = recvcounts[n]; + MPI_Aint mpi_displs[size]; + for (int n = 0; n < size; ++n) + mpi_displs[n] = displs[n]; +#endif + int ierr = MPI_Allgatherv_c(abi2mpi_buffer(sendbuf), sendcount, + abi2mpi_datatype(sendtype), recvbuf, + mpi_recvcounts, mpi_displs, + abi2mpi_datatype(recvtype), abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Allgatherv_init(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Allgatherv_init( + abi2mpi_buffer(sendbuf), sendcount, abi2mpi_datatype(sendtype), recvbuf, + recvcounts, displs, abi2mpi_datatype(recvtype), abi2mpi_comm(comm), + abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Allgatherv_init_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], + const MPIABI_Aint displs[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Info info, + MPIABI_Request *restrict request) { +#if SIZEOF_MPI_COUNT == SIZEOF_PTRDIFF_T && SIZEOF_MPI_AINT == SIZEOF_PTRDIFF_T + const MPI_Count *mpi_recvcounts = (const MPI_Count *)recvcounts; + const MPI_Aint *mpi_displs = (const MPI_Aint *)displs; +#else + int size; + int ierr1 = MPIABI_Comm_size(comm, &size); + if (ierr1) + return ierr1; + MPI_Count mpi_recvcounts[size]; + for (int n = 0; n < size; ++n) + mpi_recvcounts[n] = recvcounts[n]; + MPI_Aint mpi_displs[size]; + for (int n = 0; n < size; ++n) + mpi_displs[n] = displs[n]; +#endif + MPI_Request mpi_request; + int ierr = MPI_Allgatherv_init_c( + abi2mpi_buffer(sendbuf), sendcount, abi2mpi_datatype(sendtype), recvbuf, + mpi_recvcounts, mpi_displs, abi2mpi_datatype(recvtype), + abi2mpi_comm(comm), abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Allreduce(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm) { + int ierr = MPI_Allreduce(abi2mpi_buffer(sendbuf), recvbuf, count, + abi2mpi_datatype(datatype), abi2mpi_op(op), + abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Allreduce_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm) { + int ierr = MPI_Allreduce_c(abi2mpi_buffer(sendbuf), recvbuf, count, + abi2mpi_datatype(datatype), abi2mpi_op(op), + abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Allreduce_init(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Allreduce_init( + abi2mpi_buffer(sendbuf), recvbuf, count, abi2mpi_datatype(datatype), + abi2mpi_op(op), abi2mpi_comm(comm), abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Allreduce_init_c(const void *sendbuf, void *recvbuf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Allreduce_init_c( + abi2mpi_buffer(sendbuf), recvbuf, count, abi2mpi_datatype(datatype), + abi2mpi_op(op), abi2mpi_comm(comm), abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Alltoall(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, int recvcount, + MPIABI_Datatype recvtype, MPIABI_Comm comm) { + int ierr = MPI_Alltoall(abi2mpi_buffer(sendbuf), sendcount, + abi2mpi_datatype(sendtype), recvbuf, recvcount, + abi2mpi_datatype(recvtype), abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Alltoall_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm) { + int ierr = MPI_Alltoall_c(abi2mpi_buffer(sendbuf), sendcount, + abi2mpi_datatype(sendtype), recvbuf, recvcount, + abi2mpi_datatype(recvtype), abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Alltoall_init(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, int recvcount, + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Alltoall_init(abi2mpi_buffer(sendbuf), sendcount, + abi2mpi_datatype(sendtype), recvbuf, recvcount, + abi2mpi_datatype(recvtype), abi2mpi_comm(comm), + abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Alltoall_init_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Alltoall_init_c(abi2mpi_buffer(sendbuf), sendcount, + abi2mpi_datatype(sendtype), recvbuf, recvcount, + abi2mpi_datatype(recvtype), abi2mpi_comm(comm), + abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Alltoallv(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPIABI_Datatype sendtype, + void *recvbuf, const int recvcounts[], const int rdispls[], + MPIABI_Datatype recvtype, MPIABI_Comm comm) { + int ierr = + MPI_Alltoallv(abi2mpi_buffer(sendbuf), sendcounts, sdispls, + abi2mpi_datatype(sendtype), recvbuf, recvcounts, rdispls, + abi2mpi_datatype(recvtype), abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Alltoallv_c(const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], MPIABI_Datatype sendtype, + void *recvbuf, const MPIABI_Count recvcounts[], + const MPIABI_Aint rdispls[], MPIABI_Datatype recvtype, + MPIABI_Comm comm) { +#if SIZEOF_MPI_COUNT == SIZEOF_PTRDIFF_T && SIZEOF_MPI_AINT == SIZEOF_PTRDIFF_T + const MPI_Count *mpi_sendcounts = (const MPI_Count *)sendcounts; + const MPI_Aint *mpi_sdispls = (const MPI_Aint *)sdispls; + const MPI_Count *mpi_recvcounts = (const MPI_Count *)recvcounts; + const MPI_Aint *mpi_rdispls = (const MPI_Aint *)rdispls; +#else + int size; + int ierr1 = MPIABI_Comm_size(comm, &size); + if (ierr1) + return ierr1; + MPI_Count mpi_sendcounts[size]; + for (int n = 0; n < size; ++n) + mpi_sendcounts[n] = sendcounts[n]; + MPI_Aint mpi_sdispls[size]; + for (int n = 0; n < size; ++n) + mpi_sdispls[n] = sdispls[n]; + MPI_Count mpi_recvcounts[size]; + for (int n = 0; n < size; ++n) + mpi_recvcounts[n] = recvcounts[n]; + MPI_Aint mpi_rdispls[size]; + for (int n = 0; n < size; ++n) + mpi_rdispls[n] = rdispls[n]; +#endif + int ierr = MPI_Alltoallv_c(abi2mpi_buffer(sendbuf), mpi_sendcounts, + mpi_sdispls, abi2mpi_datatype(sendtype), recvbuf, + mpi_recvcounts, mpi_rdispls, + abi2mpi_datatype(recvtype), abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Alltoallv_init(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPIABI_Datatype sendtype, + void *recvbuf, const int recvcounts[], + const int rdispls[], MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Alltoallv_init( + abi2mpi_buffer(sendbuf), sendcounts, sdispls, abi2mpi_datatype(sendtype), + recvbuf, recvcounts, rdispls, abi2mpi_datatype(recvtype), + abi2mpi_comm(comm), abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Alltoallv_init_c( + const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], const MPIABI_Aint rdispls[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *restrict request) { +#if SIZEOF_MPI_COUNT == SIZEOF_PTRDIFF_T && SIZEOF_MPI_AINT == SIZEOF_PTRDIFF_T + const MPI_Count *mpi_sendcounts = (const MPI_Count *)sendcounts; + const MPI_Aint *mpi_sdispls = (const MPI_Aint *)sdispls; + const MPI_Count *mpi_recvcounts = (const MPI_Count *)recvcounts; + const MPI_Aint *mpi_rdispls = (const MPI_Aint *)rdispls; +#else + int size; + int ierr1 = MPIABI_Comm_size(comm, &size); + if (ierr1) + return ierr1; + MPI_Count mpi_sendcounts[size]; + for (int n = 0; n < size; ++n) + mpi_sendcounts[n] = sendcounts[n]; + MPI_Aint mpi_sdispls[size]; + for (int n = 0; n < size; ++n) + mpi_sdispls[n] = sdispls[n]; + MPI_Count mpi_recvcounts[size]; + for (int n = 0; n < size; ++n) + mpi_recvcounts[n] = recvcounts[n]; + MPI_Aint mpi_rdispls[size]; + for (int n = 0; n < size; ++n) + mpi_rdispls[n] = rdispls[n]; +#endif + MPI_Request mpi_request; + int ierr = MPI_Alltoallv_init_c( + abi2mpi_buffer(sendbuf), mpi_sendcounts, mpi_sdispls, + abi2mpi_datatype(sendtype), recvbuf, mpi_recvcounts, mpi_rdispls, + abi2mpi_datatype(recvtype), abi2mpi_comm(comm), abi2mpi_info(info), + &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Alltoallw(const void *sendbuf, const int sendcounts[], + const int sdispls[], const MPIABI_Datatype sendtypes[], + void *recvbuf, const int recvcounts[], const int rdispls[], + const MPIABI_Datatype recvtypes[], MPIABI_Comm comm) { + int size; + int ierr = MPIABI_Comm_size(comm, &size); + if (ierr) + return ierr; + MPI_Datatype mpi_sendtypes[size]; + for (int n = 0; n < size; ++n) + mpi_sendtypes[n] = abi2mpi_datatype(sendtypes[n]); + MPI_Datatype mpi_recvtypes[size]; + for (int n = 0; n < size; ++n) + mpi_recvtypes[n] = abi2mpi_datatype(recvtypes[n]); + ierr = MPI_Alltoallw(abi2mpi_buffer(sendbuf), sendcounts, sdispls, + mpi_sendtypes, recvbuf, recvcounts, rdispls, + mpi_recvtypes, abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Alltoallw_c(const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], + const MPIABI_Datatype sendtypes[], void *recvbuf, + const MPIABI_Count recvcounts[], + const MPIABI_Aint rdispls[], + const MPIABI_Datatype recvtypes[], MPIABI_Comm comm) { + int size; + int ierr1 = MPIABI_Comm_size(comm, &size); + if (ierr1) + return ierr1; +#if SIZEOF_MPI_COUNT == SIZEOF_PTRDIFF_T && SIZEOF_MPI_AINT == SIZEOF_PTRDIFF_T + const MPI_Count *mpi_sendcounts = (const MPI_Count *)sendcounts; + const MPI_Aint *mpi_sdispls = (const MPI_Aint *)sdispls; + const MPI_Count *mpi_recvcounts = (const MPI_Count *)recvcounts; + const MPI_Aint *mpi_rdispls = (const MPI_Aint *)rdispls; +#else + MPI_Count mpi_sendcounts[size]; + for (int n = 0; n < size; ++n) + mpi_sendcounts[n] = sendcounts[n]; + MPI_Aint mpi_sdispls[size]; + for (int n = 0; n < size; ++n) + mpi_sdispls[n] = sdispls[n]; + MPI_Count mpi_recvcounts[size]; + for (int n = 0; n < size; ++n) + mpi_recvcounts[n] = recvcounts[n]; + MPI_Aint mpi_rdispls[size]; + for (int n = 0; n < size; ++n) + mpi_rdispls[n] = rdispls[n]; +#endif + MPI_Datatype mpi_sendtypes[size]; + for (int n = 0; n < size; ++n) + mpi_sendtypes[n] = abi2mpi_datatype(sendtypes[n]); + MPI_Datatype mpi_recvtypes[size]; + for (int n = 0; n < size; ++n) + mpi_recvtypes[n] = abi2mpi_datatype(recvtypes[n]); + int ierr = MPI_Alltoallw_c( + abi2mpi_buffer(sendbuf), mpi_sendcounts, mpi_sdispls, mpi_sendtypes, + recvbuf, mpi_recvcounts, mpi_rdispls, mpi_recvtypes, abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Alltoallw_init(const void *sendbuf, const int sendcounts[], + const int sdispls[], + const MPIABI_Datatype sendtypes[], void *recvbuf, + const int recvcounts[], const int rdispls[], + const MPIABI_Datatype recvtypes[], MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *restrict request) { + int size; + int ierr = MPIABI_Comm_size(comm, &size); + if (ierr) + return ierr; + MPI_Datatype mpi_sendtypes[size]; + for (int n = 0; n < size; ++n) + mpi_sendtypes[n] = abi2mpi_datatype(sendtypes[n]); + MPI_Datatype mpi_recvtypes[size]; + for (int n = 0; n < size; ++n) + mpi_recvtypes[n] = abi2mpi_datatype(recvtypes[n]); + MPI_Request mpi_request; + ierr = MPI_Alltoallw_init(abi2mpi_buffer(sendbuf), sendcounts, sdispls, + mpi_sendtypes, recvbuf, recvcounts, rdispls, + mpi_recvtypes, abi2mpi_comm(comm), + abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Alltoallw_init_c( + const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], const MPIABI_Datatype sendtypes[], + void *recvbuf, const MPIABI_Count recvcounts[], const MPIABI_Aint rdispls[], + const MPIABI_Datatype recvtypes[], MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *restrict request) { + int size; + int ierr1 = MPIABI_Comm_size(comm, &size); + if (ierr1) + return ierr1; +#if SIZEOF_MPI_COUNT == SIZEOF_PTRDIFF_T && SIZEOF_MPI_AINT == SIZEOF_PTRDIFF_T + const MPI_Count *mpi_sendcounts = (const MPI_Count *)sendcounts; + const MPI_Aint *mpi_sdispls = (const MPI_Aint *)sdispls; + const MPI_Count *mpi_recvcounts = (const MPI_Count *)recvcounts; + const MPI_Aint *mpi_rdispls = (const MPI_Aint *)rdispls; +#else + MPI_Count mpi_sendcounts[size]; + for (int n = 0; n < size; ++n) + mpi_sendcounts[n] = sendcounts[n]; + MPI_Aint mpi_sdispls[size]; + for (int n = 0; n < size; ++n) + mpi_sdispls[n] = sdispls[n]; + MPI_Count mpi_recvcounts[size]; + for (int n = 0; n < size; ++n) + mpi_recvcounts[n] = recvcounts[n]; + MPI_Aint mpi_rdispls[size]; + for (int n = 0; n < size; ++n) + mpi_rdispls[n] = rdispls[n]; +#endif + MPI_Datatype mpi_sendtypes[size]; + for (int n = 0; n < size; ++n) + mpi_sendtypes[n] = abi2mpi_datatype(sendtypes[n]); + MPI_Datatype mpi_recvtypes[size]; + for (int n = 0; n < size; ++n) + mpi_recvtypes[n] = abi2mpi_datatype(recvtypes[n]); + MPI_Request mpi_request; + int ierr = MPI_Alltoallw_init_c( + abi2mpi_buffer(sendbuf), mpi_sendcounts, mpi_sdispls, mpi_sendtypes, + recvbuf, mpi_recvcounts, mpi_rdispls, mpi_recvtypes, abi2mpi_comm(comm), + abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Barrier(MPIABI_Comm comm) { + int ierr = MPI_Barrier(abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Barrier_init(MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = + MPI_Barrier_init(abi2mpi_comm(comm), abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Bcast(void *buffer, int count, MPIABI_Datatype datatype, int root, + MPIABI_Comm comm) { + int ierr = MPI_Bcast(buffer, count, abi2mpi_datatype(datatype), + abi2mpi_root(root), abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Bcast_c(void *buffer, MPIABI_Count count, MPIABI_Datatype datatype, + int root, MPIABI_Comm comm) { + int ierr = MPI_Bcast_c(buffer, count, abi2mpi_datatype(datatype), + abi2mpi_root(root), abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Bcast_init(void *buffer, int count, MPIABI_Datatype datatype, + int root, MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Bcast_init(buffer, count, abi2mpi_datatype(datatype), + abi2mpi_root(root), abi2mpi_comm(comm), + abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Bcast_init_c(void *buffer, MPIABI_Count count, + MPIABI_Datatype datatype, int root, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Bcast_init_c(buffer, count, abi2mpi_datatype(datatype), + abi2mpi_root(root), abi2mpi_comm(comm), + abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Exscan(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm) { + int ierr = MPI_Exscan(abi2mpi_buffer(sendbuf), recvbuf, count, + abi2mpi_datatype(datatype), abi2mpi_op(op), + abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Exscan_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm) { + int ierr = MPI_Exscan_c(abi2mpi_buffer(sendbuf), recvbuf, count, + abi2mpi_datatype(datatype), abi2mpi_op(op), + abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Exscan_init(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Exscan_init( + abi2mpi_buffer(sendbuf), recvbuf, count, abi2mpi_datatype(datatype), + abi2mpi_op(op), abi2mpi_comm(comm), abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Exscan_init_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Exscan_init_c( + abi2mpi_buffer(sendbuf), recvbuf, count, abi2mpi_datatype(datatype), + abi2mpi_op(op), abi2mpi_comm(comm), abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Gather(const void *sendbuf, int sendcount, MPIABI_Datatype sendtype, + void *recvbuf, int recvcount, MPIABI_Datatype recvtype, + int root, MPIABI_Comm comm) { + int ierr = + MPI_Gather(abi2mpi_buffer(sendbuf), sendcount, abi2mpi_datatype(sendtype), + recvbuf, recvcount, abi2mpi_datatype(recvtype), + abi2mpi_root(root), abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Gather_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, MPIABI_Datatype recvtype, int root, + MPIABI_Comm comm) { + int ierr = MPI_Gather_c(abi2mpi_buffer(sendbuf), sendcount, + abi2mpi_datatype(sendtype), recvbuf, recvcount, + abi2mpi_datatype(recvtype), abi2mpi_root(root), + abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Gather_init(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, int recvcount, + MPIABI_Datatype recvtype, int root, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Gather_init( + abi2mpi_buffer(sendbuf), sendcount, abi2mpi_datatype(sendtype), recvbuf, + recvcount, abi2mpi_datatype(recvtype), abi2mpi_root(root), + abi2mpi_comm(comm), abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Gather_init_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, MPIABI_Datatype recvtype, + int root, MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Gather_init_c( + abi2mpi_buffer(sendbuf), sendcount, abi2mpi_datatype(sendtype), recvbuf, + recvcount, abi2mpi_datatype(recvtype), abi2mpi_root(root), + abi2mpi_comm(comm), abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Gatherv(const void *sendbuf, int sendcount, MPIABI_Datatype sendtype, + void *recvbuf, const int recvcounts[], const int displs[], + MPIABI_Datatype recvtype, int root, MPIABI_Comm comm) { + int ierr = MPI_Gatherv(abi2mpi_buffer(sendbuf), sendcount, + abi2mpi_datatype(sendtype), recvbuf, recvcounts, + displs, abi2mpi_datatype(recvtype), abi2mpi_root(root), + abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Gatherv_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], + const MPIABI_Aint displs[], MPIABI_Datatype recvtype, + int root, MPIABI_Comm comm) { +#if SIZEOF_MPI_COUNT == SIZEOF_PTRDIFF_T && SIZEOF_MPI_AINT == SIZEOF_PTRDIFF_T + const MPI_Count *mpi_recvcounts = (const MPI_Count *)recvcounts; + const MPI_Aint *mpi_displs = (const MPI_Aint *)displs; +#else + int size; + int ierr1 = MPIABI_Comm_size(comm, &size); + if (ierr1) + return ierr1; + MPI_Count mpi_recvcounts[size]; + for (int n = 0; n < size; ++n) + mpi_recvcounts[n] = recvcounts[n]; + MPI_Aint mpi_displs[size]; + for (int n = 0; n < size; ++n) + mpi_displs[n] = displs[n]; +#endif + int ierr = MPI_Gatherv_c(abi2mpi_buffer(sendbuf), sendcount, + abi2mpi_datatype(sendtype), recvbuf, mpi_recvcounts, + mpi_displs, abi2mpi_datatype(recvtype), + abi2mpi_root(root), abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Gatherv_init(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPIABI_Datatype recvtype, int root, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Gatherv_init( + abi2mpi_buffer(sendbuf), sendcount, abi2mpi_datatype(sendtype), recvbuf, + recvcounts, displs, abi2mpi_datatype(recvtype), abi2mpi_root(root), + abi2mpi_comm(comm), abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Gatherv_init_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], + const MPIABI_Aint displs[], MPIABI_Datatype recvtype, + int root, MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *restrict request) { +#if SIZEOF_MPI_COUNT == SIZEOF_PTRDIFF_T && SIZEOF_MPI_AINT == SIZEOF_PTRDIFF_T + const MPI_Count *mpi_recvcounts = (const MPI_Count *)recvcounts; + const MPI_Aint *mpi_displs = (const MPI_Aint *)displs; +#else + int size; + int ierr1 = MPIABI_Comm_size(comm, &size); + if (ierr1) + return ierr1; + MPI_Count mpi_recvcounts[size]; + for (int n = 0; n < size; ++n) + mpi_recvcounts[n] = recvcounts[n]; + MPI_Aint mpi_displs[size]; + for (int n = 0; n < size; ++n) + mpi_displs[n] = displs[n]; +#endif + MPI_Request mpi_request; + int ierr = MPI_Gatherv_init_c( + abi2mpi_buffer(sendbuf), sendcount, abi2mpi_datatype(sendtype), recvbuf, + mpi_recvcounts, mpi_displs, abi2mpi_datatype(recvtype), + abi2mpi_root(root), abi2mpi_comm(comm), abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Iallgather(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, int recvcount, + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Iallgather( + abi2mpi_buffer(sendbuf), sendcount, abi2mpi_datatype(sendtype), recvbuf, + recvcount, abi2mpi_datatype(recvtype), abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Iallgather_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Iallgather_c( + abi2mpi_buffer(sendbuf), sendcount, abi2mpi_datatype(sendtype), recvbuf, + recvcount, abi2mpi_datatype(recvtype), abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Iallgatherv(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Iallgatherv(abi2mpi_buffer(sendbuf), sendcount, + abi2mpi_datatype(sendtype), recvbuf, recvcounts, + displs, abi2mpi_datatype(recvtype), + abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Iallgatherv_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], + const MPIABI_Aint displs[], MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Request *restrict request) { +#if SIZEOF_MPI_COUNT == SIZEOF_PTRDIFF_T && SIZEOF_MPI_AINT == SIZEOF_PTRDIFF_T + const MPI_Count *mpi_recvcounts = (const MPI_Count *)recvcounts; + const MPI_Aint *mpi_displs = (const MPI_Aint *)displs; +#else + int size; + int ierr1 = MPIABI_Comm_size(comm, &size); + if (ierr1) + return ierr1; + MPI_Count mpi_recvcounts[size]; + for (int n = 0; n < size; ++n) + mpi_recvcounts[n] = recvcounts[n]; + MPI_Aint mpi_displs[size]; + for (int n = 0; n < size; ++n) + mpi_displs[n] = displs[n]; +#endif + MPI_Request mpi_request; + int ierr = MPI_Iallgatherv_c( + abi2mpi_buffer(sendbuf), sendcount, abi2mpi_datatype(sendtype), recvbuf, + mpi_recvcounts, mpi_displs, abi2mpi_datatype(recvtype), + abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Iallreduce(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Iallreduce(abi2mpi_buffer(sendbuf), recvbuf, count, + abi2mpi_datatype(datatype), abi2mpi_op(op), + abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Iallreduce_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm, MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Iallreduce_c(abi2mpi_buffer(sendbuf), recvbuf, count, + abi2mpi_datatype(datatype), abi2mpi_op(op), + abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Ialltoall(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, int recvcount, + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Ialltoall( + abi2mpi_buffer(sendbuf), sendcount, abi2mpi_datatype(sendtype), recvbuf, + recvcount, abi2mpi_datatype(recvtype), abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Ialltoall_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Ialltoall_c( + abi2mpi_buffer(sendbuf), sendcount, abi2mpi_datatype(sendtype), recvbuf, + recvcount, abi2mpi_datatype(recvtype), abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Ialltoallv(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPIABI_Datatype sendtype, + void *recvbuf, const int recvcounts[], + const int rdispls[], MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Ialltoallv(abi2mpi_buffer(sendbuf), sendcounts, sdispls, + abi2mpi_datatype(sendtype), recvbuf, recvcounts, + rdispls, abi2mpi_datatype(recvtype), + abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Ialltoallv_c(const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], MPIABI_Datatype sendtype, + void *recvbuf, const MPIABI_Count recvcounts[], + const MPIABI_Aint rdispls[], MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Request *restrict request) { +#if SIZEOF_MPI_COUNT == SIZEOF_PTRDIFF_T && SIZEOF_MPI_AINT == SIZEOF_PTRDIFF_T + const MPI_Count *mpi_sendcounts = (const MPI_Count *)sendcounts; + const MPI_Aint *mpi_sdispls = (const MPI_Aint *)sdispls; + const MPI_Count *mpi_recvcounts = (const MPI_Count *)recvcounts; + const MPI_Aint *mpi_rdispls = (const MPI_Aint *)rdispls; +#else + int size; + int ierr1 = MPIABI_Comm_size(comm, &size); + if (ierr1) + return ierr1; + MPI_Count mpi_sendcounts[size]; + for (int n = 0; n < size; ++n) + mpi_sendcounts[n] = sendcounts[n]; + MPI_Aint mpi_sdispls[size]; + for (int n = 0; n < size; ++n) + mpi_sdispls[n] = sdispls[n]; + MPI_Count mpi_recvcounts[size]; + for (int n = 0; n < size; ++n) + mpi_recvcounts[n] = recvcounts[n]; + MPI_Aint mpi_rdispls[size]; + for (int n = 0; n < size; ++n) + mpi_rdispls[n] = rdispls[n]; +#endif + MPI_Request mpi_request; + int ierr = MPI_Ialltoallv_c( + abi2mpi_buffer(sendbuf), mpi_sendcounts, mpi_sdispls, + abi2mpi_datatype(sendtype), recvbuf, mpi_recvcounts, mpi_rdispls, + abi2mpi_datatype(recvtype), abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Ialltoallw(const void *sendbuf, const int sendcounts[], + const int sdispls[], const MPIABI_Datatype sendtypes[], + void *recvbuf, const int recvcounts[], + const int rdispls[], const MPIABI_Datatype recvtypes[], + MPIABI_Comm comm, MPIABI_Request *restrict request) { + int size; + int ierr = MPIABI_Comm_size(comm, &size); + if (ierr) + return ierr; + MPI_Datatype mpi_sendtypes[size]; + for (int n = 0; n < size; ++n) + mpi_sendtypes[n] = abi2mpi_datatype(sendtypes[n]); + MPI_Datatype mpi_recvtypes[size]; + for (int n = 0; n < size; ++n) + mpi_recvtypes[n] = abi2mpi_datatype(recvtypes[n]); + MPI_Request mpi_request; + ierr = MPI_Ialltoallw(abi2mpi_buffer(sendbuf), sendcounts, sdispls, + mpi_sendtypes, recvbuf, recvcounts, rdispls, + mpi_recvtypes, abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Ialltoallw_c(const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], + const MPIABI_Datatype sendtypes[], void *recvbuf, + const MPIABI_Count recvcounts[], + const MPIABI_Aint rdispls[], + const MPIABI_Datatype recvtypes[], MPIABI_Comm comm, + MPIABI_Request *restrict request) { + int size; + int ierr1 = MPIABI_Comm_size(comm, &size); + if (ierr1) + return ierr1; +#if SIZEOF_MPI_COUNT == SIZEOF_PTRDIFF_T && SIZEOF_MPI_AINT == SIZEOF_PTRDIFF_T + const MPI_Count *mpi_sendcounts = (const MPI_Count *)sendcounts; + const MPI_Aint *mpi_sdispls = (const MPI_Aint *)sdispls; + const MPI_Count *mpi_recvcounts = (const MPI_Count *)recvcounts; + const MPI_Aint *mpi_rdispls = (const MPI_Aint *)rdispls; +#else + MPI_Count mpi_sendcounts[size]; + for (int n = 0; n < size; ++n) + mpi_sendcounts[n] = sendcounts[n]; + MPI_Aint mpi_sdispls[size]; + for (int n = 0; n < size; ++n) + mpi_sdispls[n] = sdispls[n]; + MPI_Count mpi_recvcounts[size]; + for (int n = 0; n < size; ++n) + mpi_recvcounts[n] = recvcounts[n]; + MPI_Aint mpi_rdispls[size]; + for (int n = 0; n < size; ++n) + mpi_rdispls[n] = rdispls[n]; +#endif + MPI_Datatype mpi_sendtypes[size]; + for (int n = 0; n < size; ++n) + mpi_sendtypes[n] = abi2mpi_datatype(sendtypes[n]); + MPI_Datatype mpi_recvtypes[size]; + for (int n = 0; n < size; ++n) + mpi_recvtypes[n] = abi2mpi_datatype(recvtypes[n]); + MPI_Request mpi_request; + int ierr = + MPI_Ialltoallw_c(abi2mpi_buffer(sendbuf), mpi_sendcounts, mpi_sdispls, + mpi_sendtypes, recvbuf, mpi_recvcounts, mpi_rdispls, + mpi_recvtypes, abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Ibarrier(MPIABI_Comm comm, MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Ibarrier(abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Ibcast(void *buffer, int count, MPIABI_Datatype datatype, int root, + MPIABI_Comm comm, MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Ibcast(buffer, count, abi2mpi_datatype(datatype), + abi2mpi_root(root), abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Ibcast_c(void *buffer, MPIABI_Count count, MPIABI_Datatype datatype, + int root, MPIABI_Comm comm, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Ibcast_c(buffer, count, abi2mpi_datatype(datatype), + abi2mpi_root(root), abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Iexscan(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Iexscan(abi2mpi_buffer(sendbuf), recvbuf, count, + abi2mpi_datatype(datatype), abi2mpi_op(op), + abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Iexscan_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Iexscan_c(abi2mpi_buffer(sendbuf), recvbuf, count, + abi2mpi_datatype(datatype), abi2mpi_op(op), + abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Igather(const void *sendbuf, int sendcount, MPIABI_Datatype sendtype, + void *recvbuf, int recvcount, MPIABI_Datatype recvtype, + int root, MPIABI_Comm comm, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Igather(abi2mpi_buffer(sendbuf), sendcount, + abi2mpi_datatype(sendtype), recvbuf, recvcount, + abi2mpi_datatype(recvtype), abi2mpi_root(root), + abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Igather_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, MPIABI_Datatype recvtype, int root, + MPIABI_Comm comm, MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Igather_c(abi2mpi_buffer(sendbuf), sendcount, + abi2mpi_datatype(sendtype), recvbuf, recvcount, + abi2mpi_datatype(recvtype), abi2mpi_root(root), + abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Igatherv(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPIABI_Datatype recvtype, int root, MPIABI_Comm comm, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Igatherv(abi2mpi_buffer(sendbuf), sendcount, + abi2mpi_datatype(sendtype), recvbuf, recvcounts, + displs, abi2mpi_datatype(recvtype), + abi2mpi_root(root), abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Igatherv_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], + const MPIABI_Aint displs[], MPIABI_Datatype recvtype, + int root, MPIABI_Comm comm, + MPIABI_Request *restrict request) { +#if SIZEOF_MPI_COUNT == SIZEOF_PTRDIFF_T && SIZEOF_MPI_AINT == SIZEOF_PTRDIFF_T + const MPI_Count *mpi_recvcounts = (const MPI_Count *)recvcounts; + const MPI_Aint *mpi_displs = (const MPI_Aint *)displs; +#else + int size; + int ierr1 = MPIABI_Comm_size(comm, &size); + if (ierr1) + return ierr1; + MPI_Count mpi_recvcounts[size]; + for (int n = 0; n < size; ++n) + mpi_recvcounts[n] = recvcounts[n]; + MPI_Aint mpi_displs[size]; + for (int n = 0; n < size; ++n) + mpi_displs[n] = displs[n]; +#endif + MPI_Request mpi_request; + int ierr = MPI_Igatherv_c( + abi2mpi_buffer(sendbuf), sendcount, abi2mpi_datatype(sendtype), recvbuf, + mpi_recvcounts, mpi_displs, abi2mpi_datatype(recvtype), + abi2mpi_root(root), abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Ireduce(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, int root, + MPIABI_Comm comm, MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Ireduce(abi2mpi_buffer(sendbuf), recvbuf, count, + abi2mpi_datatype(datatype), abi2mpi_op(op), + abi2mpi_root(root), abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Ireduce_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Op op, int root, + MPIABI_Comm comm, MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Ireduce_c( + abi2mpi_buffer(sendbuf), recvbuf, count, abi2mpi_datatype(datatype), + abi2mpi_op(op), abi2mpi_root(root), abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Ireduce_scatter(const void *sendbuf, void *recvbuf, + const int recvcounts[], MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Ireduce_scatter(abi2mpi_buffer(sendbuf), recvbuf, recvcounts, + abi2mpi_datatype(datatype), abi2mpi_op(op), + abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Ireduce_scatter_block(const void *sendbuf, void *recvbuf, + int recvcount, MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Ireduce_scatter_block( + abi2mpi_buffer(sendbuf), recvbuf, recvcount, abi2mpi_datatype(datatype), + abi2mpi_op(op), abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Ireduce_scatter_block_c(const void *sendbuf, void *recvbuf, + MPIABI_Count recvcount, + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Ireduce_scatter_block_c( + abi2mpi_buffer(sendbuf), recvbuf, recvcount, abi2mpi_datatype(datatype), + abi2mpi_op(op), abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Ireduce_scatter_c(const void *sendbuf, void *recvbuf, + const MPIABI_Count recvcounts[], + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm, + MPIABI_Request *restrict request) { +#if SIZEOF_MPI_COUNT == SIZEOF_PTRDIFF_T + const MPI_Count *mpi_recvcounts = (const MPI_Count *)recvcounts; +#else + int size; + int ierr1 = MPIABI_Comm_size(comm, &size); + if (ierr1) + return ierr1; + MPI_Count mpi_recvcounts[size]; + for (int n = 0; n < size; ++n) + mpi_recvcounts[n] = recvcounts[n]; +#endif + MPI_Request mpi_request; + int ierr = + MPI_Ireduce_scatter_c(abi2mpi_buffer(sendbuf), recvbuf, mpi_recvcounts, + abi2mpi_datatype(datatype), abi2mpi_op(op), + abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Iscan(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Iscan(abi2mpi_buffer(sendbuf), recvbuf, count, + abi2mpi_datatype(datatype), abi2mpi_op(op), + abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Iscan_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Iscan_c(abi2mpi_buffer(sendbuf), recvbuf, count, + abi2mpi_datatype(datatype), abi2mpi_op(op), + abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Iscatter(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, int recvcount, + MPIABI_Datatype recvtype, int root, MPIABI_Comm comm, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Iscatter(abi2mpi_buffer(sendbuf), sendcount, + abi2mpi_datatype(sendtype), recvbuf, recvcount, + abi2mpi_datatype(recvtype), abi2mpi_root(root), + abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Iscatter_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, MPIABI_Datatype recvtype, + int root, MPIABI_Comm comm, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Iscatter_c(abi2mpi_buffer(sendbuf), sendcount, + abi2mpi_datatype(sendtype), recvbuf, recvcount, + abi2mpi_datatype(recvtype), abi2mpi_root(root), + abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Iscatterv(const void *sendbuf, const int sendcounts[], + const int displs[], MPIABI_Datatype sendtype, + void *recvbuf, int recvcount, MPIABI_Datatype recvtype, + int root, MPIABI_Comm comm, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Iscatterv(abi2mpi_buffer(sendbuf), sendcounts, displs, + abi2mpi_datatype(sendtype), recvbuf, recvcount, + abi2mpi_datatype(recvtype), abi2mpi_root(root), + abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Iscatterv_c(const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint displs[], MPIABI_Datatype sendtype, + void *recvbuf, MPIABI_Count recvcount, + MPIABI_Datatype recvtype, int root, MPIABI_Comm comm, + MPIABI_Request *restrict request) { +#if SIZEOF_MPI_COUNT == SIZEOF_PTRDIFF_T && SIZEOF_MPI_AINT == SIZEOF_PTRDIFF_T + const MPI_Count *mpi_sendcounts = (const MPI_Count *)sendcounts; + const MPI_Aint *mpi_displs = (const MPI_Aint *)displs; +#else + int size; + int ierr1 = MPIABI_Comm_size(comm, &size); + if (ierr1) + return ierr1; + MPI_Count mpi_sendcounts[size]; + for (int n = 0; n < size; ++n) + mpi_sendcounts[n] = sendcounts[n]; + MPI_Aint mpi_displs[size]; + for (int n = 0; n < size; ++n) + mpi_displs[n] = displs[n]; +#endif + MPI_Request mpi_request; + int ierr = + MPI_Iscatterv_c(abi2mpi_buffer(sendbuf), mpi_sendcounts, mpi_displs, + abi2mpi_datatype(sendtype), recvbuf, recvcount, + abi2mpi_datatype(recvtype), abi2mpi_root(root), + abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Op_commutative(MPIABI_Op op, int *restrict commute) { + int ierr = MPI_Op_commutative(abi2mpi_op(op), commute); + return mpi2abi_errorcode(ierr); +} + +#define MAX_NUM_OP_WRAPPERS 10 +static atomic_int num_op_wrappers = 0; +static MPIABI_User_function *user_fns[MAX_NUM_OP_WRAPPERS] = { + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, +}; +static void wrap_user_fn_impl(int op_wrapper_num, void *invec, void *inoutvec, + int *restrict len, + MPI_Datatype *restrict datatype) { + MPIABI_Datatype abi_datatype = mpi2abi_datatype(*datatype); + user_fns[op_wrapper_num](invec, inoutvec, len, &abi_datatype); +} +#define DEFINE_WRAP_USER_FN(N) \ + static void wrap_user_fn_##N(void *invec, void *inoutvec, int *restrict len, \ + MPI_Datatype *restrict datatype) { \ + wrap_user_fn_impl(N, invec, inoutvec, len, datatype); \ + } +DEFINE_WRAP_USER_FN(0) +DEFINE_WRAP_USER_FN(1) +DEFINE_WRAP_USER_FN(2) +DEFINE_WRAP_USER_FN(3) +DEFINE_WRAP_USER_FN(4) +DEFINE_WRAP_USER_FN(5) +DEFINE_WRAP_USER_FN(6) +DEFINE_WRAP_USER_FN(7) +DEFINE_WRAP_USER_FN(8) +DEFINE_WRAP_USER_FN(9) +#undef DEFINE_WRAP_USER_FN +static MPI_User_function *const wrap_user_fn[MAX_NUM_OP_WRAPPERS] = { + wrap_user_fn_0, wrap_user_fn_1, wrap_user_fn_2, wrap_user_fn_3, + wrap_user_fn_4, wrap_user_fn_5, wrap_user_fn_6, wrap_user_fn_7, + wrap_user_fn_8, wrap_user_fn_9, +}; + +int MPIABI_Op_create(MPIABI_User_function *user_fn, int commute, + MPIABI_Op *restrict op) { + MPI_Op mpi_op; + int op_wrapper_num = atomic_fetch_add(&num_op_wrappers, 1); + assert(op_wrapper_num < MAX_NUM_OP_WRAPPERS); + user_fns[op_wrapper_num] = user_fn; + int ierr = MPI_Op_create(wrap_user_fn[op_wrapper_num], commute, &mpi_op); + *op = mpi2abi_op(mpi_op); + return mpi2abi_errorcode(ierr); +} + +#define MAX_NUM_OP_WRAPPERS_C 10 +static atomic_int num_op_wrappers_c = 0; +static MPIABI_User_function_c *user_fns_c[MAX_NUM_OP_WRAPPERS_C] = { + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, +}; +static void wrap_user_fn_c_impl(int op_wrapper_num, void *invec, void *inoutvec, + MPI_Count *restrict len, + MPI_Datatype *restrict datatype) { + MPIABI_Count abi_len = *len; + MPIABI_Datatype abi_datatype = mpi2abi_datatype(*datatype); + user_fns_c[op_wrapper_num](invec, inoutvec, &abi_len, &abi_datatype); +} +#define DEFINE_WRAP_USER_FN_C(N) \ + static void wrap_user_fn_c_##N(void *invec, void *inoutvec, \ + MPI_Count *restrict len, \ + MPI_Datatype *restrict datatype) { \ + wrap_user_fn_c_impl(N, invec, inoutvec, len, datatype); \ + } +DEFINE_WRAP_USER_FN_C(0) +DEFINE_WRAP_USER_FN_C(1) +DEFINE_WRAP_USER_FN_C(2) +DEFINE_WRAP_USER_FN_C(3) +DEFINE_WRAP_USER_FN_C(4) +DEFINE_WRAP_USER_FN_C(5) +DEFINE_WRAP_USER_FN_C(6) +DEFINE_WRAP_USER_FN_C(7) +DEFINE_WRAP_USER_FN_C(8) +DEFINE_WRAP_USER_FN_C(9) +#undef DEFINE_WRAP_USER_FN_C +static MPI_User_function_c *const wrap_user_fn_c[MAX_NUM_OP_WRAPPERS] = { + wrap_user_fn_c_0, wrap_user_fn_c_1, wrap_user_fn_c_2, wrap_user_fn_c_3, + wrap_user_fn_c_4, wrap_user_fn_c_5, wrap_user_fn_c_6, wrap_user_fn_c_7, + wrap_user_fn_c_8, wrap_user_fn_c_9, +}; + +int MPIABI_Op_create_c(MPIABI_User_function_c *user_fn, int commute, + MPIABI_Op *restrict op) { + MPI_Op mpi_op; + int op_wrapper_num = atomic_fetch_add(&num_op_wrappers_c, 1); + assert(op_wrapper_num < MAX_NUM_OP_WRAPPERS_C); + user_fns_c[op_wrapper_num] = user_fn; + int ierr = MPI_Op_create_c(wrap_user_fn_c[op_wrapper_num], commute, &mpi_op); + *op = mpi2abi_op(mpi_op); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Op_free(MPIABI_Op *restrict op) { + MPI_Op mpi_op = abi2mpi_op(*op); + // We do not free the wrapper functions because `MPI_Op` objects are + // reference counted and can live on after they have been freed + int ierr = MPI_Op_free(&mpi_op); + *op = mpi2abi_op(mpi_op); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Reduce(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, int root, + MPIABI_Comm comm) { + int ierr = MPI_Reduce(abi2mpi_buffer(sendbuf), recvbuf, count, + abi2mpi_datatype(datatype), abi2mpi_op(op), + abi2mpi_root(root), abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Reduce_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Op op, int root, + MPIABI_Comm comm) { + int ierr = MPI_Reduce_c(abi2mpi_buffer(sendbuf), recvbuf, count, + abi2mpi_datatype(datatype), abi2mpi_op(op), + abi2mpi_root(root), abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Reduce_init(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, int root, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Reduce_init(abi2mpi_buffer(sendbuf), recvbuf, count, + abi2mpi_datatype(datatype), abi2mpi_op(op), + abi2mpi_root(root), abi2mpi_comm(comm), + abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Reduce_init_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Op op, int root, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Reduce_init_c(abi2mpi_buffer(sendbuf), recvbuf, count, + abi2mpi_datatype(datatype), abi2mpi_op(op), + abi2mpi_root(root), abi2mpi_comm(comm), + abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Reduce_local(const void *inbuf, void *inoutbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op) { + assert(inbuf != MPIABI_IN_PLACE); + int ierr = MPI_Reduce_local(inbuf, inoutbuf, count, + abi2mpi_datatype(datatype), abi2mpi_op(op)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Reduce_local_c(const void *inbuf, void *inoutbuf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Op op) { + assert(inbuf != MPIABI_IN_PLACE); + int ierr = MPI_Reduce_local_c(inbuf, inoutbuf, count, + abi2mpi_datatype(datatype), abi2mpi_op(op)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Reduce_scatter(const void *sendbuf, void *recvbuf, + const int recvcounts[], MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm) { + int ierr = MPI_Reduce_scatter(abi2mpi_buffer(sendbuf), recvbuf, recvcounts, + abi2mpi_datatype(datatype), abi2mpi_op(op), + abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Reduce_scatter_block(const void *sendbuf, void *recvbuf, + int recvcount, MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm) { + int ierr = MPI_Reduce_scatter_block(abi2mpi_buffer(sendbuf), recvbuf, + recvcount, abi2mpi_datatype(datatype), + abi2mpi_op(op), abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Reduce_scatter_block_c(const void *sendbuf, void *recvbuf, + MPIABI_Count recvcount, + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm) { + int ierr = MPI_Reduce_scatter_block_c(abi2mpi_buffer(sendbuf), recvbuf, + recvcount, abi2mpi_datatype(datatype), + abi2mpi_op(op), abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Reduce_scatter_block_init(const void *sendbuf, void *recvbuf, + int recvcount, MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Info info, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Reduce_scatter_block_init( + abi2mpi_buffer(sendbuf), recvbuf, recvcount, abi2mpi_datatype(datatype), + abi2mpi_op(op), abi2mpi_comm(comm), abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Reduce_scatter_block_init_c(const void *sendbuf, void *recvbuf, + MPIABI_Count recvcount, + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Reduce_scatter_block_init_c( + abi2mpi_buffer(sendbuf), recvbuf, recvcount, abi2mpi_datatype(datatype), + abi2mpi_op(op), abi2mpi_comm(comm), abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Reduce_scatter_c(const void *sendbuf, void *recvbuf, + const MPIABI_Count recvcounts[], + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm) { +#if SIZEOF_MPI_COUNT == SIZEOF_PTRDIFF_T + const MPI_Count *mpi_recvcounts = (const MPI_Count *)recvcounts; +#else + int size; + int ierr1 = MPIABI_Comm_size(comm, &size); + if (ierr1) + return ierr1; + MPI_Count mpi_recvcounts[size]; + for (int n = 0; n < size; ++n) + mpi_recvcounts[n] = recvcounts[n]; +#endif + int ierr = MPI_Reduce_scatter_c(abi2mpi_buffer(sendbuf), recvbuf, + mpi_recvcounts, abi2mpi_datatype(datatype), + abi2mpi_op(op), abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Reduce_scatter_init(const void *sendbuf, void *recvbuf, + const int recvcounts[], MPIABI_Datatype datatype, + MPIABI_Op op, MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Reduce_scatter_init( + abi2mpi_buffer(sendbuf), recvbuf, recvcounts, abi2mpi_datatype(datatype), + abi2mpi_op(op), abi2mpi_comm(comm), abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Reduce_scatter_init_c(const void *sendbuf, void *recvbuf, + const MPIABI_Count recvcounts[], + MPIABI_Datatype datatype, MPIABI_Op op, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *restrict request) { +#if SIZEOF_MPI_COUNT == SIZEOF_PTRDIFF_T + const MPI_Count *mpi_recvcounts = (const MPI_Count *)recvcounts; +#else + int size; + int ierr1 = MPIABI_Comm_size(comm, &size); + if (ierr1) + return ierr1; + MPI_Count mpi_recvcounts[size]; + for (int n = 0; n < size; ++n) + mpi_recvcounts[n] = recvcounts[n]; +#endif + MPI_Request mpi_request; + int ierr = MPI_Reduce_scatter_init_c( + abi2mpi_buffer(sendbuf), recvbuf, mpi_recvcounts, + abi2mpi_datatype(datatype), abi2mpi_op(op), abi2mpi_comm(comm), + abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Scan(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm) { + int ierr = + MPI_Scan(abi2mpi_buffer(sendbuf), recvbuf, count, + abi2mpi_datatype(datatype), abi2mpi_op(op), abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Scan_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm) { + int ierr = MPI_Scan_c(abi2mpi_buffer(sendbuf), recvbuf, count, + abi2mpi_datatype(datatype), abi2mpi_op(op), + abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Scan_init(const void *sendbuf, void *recvbuf, int count, + MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Scan_init( + abi2mpi_buffer(sendbuf), recvbuf, count, abi2mpi_datatype(datatype), + abi2mpi_op(op), abi2mpi_comm(comm), abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Scan_init_c(const void *sendbuf, void *recvbuf, MPIABI_Count count, + MPIABI_Datatype datatype, MPIABI_Op op, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Scan_init_c( + abi2mpi_buffer(sendbuf), recvbuf, count, abi2mpi_datatype(datatype), + abi2mpi_op(op), abi2mpi_comm(comm), abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Scatter(const void *sendbuf, int sendcount, MPIABI_Datatype sendtype, + void *recvbuf, int recvcount, MPIABI_Datatype recvtype, + int root, MPIABI_Comm comm) { + int ierr = MPI_Scatter(abi2mpi_buffer(sendbuf), sendcount, + abi2mpi_datatype(sendtype), recvbuf, recvcount, + abi2mpi_datatype(recvtype), abi2mpi_root(root), + abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Scatter_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, MPIABI_Datatype recvtype, int root, + MPIABI_Comm comm) { + int ierr = MPI_Scatter_c(abi2mpi_buffer(sendbuf), sendcount, + abi2mpi_datatype(sendtype), recvbuf, recvcount, + abi2mpi_datatype(recvtype), abi2mpi_root(root), + abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Scatter_init(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, int recvcount, + MPIABI_Datatype recvtype, int root, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Scatter_init( + abi2mpi_buffer(sendbuf), sendcount, abi2mpi_datatype(sendtype), recvbuf, + recvcount, abi2mpi_datatype(recvtype), abi2mpi_root(root), + abi2mpi_comm(comm), abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Scatter_init_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, MPIABI_Datatype recvtype, + int root, MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Scatter_init_c( + abi2mpi_buffer(sendbuf), sendcount, abi2mpi_datatype(sendtype), recvbuf, + recvcount, abi2mpi_datatype(recvtype), abi2mpi_root(root), + abi2mpi_comm(comm), abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Scatterv(const void *sendbuf, const int sendcounts[], + const int displs[], MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, int root, + MPIABI_Comm comm) { + int ierr = MPI_Scatterv(abi2mpi_buffer(sendbuf), sendcounts, displs, + abi2mpi_datatype(sendtype), recvbuf, recvcount, + abi2mpi_datatype(recvtype), abi2mpi_root(root), + abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Scatterv_c(const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint displs[], MPIABI_Datatype sendtype, + void *recvbuf, MPIABI_Count recvcount, + MPIABI_Datatype recvtype, int root, MPIABI_Comm comm) { +#if SIZEOF_MPI_COUNT == SIZEOF_PTRDIFF_T && SIZEOF_MPI_AINT == SIZEOF_PTRDIFF_T + const MPI_Count *mpi_sendcounts = (const MPI_Count *)sendcounts; + const MPI_Aint *mpi_displs = (const MPI_Aint *)displs; +#else + int size; + int ierr1 = MPIABI_Comm_size(comm, &size); + if (ierr1) + return ierr1; + MPI_Count mpi_sendcounts[size]; + for (int n = 0; n < size; ++n) + mpi_sendcounts[n] = sendcounts[n]; + MPI_Aint mpi_displs[size]; + for (int n = 0; n < size; ++n) + mpi_displs[n] = displs[n]; +#endif + int ierr = MPI_Scatterv_c(abi2mpi_buffer(sendbuf), mpi_sendcounts, mpi_displs, + abi2mpi_datatype(sendtype), recvbuf, recvcount, + abi2mpi_datatype(recvtype), abi2mpi_root(root), + abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Scatterv_init(const void *sendbuf, const int sendcounts[], + const int displs[], MPIABI_Datatype sendtype, + void *recvbuf, int recvcount, MPIABI_Datatype recvtype, + int root, MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Scatterv_init( + abi2mpi_buffer(sendbuf), sendcounts, displs, abi2mpi_datatype(sendtype), + recvbuf, recvcount, abi2mpi_datatype(recvtype), abi2mpi_root(root), + abi2mpi_comm(comm), abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Scatterv_init_c(const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint displs[], MPIABI_Datatype sendtype, + void *recvbuf, MPIABI_Count recvcount, + MPIABI_Datatype recvtype, int root, MPIABI_Comm comm, + MPIABI_Info info, MPIABI_Request *restrict request) { +#if SIZEOF_MPI_COUNT == SIZEOF_PTRDIFF_T && SIZEOF_MPI_AINT == SIZEOF_PTRDIFF_T + const MPI_Count *mpi_sendcounts = (const MPI_Count *)sendcounts; + const MPI_Aint *mpi_displs = (const MPI_Aint *)displs; +#else + int size; + int ierr1 = MPIABI_Comm_size(comm, &size); + if (ierr1) + return ierr1; + MPI_Count mpi_sendcounts[size]; + for (int n = 0; n < size; ++n) + mpi_sendcounts[n] = sendcounts[n]; + MPI_Aint mpi_displs[size]; + for (int n = 0; n < size; ++n) + mpi_displs[n] = displs[n]; +#endif + MPI_Request mpi_request; + int ierr = + MPI_Scatterv_init_c(abi2mpi_buffer(sendbuf), mpi_sendcounts, mpi_displs, + abi2mpi_datatype(sendtype), recvbuf, recvcount, + abi2mpi_datatype(recvtype), abi2mpi_root(root), + abi2mpi_comm(comm), abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_get_value_index(MPIABI_Datatype value_type, + MPIABI_Datatype index_type, + MPIABI_Datatype *restrict pair_type) { +#if MPI_VERSION_NUMBER >= 410 + MPI_Datatype mpi_pair_type; + int ierr = + MPI_Type_get_value_index(abi2mpi_datatype(value_type), + abi2mpi_datatype(index_type), &mpi_pair_type); + *pair_type = mpi2abi_datatype(mpi_pair_type); + return mpi2abi_errorcode(ierr); +#else + assert(0); +#endif +} + +// A.3.5 Groups, Contexts, Communicators, and Caching C Bindings + +int MPIABI_Comm_compare(MPIABI_Comm comm1, MPIABI_Comm comm2, + int *restrict result) { + int ierr = MPI_Comm_compare(abi2mpi_comm(comm1), abi2mpi_comm(comm2), result); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Comm_create(MPIABI_Comm comm, MPIABI_Group group, + MPIABI_Comm *restrict newcomm) { + MPI_Comm mpi_newcomm; + int ierr = + MPI_Comm_create(abi2mpi_comm(comm), abi2mpi_group(group), &mpi_newcomm); + *newcomm = mpi2abi_comm(mpi_newcomm); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Comm_create_from_group(MPIABI_Group group, + const char *restrict stringtag, + MPIABI_Info info, + MPIABI_Errhandler errhandler, + MPIABI_Comm *restrict newcomm) { + MPI_Comm mpi_newcomm; + int ierr = MPI_Comm_create_from_group( + abi2mpi_group(group), stringtag, abi2mpi_info(info), + abi2mpi_errhandler(errhandler), &mpi_newcomm); + *newcomm = mpi2abi_comm(mpi_newcomm); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Comm_create_group(MPIABI_Comm comm, MPIABI_Group group, int tag, + MPIABI_Comm *restrict newcomm) { + MPI_Comm mpi_newcomm; + int ierr = MPI_Comm_create_group(abi2mpi_comm(comm), abi2mpi_group(group), + tag, &mpi_newcomm); + *newcomm = mpi2abi_comm(mpi_newcomm); + return mpi2abi_errorcode(ierr); +} + +struct abi_Comm_create_keyval_state { + MPIABI_Comm_copy_attr_function *abi_comm_copy_attr_fn; + MPIABI_Comm_delete_attr_function *abi_comm_delete_attr_fn; + void *abi_extra_state; +}; +static int mpi_Comm_create_keyval_copy_attr_function( + MPI_Comm oldcomm, int comm_keyval, void *extra_state, + void *attribute_val_in, void *attribute_val_out, int *restrict flag) { + const struct abi_Comm_create_keyval_state *mpi_extra_state = extra_state; + int ierr = mpi_extra_state->abi_comm_copy_attr_fn( + mpi2abi_comm(oldcomm), mpi2abi_keyval(comm_keyval), + mpi_extra_state->abi_extra_state, attribute_val_in, attribute_val_out, + flag); + return abi2mpi_errorcode(ierr); +} +static int mpi_Comm_create_keyval_delete_attr_function(MPI_Comm comm, + int comm_keyval, + void *attribute_val, + void *extra_state) { + const struct abi_Comm_create_keyval_state *mpi_extra_state = extra_state; + int ierr = mpi_extra_state->abi_comm_delete_attr_fn( + mpi2abi_comm(comm), mpi2abi_keyval(comm_keyval), attribute_val, + mpi_extra_state->abi_extra_state); + return abi2mpi_errorcode(ierr); +} +int MPIABI_Comm_create_keyval( + MPIABI_Comm_copy_attr_function *comm_copy_attr_fn, + MPIABI_Comm_delete_attr_function *comm_delete_attr_fn, + int *restrict comm_keyval, void *extra_state) { + struct abi_Comm_create_keyval_state *mpi_extra_state = + malloc(sizeof *mpi_extra_state); + mpi_extra_state->abi_comm_copy_attr_fn = comm_copy_attr_fn; + mpi_extra_state->abi_comm_delete_attr_fn = comm_delete_attr_fn; + mpi_extra_state->abi_extra_state = extra_state; + int ierr = MPI_Comm_create_keyval(mpi_Comm_create_keyval_copy_attr_function, + mpi_Comm_create_keyval_delete_attr_function, + comm_keyval, mpi_extra_state); + *comm_keyval = mpi2abi_keyval(*comm_keyval); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Comm_delete_attr(MPIABI_Comm comm, int comm_keyval) { + int ierr = + MPI_Comm_delete_attr(abi2mpi_comm(comm), abi2mpi_keyval(comm_keyval)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Comm_dup(MPIABI_Comm comm, MPIABI_Comm *restrict newcomm) { + MPI_Comm mpi_newcomm; + int ierr = MPI_Comm_dup(abi2mpi_comm(comm), &mpi_newcomm); + *newcomm = mpi2abi_comm(mpi_newcomm); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Comm_dup_with_info(MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Comm *restrict newcomm) { + MPI_Comm mpi_newcomm; + int ierr = MPI_Comm_dup_with_info(abi2mpi_comm(comm), abi2mpi_info(info), + &mpi_newcomm); + *newcomm = mpi2abi_comm(mpi_newcomm); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Comm_free(MPIABI_Comm *restrict comm) { + MPI_Comm mpi_comm = abi2mpi_comm(*comm); + int ierr = MPI_Comm_free(&mpi_comm); + *comm = mpi2abi_comm(mpi_comm); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Comm_get_name(MPIABI_Comm comm, char *restrict comm_name, + int *restrict resultlen) { + int ierr = MPI_Comm_get_name(abi2mpi_comm(comm), comm_name, resultlen); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Comm_free_keyval(int *restrict comm_keyval) { + int mpi_comm_keyval = abi2mpi_keyval(*comm_keyval); + // We do not free the keyval wrappers + int ierr = MPI_Comm_free_keyval(&mpi_comm_keyval); + *comm_keyval = mpi2abi_keyval(mpi_comm_keyval); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Comm_get_attr(MPIABI_Comm comm, int comm_keyval, void *attribute_val, + int *restrict flag) { + int ierr = MPI_Comm_get_attr(abi2mpi_comm(comm), abi2mpi_keyval(comm_keyval), + attribute_val, flag); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Comm_get_info(MPIABI_Comm comm, MPIABI_Info *restrict info_used) { + MPI_Info mpi_info_used; + int ierr = MPI_Comm_get_info(abi2mpi_comm(comm), &mpi_info_used); + *info_used = mpi2abi_info(mpi_info_used); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Comm_group(MPIABI_Comm comm, MPIABI_Group *restrict group) { + MPI_Group mpi_group; + int ierr = MPI_Comm_group(abi2mpi_comm(comm), &mpi_group); + *group = mpi2abi_group(mpi_group); + return mpi2abi_errorcode(ierr); +} + +struct finish_Comm_idup_state { + MPIABI_Comm *newcomm; + MPI_Comm mpi_newcomm; +}; +static void finish_Comm_idup(void *state1) { + struct finish_Comm_idup_state *state = state1; + *state->newcomm = mpi2abi_comm(state->mpi_newcomm); + free(state); +} +int MPIABI_Comm_idup(MPIABI_Comm comm, MPIABI_Comm *restrict newcomm, + MPIABI_Request *restrict request) { + struct finish_Comm_idup_state *finish_Comm_idup_state = + malloc(sizeof *finish_Comm_idup_state); + finish_Comm_idup_state->newcomm = newcomm; + MPI_Request mpi_request; + int ierr = MPI_Comm_idup(abi2mpi_comm(comm), + &finish_Comm_idup_state->mpi_newcomm, &mpi_request); + *request = mpi2abi_request(mpi_request); + struct lambda action = {finish_Comm_idup, finish_Comm_idup_state}; + request_action_insert(*request, action); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Comm_idup_with_info(MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Comm *restrict newcomm, + MPIABI_Request *restrict request) { + struct finish_Comm_idup_state *finish_Comm_idup_state = + malloc(sizeof *finish_Comm_idup_state); + finish_Comm_idup_state->newcomm = newcomm; + MPI_Request mpi_request; + int ierr = MPI_Comm_idup_with_info(abi2mpi_comm(comm), abi2mpi_info(info), + &finish_Comm_idup_state->mpi_newcomm, + &mpi_request); + *request = mpi2abi_request(mpi_request); + struct lambda action = {finish_Comm_idup, finish_Comm_idup_state}; + request_action_insert(*request, action); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Comm_rank(MPIABI_Comm comm, int *restrict rank) { + int ierr = MPI_Comm_rank(abi2mpi_comm(comm), rank); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Comm_remote_group(MPIABI_Comm comm, MPIABI_Group *restrict group) { + MPI_Group mpi_group; + int ierr = MPI_Comm_remote_group(abi2mpi_comm(comm), &mpi_group); + *group = mpi2abi_group(mpi_group); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Comm_remote_size(MPIABI_Comm comm, int *restrict size) { + int ierr = MPI_Comm_remote_size(abi2mpi_comm(comm), size); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Comm_set_attr(MPIABI_Comm comm, int comm_keyval, + void *attribute_val) { + int ierr = MPI_Comm_set_attr(abi2mpi_comm(comm), abi2mpi_keyval(comm_keyval), + attribute_val); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Comm_set_info(MPIABI_Comm comm, MPIABI_Info info) { + int ierr = MPI_Comm_set_info(abi2mpi_comm(comm), abi2mpi_info(info)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Comm_set_name(MPIABI_Comm comm, const char *restrict comm_name) { + int ierr = MPI_Comm_set_name(abi2mpi_comm(comm), comm_name); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Comm_size(MPIABI_Comm comm, int *restrict size) { + int ierr = MPI_Comm_size(abi2mpi_comm(comm), size); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Comm_split(MPIABI_Comm comm, int color, int key, + MPIABI_Comm *restrict newcomm) { + MPI_Comm mpi_newcomm; + int ierr = MPI_Comm_split(abi2mpi_comm(comm), color, key, &mpi_newcomm); + *newcomm = mpi2abi_comm(mpi_newcomm); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Group_free(MPIABI_Group *restrict group) { + MPI_Group mpi_group = abi2mpi_group(*group); + int ierr = MPI_Group_free(&mpi_group); + *group = mpi2abi_group(mpi_group); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Comm_split_type(MPIABI_Comm comm, int split_type, int key, + MPIABI_Info info, MPIABI_Comm *restrict newcomm) { + int mpi_split_type; + switch (split_type) { + case MPIABI_COMM_TYPE_SHARED: + mpi_split_type = MPI_COMM_TYPE_SHARED; + break; + case MPIABI_COMM_TYPE_HW_UNGUIDED: + mpi_split_type = MPI_COMM_TYPE_HW_UNGUIDED; + break; + case MPIABI_COMM_TYPE_HW_GUIDED: + mpi_split_type = MPI_COMM_TYPE_HW_GUIDED; + break; +#if MPI_VERSION_NUMBER >= 400 + case MPIABI_COMM_TYPE_RESOURCE_GUIDED: + mpi_split_type = MPI_COMM_TYPE_RESOURCE_GUIDED; + break; +#endif + default: + assert(false); + } + MPI_Comm mpi_newcomm; + int ierr = MPI_Comm_split_type(abi2mpi_comm(comm), mpi_split_type, key, + abi2mpi_info(info), &mpi_newcomm); + *newcomm = mpi2abi_comm(mpi_newcomm); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Comm_test_inter(MPIABI_Comm comm, int *restrict flag) { + int ierr = MPI_Comm_test_inter(abi2mpi_comm(comm), flag); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Group_compare(MPIABI_Group group1, MPIABI_Group group2, + int *restrict result) { + int ierr = + MPI_Group_compare(abi2mpi_group(group1), abi2mpi_group(group2), result); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Group_difference(MPIABI_Group group1, MPIABI_Group group2, + MPIABI_Group *restrict newgroup) { + MPI_Group mpi_newgroup; + int ierr = MPI_Group_difference(abi2mpi_group(group1), abi2mpi_group(group2), + &mpi_newgroup); + *newgroup = mpi2abi_group(mpi_newgroup); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Group_excl(MPIABI_Group group, int n, const int ranks[], + MPIABI_Group *restrict newgroup) { + MPI_Group mpi_newgroup; + int ierr = MPI_Group_excl(abi2mpi_group(group), n, ranks, &mpi_newgroup); + *newgroup = mpi2abi_group(mpi_newgroup); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Group_from_session_pset(MPIABI_Session session, + const char *restrict pset_name, + MPIABI_Group *restrict newgroup) { + MPI_Group mpi_newgroup; + int ierr = MPI_Group_from_session_pset(abi2mpi_session(session), pset_name, + &mpi_newgroup); + *newgroup = mpi2abi_group(mpi_newgroup); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Group_incl(MPIABI_Group group, int n, const int ranks[], + MPIABI_Group *restrict newgroup) { + MPI_Group mpi_newgroup; + int ierr = MPI_Group_incl(abi2mpi_group(group), n, ranks, &mpi_newgroup); + *newgroup = mpi2abi_group(mpi_newgroup); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Group_intersection(MPIABI_Group group1, MPIABI_Group group2, + MPIABI_Group *restrict newgroup) { + MPI_Group mpi_newgroup; + int ierr = MPI_Group_intersection(abi2mpi_group(group1), + abi2mpi_group(group2), &mpi_newgroup); + *newgroup = mpi2abi_group(mpi_newgroup); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Group_range_excl(MPIABI_Group group, int n, int ranges[][3], + MPIABI_Group *restrict newgroup) { + MPI_Group mpi_newgroup; + int ierr = + MPI_Group_range_excl(abi2mpi_group(group), n, ranges, &mpi_newgroup); + *newgroup = mpi2abi_group(mpi_newgroup); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Group_range_incl(MPIABI_Group group, int n, int ranges[][3], + MPIABI_Group *restrict newgroup) { + MPI_Group mpi_newgroup; + int ierr = + MPI_Group_range_incl(abi2mpi_group(group), n, ranges, &mpi_newgroup); + *newgroup = mpi2abi_group(mpi_newgroup); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Group_rank(MPIABI_Group group, int *restrict rank) { + int ierr = MPI_Group_rank(abi2mpi_group(group), rank); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Group_size(MPIABI_Group group, int *restrict size) { + int ierr = MPI_Group_size(abi2mpi_group(group), size); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Group_translate_ranks(MPIABI_Group group1, int n, const int ranks1[], + MPIABI_Group group2, int ranks2[]) { + int ierr = MPI_Group_translate_ranks(abi2mpi_group(group1), n, ranks1, + abi2mpi_group(group2), ranks2); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Group_union(MPIABI_Group group1, MPIABI_Group group2, + MPIABI_Group *restrict newgroup) { + MPI_Group mpi_newgroup; + int ierr = MPI_Group_union(abi2mpi_group(group1), abi2mpi_group(group2), + &mpi_newgroup); + *newgroup = mpi2abi_group(mpi_newgroup); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Intercomm_create(MPIABI_Comm local_comm, int local_leader, + MPIABI_Comm peer_comm, int remote_leader, int tag, + MPIABI_Comm *restrict newintercomm) { + MPI_Comm mpi_newintercomm; + int ierr = MPI_Intercomm_create(abi2mpi_comm(local_comm), local_leader, + abi2mpi_comm(peer_comm), remote_leader, tag, + &mpi_newintercomm); + *newintercomm = mpi2abi_comm(mpi_newintercomm); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Intercomm_create_from_groups( + MPIABI_Group local_group, int local_leader, MPIABI_Group remote_group, + int remote_leader, const char *restrict stringtag, MPIABI_Info info, + MPIABI_Errhandler errhandler, MPIABI_Comm *restrict newintercomm) { + MPI_Comm mpi_newintercomm; + int ierr = MPI_Intercomm_create_from_groups( + abi2mpi_group(local_group), local_leader, abi2mpi_group(remote_group), + remote_leader, stringtag, abi2mpi_info(info), + abi2mpi_errhandler(errhandler), &mpi_newintercomm); + *newintercomm = mpi2abi_comm(mpi_newintercomm); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Intercomm_merge(MPIABI_Comm intercomm, int high, + MPIABI_Comm *restrict newintracomm) { + MPI_Comm mpi_newintracomm; + int ierr = + MPI_Intercomm_merge(abi2mpi_comm(intercomm), high, &mpi_newintracomm); + *newintracomm = mpi2abi_comm(mpi_newintracomm); + return mpi2abi_errorcode(ierr); +} + +struct abi_Type_create_keyval_state { + MPIABI_Type_copy_attr_function *abi_type_copy_attr_fn; + MPIABI_Type_delete_attr_function *abi_type_delete_attr_fn; + void *abi_extra_state; +}; +static int mpi_Type_create_keyval_copy_attr_function( + MPI_Datatype oldtype, int type_keyval, void *extra_state, + void *attribute_val_in, void *attribute_val_out, int *restrict flag) { + const struct abi_Type_create_keyval_state *mpi_extra_state = extra_state; + int ierr = mpi_extra_state->abi_type_copy_attr_fn( + mpi2abi_datatype(oldtype), mpi2abi_keyval(type_keyval), + mpi_extra_state->abi_extra_state, attribute_val_in, attribute_val_out, + flag); + return abi2mpi_errorcode(ierr); +} +static int mpi_Type_create_keyval_delete_attr_function(MPI_Datatype type, + int type_keyval, + void *attribute_val, + void *extra_state) { + const struct abi_Type_create_keyval_state *mpi_extra_state = extra_state; + int ierr = mpi_extra_state->abi_type_delete_attr_fn( + mpi2abi_datatype(type), mpi2abi_keyval(type_keyval), attribute_val, + mpi_extra_state->abi_extra_state); + return abi2mpi_errorcode(ierr); +} +int MPIABI_Type_create_keyval( + MPIABI_Type_copy_attr_function *type_copy_attr_fn, + MPIABI_Type_delete_attr_function *type_delete_attr_fn, + int *restrict type_keyval, void *extra_state) { + struct abi_Type_create_keyval_state *mpi_extra_state = + malloc(sizeof *mpi_extra_state); + mpi_extra_state->abi_type_copy_attr_fn = type_copy_attr_fn; + mpi_extra_state->abi_type_delete_attr_fn = type_delete_attr_fn; + mpi_extra_state->abi_extra_state = extra_state; + int ierr = MPI_Type_create_keyval(mpi_Type_create_keyval_copy_attr_function, + mpi_Type_create_keyval_delete_attr_function, + type_keyval, mpi_extra_state); + *type_keyval = mpi2abi_keyval(*type_keyval); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_delete_attr(MPIABI_Datatype datatype, int type_keyval) { + int ierr = MPI_Type_delete_attr(abi2mpi_datatype(datatype), + abi2mpi_keyval(type_keyval)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_free_keyval(int *restrict type_keyval) { + // We do not free the keyval wrappers + int mpi_type_keyval = abi2mpi_keyval(*type_keyval); + int ierr = MPI_Type_free_keyval(&mpi_type_keyval); + *type_keyval = mpi2abi_keyval(mpi_type_keyval); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_get_attr(MPIABI_Datatype datatype, int type_keyval, + void *attribute_val, int *restrict flag) { + int ierr = + MPI_Type_get_attr(abi2mpi_datatype(datatype), abi2mpi_keyval(type_keyval), + attribute_val, flag); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_get_name(MPIABI_Datatype datatype, char *restrict type_name, + int *restrict resultlen) { + int ierr = + MPI_Type_get_name(abi2mpi_datatype(datatype), type_name, resultlen); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_set_attr(MPIABI_Datatype datatype, int type_keyval, + void *attribute_val) { + int ierr = MPI_Type_set_attr(abi2mpi_datatype(datatype), + abi2mpi_keyval(type_keyval), attribute_val); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_set_name(MPIABI_Datatype datatype, + const char *restrict type_name) { + int ierr = MPI_Type_set_name(abi2mpi_datatype(datatype), type_name); + return mpi2abi_errorcode(ierr); +} + +struct abi_Win_create_keyval_state { + MPIABI_Win_copy_attr_function *abi_win_copy_attr_fn; + MPIABI_Win_delete_attr_function *abi_win_delete_attr_fn; + void *abi_extra_state; +}; +static int mpi_Win_create_keyval_copy_attr_function( + MPI_Win oldwin, int win_keyval, void *extra_state, void *attribute_val_in, + void *attribute_val_out, int *restrict flag) { + const struct abi_Win_create_keyval_state *mpi_extra_state = extra_state; + int ierr = mpi_extra_state->abi_win_copy_attr_fn( + mpi2abi_win(oldwin), mpi2abi_keyval(win_keyval), + mpi_extra_state->abi_extra_state, attribute_val_in, attribute_val_out, + flag); + return abi2mpi_errorcode(ierr); +} +static int mpi_Win_create_keyval_delete_attr_function(MPI_Win win, + int win_keyval, + void *attribute_val, + void *extra_state) { + const struct abi_Win_create_keyval_state *mpi_extra_state = extra_state; + int ierr = mpi_extra_state->abi_win_delete_attr_fn( + mpi2abi_win(win), mpi2abi_keyval(win_keyval), attribute_val, + mpi_extra_state->abi_extra_state); + return abi2mpi_errorcode(ierr); +} +int MPIABI_Win_create_keyval( + MPIABI_Win_copy_attr_function *win_copy_attr_fn, + MPIABI_Win_delete_attr_function *win_delete_attr_fn, + int *restrict win_keyval, void *extra_state) { + struct abi_Win_create_keyval_state *mpi_extra_state = + malloc(sizeof *mpi_extra_state); + mpi_extra_state->abi_win_copy_attr_fn = win_copy_attr_fn; + mpi_extra_state->abi_win_delete_attr_fn = win_delete_attr_fn; + mpi_extra_state->abi_extra_state = extra_state; + int ierr = MPI_Win_create_keyval(mpi_Win_create_keyval_copy_attr_function, + mpi_Win_create_keyval_delete_attr_function, + win_keyval, mpi_extra_state); + *win_keyval = mpi2abi_keyval(*win_keyval); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_delete_attr(MPIABI_Win win, int win_keyval) { + int ierr = MPI_Win_delete_attr(abi2mpi_win(win), abi2mpi_keyval(win_keyval)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_free_keyval(int *restrict win_keyval) { + int mpi_win_keyval = abi2mpi_keyval(*win_keyval); + int ierr = MPI_Win_free_keyval(&mpi_win_keyval); + *win_keyval = mpi2abi_keyval(mpi_win_keyval); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_get_attr(MPIABI_Win win, int win_keyval, void *attribute_val, + int *restrict flag) { + int ierr = MPI_Win_get_attr(abi2mpi_win(win), abi2mpi_keyval(win_keyval), + attribute_val, flag); + switch (win_keyval) { + case MPIABI_WIN_CREATE_FLAVOR: + switch (*(int *)attribute_val) { + case MPI_WIN_FLAVOR_CREATE: + *(int *restrict)attribute_val = MPIABI_WIN_FLAVOR_CREATE; + break; + case MPI_WIN_FLAVOR_ALLOCATE: + *(int *restrict)attribute_val = MPIABI_WIN_FLAVOR_ALLOCATE; + break; + case MPI_WIN_FLAVOR_DYNAMIC: + *(int *restrict)attribute_val = MPIABI_WIN_FLAVOR_DYNAMIC; + break; + case MPI_WIN_FLAVOR_SHARED: + *(int *restrict)attribute_val = MPIABI_WIN_FLAVOR_SHARED; + break; + default: + assert(false); + } + break; + case MPIABI_WIN_MODEL: + switch (*(int *restrict)attribute_val) { + case MPI_WIN_SEPARATE: + *(int *restrict)attribute_val = MPIABI_WIN_SEPARATE; + break; + case MPI_WIN_UNIFIED: + *(int *restrict)attribute_val = MPIABI_WIN_UNIFIED; + break; + default: + assert(0); + } + break; + } + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_get_name(MPIABI_Win win, char *restrict win_name, + int *restrict resultlen) { + int ierr = MPI_Win_get_name(abi2mpi_win(win), win_name, resultlen); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_set_attr(MPIABI_Win win, int win_keyval, void *attribute_val) { + int ierr = MPI_Win_set_attr(abi2mpi_win(win), abi2mpi_keyval(win_keyval), + attribute_val); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_set_name(MPIABI_Win win, const char *restrict win_name) { + int ierr = MPI_Win_set_name(abi2mpi_win(win), win_name); + return mpi2abi_errorcode(ierr); +} + +// A.3.6 Virtual Topologies for MPI Processes C Bindings + +int MPIABI_Cart_coords(MPIABI_Comm comm, int rank, int maxdims, int coords[]) { + int ierr = MPI_Cart_coords(abi2mpi_comm(comm), rank, maxdims, coords); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Cart_create(MPIABI_Comm comm_old, int ndims, const int dims[], + const int periods[], int reorder, + MPIABI_Comm *restrict comm_cart) { + MPI_Comm mpi_comm_cart; + int ierr = MPI_Cart_create(abi2mpi_comm(comm_old), ndims, dims, periods, + reorder, &mpi_comm_cart); + *comm_cart = mpi2abi_comm(mpi_comm_cart); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Cart_get(MPIABI_Comm comm, int maxdims, int dims[], int periods[], + int coords[]) { + int ierr = MPI_Cart_get(abi2mpi_comm(comm), maxdims, dims, periods, coords); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Cart_map(MPIABI_Comm comm, int ndims, const int dims[], + const int periods[], int *restrict newrank) { + int ierr = MPI_Cart_map(abi2mpi_comm(comm), ndims, dims, periods, newrank); + *newrank = mpi2abi_proc(*newrank); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Cart_rank(MPIABI_Comm comm, const int coords[], int *restrict rank) { + int ierr = MPI_Cart_rank(abi2mpi_comm(comm), coords, rank); + *rank = mpi2abi_proc(*rank); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Cart_shift(MPIABI_Comm comm, int direction, int disp, + int *restrict rank_source, int *restrict rank_dest) { + int ierr = MPI_Cart_shift(abi2mpi_comm(comm), direction, disp, rank_source, + rank_dest); + *rank_source = mpi2abi_proc(*rank_source); + *rank_dest = mpi2abi_proc(*rank_dest); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Cart_sub(MPIABI_Comm comm, const int remain_dims[], + MPIABI_Comm *restrict newcomm) { + MPI_Comm mpi_newcomm; + int ierr = MPI_Cart_sub(abi2mpi_comm(comm), remain_dims, &mpi_newcomm); + *newcomm = mpi2abi_comm(mpi_newcomm); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Cartdim_get(MPIABI_Comm comm, int *restrict ndims) { + int ierr = MPI_Cartdim_get(abi2mpi_comm(comm), ndims); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Dims_create(int nnodes, int ndims, int dims[]) { + int ierr = MPI_Dims_create(nnodes, ndims, dims); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Dist_graph_create(MPIABI_Comm comm_old, int n, const int sources[], + const int degrees[], const int destinations[], + const int weights[], MPIABI_Info info, int reorder, + MPIABI_Comm *restrict comm_dist_graph) { + const int *mpi_weights = weights == MPIABI_UNWEIGHTED ? MPI_UNWEIGHTED + : weights == MPIABI_WEIGHTS_EMPTY ? MPI_WEIGHTS_EMPTY + : weights; + MPI_Comm mpi_comm_dist_graph; + int ierr = MPI_Dist_graph_create( + abi2mpi_comm(comm_old), n, sources, degrees, destinations, mpi_weights, + abi2mpi_info(info), reorder, &mpi_comm_dist_graph); + *comm_dist_graph = mpi2abi_comm(mpi_comm_dist_graph); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Dist_graph_create_adjacent(MPIABI_Comm comm_old, int indegree, + const int sources[], + const int sourceweights[], int outdegree, + const int destinations[], + const int destweights[], MPIABI_Info info, + int reorder, + MPIABI_Comm *restrict comm_dist_graph) { + const int *mpi_sourceweights = + sourceweights == MPIABI_UNWEIGHTED ? MPI_UNWEIGHTED + : sourceweights == MPIABI_WEIGHTS_EMPTY ? MPI_WEIGHTS_EMPTY + : sourceweights; + const int *mpi_destweights = destweights == MPIABI_UNWEIGHTED ? MPI_UNWEIGHTED + : destweights == MPIABI_WEIGHTS_EMPTY + ? MPI_WEIGHTS_EMPTY + : destweights; + MPI_Comm mpi_comm_dist_graph; + int ierr = MPI_Dist_graph_create_adjacent( + abi2mpi_comm(comm_old), indegree, sources, mpi_sourceweights, outdegree, + destinations, mpi_destweights, abi2mpi_info(info), reorder, + &mpi_comm_dist_graph); + *comm_dist_graph = mpi2abi_comm(mpi_comm_dist_graph); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Dist_graph_neighbors(MPIABI_Comm comm, int maxindegree, + int sources[], int sourceweights[], + int maxoutdegree, int destinations[], + int destweights[]) { + int ierr = MPI_Dist_graph_neighbors(abi2mpi_comm(comm), maxindegree, sources, + sourceweights, maxoutdegree, destinations, + destweights); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Dist_graph_neighbors_count(MPIABI_Comm comm, int *restrict indegree, + int *restrict outdegree, + int *restrict weighted) { + int ierr = MPI_Dist_graph_neighbors_count(abi2mpi_comm(comm), indegree, + outdegree, weighted); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Graph_create(MPIABI_Comm comm_old, int nnodes, const int index[], + const int edges[], int reorder, + MPIABI_Comm *restrict comm_graph) { + MPI_Comm mpi_comm_graph; + int ierr = MPI_Graph_create(abi2mpi_comm(comm_old), nnodes, index, edges, + reorder, &mpi_comm_graph); + *comm_graph = mpi2abi_comm(mpi_comm_graph); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Graph_get(MPIABI_Comm comm, int maxindex, int maxedges, int index[], + int edges[]) { + int ierr = + MPI_Graph_get(abi2mpi_comm(comm), maxindex, maxedges, index, edges); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Graph_map(MPIABI_Comm comm, int nnodes, const int index[], + const int edges[], int *restrict newrank) { + int ierr = MPI_Graph_map(abi2mpi_comm(comm), nnodes, index, edges, newrank); + *newrank = mpi2abi_proc(*newrank); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Graph_neighbors(MPIABI_Comm comm, int rank, int maxneighbors, + int neighbors[]) { + int ierr = MPI_Graph_neighbors(abi2mpi_comm(comm), abi2mpi_proc(rank), + maxneighbors, neighbors); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Graph_neighbors_count(MPIABI_Comm comm, int rank, + int *restrict nneighbors) { + int ierr = MPI_Graph_neighbors_count(abi2mpi_comm(comm), rank, nneighbors); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Graphdims_get(MPIABI_Comm comm, int *restrict nnodes, + int *restrict nedges) { + int ierr = MPI_Graphdims_get(abi2mpi_comm(comm), nnodes, nedges); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Ineighbor_allgather(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Ineighbor_allgather( + sendbuf, sendcount, abi2mpi_datatype(sendtype), recvbuf, recvcount, + abi2mpi_datatype(recvtype), abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Ineighbor_allgather_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Ineighbor_allgather_c( + sendbuf, sendcount, abi2mpi_datatype(sendtype), recvbuf, recvcount, + abi2mpi_datatype(recvtype), abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Ineighbor_allgatherv(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Ineighbor_allgatherv( + sendbuf, sendcount, abi2mpi_datatype(sendtype), recvbuf, recvcounts, + displs, abi2mpi_datatype(recvtype), abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Ineighbor_allgatherv_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], + const MPIABI_Aint displs[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Request *restrict request) { +#if SIZEOF_MPI_COUNT == SIZEOF_PTRDIFF_T && SIZEOF_MPI_AINT == SIZEOF_PTRDIFF_T + const MPI_Count *mpi_recvcounts = (const MPI_Count *)recvcounts; + const MPI_Aint *mpi_displs = (const MPI_Aint *)displs; +#else + int size; + int ierr1 = MPIABI_Comm_size(comm, &size); + if (ierr1) + return ierr1; + MPI_Count mpi_recvcounts[size]; + for (int n = 0; n < size; ++n) + mpi_recvcounts[n] = recvcounts[n]; + MPI_Aint mpi_displs[size]; + for (int n = 0; n < size; ++n) + mpi_displs[n] = displs[n]; +#endif + MPI_Request mpi_request; + int ierr = MPI_Ineighbor_allgatherv_c( + sendbuf, sendcount, abi2mpi_datatype(sendtype), recvbuf, mpi_recvcounts, + mpi_displs, abi2mpi_datatype(recvtype), abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Ineighbor_alltoall(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Ineighbor_alltoall( + sendbuf, sendcount, abi2mpi_datatype(sendtype), recvbuf, recvcount, + abi2mpi_datatype(recvtype), abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Ineighbor_alltoall_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Ineighbor_alltoall_c( + sendbuf, sendcount, abi2mpi_datatype(sendtype), recvbuf, recvcount, + abi2mpi_datatype(recvtype), abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Ineighbor_alltoallv(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPIABI_Datatype sendtype, + void *recvbuf, const int recvcounts[], + const int rdispls[], MPIABI_Datatype recvtype, + MPIABI_Comm comm, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Ineighbor_alltoallv( + sendbuf, sendcounts, sdispls, abi2mpi_datatype(sendtype), recvbuf, + recvcounts, rdispls, abi2mpi_datatype(recvtype), abi2mpi_comm(comm), + &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Ineighbor_alltoallv_c(const void *sendbuf, + const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], + MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], + const MPIABI_Aint rdispls[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Request *restrict request) { +#if SIZEOF_MPI_COUNT == SIZEOF_PTRDIFF_T && SIZEOF_MPI_AINT == SIZEOF_PTRDIFF_T + const MPI_Count *mpi_sendcounts = (const MPI_Count *)sendcounts; + const MPI_Aint *mpi_sdispls = (const MPI_Aint *)sdispls; + const MPI_Count *mpi_recvcounts = (const MPI_Count *)recvcounts; + const MPI_Aint *mpi_rdispls = (const MPI_Aint *)rdispls; +#else + int size; + int ierr1 = MPIABI_Comm_size(comm, &size); + if (ierr1) + return ierr1; + MPI_Count mpi_sendcounts[size]; + for (int n = 0; n < size; ++n) + mpi_sendcounts[n] = sendcounts[n]; + MPI_Aint mpi_sdispls[size]; + for (int n = 0; n < size; ++n) + mpi_sdispls[n] = sdispls[n]; + MPI_Count mpi_recvcounts[size]; + for (int n = 0; n < size; ++n) + mpi_recvcounts[n] = recvcounts[n]; + MPI_Aint mpi_rdispls[size]; + for (int n = 0; n < size; ++n) + mpi_rdispls[n] = rdispls[n]; +#endif + MPI_Request mpi_request; + int ierr = MPI_Ineighbor_alltoallv_c( + sendbuf, mpi_sendcounts, mpi_sdispls, abi2mpi_datatype(sendtype), recvbuf, + mpi_recvcounts, mpi_rdispls, abi2mpi_datatype(recvtype), + abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Ineighbor_alltoallw( + const void *sendbuf, const int sendcounts[], const MPIABI_Aint sdispls[], + const MPIABI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], + const MPIABI_Aint rdispls[], const MPIABI_Datatype recvtypes[], + MPIABI_Comm comm, MPIABI_Request *restrict request) { + int size; + int ierr1 = MPIABI_Comm_size(comm, &size); + if (ierr1) + return ierr1; + MPI_Datatype mpi_sendtypes[size]; + for (int n = 0; n < size; ++n) + mpi_sendtypes[n] = abi2mpi_datatype(sendtypes[n]); + MPI_Datatype mpi_recvtypes[size]; + for (int n = 0; n < size; ++n) + mpi_recvtypes[n] = abi2mpi_datatype(recvtypes[n]); + MPI_Request mpi_request; + int ierr = MPI_Ineighbor_alltoallw( + sendbuf, sendcounts, sdispls, mpi_sendtypes, recvbuf, recvcounts, rdispls, + mpi_recvtypes, abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Ineighbor_alltoallw_c( + const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], const MPIABI_Datatype sendtypes[], + void *recvbuf, const MPIABI_Count recvcounts[], const MPIABI_Aint rdispls[], + const MPIABI_Datatype recvtypes[], MPIABI_Comm comm, + MPIABI_Request *restrict request) { + int size; + int ierr1 = MPIABI_Comm_size(comm, &size); + if (ierr1) + return ierr1; +#if SIZEOF_MPI_COUNT == SIZEOF_PTRDIFF_T && SIZEOF_MPI_AINT == SIZEOF_PTRDIFF_T + const MPI_Count *mpi_sendcounts = (const MPI_Count *)sendcounts; + const MPI_Aint *mpi_sdispls = (const MPI_Aint *)sdispls; + const MPI_Count *mpi_recvcounts = (const MPI_Count *)recvcounts; + const MPI_Aint *mpi_rdispls = (const MPI_Aint *)rdispls; +#else + MPI_Count mpi_sendcounts[size]; + for (int n = 0; n < size; ++n) + mpi_sendcounts[n] = sendcounts[n]; + MPI_Aint mpi_sdispls[size]; + for (int n = 0; n < size; ++n) + mpi_sdispls[n] = sdispls[n]; + MPI_Count mpi_recvcounts[size]; + for (int n = 0; n < size; ++n) + mpi_recvcounts[n] = recvcounts[n]; + MPI_Aint mpi_rdispls[size]; + for (int n = 0; n < size; ++n) + mpi_rdispls[n] = rdispls[n]; +#endif + MPI_Datatype mpi_sendtypes[size]; + for (int n = 0; n < size; ++n) + mpi_sendtypes[n] = abi2mpi_datatype(sendtypes[n]); + MPI_Datatype mpi_recvtypes[size]; + for (int n = 0; n < size; ++n) + mpi_recvtypes[n] = abi2mpi_datatype(recvtypes[n]); + MPI_Request mpi_request; + int ierr = MPI_Ineighbor_alltoallw_c(sendbuf, mpi_sendcounts, mpi_sdispls, + mpi_sendtypes, recvbuf, mpi_recvcounts, + mpi_rdispls, mpi_recvtypes, + abi2mpi_comm(comm), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Neighbor_allgather(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm) { + int ierr = MPI_Neighbor_allgather( + sendbuf, sendcount, abi2mpi_datatype(sendtype), recvbuf, recvcount, + abi2mpi_datatype(recvtype), abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Neighbor_allgather_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, + MPIABI_Datatype recvtype, MPIABI_Comm comm) { + int ierr = MPI_Neighbor_allgather_c( + sendbuf, sendcount, abi2mpi_datatype(sendtype), recvbuf, recvcount, + abi2mpi_datatype(recvtype), abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Neighbor_allgather_init(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Neighbor_allgather_init( + sendbuf, sendcount, abi2mpi_datatype(sendtype), recvbuf, recvcount, + abi2mpi_datatype(recvtype), abi2mpi_comm(comm), abi2mpi_info(info), + &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Neighbor_allgather_init_c( + const void *sendbuf, MPIABI_Count sendcount, MPIABI_Datatype sendtype, + void *recvbuf, MPIABI_Count recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Info info, MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Neighbor_allgather_init_c( + sendbuf, sendcount, abi2mpi_datatype(sendtype), recvbuf, recvcount, + abi2mpi_datatype(recvtype), abi2mpi_comm(comm), abi2mpi_info(info), + &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Neighbor_allgatherv(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPIABI_Datatype recvtype, MPIABI_Comm comm) { + int ierr = MPI_Neighbor_allgatherv( + sendbuf, sendcount, abi2mpi_datatype(sendtype), recvbuf, recvcounts, + displs, abi2mpi_datatype(recvtype), abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Neighbor_allgatherv_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], + const MPIABI_Aint displs[], + MPIABI_Datatype recvtype, MPIABI_Comm comm) { +#if SIZEOF_MPI_COUNT == SIZEOF_PTRDIFF_T && SIZEOF_MPI_AINT == SIZEOF_PTRDIFF_T + const MPI_Count *mpi_recvcounts = (const MPI_Count *)recvcounts; + const MPI_Aint *mpi_displs = (const MPI_Aint *)displs; +#else + int size; + int ierr1 = MPIABI_Comm_size(comm, &size); + if (ierr1) + return ierr1; + MPI_Count mpi_recvcounts[size]; + for (int n = 0; n < size; ++n) + mpi_recvcounts[n] = recvcounts[n]; + MPI_Aint mpi_displs[size]; + for (int n = 0; n < size; ++n) + mpi_displs[n] = displs[n]; +#endif + int ierr = MPI_Neighbor_allgatherv_c( + sendbuf, sendcount, abi2mpi_datatype(sendtype), recvbuf, mpi_recvcounts, + mpi_displs, abi2mpi_datatype(recvtype), abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Neighbor_allgatherv_init(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Info info, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Neighbor_allgatherv_init( + sendbuf, sendcount, abi2mpi_datatype(sendtype), recvbuf, recvcounts, + displs, abi2mpi_datatype(recvtype), abi2mpi_comm(comm), + abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Neighbor_allgatherv_init_c( + const void *sendbuf, MPIABI_Count sendcount, MPIABI_Datatype sendtype, + void *recvbuf, const MPIABI_Count recvcounts[], const MPIABI_Aint displs[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *restrict request) { +#if SIZEOF_MPI_COUNT == SIZEOF_PTRDIFF_T && SIZEOF_MPI_AINT == SIZEOF_PTRDIFF_T + const MPI_Count *mpi_recvcounts = (const MPI_Count *)recvcounts; + const MPI_Aint *mpi_displs = (const MPI_Aint *)displs; +#else + int size; + int ierr1 = MPIABI_Comm_size(comm, &size); + if (ierr1) + return ierr1; + MPI_Count mpi_recvcounts[size]; + for (int n = 0; n < size; ++n) + mpi_recvcounts[n] = recvcounts[n]; + MPI_Aint mpi_displs[size]; + for (int n = 0; n < size; ++n) + mpi_displs[n] = displs[n]; +#endif + MPI_Request mpi_request; + int ierr = MPI_Neighbor_allgatherv_init_c( + sendbuf, sendcount, abi2mpi_datatype(sendtype), recvbuf, mpi_recvcounts, + mpi_displs, abi2mpi_datatype(recvtype), abi2mpi_comm(comm), + abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Neighbor_alltoall(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm) { + int ierr = MPI_Neighbor_alltoall( + sendbuf, sendcount, abi2mpi_datatype(sendtype), recvbuf, recvcount, + abi2mpi_datatype(recvtype), abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Neighbor_alltoall_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm) { + int ierr = MPI_Neighbor_alltoall_c( + sendbuf, sendcount, abi2mpi_datatype(sendtype), recvbuf, recvcount, + abi2mpi_datatype(recvtype), abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Neighbor_alltoall_init(const void *sendbuf, int sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + int recvcount, MPIABI_Datatype recvtype, + MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Neighbor_alltoall_init( + sendbuf, sendcount, abi2mpi_datatype(sendtype), recvbuf, recvcount, + abi2mpi_datatype(recvtype), abi2mpi_comm(comm), abi2mpi_info(info), + &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Neighbor_alltoall_init_c(const void *sendbuf, MPIABI_Count sendcount, + MPIABI_Datatype sendtype, void *recvbuf, + MPIABI_Count recvcount, + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Info info, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Neighbor_alltoall_init_c( + sendbuf, sendcount, abi2mpi_datatype(sendtype), recvbuf, recvcount, + abi2mpi_datatype(recvtype), abi2mpi_comm(comm), abi2mpi_info(info), + &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Neighbor_alltoallv(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPIABI_Datatype sendtype, + void *recvbuf, const int recvcounts[], + const int rdispls[], MPIABI_Datatype recvtype, + MPIABI_Comm comm) { + int ierr = MPI_Neighbor_alltoallv( + sendbuf, sendcounts, sdispls, abi2mpi_datatype(sendtype), recvbuf, + recvcounts, rdispls, abi2mpi_datatype(recvtype), abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Neighbor_alltoallv_c(const void *sendbuf, + const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], + MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], + const MPIABI_Aint rdispls[], + MPIABI_Datatype recvtype, MPIABI_Comm comm) { +#if SIZEOF_MPI_COUNT == SIZEOF_PTRDIFF_T && SIZEOF_MPI_AINT == SIZEOF_PTRDIFF_T + const MPI_Count *mpi_sendcounts = (const MPI_Count *)sendcounts; + const MPI_Aint *mpi_sdispls = (const MPI_Aint *)sdispls; + const MPI_Count *mpi_recvcounts = (const MPI_Count *)recvcounts; + const MPI_Aint *mpi_rdispls = (const MPI_Aint *)rdispls; +#else + int size; + int ierr1 = MPIABI_Comm_size(comm, &size); + if (ierr1) + return ierr1; + MPI_Count mpi_sendcounts[size]; + for (int n = 0; n < size; ++n) + mpi_sendcounts[n] = sendcounts[n]; + MPI_Aint mpi_sdispls[size]; + for (int n = 0; n < size; ++n) + mpi_sdispls[n] = sdispls[n]; + MPI_Count mpi_recvcounts[size]; + for (int n = 0; n < size; ++n) + mpi_recvcounts[n] = recvcounts[n]; + MPI_Aint mpi_rdispls[size]; + for (int n = 0; n < size; ++n) + mpi_rdispls[n] = rdispls[n]; +#endif + int ierr = MPI_Neighbor_alltoallv_c( + sendbuf, mpi_sendcounts, mpi_sdispls, abi2mpi_datatype(sendtype), recvbuf, + mpi_recvcounts, mpi_rdispls, abi2mpi_datatype(recvtype), + abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Neighbor_alltoallv_init(const void *sendbuf, const int sendcounts[], + const int sdispls[], + MPIABI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int rdispls[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, + MPIABI_Info info, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Neighbor_alltoallv_init( + sendbuf, sendcounts, sdispls, abi2mpi_datatype(sendtype), recvbuf, + recvcounts, rdispls, abi2mpi_datatype(recvtype), abi2mpi_comm(comm), + abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Neighbor_alltoallv_init_c( + const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], MPIABI_Datatype sendtype, void *recvbuf, + const MPIABI_Count recvcounts[], const MPIABI_Aint rdispls[], + MPIABI_Datatype recvtype, MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *restrict request) { +#if SIZEOF_MPI_COUNT == SIZEOF_PTRDIFF_T && SIZEOF_MPI_AINT == SIZEOF_PTRDIFF_T + const MPI_Count *mpi_sendcounts = (const MPI_Count *)sendcounts; + const MPI_Aint *mpi_sdispls = (const MPI_Aint *)sdispls; + const MPI_Count *mpi_recvcounts = (const MPI_Count *)recvcounts; + const MPI_Aint *mpi_rdispls = (const MPI_Aint *)rdispls; +#else + int size; + int ierr1 = MPIABI_Comm_size(comm, &size); + if (ierr1) + return ierr1; + MPI_Count mpi_sendcounts[size]; + for (int n = 0; n < size; ++n) + mpi_sendcounts[n] = sendcounts[n]; + MPI_Aint mpi_sdispls[size]; + for (int n = 0; n < size; ++n) + mpi_sdispls[n] = sdispls[n]; + MPI_Count mpi_recvcounts[size]; + for (int n = 0; n < size; ++n) + mpi_recvcounts[n] = recvcounts[n]; + MPI_Aint mpi_rdispls[size]; + for (int n = 0; n < size; ++n) + mpi_rdispls[n] = rdispls[n]; +#endif + MPI_Request mpi_request; + int ierr = MPI_Neighbor_alltoallv_init_c( + sendbuf, mpi_sendcounts, mpi_sdispls, abi2mpi_datatype(sendtype), recvbuf, + mpi_recvcounts, mpi_rdispls, abi2mpi_datatype(recvtype), + abi2mpi_comm(comm), abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Neighbor_alltoallw(const void *sendbuf, const int sendcounts[], + const MPIABI_Aint sdispls[], + const MPIABI_Datatype sendtypes[], void *recvbuf, + const int recvcounts[], + const MPIABI_Aint rdispls[], + const MPIABI_Datatype recvtypes[], + MPIABI_Comm comm) { + int size; + int ierr1 = MPIABI_Comm_size(comm, &size); + if (ierr1) + return ierr1; + MPI_Datatype mpi_sendtypes[size]; + for (int n = 0; n < size; ++n) + mpi_sendtypes[n] = abi2mpi_datatype(sendtypes[n]); + MPI_Datatype mpi_recvtypes[size]; + for (int n = 0; n < size; ++n) + mpi_recvtypes[n] = abi2mpi_datatype(recvtypes[n]); + int ierr = MPI_Neighbor_alltoallw(sendbuf, sendcounts, sdispls, mpi_sendtypes, + recvbuf, recvcounts, rdispls, mpi_recvtypes, + abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Neighbor_alltoallw_c( + const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], const MPIABI_Datatype sendtypes[], + void *recvbuf, const MPIABI_Count recvcounts[], const MPIABI_Aint rdispls[], + const MPIABI_Datatype recvtypes[], MPIABI_Comm comm) { + int size; + int ierr1 = MPIABI_Comm_size(comm, &size); + if (ierr1) + return ierr1; +#if SIZEOF_MPI_COUNT == SIZEOF_PTRDIFF_T && SIZEOF_MPI_AINT == SIZEOF_PTRDIFF_T + const MPI_Count *mpi_sendcounts = (const MPI_Count *)sendcounts; + const MPI_Aint *mpi_sdispls = (const MPI_Aint *)sdispls; + const MPI_Count *mpi_recvcounts = (const MPI_Count *)recvcounts; + const MPI_Aint *mpi_rdispls = (const MPI_Aint *)rdispls; +#else + MPI_Count mpi_sendcounts[size]; + for (int n = 0; n < size; ++n) + mpi_sendcounts[n] = sendcounts[n]; + MPI_Aint mpi_sdispls[size]; + for (int n = 0; n < size; ++n) + mpi_sdispls[n] = sdispls[n]; + MPI_Count mpi_recvcounts[size]; + for (int n = 0; n < size; ++n) + mpi_recvcounts[n] = recvcounts[n]; + MPI_Aint mpi_rdispls[size]; + for (int n = 0; n < size; ++n) + mpi_rdispls[n] = rdispls[n]; +#endif + MPI_Datatype mpi_sendtypes[size]; + for (int n = 0; n < size; ++n) + mpi_sendtypes[n] = abi2mpi_datatype(sendtypes[n]); + MPI_Datatype mpi_recvtypes[size]; + for (int n = 0; n < size; ++n) + mpi_recvtypes[n] = abi2mpi_datatype(recvtypes[n]); + int ierr = MPI_Neighbor_alltoallw_c( + sendbuf, mpi_sendcounts, mpi_sdispls, mpi_sendtypes, recvbuf, + mpi_recvcounts, mpi_rdispls, mpi_recvtypes, abi2mpi_comm(comm)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Neighbor_alltoallw_init( + const void *sendbuf, const int sendcounts[], const MPIABI_Aint sdispls[], + const MPIABI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], + const MPIABI_Aint rdispls[], const MPIABI_Datatype recvtypes[], + MPIABI_Comm comm, MPIABI_Info info, MPIABI_Request *restrict request) { + int size; + int ierr1 = MPIABI_Comm_size(comm, &size); + if (ierr1) + return ierr1; + MPI_Datatype mpi_sendtypes[size]; + for (int n = 0; n < size; ++n) + mpi_sendtypes[n] = abi2mpi_datatype(sendtypes[n]); + MPI_Datatype mpi_recvtypes[size]; + for (int n = 0; n < size; ++n) + mpi_recvtypes[n] = abi2mpi_datatype(recvtypes[n]); + MPI_Request mpi_request; + int ierr = MPI_Neighbor_alltoallw_init( + sendbuf, sendcounts, sdispls, mpi_sendtypes, recvbuf, recvcounts, rdispls, + mpi_recvtypes, abi2mpi_comm(comm), abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Neighbor_alltoallw_init_c( + const void *sendbuf, const MPIABI_Count sendcounts[], + const MPIABI_Aint sdispls[], const MPIABI_Datatype sendtypes[], + void *recvbuf, const MPIABI_Count recvcounts[], const MPIABI_Aint rdispls[], + const MPIABI_Datatype recvtypes[], MPIABI_Comm comm, MPIABI_Info info, + MPIABI_Request *restrict request) { + int size; + int ierr1 = MPIABI_Comm_size(comm, &size); + if (ierr1) + return ierr1; +#if SIZEOF_MPI_COUNT == SIZEOF_PTRDIFF_T && SIZEOF_MPI_AINT == SIZEOF_PTRDIFF_T + const MPI_Count *mpi_sendcounts = (const MPI_Count *)sendcounts; + const MPI_Aint *mpi_sdispls = (const MPI_Aint *)sdispls; + const MPI_Count *mpi_recvcounts = (const MPI_Count *)recvcounts; + const MPI_Aint *mpi_rdispls = (const MPI_Aint *)rdispls; +#else + MPI_Count mpi_sendcounts[size]; + for (int n = 0; n < size; ++n) + mpi_sendcounts[n] = sendcounts[n]; + MPI_Aint mpi_sdispls[size]; + for (int n = 0; n < size; ++n) + mpi_sdispls[n] = sdispls[n]; + MPI_Count mpi_recvcounts[size]; + for (int n = 0; n < size; ++n) + mpi_recvcounts[n] = recvcounts[n]; + MPI_Aint mpi_rdispls[size]; + for (int n = 0; n < size; ++n) + mpi_rdispls[n] = rdispls[n]; +#endif + MPI_Datatype mpi_sendtypes[size]; + for (int n = 0; n < size; ++n) + mpi_sendtypes[n] = abi2mpi_datatype(sendtypes[n]); + MPI_Datatype mpi_recvtypes[size]; + for (int n = 0; n < size; ++n) + mpi_recvtypes[n] = abi2mpi_datatype(recvtypes[n]); + MPI_Request mpi_request; + int ierr = MPI_Neighbor_alltoallw_init_c( + sendbuf, mpi_sendcounts, mpi_sdispls, mpi_sendtypes, recvbuf, + mpi_recvcounts, mpi_rdispls, mpi_recvtypes, abi2mpi_comm(comm), + abi2mpi_info(info), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Topo_test(MPIABI_Comm comm, int *restrict status) { + int ierr = MPI_Topo_test(abi2mpi_comm(comm), status); + switch (*status) { + case MPI_GRAPH: + *status = MPIABI_GRAPH; + break; + case MPI_CART: + *status = MPIABI_CART; + break; + case MPI_DIST_GRAPH: + *status = MPIABI_DIST_GRAPH; + break; + case MPI_UNDEFINED: + *status = MPIABI_UNDEFINED; + break; + default: + assert(false); + } + return mpi2abi_errorcode(ierr); +} + +// A.3.7 MPI Environmental Management C Bindings + +int MPIABI_Add_error_class(int *restrict errorclass) { + int ierr = MPI_Add_error_class(errorclass); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Add_error_code(int errorclass, int *restrict errorcode) { + int ierr = MPI_Add_error_code(errorclass, errorcode); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Add_error_string(int errorcode, const char *restrict string) { + int ierr = MPI_Add_error_string(errorcode, string); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Alloc_mem(MPIABI_Aint size, MPIABI_Info info, void *baseptr) { + int ierr = MPI_Alloc_mem(size, abi2mpi_info(info), baseptr); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Comm_call_errhandler(MPIABI_Comm comm, int errorcode) { + int ierr = MPI_Comm_call_errhandler(abi2mpi_comm(comm), errorcode); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Comm_create_errhandler( + MPIABI_Comm_errhandler_function *comm_errhandler_fn, + MPIABI_Errhandler *restrict errhandler) { + // This is not possible; errhandler calls cannot be forwarded + assert(false); +} + +int MPIABI_Comm_get_errhandler(MPIABI_Comm comm, + MPIABI_Errhandler *restrict errhandler) { + MPI_Errhandler mpi_errhandler; + int ierr = MPI_Comm_get_errhandler(abi2mpi_comm(comm), &mpi_errhandler); + *errhandler = mpi2abi_errhandler(mpi_errhandler); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Comm_set_errhandler(MPIABI_Comm comm, MPIABI_Errhandler errhandler) { + int ierr = MPI_Comm_set_errhandler(abi2mpi_comm(comm), + abi2mpi_errhandler(errhandler)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Errhandler_free(MPIABI_Errhandler *restrict errhandler) { + MPI_Errhandler mpi_errhandler; + int ierr = MPI_Errhandler_free(&mpi_errhandler); + *errhandler = mpi2abi_errhandler(mpi_errhandler); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Error_class(int errorcode, int *restrict errorclass) { + int ierr = MPI_Error_class(abi2mpi_errorcode(errorcode), errorclass); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Error_string(int errorcode, char *restrict string, + int *restrict resultlen) { + int ierr = MPI_Error_string(abi2mpi_errorcode(errorcode), string, resultlen); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_call_errhandler(MPIABI_File fh, int errorcode) { + int ierr = MPI_File_call_errhandler(abi2mpi_file(fh), errorcode); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_create_errhandler( + MPIABI_File_errhandler_function *file_errhandler_fn, + MPIABI_Errhandler *restrict errhandler) { + // This is not possible; errhandler calls cannot be forwarded + assert(false); +} + +int MPIABI_File_get_errhandler(MPIABI_File file, + MPIABI_Errhandler *restrict errhandler) { + MPI_Errhandler mpi_errhandler; + int ierr = MPI_File_get_errhandler(abi2mpi_file(file), &mpi_errhandler); + *errhandler = mpi2abi_errhandler(mpi_errhandler); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_set_errhandler(MPIABI_File file, MPIABI_Errhandler errhandler) { + int ierr = MPI_File_set_errhandler(abi2mpi_file(file), + abi2mpi_errhandler(errhandler)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Free_mem(void *base) { + int ierr = MPI_Free_mem(base); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Get_hw_resource_info(MPIABI_Info *restrict hw_info) { +#if MPI_VERSION_NUMBER >= 410 + MPI_Info mpi_hw_info; + int ierr = MPI_Get_hw_resource_info(&mpi_hw_info); + *hw_info = mpi2abi_info(mpi_hw_info); + return mpi2abi_errorcode(ierr); +#else + assert(0); +#endif +} + +int MPIABI_Get_library_version(char *restrict version, + int *restrict resultlen) { + int ierr = MPI_Get_library_version(version, resultlen); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Get_processor_name(char *restrict name, int *restrict resultlen) { + int ierr = MPI_Get_processor_name(name, resultlen); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Get_version(int *restrict version, int *restrict subversion) { + int ierr = MPI_Get_version(version, subversion); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Remove_error_class(int errorclass) { +#if MPI_VERSION_NUMBER >= 410 + int ierr = MPI_Remove_error_class(errorclass); + return mpi2abi_errorcode(ierr); +#else + assert(0); +#endif +} + +int MPIABI_Remove_error_code(int errorcode) { +#if MPI_VERSION_NUMBER >= 410 + int ierr = MPI_Remove_error_code(errorcode); + return mpi2abi_errorcode(ierr); +#else + assert(0); +#endif +} + +int MPIABI_Remove_error_string(int errorcode) { +#if MPI_VERSION_NUMBER >= 410 + int ierr = MPI_Remove_error_string(errorcode); + return mpi2abi_errorcode(ierr); +#else + assert(0); +#endif +} + +int MPIABI_Session_call_errhandler(MPIABI_Session session, int errorcode) { + int ierr = MPI_Session_call_errhandler(abi2mpi_session(session), errorcode); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Session_create_errhandler( + MPIABI_Session_errhandler_function *session_errhandler_fn, + MPIABI_Errhandler *restrict errhandler) { + // This is not possible; errhandler calls cannot be forwarded + assert(false); +} + +int MPIABI_Session_get_errhandler(MPIABI_Session session, + MPIABI_Errhandler *restrict errhandler) { + MPI_Errhandler mpi_errhandler; + int ierr = + MPI_Session_get_errhandler(abi2mpi_session(session), &mpi_errhandler); + *errhandler = mpi2abi_errhandler(mpi_errhandler); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Session_set_errhandler(MPIABI_Session session, + MPIABI_Errhandler errhandler) { + int ierr = MPI_Session_set_errhandler(abi2mpi_session(session), + abi2mpi_errhandler(errhandler)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_call_errhandler(MPIABI_Win win, int errorcode) { + int ierr = MPI_Win_call_errhandler(abi2mpi_win(win), errorcode); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_create_errhandler( + MPIABI_Win_errhandler_function *win_errhandler_fn, + MPIABI_Errhandler *restrict errhandler) { + // This is not possible; errhandler calls cannot be forwarded + assert(false); +} + +int MPIABI_Win_get_errhandler(MPIABI_Win win, + MPIABI_Errhandler *restrict errhandler) { + MPI_Errhandler mpi_errhandler; + int ierr = MPI_Win_get_errhandler(abi2mpi_win(win), &mpi_errhandler); + *errhandler = mpi2abi_errhandler(mpi_errhandler); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_set_errhandler(MPIABI_Win win, MPIABI_Errhandler errhandler) { + int ierr = + MPI_Win_set_errhandler(abi2mpi_win(win), abi2mpi_errhandler(errhandler)); + return mpi2abi_errorcode(ierr); +} + +double MPIABI_Wtick(void) { return MPI_Wtick(); } + +double MPIABI_Wtime(void) { return MPI_Wtime(); } + +// A.3.8 The Info Object C Bindings + +int MPIABI_Info_create(MPIABI_Info *restrict info) { + MPI_Info mpi_info; + int ierr = MPI_Info_create(&mpi_info); + *info = mpi2abi_info(mpi_info); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Info_create_env(int argc, char *argv[], MPIABI_Info *restrict info) { + MPI_Info mpi_info; + int ierr = MPI_Info_create_env(argc, argv, &mpi_info); + *info = mpi2abi_info(mpi_info); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Info_delete(MPIABI_Info info, const char *restrict key) { + int ierr = MPI_Info_delete(abi2mpi_info(info), key); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Info_dup(MPIABI_Info info, MPIABI_Info *restrict newinfo) { + MPI_Info mpi_newinfo; + int ierr = MPI_Info_dup(abi2mpi_info(info), &mpi_newinfo); + *newinfo = mpi2abi_info(mpi_newinfo); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Info_free(MPIABI_Info *restrict info) { + MPI_Info mpi_info = abi2mpi_info(*info); + int ierr = MPI_Info_free(&mpi_info); + *info = mpi2abi_info(mpi_info); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Info_get_nkeys(MPIABI_Info info, int *restrict nkeys) { + int ierr = MPI_Info_get_nkeys(abi2mpi_info(info), nkeys); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Info_get_nthkey(MPIABI_Info info, int n, char *restrict key) { + int ierr = MPI_Info_get_nthkey(abi2mpi_info(info), n, key); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Info_get_string(MPIABI_Info info, const char *restrict key, + int *restrict buflen, char *restrict value, + int *restrict flag) { + int ierr = MPI_Info_get_string(abi2mpi_info(info), key, buflen, value, flag); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Info_set(MPIABI_Info info, const char *restrict key, + const char *restrict value) { + int ierr = MPI_Info_set(abi2mpi_info(info), key, value); + return mpi2abi_errorcode(ierr); +} + +// A.3.9 Process Creation and Management C Bindings + +int MPIABI_Abort(MPIABI_Comm comm, int errorcode) { + int ierr = MPI_Abort(abi2mpi_comm(comm), errorcode); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Close_port(const char *restrict port_name) { + int ierr = MPI_Close_port(port_name); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Comm_accept(const char *restrict port_name, MPIABI_Info info, + int root, MPIABI_Comm comm, + MPIABI_Comm *restrict newcomm) { + MPI_Comm mpi_newcomm; + int ierr = MPI_Comm_accept(port_name, abi2mpi_info(info), root, + abi2mpi_comm(comm), &mpi_newcomm); + *newcomm = mpi2abi_comm(mpi_newcomm); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Comm_connect(const char *restrict port_name, MPIABI_Info info, + int root, MPIABI_Comm comm, + MPIABI_Comm *restrict newcomm) { + MPI_Comm mpi_newcomm; + int ierr = MPI_Comm_connect(port_name, abi2mpi_info(info), root, + abi2mpi_comm(comm), &mpi_newcomm); + *newcomm = mpi2abi_comm(mpi_newcomm); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Comm_disconnect(MPIABI_Comm *restrict comm) { + MPI_Comm mpi_comm = abi2mpi_comm(*comm); + int ierr = MPI_Comm_disconnect(&mpi_comm); + *comm = mpi2abi_comm(mpi_comm); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Comm_get_parent(MPIABI_Comm *restrict parent) { + MPI_Comm mpi_parent; + int ierr = MPI_Comm_get_parent(&mpi_parent); + *parent = mpi2abi_comm(mpi_parent); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Comm_join(int fd, MPIABI_Comm *restrict intercomm) { + MPI_Comm mpi_intercomm; + int ierr = MPI_Comm_join(fd, &mpi_intercomm); + *intercomm = mpi2abi_comm(mpi_intercomm); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Comm_spawn(const char *restrict command, char *argv[], int maxprocs, + MPIABI_Info info, int root, MPIABI_Comm comm, + MPIABI_Comm *restrict intercomm, + int array_of_errcodes[]) { + MPI_Comm mpi_intercomm; + int ierr = + MPI_Comm_spawn(command, argv, maxprocs, abi2mpi_info(info), root, + abi2mpi_comm(comm), &mpi_intercomm, array_of_errcodes); + *intercomm = mpi2abi_comm(mpi_intercomm); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Comm_spawn_multiple(int count, char *array_of_commands[], + char **array_of_argv[], + const int array_of_maxprocs[], + const MPIABI_Info array_of_info[], int root, + MPIABI_Comm comm, + MPIABI_Comm *restrict intercomm, + int array_of_errcodes[]) { + MPI_Info mpi_array_of_info[count]; + for (int n = 0; n < count; ++n) + mpi_array_of_info[n] = abi2mpi_info(array_of_info[n]); + MPI_Comm mpi_intercomm; + int ierr = MPI_Comm_spawn_multiple(count, array_of_commands, array_of_argv, + array_of_maxprocs, mpi_array_of_info, root, + abi2mpi_comm(comm), &mpi_intercomm, + array_of_errcodes); + *intercomm = mpi2abi_comm(mpi_intercomm); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Finalize(void) { + int ierr = MPI_Finalize(); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Finalized(int *restrict flag) { + int ierr = MPI_Finalized(flag); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Init(int *argc, char ***argv) { + int ierr = MPI_Init(argc, argv); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Init_thread(int *argc, char ***argv, int required, + int *restrict provided) { + int ierr = + MPI_Init_thread(argc, argv, abi2mpi_threadlevel(required), provided); + *provided = mpi2abi_threadlevel(*provided); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Initialized(int *restrict flag) { + int ierr = MPI_Initialized(flag); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Is_thread_main(int *restrict flag) { + int ierr = MPI_Is_thread_main(flag); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Lookup_name(const char *restrict service_name, MPIABI_Info info, + char *restrict port_name) { + int ierr = MPI_Lookup_name(service_name, abi2mpi_info(info), port_name); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Open_port(MPIABI_Info info, char *restrict port_name) { + int ierr = MPI_Open_port(abi2mpi_info(info), port_name); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Publish_name(const char *restrict service_name, MPIABI_Info info, + const char *restrict port_name) { + int ierr = MPI_Publish_name(service_name, abi2mpi_info(info), port_name); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Query_thread(int *restrict provided) { + int ierr = MPI_Query_thread(provided); + *provided = mpi2abi_threadlevel(*provided); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Session_finalize(MPIABI_Session *restrict session) { + MPI_Session mpi_session = abi2mpi_session(*session); + int ierr = MPI_Session_finalize(&mpi_session); + *session = mpi2abi_session(mpi_session); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Session_get_info(MPIABI_Session session, + MPIABI_Info *restrict info_used) { + MPI_Info mpi_info_used; + int ierr = MPI_Session_get_info(abi2mpi_session(session), &mpi_info_used); + *info_used = mpi2abi_info(mpi_info_used); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Session_get_nth_pset(MPIABI_Session session, MPIABI_Info info, int n, + int *restrict pset_len, + char *restrict pset_name) { + int ierr = MPI_Session_get_nth_pset( + abi2mpi_session(session), abi2mpi_info(info), n, pset_len, pset_name); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Session_get_num_psets(MPIABI_Session session, MPIABI_Info info, + int *restrict npset_names) { + int ierr = MPI_Session_get_num_psets(abi2mpi_session(session), + abi2mpi_info(info), npset_names); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Session_get_pset_info(MPIABI_Session session, + const char *restrict pset_name, + MPIABI_Info *restrict info) { + MPI_Info mpi_info; + int ierr = + MPI_Session_get_pset_info(abi2mpi_session(session), pset_name, &mpi_info); + *info = mpi2abi_info(mpi_info); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Session_init(MPIABI_Info info, MPIABI_Errhandler errhandler, + MPIABI_Session *restrict session) { + MPI_Session mpi_session; + int ierr = MPI_Session_init(abi2mpi_info(info), + abi2mpi_errhandler(errhandler), &mpi_session); + *session = mpi2abi_session(mpi_session); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Unpublish_name(const char *restrict service_name, MPIABI_Info info, + const char *restrict port_name) { + int ierr = MPI_Unpublish_name(service_name, abi2mpi_info(info), port_name); + return mpi2abi_errorcode(ierr); +} + +// A.3.10 One-Sided Communications C Bindings + +int MPIABI_Accumulate(const void *origin_addr, int origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, int target_count, + MPIABI_Datatype target_datatype, MPIABI_Op op, + MPIABI_Win win) { + int ierr = MPI_Accumulate( + origin_addr, origin_count, abi2mpi_datatype(origin_datatype), target_rank, + target_disp, target_count, abi2mpi_datatype(target_datatype), + abi2mpi_op(op), abi2mpi_win(win)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Accumulate_c(const void *origin_addr, MPIABI_Count origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, MPIABI_Count target_count, + MPIABI_Datatype target_datatype, MPIABI_Op op, + MPIABI_Win win) { + int ierr = MPI_Accumulate_c( + origin_addr, origin_count, abi2mpi_datatype(origin_datatype), target_rank, + target_disp, target_count, abi2mpi_datatype(target_datatype), + abi2mpi_op(op), abi2mpi_win(win)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Compare_and_swap(const void *origin_addr, const void *compare_addr, + void *result_addr, MPIABI_Datatype datatype, + int target_rank, MPIABI_Aint target_disp, + MPIABI_Win win) { + int ierr = MPI_Compare_and_swap(origin_addr, compare_addr, result_addr, + abi2mpi_datatype(datatype), target_rank, + target_disp, abi2mpi_win(win)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Fetch_and_op(const void *origin_addr, void *result_addr, + MPIABI_Datatype datatype, int target_rank, + MPIABI_Aint target_disp, MPIABI_Op op, MPIABI_Win win) { + int ierr = MPI_Fetch_and_op(origin_addr, result_addr, + abi2mpi_datatype(datatype), target_rank, + target_disp, abi2mpi_op(op), abi2mpi_win(win)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Get(void *origin_addr, int origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, int target_count, + MPIABI_Datatype target_datatype, MPIABI_Win win) { + int ierr = + MPI_Get(origin_addr, origin_count, abi2mpi_datatype(origin_datatype), + target_rank, target_disp, target_count, + abi2mpi_datatype(target_datatype), abi2mpi_win(win)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Get_accumulate(const void *origin_addr, int origin_count, + MPIABI_Datatype origin_datatype, void *result_addr, + int result_count, MPIABI_Datatype result_datatype, + int target_rank, MPIABI_Aint target_disp, + int target_count, MPIABI_Datatype target_datatype, + MPIABI_Op op, MPIABI_Win win) { + int ierr = MPI_Get_accumulate( + origin_addr, origin_count, abi2mpi_datatype(origin_datatype), result_addr, + result_count, abi2mpi_datatype(result_datatype), target_rank, target_disp, + target_count, abi2mpi_datatype(target_datatype), abi2mpi_op(op), + abi2mpi_win(win)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Get_accumulate_c(const void *origin_addr, MPIABI_Count origin_count, + MPIABI_Datatype origin_datatype, void *result_addr, + MPIABI_Count result_count, + MPIABI_Datatype result_datatype, int target_rank, + MPIABI_Aint target_disp, MPIABI_Count target_count, + MPIABI_Datatype target_datatype, MPIABI_Op op, + MPIABI_Win win) { + int ierr = MPI_Get_accumulate_c( + origin_addr, origin_count, abi2mpi_datatype(origin_datatype), result_addr, + result_count, abi2mpi_datatype(result_datatype), target_rank, target_disp, + target_count, abi2mpi_datatype(target_datatype), abi2mpi_op(op), + abi2mpi_win(win)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Get_c(void *origin_addr, MPIABI_Count origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, MPIABI_Count target_count, + MPIABI_Datatype target_datatype, MPIABI_Win win) { + int ierr = + MPI_Get_c(origin_addr, origin_count, abi2mpi_datatype(origin_datatype), + target_rank, target_disp, target_count, + abi2mpi_datatype(target_datatype), abi2mpi_win(win)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Put(const void *origin_addr, int origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, int target_count, + MPIABI_Datatype target_datatype, MPIABI_Win win) { + int ierr = + MPI_Put(origin_addr, origin_count, abi2mpi_datatype(origin_datatype), + target_rank, target_disp, target_count, + abi2mpi_datatype(target_datatype), abi2mpi_win(win)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Put_c(const void *origin_addr, MPIABI_Count origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, MPIABI_Count target_count, + MPIABI_Datatype target_datatype, MPIABI_Win win) { + int ierr = + MPI_Put(origin_addr, origin_count, abi2mpi_datatype(origin_datatype), + target_rank, target_disp, target_count, + abi2mpi_datatype(target_datatype), abi2mpi_win(win)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Raccumulate(const void *origin_addr, int origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, int target_count, + MPIABI_Datatype target_datatype, MPIABI_Op op, + MPIABI_Win win, MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Raccumulate( + origin_addr, origin_count, abi2mpi_datatype(origin_datatype), target_rank, + target_disp, target_count, abi2mpi_datatype(target_datatype), + abi2mpi_op(op), abi2mpi_win(win), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Raccumulate_c(const void *origin_addr, MPIABI_Count origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, MPIABI_Count target_count, + MPIABI_Datatype target_datatype, MPIABI_Op op, + MPIABI_Win win, MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Raccumulate_c( + origin_addr, origin_count, abi2mpi_datatype(origin_datatype), target_rank, + target_disp, target_count, abi2mpi_datatype(target_datatype), + abi2mpi_op(op), abi2mpi_win(win), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Rget(void *origin_addr, int origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, int target_count, + MPIABI_Datatype target_datatype, MPIABI_Win win, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Rget( + origin_addr, origin_count, abi2mpi_datatype(origin_datatype), target_rank, + target_disp, target_count, abi2mpi_datatype(target_datatype), + abi2mpi_win(win), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Rget_accumulate(const void *origin_addr, int origin_count, + MPIABI_Datatype origin_datatype, void *result_addr, + int result_count, MPIABI_Datatype result_datatype, + int target_rank, MPIABI_Aint target_disp, + int target_count, MPIABI_Datatype target_datatype, + MPIABI_Op op, MPIABI_Win win, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Rget_accumulate( + origin_addr, origin_count, abi2mpi_datatype(origin_datatype), result_addr, + result_count, abi2mpi_datatype(result_datatype), target_rank, target_disp, + target_count, abi2mpi_datatype(target_datatype), abi2mpi_op(op), + abi2mpi_win(win), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Rget_accumulate_c(const void *origin_addr, MPIABI_Count origin_count, + MPIABI_Datatype origin_datatype, void *result_addr, + MPIABI_Count result_count, + MPIABI_Datatype result_datatype, int target_rank, + MPIABI_Aint target_disp, MPIABI_Count target_count, + MPIABI_Datatype target_datatype, MPIABI_Op op, + MPIABI_Win win, MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Rget_accumulate_c( + origin_addr, origin_count, abi2mpi_datatype(origin_datatype), result_addr, + result_count, abi2mpi_datatype(result_datatype), target_rank, target_disp, + target_count, abi2mpi_datatype(target_datatype), abi2mpi_op(op), + abi2mpi_win(win), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Rget_c(void *origin_addr, MPIABI_Count origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, MPIABI_Count target_count, + MPIABI_Datatype target_datatype, MPIABI_Win win, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Rget_c( + origin_addr, origin_count, abi2mpi_datatype(origin_datatype), target_rank, + target_disp, target_count, abi2mpi_datatype(target_datatype), + abi2mpi_win(win), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Rput(const void *origin_addr, int origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, int target_count, + MPIABI_Datatype target_datatype, MPIABI_Win win, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Rput( + origin_addr, origin_count, abi2mpi_datatype(origin_datatype), target_rank, + target_disp, target_count, abi2mpi_datatype(target_datatype), + abi2mpi_win(win), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Rput_c(const void *origin_addr, MPIABI_Count origin_count, + MPIABI_Datatype origin_datatype, int target_rank, + MPIABI_Aint target_disp, MPIABI_Count target_count, + MPIABI_Datatype target_datatype, MPIABI_Win win, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_Rput_c( + origin_addr, origin_count, abi2mpi_datatype(origin_datatype), target_rank, + target_disp, target_count, abi2mpi_datatype(target_datatype), + abi2mpi_win(win), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_allocate(MPIABI_Aint size, int disp_unit, MPIABI_Info info, + MPIABI_Comm comm, void *baseptr, + MPIABI_Win *restrict win) { + MPI_Win mpi_win; + int ierr = MPI_Win_allocate(size, disp_unit, abi2mpi_info(info), + abi2mpi_comm(comm), baseptr, &mpi_win); + *win = mpi2abi_win(mpi_win); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_allocate_c(MPIABI_Aint size, MPIABI_Aint disp_unit, + MPIABI_Info info, MPIABI_Comm comm, void *baseptr, + MPIABI_Win *restrict win) { + MPI_Win mpi_win; + int ierr = MPI_Win_allocate(size, disp_unit, abi2mpi_info(info), + abi2mpi_comm(comm), baseptr, &mpi_win); + *win = mpi2abi_win(mpi_win); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_allocate_shared(MPIABI_Aint size, int disp_unit, + MPIABI_Info info, MPIABI_Comm comm, + void *baseptr, MPIABI_Win *restrict win) { + MPI_Win mpi_win; + int ierr = MPI_Win_allocate_shared(size, disp_unit, abi2mpi_info(info), + abi2mpi_comm(comm), baseptr, &mpi_win); + *win = mpi2abi_win(mpi_win); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_allocate_shared_c(MPIABI_Aint size, MPIABI_Aint disp_unit, + MPIABI_Info info, MPIABI_Comm comm, + void *baseptr, MPIABI_Win *restrict win) { + MPI_Win mpi_win; + int ierr = MPI_Win_allocate_shared_c(size, disp_unit, abi2mpi_info(info), + abi2mpi_comm(comm), baseptr, &mpi_win); + *win = mpi2abi_win(mpi_win); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_attach(MPIABI_Win win, void *base, MPIABI_Aint size) { + int ierr = MPI_Win_attach(abi2mpi_win(win), base, size); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_complete(MPIABI_Win win) { + int ierr = MPI_Win_complete(abi2mpi_win(win)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_create(void *base, MPIABI_Aint size, int disp_unit, + MPIABI_Info info, MPIABI_Comm comm, + MPIABI_Win *restrict win) { + MPI_Win mpi_win; + int ierr = MPI_Win_create(base, size, disp_unit, abi2mpi_info(info), + abi2mpi_comm(comm), &mpi_win); + *win = mpi2abi_win(mpi_win); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_create_c(void *base, MPIABI_Aint size, MPIABI_Aint disp_unit, + MPIABI_Info info, MPIABI_Comm comm, + MPIABI_Win *restrict win) { + MPI_Win mpi_win; + int ierr = MPI_Win_create_c(base, size, disp_unit, abi2mpi_info(info), + abi2mpi_comm(comm), &mpi_win); + *win = mpi2abi_win(mpi_win); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_create_dynamic(MPIABI_Info info, MPIABI_Comm comm, + MPIABI_Win *restrict win) { + MPI_Win mpi_win; + int ierr = + MPI_Win_create_dynamic(abi2mpi_info(info), abi2mpi_comm(comm), &mpi_win); + *win = mpi2abi_win(mpi_win); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_detach(MPIABI_Win win, const void *base) { + int ierr = MPI_Win_detach(abi2mpi_win(win), base); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_fence(int assert, MPIABI_Win win) { + int ierr = MPI_Win_fence(assert, abi2mpi_win(win)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_flush(int rank, MPIABI_Win win) { + int ierr = MPI_Win_flush(rank, abi2mpi_win(win)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_flush_all(MPIABI_Win win) { + int ierr = MPI_Win_flush_all(abi2mpi_win(win)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_flush_local(int rank, MPIABI_Win win) { + int ierr = MPI_Win_flush_local(rank, abi2mpi_win(win)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_flush_local_all(MPIABI_Win win) { + int ierr = MPI_Win_flush_local_all(abi2mpi_win(win)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_free(MPIABI_Win *restrict win) { + MPI_Win mpi_win = abi2mpi_win(*win); + int ierr = MPI_Win_free(&mpi_win); + *win = mpi2abi_win(mpi_win); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_get_group(MPIABI_Win win, MPIABI_Group *restrict group) { + MPI_Group mpi_group; + int ierr = MPI_Win_get_group(abi2mpi_win(win), &mpi_group); + *group = mpi2abi_group(mpi_group); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_get_info(MPIABI_Win win, MPIABI_Info *restrict info_used) { + MPI_Info mpi_info_used; + int ierr = MPI_Win_get_info(abi2mpi_win(win), &mpi_info_used); + *info_used = mpi2abi_info(mpi_info_used); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_lock(int lock_type, int rank, int assert, MPIABI_Win win) { + switch (lock_type) { + case MPIABI_LOCK_EXCLUSIVE: + lock_type = MPI_LOCK_EXCLUSIVE; + break; + case MPIABI_LOCK_SHARED: + lock_type = MPI_LOCK_SHARED; + break; + default: + assert(false); + } + int ierr = MPI_Win_lock(lock_type, rank, assert, abi2mpi_win(win)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_lock_all(int assert, MPIABI_Win win) { + int ierr = MPI_Win_lock_all(assert, abi2mpi_win(win)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_post(MPIABI_Group group, int assert, MPIABI_Win win) { + int ierr = MPI_Win_post(abi2mpi_group(group), assert, abi2mpi_win(win)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_set_info(MPIABI_Win win, MPIABI_Info info) { + int ierr = MPI_Win_set_info(abi2mpi_win(win), abi2mpi_info(info)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_shared_query(MPIABI_Win win, int rank, + MPIABI_Aint *restrict size, int *restrict disp_unit, + void *baseptr) { + MPI_Aint mpi_size; + int ierr = MPI_Win_shared_query(abi2mpi_win(win), rank, &mpi_size, disp_unit, + baseptr); + *size = mpi_size; + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_shared_query_c(MPIABI_Win win, int rank, + MPIABI_Aint *restrict size, + MPIABI_Aint *restrict disp_unit, void *baseptr) { + MPI_Aint mpi_size; + MPI_Aint mpi_disp_unit; + int ierr = MPI_Win_shared_query_c(abi2mpi_win(win), rank, &mpi_size, + &mpi_disp_unit, baseptr); + *size = mpi_size; + *disp_unit = mpi_disp_unit; + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_start(MPIABI_Group group, int assert, MPIABI_Win win) { + int ierr = MPI_Win_start(abi2mpi_group(group), assert, abi2mpi_win(win)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_sync(MPIABI_Win win) { + int ierr = MPI_Win_sync(abi2mpi_win(win)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_test(MPIABI_Win win, int *restrict flag) { + int ierr = MPI_Win_test(abi2mpi_win(win), flag); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_unlock(int rank, MPIABI_Win win) { + int ierr = MPI_Win_unlock(rank, abi2mpi_win(win)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_unlock_all(MPIABI_Win win) { + int ierr = MPI_Win_unlock_all(abi2mpi_win(win)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Win_wait(MPIABI_Win win) { + int ierr = MPI_Win_wait(abi2mpi_win(win)); + return mpi2abi_errorcode(ierr); +} + +// A.3.11 External Interfaces C Bindings + +int MPIABI_Grequest_complete(MPIABI_Request request) { + int ierr = MPI_Grequest_complete(abi2mpi_request(request)); + return mpi2abi_errorcode(ierr); +} + +struct abi_Grequest_start_state { + MPIABI_Grequest_query_function *abi_query_fn; + MPIABI_Grequest_free_function *abi_free_fn; + MPIABI_Grequest_cancel_function *abi_cancel_fn; + void *abi_extra_state; +}; +static int mpi_Grequest_query_function(void *extra_state, + MPI_Status *restrict status) { + const struct abi_Grequest_start_state *mpi_extra_state = extra_state; + MPIABI_Status *abi_status = mpi2abi_statusptr(status); + int ierr = mpi_extra_state->abi_query_fn(mpi_extra_state->abi_extra_state, + abi_status); + abi2mpi_statusptr(abi_status); + return abi2mpi_errorcode(ierr); +} +static int mpi_Grequest_free_function(void *extra_state) { + const struct abi_Grequest_start_state *mpi_extra_state = extra_state; + int ierr = mpi_extra_state->abi_free_fn(mpi_extra_state->abi_extra_state); + return abi2mpi_errorcode(ierr); +} +static int mpi_Grequest_cancel_function(void *extra_state, int complete) { + const struct abi_Grequest_start_state *mpi_extra_state = extra_state; + int ierr = mpi_extra_state->abi_cancel_fn(mpi_extra_state->abi_extra_state, + complete); + return abi2mpi_errorcode(ierr); +} +int MPIABI_Grequest_start(MPIABI_Grequest_query_function *query_fn, + MPIABI_Grequest_free_function *free_fn, + MPIABI_Grequest_cancel_function *cancel_fn, + void *extra_state, MPIABI_Request *restrict request) { + struct abi_Grequest_start_state *mpi_extra_state = + malloc(sizeof *mpi_extra_state); + mpi_extra_state->abi_query_fn = query_fn; + mpi_extra_state->abi_free_fn = free_fn; + mpi_extra_state->abi_cancel_fn = cancel_fn; + mpi_extra_state->abi_extra_state = extra_state; + MPI_Request mpi_request; + int ierr = MPI_Grequest_start( + mpi_Grequest_query_function, mpi_Grequest_free_function, + mpi_Grequest_cancel_function, mpi_extra_state, &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Status_set_cancelled(MPIABI_Status *restrict status, int flag) { + MPI_Status *mpi_status = abi2mpi_statusptr(status); + int ierr = MPI_Status_set_cancelled(mpi_status, flag); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Status_set_elements(MPIABI_Status *restrict status, + MPIABI_Datatype datatype, int count) { + MPI_Status *mpi_status = abi2mpi_statusptr(status); + int ierr = + MPI_Status_set_elements(mpi_status, abi2mpi_datatype(datatype), count); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Status_set_elements_c(MPIABI_Status *restrict status, + MPIABI_Datatype datatype, MPIABI_Count count) { + MPI_Status *mpi_status = abi2mpi_statusptr(status); + int ierr = + MPI_Status_set_elements_c(mpi_status, abi2mpi_datatype(datatype), count); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Status_set_error(MPIABI_Status *restrict status, int err) { +#if MPI_VERSION_NUMBER >= 410 + MPI_Status *mpi_status = abi2mpi_statusptr(status); + int ierr = MPI_Status_set_error(mpi_status, err); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +#else + assert(0); +#endif +} + +int MPIABI_Status_set_source(MPIABI_Status *restrict status, int source) { +#if MPI_VERSION_NUMBER >= 410 + MPI_Status *mpi_status = abi2mpi_statusptr(status); + int ierr = MPI_Status_set_source(mpi_status, source); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +#else + assert(0); +#endif +} + +int MPIABI_Status_set_tag(MPIABI_Status *restrict status, int tag) { +#if MPI_VERSION_NUMBER >= 410 + MPI_Status *mpi_status = abi2mpi_statusptr(status); + int ierr = MPI_Status_set_tag(mpi_status, tag); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +#else + assert(0); +#endif +} + +// A.3.12 I/O C Bindings + +int MPIABI_File_close(MPIABI_File *restrict fh) { + MPI_File mpi_fh = abi2mpi_file(*fh); + int ierr = MPI_File_close(&mpi_fh); + *fh = mpi2abi_file(mpi_fh); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_delete(const char *restrict filename, MPIABI_Info info) { + int ierr = MPI_File_delete(filename, abi2mpi_info(info)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_get_amode(MPIABI_File fh, int *restrict amode) { + int ierr = MPI_File_get_amode(abi2mpi_file(fh), amode); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_get_atomicity(MPIABI_File fh, int *restrict flag) { + int ierr = MPI_File_get_atomicity(abi2mpi_file(fh), flag); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_get_byte_offset(MPIABI_File fh, MPIABI_Offset offset, + MPIABI_Offset *restrict disp) { + MPI_Offset mpi_disp; + int ierr = MPI_File_get_byte_offset(abi2mpi_file(fh), offset, &mpi_disp); + *disp = mpi_disp; + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_get_group(MPIABI_File fh, MPIABI_Group *restrict group) { + MPI_Group mpi_group; + int ierr = MPI_File_get_group(abi2mpi_file(fh), &mpi_group); + *group = mpi2abi_group(mpi_group); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_get_info(MPIABI_File fh, MPIABI_Info *restrict info_used) { + MPI_Info mpi_info_used; + int ierr = MPI_File_get_info(abi2mpi_file(fh), &mpi_info_used); + *info_used = mpi2abi_info(mpi_info_used); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_get_position(MPIABI_File fh, MPIABI_Offset *restrict offset) { + MPI_Offset mpi_offset; + int ierr = MPI_File_get_position(abi2mpi_file(fh), &mpi_offset); + *offset = mpi_offset; + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_get_position_shared(MPIABI_File fh, + MPIABI_Offset *restrict offset) { + MPI_Offset mpi_offset; + int ierr = MPI_File_get_position_shared(abi2mpi_file(fh), &mpi_offset); + *offset = mpi_offset; + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_get_size(MPIABI_File fh, MPIABI_Offset *restrict size) { + MPI_Offset mpi_size; + int ierr = MPI_File_get_size(abi2mpi_file(fh), &mpi_size); + *size = mpi_size; + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_get_type_extent(MPIABI_File fh, MPIABI_Datatype datatype, + MPIABI_Aint *restrict extent) { + MPI_Aint mpi_extent; + int ierr = MPI_File_get_type_extent(abi2mpi_file(fh), + abi2mpi_datatype(datatype), &mpi_extent); + *extent = mpi_extent; + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_get_type_extent_c(MPIABI_File fh, MPIABI_Datatype datatype, + MPIABI_Count *restrict extent) { + MPI_Count mpi_extent; + int ierr = MPI_File_get_type_extent_c( + abi2mpi_file(fh), abi2mpi_datatype(datatype), &mpi_extent); + *extent = mpi_extent; + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_get_view(MPIABI_File fh, MPIABI_Offset *restrict disp, + MPIABI_Datatype *restrict etype, + MPIABI_Datatype *restrict filetype, + char *restrict datarep) { + MPI_Offset mpi_disp; + MPI_Datatype mpi_etype; + MPI_Datatype mpi_filetype; + int ierr = MPI_File_get_view(abi2mpi_file(fh), &mpi_disp, &mpi_etype, + &mpi_filetype, datarep); + *disp = mpi_disp; + *etype = mpi2abi_datatype(mpi_etype); + *filetype = mpi2abi_datatype(mpi_filetype); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_iread(MPIABI_File fh, void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_File_iread(abi2mpi_file(fh), buf, count, + abi2mpi_datatype(datatype), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_iread_all(MPIABI_File fh, void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_File_iread_all(abi2mpi_file(fh), buf, count, + abi2mpi_datatype(datatype), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_iread_all_c(MPIABI_File fh, void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_File_iread_all_c(abi2mpi_file(fh), buf, count, + abi2mpi_datatype(datatype), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_iread_at(MPIABI_File fh, MPIABI_Offset offset, void *buf, + int count, MPIABI_Datatype datatype, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_File_iread_at(abi2mpi_file(fh), offset, buf, count, + abi2mpi_datatype(datatype), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_iread_at_all(MPIABI_File fh, MPIABI_Offset offset, void *buf, + int count, MPIABI_Datatype datatype, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_File_iread_at_all(abi2mpi_file(fh), offset, buf, count, + abi2mpi_datatype(datatype), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_iread_at_all_c(MPIABI_File fh, MPIABI_Offset offset, void *buf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_File_iread_at_all_c(abi2mpi_file(fh), offset, buf, count, + abi2mpi_datatype(datatype), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_iread_at_c(MPIABI_File fh, MPIABI_Offset offset, void *buf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_File_iread_at_c(abi2mpi_file(fh), offset, buf, count, + abi2mpi_datatype(datatype), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_iread_c(MPIABI_File fh, void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_File_iread_c(abi2mpi_file(fh), buf, count, + abi2mpi_datatype(datatype), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_iread_shared(MPIABI_File fh, void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_File_iread_shared(abi2mpi_file(fh), buf, count, + abi2mpi_datatype(datatype), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_iread_shared_c(MPIABI_File fh, void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_File_iread_shared_c(abi2mpi_file(fh), buf, count, + abi2mpi_datatype(datatype), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_iwrite(MPIABI_File fh, const void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_File_iwrite(abi2mpi_file(fh), buf, count, + abi2mpi_datatype(datatype), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_iwrite_all(MPIABI_File fh, const void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_File_iwrite_all(abi2mpi_file(fh), buf, count, + abi2mpi_datatype(datatype), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_iwrite_all_c(MPIABI_File fh, const void *buf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_File_iwrite_all_c(abi2mpi_file(fh), buf, count, + abi2mpi_datatype(datatype), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_iwrite_at(MPIABI_File fh, MPIABI_Offset offset, const void *buf, + int count, MPIABI_Datatype datatype, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_File_iwrite_at(abi2mpi_file(fh), offset, buf, count, + abi2mpi_datatype(datatype), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_iwrite_at_all(MPIABI_File fh, MPIABI_Offset offset, + const void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_File_iwrite_at_all(abi2mpi_file(fh), offset, buf, count, + abi2mpi_datatype(datatype), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_iwrite_at_all_c(MPIABI_File fh, MPIABI_Offset offset, + const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_File_iwrite_at_all_c(abi2mpi_file(fh), offset, buf, count, + abi2mpi_datatype(datatype), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_iwrite_at_c(MPIABI_File fh, MPIABI_Offset offset, + const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_File_iwrite_at_c(abi2mpi_file(fh), offset, buf, count, + abi2mpi_datatype(datatype), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_iwrite_c(MPIABI_File fh, const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_File_iwrite_c(abi2mpi_file(fh), buf, count, + abi2mpi_datatype(datatype), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_iwrite_shared(MPIABI_File fh, const void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_File_iwrite_shared(abi2mpi_file(fh), buf, count, + abi2mpi_datatype(datatype), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_iwrite_shared_c(MPIABI_File fh, const void *buf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Request *restrict request) { + MPI_Request mpi_request; + int ierr = MPI_File_iwrite_shared_c(abi2mpi_file(fh), buf, count, + abi2mpi_datatype(datatype), &mpi_request); + *request = mpi2abi_request(mpi_request); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_open(MPIABI_Comm comm, const char *restrict filename, int amode, + MPIABI_Info info, MPIABI_File *restrict fh) { + MPI_File mpi_fh; + int ierr = MPI_File_open(abi2mpi_comm(comm), filename, abi2mpi_mode(amode), + abi2mpi_info(info), &mpi_fh); + *fh = mpi2abi_file(mpi_fh); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_preallocate(MPIABI_File fh, MPIABI_Offset size) { + int ierr = MPI_File_preallocate(abi2mpi_file(fh), size); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_read(MPIABI_File fh, void *buf, int count, + MPIABI_Datatype datatype, MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_File_read(abi2mpi_file(fh), buf, count, + abi2mpi_datatype(datatype), mpi_status); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_read_all(MPIABI_File fh, void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_File_read_all(abi2mpi_file(fh), buf, count, + abi2mpi_datatype(datatype), mpi_status); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_read_all_begin(MPIABI_File fh, void *buf, int count, + MPIABI_Datatype datatype) { + int ierr = MPI_File_read_all_begin(abi2mpi_file(fh), buf, count, + abi2mpi_datatype(datatype)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_read_all_begin_c(MPIABI_File fh, void *buf, MPIABI_Count count, + MPIABI_Datatype datatype) { + int ierr = MPI_File_read_all_begin_c(abi2mpi_file(fh), buf, count, + abi2mpi_datatype(datatype)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_read_all_c(MPIABI_File fh, void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_File_read_all_c(abi2mpi_file(fh), buf, count, + abi2mpi_datatype(datatype), mpi_status); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_read_all_end(MPIABI_File fh, void *buf, + MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_File_read_all_end(abi2mpi_file(fh), buf, mpi_status); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_read_at(MPIABI_File fh, MPIABI_Offset offset, void *buf, + int count, MPIABI_Datatype datatype, + MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_File_read_at(abi2mpi_file(fh), offset, buf, count, + abi2mpi_datatype(datatype), mpi_status); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_read_at_all(MPIABI_File fh, MPIABI_Offset offset, void *buf, + int count, MPIABI_Datatype datatype, + MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_File_read_at_all(abi2mpi_file(fh), offset, buf, count, + abi2mpi_datatype(datatype), mpi_status); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_read_at_all_begin(MPIABI_File fh, MPIABI_Offset offset, + void *buf, int count, + MPIABI_Datatype datatype) { + int ierr = MPI_File_read_at_all_begin(abi2mpi_file(fh), offset, buf, count, + abi2mpi_datatype(datatype)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_read_at_all_begin_c(MPIABI_File fh, MPIABI_Offset offset, + void *buf, MPIABI_Count count, + MPIABI_Datatype datatype) { + int ierr = MPI_File_read_at_all_begin_c(abi2mpi_file(fh), offset, buf, count, + abi2mpi_datatype(datatype)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_read_at_all_c(MPIABI_File fh, MPIABI_Offset offset, void *buf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_File_read_at_all_c(abi2mpi_file(fh), offset, buf, count, + abi2mpi_datatype(datatype), mpi_status); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_read_at_all_end(MPIABI_File fh, void *buf, + MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_File_read_at_all_end(abi2mpi_file(fh), buf, mpi_status); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_read_at_c(MPIABI_File fh, MPIABI_Offset offset, void *buf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_File_read_at(abi2mpi_file(fh), offset, buf, count, + abi2mpi_datatype(datatype), mpi_status); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_read_c(MPIABI_File fh, void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_File_read(abi2mpi_file(fh), buf, count, + abi2mpi_datatype(datatype), mpi_status); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_read_ordered(MPIABI_File fh, void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_File_read_ordered(abi2mpi_file(fh), buf, count, + abi2mpi_datatype(datatype), mpi_status); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_read_ordered_begin(MPIABI_File fh, void *buf, int count, + MPIABI_Datatype datatype) { + int ierr = MPI_File_read_ordered_begin(abi2mpi_file(fh), buf, count, + abi2mpi_datatype(datatype)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_read_ordered_begin_c(MPIABI_File fh, void *buf, + MPIABI_Count count, + MPIABI_Datatype datatype) { + int ierr = MPI_File_read_ordered_begin_c(abi2mpi_file(fh), buf, count, + abi2mpi_datatype(datatype)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_read_ordered_c(MPIABI_File fh, void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_File_read_ordered_c(abi2mpi_file(fh), buf, count, + abi2mpi_datatype(datatype), mpi_status); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_read_ordered_end(MPIABI_File fh, void *buf, + MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_File_read_ordered_end(abi2mpi_file(fh), buf, mpi_status); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_read_shared(MPIABI_File fh, void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_File_read_shared(abi2mpi_file(fh), buf, count, + abi2mpi_datatype(datatype), mpi_status); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_read_shared_c(MPIABI_File fh, void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_File_read_shared_c(abi2mpi_file(fh), buf, count, + abi2mpi_datatype(datatype), mpi_status); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_seek(MPIABI_File fh, MPIABI_Offset offset, int whence) { + int ierr = MPI_File_seek(abi2mpi_file(fh), offset, abi2mpi_whence(whence)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_seek_shared(MPIABI_File fh, MPIABI_Offset offset, int whence) { + int ierr = + MPI_File_seek_shared(abi2mpi_file(fh), offset, abi2mpi_whence(whence)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_set_atomicity(MPIABI_File fh, int flag) { + int ierr = MPI_File_set_atomicity(abi2mpi_file(fh), flag); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_set_info(MPIABI_File fh, MPIABI_Info info) { + int ierr = MPI_File_set_info(abi2mpi_file(fh), abi2mpi_info(info)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_set_size(MPIABI_File fh, MPIABI_Offset size) { + int ierr = MPI_File_set_size(abi2mpi_file(fh), size); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_set_view(MPIABI_File fh, MPIABI_Offset disp, + MPIABI_Datatype etype, MPIABI_Datatype filetype, + const char *restrict datarep, MPIABI_Info info) { + if (disp == MPIABI_DISPLACEMENT_CURRENT) + disp = MPI_DISPLACEMENT_CURRENT; + int ierr = MPI_File_set_view(abi2mpi_file(fh), disp, abi2mpi_datatype(etype), + abi2mpi_datatype(filetype), datarep, + abi2mpi_info(info)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_sync(MPIABI_File fh) { + int ierr = MPI_File_sync(abi2mpi_file(fh)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_write(MPIABI_File fh, const void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_File_write(abi2mpi_file(fh), buf, count, + abi2mpi_datatype(datatype), mpi_status); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_write_all(MPIABI_File fh, const void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_File_write_all(abi2mpi_file(fh), buf, count, + abi2mpi_datatype(datatype), mpi_status); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_write_all_begin(MPIABI_File fh, const void *buf, int count, + MPIABI_Datatype datatype) { + int ierr = MPI_File_write_all_begin(abi2mpi_file(fh), buf, count, + abi2mpi_datatype(datatype)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_write_all_begin_c(MPIABI_File fh, const void *buf, + MPIABI_Count count, + MPIABI_Datatype datatype) { + int ierr = MPI_File_write_all_begin_c(abi2mpi_file(fh), buf, count, + abi2mpi_datatype(datatype)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_write_all_c(MPIABI_File fh, const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_File_write_all_c(abi2mpi_file(fh), buf, count, + abi2mpi_datatype(datatype), mpi_status); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_write_all_end(MPIABI_File fh, const void *buf, + MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_File_write_all_end(abi2mpi_file(fh), buf, mpi_status); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_write_at(MPIABI_File fh, MPIABI_Offset offset, const void *buf, + int count, MPIABI_Datatype datatype, + MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_File_write_at(abi2mpi_file(fh), offset, buf, count, + abi2mpi_datatype(datatype), mpi_status); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_write_at_all(MPIABI_File fh, MPIABI_Offset offset, + const void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_File_write_at_all(abi2mpi_file(fh), offset, buf, count, + abi2mpi_datatype(datatype), mpi_status); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_write_at_all_begin(MPIABI_File fh, MPIABI_Offset offset, + const void *buf, int count, + MPIABI_Datatype datatype) { + int ierr = MPI_File_write_at_all_begin(abi2mpi_file(fh), offset, buf, count, + abi2mpi_datatype(datatype)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_write_at_all_begin_c(MPIABI_File fh, MPIABI_Offset offset, + const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype) { + int ierr = MPI_File_write_at_all_begin_c(abi2mpi_file(fh), offset, buf, count, + abi2mpi_datatype(datatype)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_write_at_all_c(MPIABI_File fh, MPIABI_Offset offset, + const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_File_write_at_all_c(abi2mpi_file(fh), offset, buf, count, + abi2mpi_datatype(datatype), mpi_status); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_write_at_all_end(MPIABI_File fh, const void *buf, + MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_File_write_at_all_end(abi2mpi_file(fh), buf, mpi_status); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_write_at_c(MPIABI_File fh, MPIABI_Offset offset, + const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_File_write_at_all_c(abi2mpi_file(fh), offset, buf, count, + abi2mpi_datatype(datatype), mpi_status); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_write_c(MPIABI_File fh, const void *buf, MPIABI_Count count, + MPIABI_Datatype datatype, + MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_File_write(abi2mpi_file(fh), buf, count, + abi2mpi_datatype(datatype), mpi_status); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_write_ordered(MPIABI_File fh, const void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_File_write_ordered(abi2mpi_file(fh), buf, count, + abi2mpi_datatype(datatype), mpi_status); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_write_ordered_begin(MPIABI_File fh, const void *buf, int count, + MPIABI_Datatype datatype) { + int ierr = MPI_File_write_ordered_begin(abi2mpi_file(fh), buf, count, + abi2mpi_datatype(datatype)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_write_ordered_begin_c(MPIABI_File fh, const void *buf, + MPIABI_Count count, + MPIABI_Datatype datatype) { + int ierr = MPI_File_write_ordered_begin_c(abi2mpi_file(fh), buf, count, + abi2mpi_datatype(datatype)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_write_ordered_c(MPIABI_File fh, const void *buf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_File_write_ordered_c(abi2mpi_file(fh), buf, count, + abi2mpi_datatype(datatype), mpi_status); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_write_ordered_end(MPIABI_File fh, const void *buf, + MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_File_write_ordered_end(abi2mpi_file(fh), buf, mpi_status); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_write_shared(MPIABI_File fh, const void *buf, int count, + MPIABI_Datatype datatype, + MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_File_write_shared(abi2mpi_file(fh), buf, count, + abi2mpi_datatype(datatype), mpi_status); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_File_write_shared_c(MPIABI_File fh, const void *buf, + MPIABI_Count count, MPIABI_Datatype datatype, + MPIABI_Status *restrict status) { + MPI_Status *mpi_status = abi2mpi_statusptr_uninitialized(status); + int ierr = MPI_File_write_shared_c(abi2mpi_file(fh), buf, count, + abi2mpi_datatype(datatype), mpi_status); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +struct mpi_Register_datarep_state { + MPIABI_Datarep_conversion_function *abi_read_conversion_fn; + MPIABI_Datarep_conversion_function *abi_write_conversion_fn; + MPIABI_Datarep_extent_function *abi_dtype_file_extent_fn; + void *abi_extra_state; +}; +static int mpi_Datarep_read_conversion_function(void *userbuf, + MPI_Datatype datatype, + int count, void *filebuf, + MPI_Offset position, + void *extra_state) { + const struct mpi_Register_datarep_state *mpi_extra_state = extra_state; + int ierr = mpi_extra_state->abi_read_conversion_fn( + userbuf, mpi2abi_datatype(datatype), count, filebuf, position, + mpi_extra_state->abi_extra_state); + return abi2mpi_errorcode(ierr); +} +static int mpi_Datarep_write_conversion_function(void *userbuf, + MPI_Datatype datatype, + int count, void *filebuf, + MPI_Offset position, + void *extra_state) { + const struct mpi_Register_datarep_state *mpi_extra_state = extra_state; + int ierr = mpi_extra_state->abi_write_conversion_fn( + userbuf, mpi2abi_datatype(datatype), count, filebuf, position, + mpi_extra_state->abi_extra_state); + return abi2mpi_errorcode(ierr); +} +static int mpi_Datarep_extent_function(MPI_Datatype datatype, + MPI_Aint *restrict extent, + void *extra_state) { + const struct mpi_Register_datarep_state *mpi_extra_state = extra_state; + MPIABI_Aint abi_extent; + int ierr = mpi_extra_state->abi_dtype_file_extent_fn( + mpi2abi_datatype(datatype), &abi_extent, + mpi_extra_state->abi_extra_state); + *extent = abi_extent; + return abi2mpi_errorcode(ierr); +} +int MPIABI_Register_datarep( + const char *restrict datarep, + MPIABI_Datarep_conversion_function *read_conversion_fn, + MPIABI_Datarep_conversion_function *write_conversion_fn, + MPIABI_Datarep_extent_function *dtype_file_extent_fn, void *extra_state) { + struct mpi_Register_datarep_state *mpi_extra_state = + malloc(sizeof *mpi_extra_state); + mpi_extra_state->abi_read_conversion_fn = read_conversion_fn; + mpi_extra_state->abi_write_conversion_fn = write_conversion_fn; + mpi_extra_state->abi_dtype_file_extent_fn = dtype_file_extent_fn; + mpi_extra_state->abi_extra_state = extra_state; + int ierr = MPI_Register_datarep(datarep, mpi_Datarep_read_conversion_function, + mpi_Datarep_write_conversion_function, + mpi_Datarep_extent_function, mpi_extra_state); + return mpi2abi_errorcode(ierr); +} + +struct mpi_Register_datarep_state_c { + MPIABI_Datarep_conversion_function_c *abi_read_conversion_fn; + MPIABI_Datarep_conversion_function_c *abi_write_conversion_fn; + MPIABI_Datarep_extent_function *abi_dtype_file_extent_fn; + void *abi_extra_state; +}; +static int +mpi_Datarep_read_conversion_function_c(void *userbuf, MPI_Datatype datatype, + MPI_Count count, void *filebuf, + MPI_Offset position, void *extra_state) { + const struct mpi_Register_datarep_state_c *mpi_extra_state = extra_state; + int ierr = mpi_extra_state->abi_read_conversion_fn( + userbuf, mpi2abi_datatype(datatype), count, filebuf, position, + mpi_extra_state->abi_extra_state); + return abi2mpi_errorcode(ierr); +} +static int mpi_Datarep_write_conversion_function_c( + void *userbuf, MPI_Datatype datatype, MPI_Count count, void *filebuf, + MPI_Offset position, void *extra_state) { + const struct mpi_Register_datarep_state_c *mpi_extra_state = extra_state; + int ierr = mpi_extra_state->abi_write_conversion_fn( + userbuf, mpi2abi_datatype(datatype), count, filebuf, position, + mpi_extra_state->abi_extra_state); + return abi2mpi_errorcode(ierr); +} +static int mpi_Datarep_extent_function_c(MPI_Datatype datatype, + MPI_Aint *restrict extent, + void *extra_state) { + const struct mpi_Register_datarep_state_c *mpi_extra_state = extra_state; + MPIABI_Aint abi_extent; + int ierr = mpi_extra_state->abi_dtype_file_extent_fn( + mpi2abi_datatype(datatype), &abi_extent, + mpi_extra_state->abi_extra_state); + *extent = abi_extent; + return abi2mpi_errorcode(ierr); +} +int MPIABI_Register_datarep_c( + const char *restrict datarep, + MPIABI_Datarep_conversion_function_c *read_conversion_fn, + MPIABI_Datarep_conversion_function_c *write_conversion_fn, + MPIABI_Datarep_extent_function *dtype_file_extent_fn, void *extra_state) { + struct mpi_Register_datarep_state_c *mpi_extra_state = + malloc(sizeof *mpi_extra_state); + mpi_extra_state->abi_read_conversion_fn = read_conversion_fn; + mpi_extra_state->abi_write_conversion_fn = write_conversion_fn; + mpi_extra_state->abi_dtype_file_extent_fn = dtype_file_extent_fn; + mpi_extra_state->abi_extra_state = extra_state; + int ierr = + MPI_Register_datarep_c(datarep, mpi_Datarep_read_conversion_function_c, + mpi_Datarep_write_conversion_function_c, + mpi_Datarep_extent_function_c, mpi_extra_state); + return mpi2abi_errorcode(ierr); +} + +// A.3.13 Language Bindings C Bindings + +MPIABI_Fint MPIABI_Comm_c2f(MPIABI_Comm comm); +MPIABI_Comm MPIABI_Comm_f2c(MPIABI_Fint comm); +MPIABI_Fint MPIABI_Errhandler_c2f(MPIABI_Errhandler errhandler); +MPIABI_Errhandler MPIABI_Errhandler_f2c(MPIABI_Fint errhandler); +MPIABI_Fint MPIABI_File_c2f(MPIABI_File file); +MPIABI_File MPIABI_File_f2c(MPIABI_Fint file); +MPIABI_Fint MPIABI_Group_c2f(MPIABI_Group group); +MPIABI_Group MPIABI_Group_f2c(MPIABI_Fint group); +MPIABI_Fint MPIABI_Info_c2f(MPIABI_Info info); +MPIABI_Info MPIABI_Info_f2c(MPIABI_Fint info); +MPIABI_Fint MPIABI_Message_c2f(MPIABI_Message message); +MPIABI_Message MPIABI_Message_f2c(MPIABI_Fint message); +MPIABI_Fint MPIABI_Op_c2f(MPIABI_Op op); +MPIABI_Op MPIABI_Op_f2c(MPIABI_Fint op); +MPIABI_Fint MPIABI_Request_c2f(MPIABI_Request request); +MPIABI_Request MPIABI_Request_f2c(MPIABI_Fint request); +MPIABI_Fint MPIABI_Session_c2f(MPIABI_Session session); +MPIABI_Session MPIABI_Session_f2c(MPIABI_Fint session); +int MPIABI_Status_f082f(const MPIABI_F08_status *restrict f08_status, + MPIABI_Fint *restrict f_status); +int MPIABI_Status_c2f(const MPIABI_Status *restrict c_status, + MPIABI_Fint *restrict f_status); +int MPIABI_Status_c2f08(const MPIABI_Status *restrict c_status, + MPIABI_F08_status *restrict f08_status); +int MPIABI_Status_f082c(const MPIABI_F08_status *restrict f08_status, + MPIABI_Status *restrict c_status); +int MPIABI_Status_f2c(const MPIABI_Fint *restrict f_status, + MPIABI_Status *restrict c_status); +int MPIABI_Status_f2f08(const MPIABI_Fint *restrict f_status, + MPIABI_F08_status *restrict f08_status); +MPIABI_Fint MPIABI_Type_c2f(MPIABI_Datatype datatype); +int MPIABI_Type_create_f90_complex(int p, int r, + MPIABI_Datatype *restrict newtype); +int MPIABI_Type_create_f90_integer(int r, MPIABI_Datatype *restrict newtype); +int MPIABI_Type_create_f90_real(int p, int r, + MPIABI_Datatype *restrict newtype); +MPIABI_Datatype MPIABI_Type_f2c(MPIABI_Fint datatype); +int MPIABI_Type_match_size(int typeclass, int size, + MPIABI_Datatype *restrict datatype); +MPIABI_Fint MPIABI_Win_c2f(MPIABI_Win win); +MPIABI_Win MPIABI_Win_f2c(MPIABI_Fint win); + +// A.3.14 Tools / Profiling Interface C Bindings + +int MPIABI_Pcontrol(const int level, ...) { + // Variadic arguments cannot be forwarded + return MPIABI_SUCCESS; +} + +// A.3.15 Tools / MPI Tool Information Interface +// C Bindings + +int MPIABI_T_category_changed(int *restrict update_number); +int MPIABI_T_category_get_categories(int cat_index, int len, int indices[]); +int MPIABI_T_category_get_cvars(int cat_index, int len, int indices[]); +int MPIABI_T_category_get_events(int cat_index, int len, int indices[]); +int MPIABI_T_category_get_index(const char *restrict name, + int *restrict cat_index); +int MPIABI_T_category_get_info(int cat_index, char *restrict name, + int *restrict name_len, char *restrict desc, + int *restrict desc_len, int *restrict num_cvars, + int *restrict num_pvars, + int *restrict num_categories); +int MPIABI_T_category_get_num(int *restrict num_cat); +int MPIABI_T_category_get_num_events(int cat_index, int *restrict num_events); +int MPIABI_T_category_get_pvars(int cat_index, int len, int indices[]); +int MPIABI_T_cvar_get_index(const char *restrict name, + int *restrict cvar_index); +int MPIABI_T_cvar_get_info(int cvar_index, char *restrict name, + int *restrict name_len, int *restrict verbosity, + MPIABI_Datatype *restrict datatype, + MPIABI_T_enum *restrict enumtype, + char *restrict desc, int *restrict desc_len, + int *restrict bind, int *restrict scope); +int MPIABI_T_cvar_get_num(int *restrict num_cvar); +int MPIABI_T_cvar_handle_alloc(int cvar_index, void *obj_handle, + MPIABI_T_cvar_handle *restrict handle, + int *restrict count); +int MPIABI_T_cvar_handle_free(MPIABI_T_cvar_handle *restrict handle); +int MPIABI_T_cvar_read(MPIABI_T_cvar_handle handle, void *buf); +int MPIABI_T_cvar_write(MPIABI_T_cvar_handle handle, const void *buf); +int MPIABI_T_enum_get_info(MPIABI_T_enum enumtype, int *restrict num, + char *restrict name, int *restrict name_len); +int MPIABI_T_enum_get_item(MPIABI_T_enum enumtype, int index, + int *restrict value, char *restrict name, + int *restrict name_len); +int MPIABI_T_event_callback_get_info( + MPIABI_T_event_registration event_registration, + MPIABI_T_cb_safety cb_safety, MPIABI_Info *restrict info_used); +int MPIABI_T_event_callback_set_info( + MPIABI_T_event_registration event_registration, + MPIABI_T_cb_safety cb_safety, MPIABI_Info info); +int MPIABI_T_event_copy(MPIABI_T_event_instance event_instance, void *buffer); +int MPIABI_T_event_get_index(const char *restrict name, + int *restrict event_index); +int MPIABI_T_event_get_info(int event_index, char *restrict name, + int *restrict name_len, int *restrict verbosity, + MPIABI_Datatype array_of_datatypes[], + MPIABI_Aint array_of_displacements[], + int *restrict num_elements, + MPIABI_T_enum *restrict enumtype, + MPIABI_Info *restrict info, char *restrict desc, + int *restrict desc_len, int *restrict bind); +int MPIABI_T_event_get_num(int *restrict num_events); +int MPIABI_T_event_get_source(MPIABI_T_event_instance event_instance, + int *restrict source_index); +int MPIABI_T_event_get_timestamp(MPIABI_T_event_instance event_instance, + MPIABI_Count *restrict event_timestamp); +int MPIABI_T_event_handle_alloc( + int event_index, void *obj_handle, MPIABI_Info info, + MPIABI_T_event_registration *restrict event_registration); +int MPIABI_T_event_handle_free( + MPIABI_T_event_registration event_registration, void *user_data, + MPIABI_T_event_free_cb_function free_cb_function); +int MPIABI_T_event_handle_get_info( + MPIABI_T_event_registration event_registration, + MPIABI_Info *restrict info_used); +int MPIABI_T_event_handle_set_info( + MPIABI_T_event_registration event_registration, MPIABI_Info info); +int MPIABI_T_event_read(MPIABI_T_event_instance event_instance, + int element_index, void *buffer); +int MPIABI_T_event_register_callback( + MPIABI_T_event_registration event_registration, + MPIABI_T_cb_safety cb_safety, MPIABI_Info info, void *user_data, + MPIABI_T_event_cb_function event_cb_function); +int MPIABI_T_event_set_dropped_handler( + MPIABI_T_event_registration event_registration, + MPIABI_T_event_dropped_cb_function dropped_cb_function); +int MPIABI_T_finalize(void); +int MPIABI_T_init_thread(int required, int *restrict provided); +int MPIABI_T_pvar_get_index(const char *restrict name, int var_class, + int *restrict pvar_index); +int MPIABI_T_pvar_get_info(int pvar_index, char *restrict name, + int *restrict name_len, int *restrict verbosity, + int *restrict var_class, + MPIABI_Datatype *restrict datatype, + MPIABI_T_enum *restrict enumtype, + char *restrict desc, int *restrict desc_len, + int *restrict bind, int *restrict readonly, + int *restrict continuous, int *restrict atomic); +int MPIABI_T_pvar_get_num(int *restrict num_pvar); +int MPIABI_T_pvar_handle_alloc(MPIABI_T_pvar_session pe_session, int pvar_index, + void *obj_handle, + MPIABI_T_pvar_handle *restrict handle, + int *restrict count); +int MPIABI_T_pvar_handle_free(MPIABI_T_pvar_session pe_session, + MPIABI_T_pvar_handle *restrict handle); +int MPIABI_T_pvar_read(MPIABI_T_pvar_session pe_session, + MPIABI_T_pvar_handle handle, void *buf); +int MPIABI_T_pvar_readreset(MPIABI_T_pvar_session pe_session, + MPIABI_T_pvar_handle handle, void *buf); +int MPIABI_T_pvar_reset(MPIABI_T_pvar_session pe_session, + MPIABI_T_pvar_handle handle); +int MPIABI_T_pvar_session_create(MPIABI_T_pvar_session *restrict pe_session); +int MPIABI_T_pvar_session_free(MPIABI_T_pvar_session *restrict pe_session); +int MPIABI_T_pvar_start(MPIABI_T_pvar_session pe_session, + MPIABI_T_pvar_handle handle); +int MPIABI_T_pvar_stop(MPIABI_T_pvar_session pe_session, + MPIABI_T_pvar_handle handle); +int MPIABI_T_pvar_write(MPIABI_T_pvar_session pe_session, + MPIABI_T_pvar_handle handle, const void *buf); +int MPIABI_T_source_get_info(int source_index, char *restrict name, + int *restrict name_len, char *restrict desc, + int *restrict desc_len, + MPIABI_T_source_order *restrict ordering, + MPIABI_Count *restrict ticks_per_second, + MPIABI_Count *restrict max_ticks, + MPIABI_Info *restrict info); +int MPIABI_T_source_get_num(int *restrict num_sources); +int MPIABI_T_source_get_timestamp(int source_index, + MPIABI_Count *restrict timestamp); + +// A.3.16 Deprecated C Bindings + +int MPIABI_Attr_delete(MPIABI_Comm comm, int keyval) { + int ierr = MPI_Attr_delete(abi2mpi_comm(comm), abi2mpi_keyval(keyval)); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Attr_get(MPIABI_Comm comm, int keyval, void *attribute_val, + int *restrict flag) { + int ierr = MPI_Attr_get(abi2mpi_comm(comm), abi2mpi_keyval(keyval), + attribute_val, flag); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Attr_put(MPIABI_Comm comm, int keyval, void *attribute_val) { + int ierr = + MPI_Attr_put(abi2mpi_comm(comm), abi2mpi_keyval(keyval), attribute_val); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Get_elements_x(const MPIABI_Status *restrict status, + MPIABI_Datatype datatype, + MPIABI_Count *restrict count) { + const MPI_Status mpi_status = abi2mpi_status(*status); + MPI_Count mpi_count; + int ierr = + MPI_Get_elements_x(&mpi_status, abi2mpi_datatype(datatype), &mpi_count); + *count = mpi_count; + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Info_get(MPIABI_Info info, const char *restrict key, int valuelen, + char *restrict value, int *restrict flag) { + int ierr = MPI_Info_get(abi2mpi_info(info), key, valuelen, value, flag); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Info_get_valuelen(MPIABI_Info info, const char *restrict key, + int *restrict valuelen, int *restrict flag) { + int ierr = MPI_Info_get_valuelen(abi2mpi_info(info), key, valuelen, flag); + return mpi2abi_errorcode(ierr); +} + +struct abi_Keyval_create_state { + MPIABI_Copy_function *abi_copy_fn; + MPIABI_Delete_function *abi_delete_fn; + void *abi_extra_state; +}; +static int mpi_Keyval_create_copy_function(MPI_Comm oldcomm, int keyval, + void *extra_state, + void *attribute_val_in, + void *attribute_val_out, + int *restrict flag) { + const struct abi_Keyval_create_state *mpi_extra_state = extra_state; + int ierr = mpi_extra_state->abi_copy_fn( + mpi2abi_comm(oldcomm), mpi2abi_keyval(keyval), + mpi_extra_state->abi_extra_state, attribute_val_in, attribute_val_out, + flag); + return abi2mpi_errorcode(ierr); +} +static int mpi_Keyval_create_delete_function(MPI_Comm comm, int keyval, + void *attribute_val, + void *extra_state) { + const struct abi_Keyval_create_state *mpi_extra_state = extra_state; + int ierr = mpi_extra_state->abi_delete_fn( + mpi2abi_comm(comm), mpi2abi_keyval(keyval), attribute_val, + mpi_extra_state->abi_extra_state); + return abi2mpi_errorcode(ierr); +} +int MPIABI_Keyval_create(MPIABI_Copy_function *copy_fn, + MPIABI_Delete_function *delete_fn, + int *restrict keyval, void *extra_state) { + struct abi_Keyval_create_state *mpi_extra_state = + malloc(sizeof *mpi_extra_state); + mpi_extra_state->abi_copy_fn = copy_fn; + mpi_extra_state->abi_delete_fn = delete_fn; + mpi_extra_state->abi_extra_state = extra_state; + int ierr = MPI_Keyval_create(mpi_Keyval_create_copy_function, + mpi_Keyval_create_delete_function, keyval, + mpi_extra_state); + *keyval = mpi2abi_keyval(*keyval); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Keyval_free(int *restrict keyval) { + int mpi_keyval = abi2mpi_keyval(*keyval); + int ierr = MPI_Keyval_free(&mpi_keyval); + *keyval = mpi2abi_keyval(mpi_keyval); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Status_set_elements_x(MPIABI_Status *restrict status, + MPIABI_Datatype datatype, MPIABI_Count count) { + MPI_Status *mpi_status = abi2mpi_statusptr(status); + int ierr = + MPI_Status_set_elements_x(mpi_status, abi2mpi_datatype(datatype), count); + mpi2abi_statusptr(mpi_status); + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_get_extent_x(MPIABI_Datatype datatype, + MPIABI_Count *restrict lb, + MPIABI_Count *restrict extent) { + MPI_Count mpi_lb; + MPI_Count mpi_extent; + int ierr = + MPI_Type_get_extent_x(abi2mpi_datatype(datatype), &mpi_lb, &mpi_extent); + *lb = mpi_lb; + *extent = mpi_extent; + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_get_true_extent_x(MPIABI_Datatype datatype, + MPIABI_Count *restrict true_lb, + MPIABI_Count *restrict true_extent) { + MPI_Count mpi_true_lb; + MPI_Count mpi_true_extent; + int ierr = MPI_Type_get_true_extent_x(abi2mpi_datatype(datatype), + &mpi_true_lb, &mpi_true_extent); + *true_lb = mpi_true_lb; + *true_extent = mpi_true_extent; + return mpi2abi_errorcode(ierr); +} + +int MPIABI_Type_size_x(MPIABI_Datatype datatype, MPIABI_Count *restrict size) { + MPI_Count mpi_size; + int ierr = MPI_Type_size_x(abi2mpi_datatype(datatype), &mpi_size); + *size = mpi_size; + return mpi2abi_errorcode(ierr); +} + +// Removed C Bindings + +// deprecated, use `MPI_Get_address` instead +int MPIABI_Address(void *location, MPIABI_Aint *restrict address) { +#if 0 + MPI_Aint mpi_address; + int ierr = MPI_Address(location, &mpi_address); + * address = mpi_address; + return mpi2abi_errorcode(ierr); +#endif + return MPIABI_Get_address(location, address); +} + +// deprecated, use `MPI_Type_create_hindexed` instead +int MPIABI_Type_hindexed(int count, int *restrict array_of_blocklengths, + MPIABI_Aint *restrict array_of_displacements, + MPIABI_Datatype oldtype, + MPIABI_Datatype *restrict newtype) { +#if 0 + MPI_Aint mpi_array_of_displacements[count]; + for (int n = 0; n < count; ++n) + mpi_array_of_displacements[n] = array_of_displacements[n]; + MPI_Datatype mpi_newtype; + int ierr = MPI_Type_hindexed(count, array_of_blocklengths, + mpi_array_of_displacements, + abi2mpi_datatype(oldtype), &mpi_newtype); + * newtype = mpi2abi_datatype(mpi_newtype); + return mpi2abi_errorcode(ierr); +#endif + return MPIABI_Type_create_hindexed(count, array_of_blocklengths, + array_of_displacements, oldtype, newtype); +} + +// deprecated, use `MPI_Type_create_hvector` instead +int MPIABI_Type_hvector(int count, int blocklength, MPIABI_Aint stride, + MPIABI_Datatype oldtype, + MPIABI_Datatype *restrict newtype) { +#if 0 + MPI_Datatype mpi_newtype; + int ierr = MPI_Type_hvector(count, blocklength, stride, + abi2mpi_datatype(oldtype), &mpi_newtype); + * newtype = mpi2abi_datatype(mpi_newtype); + return mpi2abi_errorcode(ierr); +#endif + return MPIABI_Type_create_hvector(count, blocklength, stride, oldtype, + newtype); +} + +// deprecated, use `MPI_Type_create_struct` instead +int MPIABI_Type_struct(int count, int *restrict array_of_blocklengths, + MPIABI_Aint *restrict array_of_displacements, + MPIABI_Datatype *restrict array_of_types, + MPIABI_Datatype *restrict newtype) { +#if 0 + MPI_Aint mpi_array_of_displacements[count]; + for (int n = 0; n < count; ++n) + mpi_array_of_displacements[n] = array_of_displacements[n]; + MPI_Datatype mpi_newtype; + MPI_Datatype mpi_array_of_types[count]; + for (int n = 0; n < count; ++n) + mpi_array_of_types[n] = abi2mpi_datatype(array_of_types[n]); + int ierr = + MPI_Type_struct(count, array_of_blocklengths, mpi_array_of_displacements, + mpi_array_of_types, &mpi_newtype); + * newtype = mpi2abi_datatype(mpi_newtype); + return mpi2abi_errorcode(ierr); +#endif + return MPIABI_Type_create_struct(count, array_of_blocklengths, + array_of_displacements, array_of_types, + newtype); +} + +// deprecated, use `MPI_Type_get_extent` instead +int MPIABI_Type_extent(MPIABI_Datatype datatype, MPIABI_Aint *restrict extent) { +#if 0 + MPI_Aint mpi_extent; + int ierr = MPI_Type_extent(abi2mpi_datatype(datatype), &mpi_extent); + *extent = mpi_extent; + return mpi2abi_errorcode(ierr); +#endif + MPIABI_Aint lb; + return MPIABI_Type_get_extent(datatype, &lb, extent); +} + +// deprecated, use `MPI_Type_get_extent` instead +int MPIABI_Type_lb(MPIABI_Datatype datatype, + MPIABI_Aint *restrict displacement) { +#if 0 + MPI_Aint mpi_displacement; + int ierr = MPI_Type_lb(abi2mpi_datatype(datatype), &mpi_displacement); + *displacement = mpi_displacement; + return mpi2abi_errorcode(ierr); +#endif + MPIABI_Aint extent; + return MPIABI_Type_get_extent(datatype, displacement, &extent); +} + +// deprecated, use `MPI_Type_get_extent` instead +int MPIABI_Type_ub(MPIABI_Datatype datatype, + MPIABI_Aint *restrict displacement) { +#if 0 + MPI_Aint mpi_displacement; + int ierr = MPI_Type_ub(abi2mpi_datatype(datatype), &mpi_displacement); + *displacement = mpi_displacement; + return mpi2abi_errorcode(ierr); +#endif + MPIABI_Aint lb, extent; + int ierr = MPIABI_Type_get_extent(datatype, &lb, &extent); + *displacement = lb == MPIABI_UNDEFINED || extent == MPIABI_UNDEFINED + ? MPIABI_UNDEFINED + : lb + extent; + return ierr; +} + +// MPIX + +int MPIXABI_Query_cuda_support() { +#ifdef HAVE_MPIX_QUERY_CUDA_SUPPORT + return MPIX_Query_cuda_support(); +#else + return 0; +#endif +} + +int MPIXABI_Query_hip_support() { +#ifdef HAVE_MPIX_QUERY_HIP_SUPPORT + return MPIX_Query_hip_support(); +#else + return 0; +#endif +} + +int MPIXABI_Query_rocm_support() { +#ifdef HAVE_MPIX_QUERY_ROCM_SUPPORT + return MPIX_Query_rocm_support(); +#else + return 0; +#endif +} + +int MPIXABI_Query_ze_support() { +#ifdef HAVE_MPIX_QUERY_ZE_SUPPORT + return MPIX_Query_ze_support(); +#else + return 0; +#endif +} diff --git a/mpiwrapper/mpiwrapper.h.in b/mpiwrapper/mpiwrapper.h.in new file mode 100644 index 00000000..6d1064d6 --- /dev/null +++ b/mpiwrapper/mpiwrapper.h.in @@ -0,0 +1,101 @@ +#ifndef MPIWRAPPER_H +#define MPIWRAPPER_H + +#define MPIWRAPPER_VERSION_MAJOR @PROJECT_VERSION_MAJOR@ +#define MPIWRAPPER_VERSION_MINOR @PROJECT_VERSION_MINOR@ +#define MPIWRAPPER_VERSION_PATCH @PROJECT_VERSION_PATCH@ + +#define MPIWRAPPER_VERSION "@PROJECT_VERSION@" + +#define SIZEOF_PTRDIFF_T @SIZEOF_PTRDIFF_T@ + +#cmakedefine HAVE_MPI_H +#cmakedefine HAVE_MPI_EXT_H + +#define MPI_C_VERSION_MAJOR @MPI_C_VERSION_MAJOR@ +#define MPI_C_VERSION_MINOR @MPI_C_VERSION_MINOR@ + +#define MPI_Fortran_VERSION_MAJOR @MPI_Fortran_VERSION_MAJOR@ +#define MPI_Fortran_VERSION_MINOR @MPI_Fortran_VERSION_MINOR@ + +#define SIZEOF_MPI_AINT @SIZEOF_MPI_AINT@ +#define SIZEOF_MPI_COUNT @SIZEOF_MPI_COUNT@ +#define SIZEOF_MPI_FINT @SIZEOF_MPI_FINT@ +#define SIZEOF_MPI_OFFSET @SIZEOF_MPI_OFFSET@ +/* #define SIZEOF_MPI_STATUS @SIZEOF_MPI_STATUS@ */ +/* #define SIZEOF_MPI_F08_STATUS @SIZEOF_MPI_F08_STATUS@ */ + +/* #cmakedefine HAVE_MPI_INTEGER */ +/* #cmakedefine HAVE_MPI_INTEGER1 */ +/* #cmakedefine HAVE_MPI_INTEGER2 */ +/* #cmakedefine HAVE_MPI_INTEGER4 */ +/* #cmakedefine HAVE_MPI_INTEGER8 */ +/* #cmakedefine HAVE_MPI_INTEGER16 */ + +/* #cmakedefine HAVE_MPI_REAL */ +/* #cmakedefine HAVE_MPI_REAL1 */ +/* #cmakedefine HAVE_MPI_REAL2 */ +/* #cmakedefine HAVE_MPI_REAL4 */ +/* #cmakedefine HAVE_MPI_REAL8 */ +/* #cmakedefine HAVE_MPI_REAL16 */ + +/* #cmakedefine HAVE_MPI_COMPLEX */ +/* #cmakedefine HAVE_MPI_COMPLEX2 */ +/* #cmakedefine HAVE_MPI_COMPLEX4 */ +/* #cmakedefine HAVE_MPI_COMPLEX8 */ +/* #cmakedefine HAVE_MPI_COMPLEX16 */ +/* #cmakedefine HAVE_MPI_COMPLEX32 */ + +/* #cmakedefine HAVE_MPI_LOGICAL1 */ +/* #cmakedefine HAVE_MPI_LOGICAL */ +/* #cmakedefine HAVE_MPI_LOGICAL2 */ +/* #cmakedefine HAVE_MPI_LOGICAL4 */ +/* #cmakedefine HAVE_MPI_LOGICAL8 */ +/* #cmakedefine HAVE_MPI_LOGICAL16 */ + +#cmakedefine HAVE_USABLE_MPI_INTEGER +#cmakedefine HAVE_USABLE_MPI_INTEGER1 +#cmakedefine HAVE_USABLE_MPI_INTEGER2 +#cmakedefine HAVE_USABLE_MPI_INTEGER4 +#cmakedefine HAVE_USABLE_MPI_INTEGER8 +#cmakedefine HAVE_USABLE_MPI_INTEGER16 + +#cmakedefine HAVE_USABLE_MPI_REAL +#cmakedefine HAVE_USABLE_MPI_REAL1 +#cmakedefine HAVE_USABLE_MPI_REAL2 +#cmakedefine HAVE_USABLE_MPI_REAL4 +#cmakedefine HAVE_USABLE_MPI_REAL8 +#cmakedefine HAVE_USABLE_MPI_REAL16 + +#cmakedefine HAVE_USABLE_MPI_COMPLEX +#cmakedefine HAVE_USABLE_MPI_COMPLEX2 +#cmakedefine HAVE_USABLE_MPI_COMPLEX4 +#cmakedefine HAVE_USABLE_MPI_COMPLEX8 +#cmakedefine HAVE_USABLE_MPI_COMPLEX16 +#cmakedefine HAVE_USABLE_MPI_COMPLEX32 + +#cmakedefine HAVE_USABLE_MPI_LOGICAL1 +#cmakedefine HAVE_USABLE_MPI_LOGICAL +#cmakedefine HAVE_USABLE_MPI_LOGICAL2 +#cmakedefine HAVE_USABLE_MPI_LOGICAL4 +#cmakedefine HAVE_USABLE_MPI_LOGICAL8 +#cmakedefine HAVE_USABLE_MPI_LOGICAL16 + +#cmakedefine HAVE_MPIX_QUERY_CUDA_SUPPORT +#cmakedefine HAVE_MPIX_QUERY_HIP_SUPPORT +#cmakedefine HAVE_MPIX_QUERY_ROCM_SUPPORT +#cmakedefine HAVE_MPIX_QUERY_ZE_SUPPORT + +/* MPI 4 support */ +#cmakedefine HAVE_MPI_BUFFER_AUTOMATIC +#cmakedefine HAVE_MPI_COMM_TYPE_HW_GUIDED +#cmakedefine HAVE_MPI_COMM_TYPE_HW_UNGUIDED +#cmakedefine HAVE_MPI_COMM_TYPE_RESOURCE_GUIDED +#cmakedefine HAVE_SIZEOF_MPI_SESSION +#cmakedefine HAVE_SIZEOF_MPI_USER_FUNCTION_C + +#cmakedefine HAVE_FORTRAN_DECLARATION_MPI_AINT_ADD +#cmakedefine HAVE_FORTRAN_DECLARATION_MPI_AINT_DIFF +#cmakedefine HAVE_FORTRAN_MPI_SESSION_NULL + +#endif /* #ifndef MPIWRAPPER_H */ diff --git a/mpiwrapper/mpiwrapper_functions.F90 b/mpiwrapper/mpiwrapper_functions.F90 new file mode 100644 index 00000000..08765059 --- /dev/null +++ b/mpiwrapper/mpiwrapper_functions.F90 @@ -0,0 +1,11812 @@ +! MPI Fortran function wrappers + +! This file has been generated automatically +! by `mpiwrapper/generate_wrappers.jl`. +! Do not modify this file, changes will be overwritten. + +subroutine MPIABI_Bsend( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: ierror + call MPI_Bsend( & + buf, & + count, & + abi2mpi_datatype(datatype), & + abi2mpi_proc(dest), & + abi2mpi_tag(tag), & + abi2mpi_comm(comm), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Bsend + +subroutine MPIABI_Bsend_init( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Bsend_init( & + buf, & + count, & + abi2mpi_datatype(datatype), & + abi2mpi_proc(dest), & + abi2mpi_tag(tag), & + abi2mpi_comm(comm), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Bsend_init + +subroutine MPIABI_Buffer_attach( & + buffer, & + size, & + ierror & +) + use mpiwrapper + implicit none + integer :: buffer(*) + integer, intent(in) :: size + integer, intent(out) :: ierror + call MPI_Buffer_attach( & + buffer, & + size, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Buffer_attach + +subroutine MPIABI_Buffer_detach( & + buffer_addr, & + size, & + ierror & +) + use mpiwrapper + implicit none + integer(MPIABI_ADDRESS_KIND), intent(out) :: buffer_addr + integer, intent(out) :: size + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: wrap_buffer_addr + call MPI_Buffer_detach( & + wrap_buffer_addr, & + size, & + ierror & + ) + buffer_addr = mpi2abi_address(wrap_buffer_addr) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Buffer_detach + +subroutine MPIABI_Buffer_flush( & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER < 401 + write(0, '("The Fortran function MPI_Buffer_flush is not available in the wrapped MPI implementation")') + call MPI_Abort(MPI_COMM_SELF, 1, ierror) + stop +#else + call MPI_Buffer_flush( & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +#endif +end subroutine MPIABI_Buffer_flush + +subroutine MPIABI_Buffer_iflush( & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: request + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER < 401 + write(0, '("The Fortran function MPI_Buffer_iflush is not available in the wrapped MPI implementation")') + call MPI_Abort(MPI_COMM_SELF, 1, ierror) + stop +#else + call MPI_Buffer_iflush( & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +#endif +end subroutine MPIABI_Buffer_iflush + +subroutine MPIABI_Cancel( & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Cancel( & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Cancel + +subroutine MPIABI_Comm_attach_buffer( & + comm, & + buffer, & + size, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(in) :: buffer(*) + integer, intent(in) :: size + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER < 401 + write(0, '("The Fortran function MPI_Comm_attach_buffer is not available in the wrapped MPI implementation")') + call MPI_Abort(MPI_COMM_SELF, 1, ierror) + stop +#else + call MPI_Comm_attach_buffer( & + abi2mpi_comm(comm), & + buffer, & + size, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +#endif +end subroutine MPIABI_Comm_attach_buffer + +subroutine MPIABI_Comm_detach_buffer( & + comm, & + buffer_addr, & + size, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer(MPIABI_ADDRESS_KIND), intent(out) :: buffer_addr + integer, intent(out) :: size + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER < 401 + write(0, '("The Fortran function MPI_Comm_detach_buffer is not available in the wrapped MPI implementation")') + call MPI_Abort(MPI_COMM_SELF, 1, ierror) + stop +#else + integer(MPI_ADDRESS_KIND) :: wrap_buffer_addr + call MPI_Comm_detach_buffer( & + abi2mpi_comm(comm), & + wrap_buffer_addr, & + size, & + ierror & + ) + buffer_addr = mpi2abi_address(wrap_buffer_addr) + ierror = mpi2abi_errorcode(ierror) +#endif +end subroutine MPIABI_Comm_detach_buffer + +subroutine MPIABI_Comm_flush_buffer( & + comm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER < 401 + write(0, '("The Fortran function MPI_Comm_flush_buffer is not available in the wrapped MPI implementation")') + call MPI_Abort(MPI_COMM_SELF, 1, ierror) + stop +#else + call MPI_Comm_flush_buffer( & + abi2mpi_comm(comm), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +#endif +end subroutine MPIABI_Comm_flush_buffer + +subroutine MPIABI_Comm_iflush_buffer( & + comm, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER < 401 + write(0, '("The Fortran function MPI_Comm_iflush_buffer is not available in the wrapped MPI implementation")') + call MPI_Abort(MPI_COMM_SELF, 1, ierror) + stop +#else + call MPI_Comm_iflush_buffer( & + abi2mpi_comm(comm), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +#endif +end subroutine MPIABI_Comm_iflush_buffer + +subroutine MPIABI_Get_count( & + status, & + datatype, & + count, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: status(MPIABI_STATUS_SIZE) + integer, intent(in) :: datatype + integer, intent(out) :: count + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + integer :: wrap_count + ptr_status = abi2mpi_status_ptr(status, tmp_status) + call MPI_Get_count( & + wrap_status, & + abi2mpi_datatype(datatype), & + wrap_count, & + ierror & + ) + count = mpi2abi_maybe_undefined(wrap_count) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Get_count + +subroutine MPIABI_Ibsend( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Ibsend( & + buf, & + count, & + abi2mpi_datatype(datatype), & + abi2mpi_proc(dest), & + abi2mpi_tag(tag), & + abi2mpi_comm(comm), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Ibsend + +subroutine MPIABI_Improbe( & + source, & + tag, & + comm, & + flag, & + message, & + status, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: source + integer, intent(in) :: tag + integer, intent(in) :: comm + logical, intent(out) :: flag + integer, intent(out) :: message + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + ptr_status = abi2mpi_status_ptr_uninitialized(status, tmp_status) + call MPI_Improbe( & + abi2mpi_proc(source), & + abi2mpi_tag(tag), & + abi2mpi_comm(comm), & + flag, & + message, & + wrap_status, & + ierror & + ) + if (flag) message = mpi2abi_message(message) + if (flag) call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Improbe + +subroutine MPIABI_Imrecv( & + buf, & + count, & + datatype, & + message, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: message + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Imrecv( & + buf, & + count, & + abi2mpi_datatype(datatype), & + message, & + request, & + ierror & + ) + message = mpi2abi_message(message) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Imrecv + +subroutine MPIABI_Iprobe( & + source, & + tag, & + comm, & + flag, & + status, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: source + integer, intent(in) :: tag + integer, intent(in) :: comm + logical, intent(out) :: flag + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + ptr_status = abi2mpi_status_ptr_uninitialized(status, tmp_status) + call MPI_Iprobe( & + abi2mpi_proc(source), & + abi2mpi_tag(tag), & + abi2mpi_comm(comm), & + flag, & + wrap_status, & + ierror & + ) + if (flag) call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Iprobe + +subroutine MPIABI_Irecv( & + buf, & + count, & + datatype, & + source, & + tag, & + comm, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: source + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Irecv( & + buf, & + count, & + abi2mpi_datatype(datatype), & + abi2mpi_proc(source), & + abi2mpi_tag(tag), & + abi2mpi_comm(comm), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Irecv + +subroutine MPIABI_Irsend( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Irsend( & + buf, & + count, & + abi2mpi_datatype(datatype), & + abi2mpi_proc(dest), & + abi2mpi_tag(tag), & + abi2mpi_comm(comm), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Irsend + +subroutine MPIABI_Isend( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Isend( & + buf, & + count, & + abi2mpi_datatype(datatype), & + abi2mpi_proc(dest), & + abi2mpi_tag(tag), & + abi2mpi_comm(comm), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Isend + +subroutine MPIABI_Isendrecv( & + sendbuf, & + sendcount, & + sendtype, & + dest, & + sendtag, & + recvbuf, & + recvcount, & + recvtype, & + source, & + recvtag, & + comm, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype + integer, intent(in) :: dest + integer, intent(in) :: sendtag + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: source + integer, intent(in) :: recvtag + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Isendrecv( & + sendbuf, & + sendcount, & + abi2mpi_datatype(sendtype), & + abi2mpi_proc(dest), & + abi2mpi_tag(sendtag), & + recvbuf, & + recvcount, & + abi2mpi_datatype(recvtype), & + abi2mpi_proc(source), & + abi2mpi_tag(recvtag), & + abi2mpi_comm(comm), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Isendrecv + +subroutine MPIABI_Isendrecv_replace( & + buf, & + count, & + datatype, & + dest, & + sendtag, & + source, & + recvtag, & + comm, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(inout) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: sendtag + integer, intent(in) :: source + integer, intent(in) :: recvtag + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Isendrecv_replace( & + buf, & + count, & + abi2mpi_datatype(datatype), & + abi2mpi_proc(dest), & + abi2mpi_tag(sendtag), & + abi2mpi_proc(source), & + abi2mpi_tag(recvtag), & + abi2mpi_comm(comm), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Isendrecv_replace + +subroutine MPIABI_Issend( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Issend( & + buf, & + count, & + abi2mpi_datatype(datatype), & + abi2mpi_proc(dest), & + abi2mpi_tag(tag), & + abi2mpi_comm(comm), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Issend + +subroutine MPIABI_Mprobe( & + source, & + tag, & + comm, & + message, & + status, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: source + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: message + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + ptr_status = abi2mpi_status_ptr_uninitialized(status, tmp_status) + call MPI_Mprobe( & + abi2mpi_proc(source), & + abi2mpi_tag(tag), & + abi2mpi_comm(comm), & + message, & + wrap_status, & + ierror & + ) + message = mpi2abi_message(message) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Mprobe + +subroutine MPIABI_Mrecv( & + buf, & + count, & + datatype, & + message, & + status, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: message + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + ptr_status = abi2mpi_status_ptr_uninitialized(status, tmp_status) + call MPI_Mrecv( & + buf, & + count, & + abi2mpi_datatype(datatype), & + message, & + wrap_status, & + ierror & + ) + message = mpi2abi_message(message) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Mrecv + +subroutine MPIABI_Probe( & + source, & + tag, & + comm, & + status, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: source + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + ptr_status = abi2mpi_status_ptr_uninitialized(status, tmp_status) + call MPI_Probe( & + abi2mpi_proc(source), & + abi2mpi_tag(tag), & + abi2mpi_comm(comm), & + wrap_status, & + ierror & + ) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Probe + +subroutine MPIABI_Recv( & + buf, & + count, & + datatype, & + source, & + tag, & + comm, & + status, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: source + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + ptr_status = abi2mpi_status_ptr_uninitialized(status, tmp_status) + call MPI_Recv( & + buf, & + count, & + abi2mpi_datatype(datatype), & + abi2mpi_proc(source), & + abi2mpi_tag(tag), & + abi2mpi_comm(comm), & + wrap_status, & + ierror & + ) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Recv + +subroutine MPIABI_Recv_init( & + buf, & + count, & + datatype, & + source, & + tag, & + comm, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: source + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Recv_init( & + buf, & + count, & + abi2mpi_datatype(datatype), & + abi2mpi_proc(source), & + abi2mpi_tag(tag), & + abi2mpi_comm(comm), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Recv_init + +subroutine MPIABI_Request_free( & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(inout) :: request + integer, intent(out) :: ierror + request = abi2mpi_request(request) + call MPI_Request_free( & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Request_free + +subroutine MPIABI_Request_get_status( & + request, & + flag, & + status, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: request + logical, intent(out) :: flag + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + ptr_status = abi2mpi_status_ptr_uninitialized(status, tmp_status) + call MPI_Request_get_status( & + abi2mpi_request(request), & + flag, & + wrap_status, & + ierror & + ) + if (flag) call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Request_get_status + +subroutine MPIABI_Request_get_status_all( & + count, & + array_of_requests, & + flag, & + array_of_statuses, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: count + integer, intent(in) :: array_of_requests(count) + logical, intent(out) :: flag + integer, intent(out) :: array_of_statuses(MPIABI_STATUS_SIZE, count) + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER < 401 + write(0, '("The Fortran function MPI_Request_get_status_all is not available in the wrapped MPI implementation")') + call MPI_Abort(MPI_COMM_SELF, 1, ierror) + stop +#else + integer :: wrap_array_of_requests(count) + integer(MPI_ADDRESS_KIND) :: ptr_array_of_statuses + integer :: wrap_array_of_statuses(MPI_STATUS_SIZE, count) + pointer(ptr_array_of_statuses, wrap_array_of_statuses) + integer :: tmp_array_of_statuses(MPI_STATUS_SIZE, count) + integer :: i + do i = 1, count + wrap_array_of_requests(i) = abi2mpi_request(array_of_requests(i)) + end do + ptr_array_of_statuses = abi2mpi_statuses_ptr_uninitialized(array_of_statuses, tmp_array_of_statuses, count) + call MPI_Request_get_status_all( & + count, & + wrap_array_of_requests, & + flag, & + wrap_array_of_statuses, & + ierror & + ) + if (flag) call mpi2abi_statuses_ptr(wrap_array_of_statuses, array_of_statuses, count) + ierror = mpi2abi_errorcode(ierror) +#endif +end subroutine MPIABI_Request_get_status_all + +subroutine MPIABI_Request_get_status_any( & + count, & + array_of_requests, & + index, & + flag, & + status, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: count + integer, intent(in) :: array_of_requests(count) + integer, intent(out) :: index + logical, intent(out) :: flag + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER < 401 + write(0, '("The Fortran function MPI_Request_get_status_any is not available in the wrapped MPI implementation")') + call MPI_Abort(MPI_COMM_SELF, 1, ierror) + stop +#else + integer :: wrap_array_of_requests(count) + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + integer :: i + do i = 1, count + wrap_array_of_requests(i) = abi2mpi_request(array_of_requests(i)) + end do + ptr_status = abi2mpi_status_ptr_uninitialized(status, tmp_status) + call MPI_Request_get_status_any( & + count, & + wrap_array_of_requests, & + index, & + flag, & + wrap_status, & + ierror & + ) + if (flag) call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +#endif +end subroutine MPIABI_Request_get_status_any + +subroutine MPIABI_Request_get_status_some( & + incount, & + array_of_requests, & + outcount, & + array_of_indices, & + array_of_statuses, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: incount + integer, intent(in) :: array_of_requests(incount) + integer, intent(out) :: outcount + integer, intent(out) :: array_of_indices(incount) + integer, intent(out) :: array_of_statuses(MPIABI_STATUS_SIZE, incount) + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER < 401 + write(0, '("The Fortran function MPI_Request_get_status_some is not available in the wrapped MPI implementation")') + call MPI_Abort(MPI_COMM_SELF, 1, ierror) + stop +#else + integer :: wrap_array_of_requests(incount) + integer(MPI_ADDRESS_KIND) :: ptr_array_of_statuses + integer :: wrap_array_of_statuses(MPI_STATUS_SIZE, incount) + pointer(ptr_array_of_statuses, wrap_array_of_statuses) + integer :: tmp_array_of_statuses(MPI_STATUS_SIZE, incount) + integer :: i + do i = 1, incount + wrap_array_of_requests(i) = abi2mpi_request(array_of_requests(i)) + end do + ptr_array_of_statuses = abi2mpi_statuses_ptr_uninitialized(array_of_statuses, tmp_array_of_statuses, incount) + call MPI_Request_get_status_some( & + incount, & + wrap_array_of_requests, & + outcount, & + array_of_indices, & + wrap_array_of_statuses, & + ierror & + ) + call mpi2abi_statuses_ptr(wrap_array_of_statuses, array_of_statuses, outcount) + ierror = mpi2abi_errorcode(ierror) +#endif +end subroutine MPIABI_Request_get_status_some + +subroutine MPIABI_Rsend( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: ierror + call MPI_Rsend( & + buf, & + count, & + abi2mpi_datatype(datatype), & + abi2mpi_proc(dest), & + abi2mpi_tag(tag), & + abi2mpi_comm(comm), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Rsend + +subroutine MPIABI_Rsend_init( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Rsend_init( & + buf, & + count, & + abi2mpi_datatype(datatype), & + abi2mpi_proc(dest), & + abi2mpi_tag(tag), & + abi2mpi_comm(comm), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Rsend_init + +subroutine MPIABI_Send( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: ierror + call MPI_Send( & + buf, & + count, & + abi2mpi_datatype(datatype), & + abi2mpi_proc(dest), & + abi2mpi_tag(tag), & + abi2mpi_comm(comm), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Send + +subroutine MPIABI_Send_init( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Send_init( & + buf, & + count, & + abi2mpi_datatype(datatype), & + abi2mpi_proc(dest), & + abi2mpi_tag(tag), & + abi2mpi_comm(comm), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Send_init + +subroutine MPIABI_Sendrecv( & + sendbuf, & + sendcount, & + sendtype, & + dest, & + sendtag, & + recvbuf, & + recvcount, & + recvtype, & + source, & + recvtag, & + comm, & + status, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype + integer, intent(in) :: dest + integer, intent(in) :: sendtag + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: source + integer, intent(in) :: recvtag + integer, intent(in) :: comm + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + ptr_status = abi2mpi_status_ptr_uninitialized(status, tmp_status) + call MPI_Sendrecv( & + sendbuf, & + sendcount, & + abi2mpi_datatype(sendtype), & + abi2mpi_proc(dest), & + abi2mpi_tag(sendtag), & + recvbuf, & + recvcount, & + abi2mpi_datatype(recvtype), & + abi2mpi_proc(source), & + abi2mpi_tag(recvtag), & + abi2mpi_comm(comm), & + wrap_status, & + ierror & + ) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Sendrecv + +subroutine MPIABI_Sendrecv_replace( & + buf, & + count, & + datatype, & + dest, & + sendtag, & + source, & + recvtag, & + comm, & + status, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(inout) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: sendtag + integer, intent(in) :: source + integer, intent(in) :: recvtag + integer, intent(in) :: comm + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + ptr_status = abi2mpi_status_ptr_uninitialized(status, tmp_status) + call MPI_Sendrecv_replace( & + buf, & + count, & + abi2mpi_datatype(datatype), & + abi2mpi_proc(dest), & + abi2mpi_tag(sendtag), & + abi2mpi_proc(source), & + abi2mpi_tag(recvtag), & + abi2mpi_comm(comm), & + wrap_status, & + ierror & + ) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Sendrecv_replace + +subroutine MPIABI_Session_attach_buffer( & + session, & + buffer, & + size, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: session + integer, intent(in) :: buffer(*) + integer, intent(in) :: size + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER < 401 + write(0, '("The Fortran function MPI_Session_attach_buffer is not available in the wrapped MPI implementation")') + call MPI_Abort(MPI_COMM_SELF, 1, ierror) + stop +#else + call MPI_Session_attach_buffer( & + abi2mpi_session(session), & + buffer, & + size, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +#endif +end subroutine MPIABI_Session_attach_buffer + +subroutine MPIABI_Session_detach_buffer( & + session, & + buffer_addr, & + size, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: session + integer(MPIABI_ADDRESS_KIND), intent(out) :: buffer_addr + integer, intent(out) :: size + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER < 401 + write(0, '("The Fortran function MPI_Session_detach_buffer is not available in the wrapped MPI implementation")') + call MPI_Abort(MPI_COMM_SELF, 1, ierror) + stop +#else + integer(MPI_ADDRESS_KIND) :: wrap_buffer_addr + call MPI_Session_detach_buffer( & + abi2mpi_session(session), & + wrap_buffer_addr, & + size, & + ierror & + ) + buffer_addr = mpi2abi_address(wrap_buffer_addr) + ierror = mpi2abi_errorcode(ierror) +#endif +end subroutine MPIABI_Session_detach_buffer + +subroutine MPIABI_Session_flush_buffer( & + session, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: session + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER < 401 + write(0, '("The Fortran function MPI_Session_flush_buffer is not available in the wrapped MPI implementation")') + call MPI_Abort(MPI_COMM_SELF, 1, ierror) + stop +#else + call MPI_Session_flush_buffer( & + abi2mpi_session(session), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +#endif +end subroutine MPIABI_Session_flush_buffer + +subroutine MPIABI_Session_iflush_buffer( & + session, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: session + integer, intent(out) :: request + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER < 401 + write(0, '("The Fortran function MPI_Session_iflush_buffer is not available in the wrapped MPI implementation")') + call MPI_Abort(MPI_COMM_SELF, 1, ierror) + stop +#else + call MPI_Session_iflush_buffer( & + abi2mpi_session(session), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +#endif +end subroutine MPIABI_Session_iflush_buffer + +subroutine MPIABI_Ssend( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: ierror + call MPI_Ssend( & + buf, & + count, & + abi2mpi_datatype(datatype), & + abi2mpi_proc(dest), & + abi2mpi_tag(tag), & + abi2mpi_comm(comm), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Ssend + +subroutine MPIABI_Ssend_init( & + buf, & + count, & + datatype, & + dest, & + tag, & + comm, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Ssend_init( & + buf, & + count, & + abi2mpi_datatype(datatype), & + abi2mpi_proc(dest), & + abi2mpi_tag(tag), & + abi2mpi_comm(comm), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Ssend_init + +subroutine MPIABI_Start( & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(inout) :: request + integer, intent(out) :: ierror + request = abi2mpi_request(request) + call MPI_Start( & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Start + +subroutine MPIABI_Startall( & + count, & + array_of_requests, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: count + integer, intent(inout) :: array_of_requests(count) + integer, intent(out) :: ierror + integer :: wrap_array_of_requests(count) + integer :: i + do i = 1, count + wrap_array_of_requests(i) = abi2mpi_request(array_of_requests(i)) + end do + call MPI_Startall( & + count, & + wrap_array_of_requests, & + ierror & + ) + do i = 1, count + array_of_requests(i) = mpi2abi_request(wrap_array_of_requests(i)) + end do + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Startall + +subroutine MPIABI_Status_get_error( & + status, & + err, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: err + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER < 401 + write(0, '("The Fortran function MPI_Status_get_error is not available in the wrapped MPI implementation")') + call MPI_Abort(MPI_COMM_SELF, 1, ierror) + stop +#else + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + ptr_status = abi2mpi_status_ptr(status, tmp_status) + call MPI_Status_get_error( & + wrap_status, & + err, & + ierror & + ) + err = mpi2abi_errorcode(err) + ierror = mpi2abi_errorcode(ierror) +#endif +end subroutine MPIABI_Status_get_error + +subroutine MPIABI_Status_get_source( & + status, & + source, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: source + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER < 401 + write(0, '("The Fortran function MPI_Status_get_source is not available in the wrapped MPI implementation")') + call MPI_Abort(MPI_COMM_SELF, 1, ierror) + stop +#else + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + ptr_status = abi2mpi_status_ptr(status, tmp_status) + call MPI_Status_get_source( & + wrap_status, & + source, & + ierror & + ) + source = mpi2abi_proc(source) + ierror = mpi2abi_errorcode(ierror) +#endif +end subroutine MPIABI_Status_get_source + +subroutine MPIABI_Status_get_tag( & + status, & + tag, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: tag + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER < 401 + write(0, '("The Fortran function MPI_Status_get_tag is not available in the wrapped MPI implementation")') + call MPI_Abort(MPI_COMM_SELF, 1, ierror) + stop +#else + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + ptr_status = abi2mpi_status_ptr(status, tmp_status) + call MPI_Status_get_tag( & + wrap_status, & + tag, & + ierror & + ) + tag = mpi2abi_tag(tag) + ierror = mpi2abi_errorcode(ierror) +#endif +end subroutine MPIABI_Status_get_tag + +subroutine MPIABI_Test( & + request, & + flag, & + status, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(inout) :: request + logical, intent(out) :: flag + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + request = abi2mpi_request(request) + ptr_status = abi2mpi_status_ptr_uninitialized(status, tmp_status) + call MPI_Test( & + request, & + flag, & + wrap_status, & + ierror & + ) + request = mpi2abi_request(request) + if (flag) call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Test + +subroutine MPIABI_Test_cancelled( & + status, & + flag, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: status(MPIABI_STATUS_SIZE) + logical, intent(out) :: flag + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + ptr_status = abi2mpi_status_ptr(status, tmp_status) + call MPI_Test_cancelled( & + wrap_status, & + flag, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Test_cancelled + +subroutine MPIABI_Testall( & + count, & + array_of_requests, & + flag, & + array_of_statuses, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: count + integer, intent(inout) :: array_of_requests(count) + logical, intent(out) :: flag + integer, intent(out) :: array_of_statuses(MPIABI_STATUS_SIZE, count) + integer, intent(out) :: ierror + integer :: wrap_array_of_requests(count) + integer(MPI_ADDRESS_KIND) :: ptr_array_of_statuses + integer :: wrap_array_of_statuses(MPI_STATUS_SIZE, count) + pointer(ptr_array_of_statuses, wrap_array_of_statuses) + integer :: tmp_array_of_statuses(MPI_STATUS_SIZE, count) + integer :: i + do i = 1, count + wrap_array_of_requests(i) = abi2mpi_request(array_of_requests(i)) + end do + ptr_array_of_statuses = abi2mpi_statuses_ptr_uninitialized(array_of_statuses, tmp_array_of_statuses, count) + call MPI_Testall( & + count, & + wrap_array_of_requests, & + flag, & + wrap_array_of_statuses, & + ierror & + ) + do i = 1, count + if (flag) array_of_requests(i) = mpi2abi_request(wrap_array_of_requests(i)) + end do + if (flag) call mpi2abi_statuses_ptr(wrap_array_of_statuses, array_of_statuses, count) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Testall + +subroutine MPIABI_Testany( & + count, & + array_of_requests, & + index, & + flag, & + status, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: count + integer, intent(inout) :: array_of_requests(count) + integer, intent(out) :: index + logical, intent(out) :: flag + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer :: wrap_array_of_requests(count) + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + integer :: i + do i = 1, count + wrap_array_of_requests(i) = abi2mpi_request(array_of_requests(i)) + end do + ptr_status = abi2mpi_status_ptr_uninitialized(status, tmp_status) + call MPI_Testany( & + count, & + wrap_array_of_requests, & + index, & + flag, & + wrap_status, & + ierror & + ) + do i = 1, count + if (flag .and. i == index) array_of_requests(i) = mpi2abi_request(wrap_array_of_requests(i)) + end do + if (flag) call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Testany + +subroutine MPIABI_Testsome( & + incount, & + array_of_requests, & + outcount, & + array_of_indices, & + array_of_statuses, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: incount + integer, intent(inout) :: array_of_requests(incount) + integer, intent(out) :: outcount + integer, intent(out) :: array_of_indices(incount) + integer, intent(out) :: array_of_statuses(MPIABI_STATUS_SIZE, incount) + integer, intent(out) :: ierror + integer :: wrap_array_of_requests(incount) + integer(MPI_ADDRESS_KIND) :: ptr_array_of_statuses + integer :: wrap_array_of_statuses(MPI_STATUS_SIZE, incount) + pointer(ptr_array_of_statuses, wrap_array_of_statuses) + integer :: tmp_array_of_statuses(MPI_STATUS_SIZE, incount) + integer :: i + do i = 1, incount + wrap_array_of_requests(i) = abi2mpi_request(array_of_requests(i)) + end do + ptr_array_of_statuses = abi2mpi_statuses_ptr_uninitialized(array_of_statuses, tmp_array_of_statuses, incount) + call MPI_Testsome( & + incount, & + wrap_array_of_requests, & + outcount, & + array_of_indices, & + wrap_array_of_statuses, & + ierror & + ) + do i = 1, incount + if (i <= outcount) array_of_requests(i) = mpi2abi_request(wrap_array_of_requests(i)) + end do + call mpi2abi_statuses_ptr(wrap_array_of_statuses, array_of_statuses, outcount) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Testsome + +subroutine MPIABI_Wait( & + request, & + status, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(inout) :: request + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + request = abi2mpi_request(request) + ptr_status = abi2mpi_status_ptr_uninitialized(status, tmp_status) + call MPI_Wait( & + request, & + wrap_status, & + ierror & + ) + request = mpi2abi_request(request) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Wait + +subroutine MPIABI_Waitall( & + count, & + array_of_requests, & + array_of_statuses, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: count + integer, intent(inout) :: array_of_requests(count) + integer, intent(out) :: array_of_statuses(MPIABI_STATUS_SIZE, count) + integer, intent(out) :: ierror + integer :: wrap_array_of_requests(count) + integer(MPI_ADDRESS_KIND) :: ptr_array_of_statuses + integer :: wrap_array_of_statuses(MPI_STATUS_SIZE, count) + pointer(ptr_array_of_statuses, wrap_array_of_statuses) + integer :: tmp_array_of_statuses(MPI_STATUS_SIZE, count) + integer :: i + do i = 1, count + wrap_array_of_requests(i) = abi2mpi_request(array_of_requests(i)) + end do + ptr_array_of_statuses = abi2mpi_statuses_ptr_uninitialized(array_of_statuses, tmp_array_of_statuses, count) + call MPI_Waitall( & + count, & + wrap_array_of_requests, & + wrap_array_of_statuses, & + ierror & + ) + do i = 1, count + array_of_requests(i) = mpi2abi_request(wrap_array_of_requests(i)) + end do + call mpi2abi_statuses_ptr(wrap_array_of_statuses, array_of_statuses, count) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Waitall + +subroutine MPIABI_Waitany( & + count, & + array_of_requests, & + index, & + status, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: count + integer, intent(inout) :: array_of_requests(count) + integer, intent(out) :: index + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer :: wrap_array_of_requests(count) + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + integer :: i + do i = 1, count + wrap_array_of_requests(i) = abi2mpi_request(array_of_requests(i)) + end do + ptr_status = abi2mpi_status_ptr_uninitialized(status, tmp_status) + call MPI_Waitany( & + count, & + wrap_array_of_requests, & + index, & + wrap_status, & + ierror & + ) + do i = 1, count + if (i == index) array_of_requests(i) = mpi2abi_request(wrap_array_of_requests(i)) + end do + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Waitany + +subroutine MPIABI_Waitsome( & + incount, & + array_of_requests, & + outcount, & + array_of_indices, & + array_of_statuses, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: incount + integer, intent(inout) :: array_of_requests(incount) + integer, intent(out) :: outcount + integer, intent(out) :: array_of_indices(incount) + integer, intent(out) :: array_of_statuses(MPIABI_STATUS_SIZE, incount) + integer, intent(out) :: ierror + integer :: wrap_array_of_requests(incount) + integer(MPI_ADDRESS_KIND) :: ptr_array_of_statuses + integer :: wrap_array_of_statuses(MPI_STATUS_SIZE, incount) + pointer(ptr_array_of_statuses, wrap_array_of_statuses) + integer :: tmp_array_of_statuses(MPI_STATUS_SIZE, incount) + integer :: i + do i = 1, incount + wrap_array_of_requests(i) = abi2mpi_request(array_of_requests(i)) + end do + ptr_array_of_statuses = abi2mpi_statuses_ptr_uninitialized(array_of_statuses, tmp_array_of_statuses, incount) + call MPI_Waitsome( & + incount, & + wrap_array_of_requests, & + outcount, & + array_of_indices, & + wrap_array_of_statuses, & + ierror & + ) + do i = 1, incount + if (i <= outcount) array_of_requests(i) = mpi2abi_request(wrap_array_of_requests(i)) + end do + call mpi2abi_statuses_ptr(wrap_array_of_statuses, array_of_statuses, outcount) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Waitsome + +subroutine MPIABI_Parrived( & + request, & + partition, & + flag, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: request + integer, intent(in) :: partition + logical, intent(out) :: flag + integer, intent(out) :: ierror + call MPI_Parrived( & + abi2mpi_request(request), & + partition, & + flag, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Parrived + +subroutine MPIABI_Pready( & + partition, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: partition + integer, intent(in) :: request + integer, intent(out) :: ierror + call MPI_Pready( & + partition, & + abi2mpi_request(request), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Pready + +subroutine MPIABI_Pready_list( & + length, & + array_of_partitions, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: length + integer, intent(in) :: array_of_partitions(length) + integer, intent(in) :: request + integer, intent(out) :: ierror + call MPI_Pready_list( & + length, & + array_of_partitions, & + abi2mpi_request(request), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Pready_list + +subroutine MPIABI_Pready_range( & + partition_low, & + partition_high, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: partition_low + integer, intent(in) :: partition_high + integer, intent(in) :: request + integer, intent(out) :: ierror + call MPI_Pready_range( & + partition_low, & + partition_high, & + abi2mpi_request(request), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Pready_range + +subroutine MPIABI_Precv_init( & + buf, & + partitions, & + count, & + datatype, & + source, & + tag, & + comm, & + info, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: buf(*) + integer, intent(in) :: partitions + integer(MPIABI_COUNT_KIND), intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: source + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Precv_init( & + buf, & + partitions, & + abi2mpi_count(count), & + abi2mpi_datatype(datatype), & + abi2mpi_proc(source), & + abi2mpi_tag(tag), & + abi2mpi_comm(comm), & + abi2mpi_info(info), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Precv_init + +subroutine MPIABI_Psend_init( & + buf, & + partitions, & + count, & + datatype, & + source, & + tag, & + comm, & + info, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: buf(*) + integer, intent(in) :: partitions + integer(MPIABI_COUNT_KIND), intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: source + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Psend_init( & + buf, & + partitions, & + abi2mpi_count(count), & + abi2mpi_datatype(datatype), & + abi2mpi_proc(source), & + abi2mpi_tag(tag), & + abi2mpi_comm(comm), & + abi2mpi_info(info), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Psend_init + +function MPIABI_Aint_add( & + base, & + disp & +) result(result) + use mpiwrapper + implicit none + integer(MPIABI_ADDRESS_KIND), intent(in) :: base + integer(MPIABI_ADDRESS_KIND), intent(in) :: disp + integer(MPIABI_ADDRESS_KIND) :: result + result = MPI_Aint_add( & + abi2mpi_address(base), & + abi2mpi_address(disp) & + ) +end function MPIABI_Aint_add + +function MPIABI_Aint_diff( & + addr1, & + addr2 & +) result(result) + use mpiwrapper + implicit none + integer(MPIABI_ADDRESS_KIND), intent(in) :: addr1 + integer(MPIABI_ADDRESS_KIND), intent(in) :: addr2 + integer(MPIABI_ADDRESS_KIND) :: result + result = MPI_Aint_diff( & + abi2mpi_address(addr1), & + abi2mpi_address(addr2) & + ) +end function MPIABI_Aint_diff + +subroutine MPIABI_Get_address( & + location, & + address, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: location(*) + integer(MPIABI_ADDRESS_KIND), intent(out) :: address + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: wrap_address + call MPI_Get_address( & + location, & + wrap_address, & + ierror & + ) + address = mpi2abi_address(wrap_address) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Get_address + +subroutine MPIABI_Get_elements( & + status, & + datatype, & + count, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: status(MPIABI_STATUS_SIZE) + integer, intent(in) :: datatype + integer, intent(out) :: count + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + ptr_status = abi2mpi_status_ptr(status, tmp_status) + call MPI_Get_elements( & + wrap_status, & + abi2mpi_datatype(datatype), & + count, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Get_elements + +subroutine MPIABI_Pack( & + inbuf, & + incount, & + datatype, & + outbuf, & + outsize, & + position, & + comm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: inbuf(*) + integer, intent(in) :: incount + integer, intent(in) :: datatype + integer, intent(out) :: outbuf(*) + integer, intent(in) :: outsize + integer, intent(out) :: position + integer, intent(in) :: comm + integer, intent(out) :: ierror + call MPI_Pack( & + inbuf, & + incount, & + abi2mpi_datatype(datatype), & + outbuf, & + outsize, & + position, & + abi2mpi_comm(comm), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Pack + +subroutine MPIABI_Pack_external( & + datarep, & + inbuf, & + incount, & + datatype, & + outbuf, & + outsize, & + position, & + ierror & +) + use mpiwrapper + implicit none + character(*), intent(in) :: datarep + integer, intent(in) :: inbuf(*) + integer, intent(in) :: incount + integer, intent(in) :: datatype + integer, intent(out) :: outbuf(*) + integer(MPIABI_ADDRESS_KIND), intent(in) :: outsize + integer(MPIABI_ADDRESS_KIND), intent(out) :: position + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: wrap_position + call MPI_Pack_external( & + datarep, & + inbuf, & + incount, & + abi2mpi_datatype(datatype), & + outbuf, & + abi2mpi_address(outsize), & + wrap_position, & + ierror & + ) + position = mpi2abi_address(wrap_position) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Pack_external + +subroutine MPIABI_Pack_external_size( & + datarep, & + incount, & + datatype, & + size, & + ierror & +) + use mpiwrapper + implicit none + character(*), intent(in) :: datarep + integer(MPIABI_COUNT_KIND), intent(in) :: incount + integer, intent(in) :: datatype + integer(MPIABI_ADDRESS_KIND), intent(out) :: size + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: wrap_size + call MPI_Pack_external_size( & + datarep, & + abi2mpi_count(incount), & + abi2mpi_datatype(datatype), & + wrap_size, & + ierror & + ) + size = mpi2abi_address(wrap_size) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Pack_external_size + +subroutine MPIABI_Pack_size( & + incount, & + datatype, & + comm, & + size, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: incount + integer, intent(in) :: datatype + integer, intent(in) :: comm + integer, intent(out) :: size + integer, intent(out) :: ierror + call MPI_Pack_size( & + incount, & + abi2mpi_datatype(datatype), & + abi2mpi_comm(comm), & + size, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Pack_size + +subroutine MPIABI_Type_commit( & + datatype, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: datatype + integer, intent(out) :: ierror + call MPI_Type_commit( & + datatype, & + ierror & + ) + datatype = mpi2abi_datatype(datatype) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_commit + +subroutine MPIABI_Type_contiguous( & + count, & + oldtype, & + newtype, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: count + integer, intent(in) :: oldtype + integer, intent(out) :: newtype + integer, intent(out) :: ierror + call MPI_Type_contiguous( & + count, & + abi2mpi_datatype(oldtype), & + newtype, & + ierror & + ) + newtype = mpi2abi_datatype(newtype) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_contiguous + +subroutine MPIABI_Type_create_darray( & + size, & + rank, & + ndims, & + array_of_gsizes, & + array_of_distribs, & + array_of_dargs, & + array_of_psizes, & + order, & + oldtype, & + newtype, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: size + integer, intent(in) :: rank + integer, intent(in) :: ndims + integer, intent(in) :: array_of_gsizes(ndims) + integer, intent(in) :: array_of_distribs(ndims) + integer, intent(in) :: array_of_dargs(ndims) + integer, intent(in) :: array_of_psizes(ndims) + integer, intent(in) :: order + integer, intent(in) :: oldtype + integer, intent(out) :: newtype + integer, intent(out) :: ierror + call MPI_Type_create_darray( & + size, & + rank, & + ndims, & + array_of_gsizes, & + array_of_distribs, & + array_of_dargs, & + array_of_psizes, & + order, & + abi2mpi_datatype(oldtype), & + newtype, & + ierror & + ) + newtype = mpi2abi_datatype(newtype) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_create_darray + +subroutine MPIABI_Type_create_hindexed( & + count, & + array_of_blocklengths, & + array_of_displacements, & + oldtype, & + newtype, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: count + integer, intent(in) :: array_of_blocklengths(count) + integer(MPIABI_ADDRESS_KIND), intent(in) :: array_of_displacements(count) + integer, intent(in) :: oldtype + integer, intent(out) :: newtype + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: wrap_array_of_displacements(count) + integer :: i + do i = 1, count + wrap_array_of_displacements(i) = abi2mpi_address(array_of_displacements(i)) + end do + call MPI_Type_create_hindexed( & + count, & + array_of_blocklengths, & + wrap_array_of_displacements, & + abi2mpi_datatype(oldtype), & + newtype, & + ierror & + ) + newtype = mpi2abi_datatype(newtype) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_create_hindexed + +subroutine MPIABI_Type_create_hindexed_block( & + count, & + blocklength, & + array_of_displacements, & + oldtype, & + newtype, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: count + integer, intent(in) :: blocklength + integer(MPIABI_ADDRESS_KIND), intent(in) :: array_of_displacements(count) + integer, intent(in) :: oldtype + integer, intent(out) :: newtype + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: wrap_array_of_displacements(count) + integer :: i + do i = 1, count + wrap_array_of_displacements(i) = abi2mpi_address(array_of_displacements(i)) + end do + call MPI_Type_create_hindexed_block( & + count, & + blocklength, & + wrap_array_of_displacements, & + abi2mpi_datatype(oldtype), & + newtype, & + ierror & + ) + newtype = mpi2abi_datatype(newtype) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_create_hindexed_block + +subroutine MPIABI_Type_create_hvector( & + count, & + blocklength, & + stride, & + oldtype, & + newtype, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: count + integer, intent(in) :: blocklength + integer(MPIABI_ADDRESS_KIND), intent(in) :: stride + integer, intent(in) :: oldtype + integer, intent(out) :: newtype + integer, intent(out) :: ierror + call MPI_Type_create_hvector( & + count, & + blocklength, & + abi2mpi_address(stride), & + abi2mpi_datatype(oldtype), & + newtype, & + ierror & + ) + newtype = mpi2abi_datatype(newtype) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_create_hvector + +subroutine MPIABI_Type_create_indexed_block( & + count, & + blocklength, & + array_of_displacements, & + oldtype, & + newtype, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: count + integer, intent(in) :: blocklength + integer, intent(in) :: array_of_displacements(count) + integer, intent(in) :: oldtype + integer, intent(out) :: newtype + integer, intent(out) :: ierror + call MPI_Type_create_indexed_block( & + count, & + blocklength, & + array_of_displacements, & + abi2mpi_datatype(oldtype), & + newtype, & + ierror & + ) + newtype = mpi2abi_datatype(newtype) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_create_indexed_block + +subroutine MPIABI_Type_create_resized( & + oldtype, & + lb, & + extent, & + newtype, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: oldtype + integer(MPIABI_ADDRESS_KIND), intent(in) :: lb + integer(MPIABI_ADDRESS_KIND), intent(in) :: extent + integer, intent(out) :: newtype + integer, intent(out) :: ierror + call MPI_Type_create_resized( & + abi2mpi_datatype(oldtype), & + abi2mpi_address(lb), & + abi2mpi_address(extent), & + newtype, & + ierror & + ) + newtype = mpi2abi_datatype(newtype) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_create_resized + +subroutine MPIABI_Type_create_struct( & + count, & + array_of_blocklengths, & + array_of_displacements, & + array_of_types, & + newtype, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: count + integer, intent(in) :: array_of_blocklengths(count) + integer(MPIABI_ADDRESS_KIND), intent(in) :: array_of_displacements(count) + integer, intent(in) :: array_of_types(count) + integer, intent(out) :: newtype + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: wrap_array_of_displacements(count) + integer :: wrap_array_of_types(count) + integer :: i + do i = 1, count + wrap_array_of_displacements(i) = abi2mpi_address(array_of_displacements(i)) + end do + do i = 1, count + wrap_array_of_types(i) = abi2mpi_datatype(array_of_types(i)) + end do + call MPI_Type_create_struct( & + count, & + array_of_blocklengths, & + wrap_array_of_displacements, & + wrap_array_of_types, & + newtype, & + ierror & + ) + newtype = mpi2abi_datatype(newtype) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_create_struct + +subroutine MPIABI_Type_create_subarray( & + ndims, & + array_of_sizes, & + array_of_subsizes, & + array_of_starts, & + order, & + oldtype, & + newtype, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: ndims + integer, intent(in) :: array_of_sizes(ndims) + integer, intent(in) :: array_of_subsizes(ndims) + integer, intent(in) :: array_of_starts(ndims) + integer, intent(in) :: order + integer, intent(in) :: oldtype + integer, intent(out) :: newtype + integer, intent(out) :: ierror + call MPI_Type_create_subarray( & + ndims, & + array_of_sizes, & + array_of_subsizes, & + array_of_starts, & + order, & + abi2mpi_datatype(oldtype), & + newtype, & + ierror & + ) + newtype = mpi2abi_datatype(newtype) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_create_subarray + +subroutine MPIABI_Type_dup( & + oldtype, & + newtype, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: oldtype + integer, intent(out) :: newtype + integer, intent(out) :: ierror + call MPI_Type_dup( & + abi2mpi_datatype(oldtype), & + newtype, & + ierror & + ) + newtype = mpi2abi_datatype(newtype) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_dup + +subroutine MPIABI_Type_free( & + datatype, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: datatype + integer, intent(out) :: ierror + call MPI_Type_free( & + datatype, & + ierror & + ) + datatype = mpi2abi_datatype(datatype) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_free + +subroutine MPIABI_Type_get_contents( & + datatype, & + max_integers, & + max_addresses, & + max_datatypes, & + array_of_integers, & + array_of_addresses, & + array_of_datatypes, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: datatype + integer, intent(in) :: max_integers + integer, intent(in) :: max_addresses + integer, intent(in) :: max_datatypes + integer, intent(out) :: array_of_integers + integer(MPIABI_ADDRESS_KIND), intent(out) :: array_of_addresses + integer, intent(out) :: array_of_datatypes + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: wrap_array_of_addresses + call MPI_Type_get_contents( & + abi2mpi_datatype(datatype), & + max_integers, & + max_addresses, & + max_datatypes, & + array_of_integers, & + wrap_array_of_addresses, & + array_of_datatypes, & + ierror & + ) + array_of_addresses = mpi2abi_address(wrap_array_of_addresses) + array_of_datatypes = mpi2abi_datatype(array_of_datatypes) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_get_contents + +subroutine MPIABI_Type_get_envelope( & + datatype, & + num_integers, & + num_addresses, & + num_datatypes, & + combiner, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: datatype + integer, intent(out) :: num_integers + integer, intent(out) :: num_addresses + integer, intent(out) :: num_datatypes + integer, intent(out) :: combiner + integer, intent(out) :: ierror + call MPI_Type_get_envelope( & + abi2mpi_datatype(datatype), & + num_integers, & + num_addresses, & + num_datatypes, & + combiner, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_get_envelope + +subroutine MPIABI_Type_get_extent( & + datatype, & + lb, & + extent, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: datatype + integer(MPIABI_ADDRESS_KIND), intent(out) :: lb + integer(MPIABI_ADDRESS_KIND), intent(out) :: extent + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: wrap_lb + integer(MPI_ADDRESS_KIND) :: wrap_extent + call MPI_Type_get_extent( & + abi2mpi_datatype(datatype), & + wrap_lb, & + wrap_extent, & + ierror & + ) + lb = mpi2abi_address(wrap_lb) + extent = mpi2abi_address(wrap_extent) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_get_extent + +subroutine MPIABI_Type_get_true_extent( & + datatype, & + true_lb, & + true_extent, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: datatype + integer(MPIABI_ADDRESS_KIND), intent(out) :: true_lb + integer(MPIABI_ADDRESS_KIND), intent(out) :: true_extent + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: wrap_true_lb + integer(MPI_ADDRESS_KIND) :: wrap_true_extent + call MPI_Type_get_true_extent( & + abi2mpi_datatype(datatype), & + wrap_true_lb, & + wrap_true_extent, & + ierror & + ) + true_lb = mpi2abi_address(wrap_true_lb) + true_extent = mpi2abi_address(wrap_true_extent) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_get_true_extent + +subroutine MPIABI_Type_indexed( & + count, & + array_of_blocklengths, & + array_of_displacements, & + oldtype, & + newtype, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: count + integer, intent(in) :: array_of_blocklengths(count) + integer, intent(in) :: array_of_displacements(count) + integer, intent(in) :: oldtype + integer, intent(out) :: newtype + integer, intent(out) :: ierror + call MPI_Type_indexed( & + count, & + array_of_blocklengths, & + array_of_displacements, & + abi2mpi_datatype(oldtype), & + newtype, & + ierror & + ) + newtype = mpi2abi_datatype(newtype) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_indexed + +subroutine MPIABI_Type_size( & + datatype, & + size, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: datatype + integer, intent(out) :: size + integer, intent(out) :: ierror + call MPI_Type_size( & + abi2mpi_datatype(datatype), & + size, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_size + +subroutine MPIABI_Type_vector( & + count, & + blocklength, & + stride, & + oldtype, & + newtype, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: count + integer, intent(in) :: blocklength + integer, intent(in) :: stride + integer, intent(in) :: oldtype + integer, intent(out) :: newtype + integer, intent(out) :: ierror + call MPI_Type_vector( & + count, & + blocklength, & + stride, & + abi2mpi_datatype(oldtype), & + newtype, & + ierror & + ) + newtype = mpi2abi_datatype(newtype) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_vector + +subroutine MPIABI_Unpack( & + inbuf, & + insize, & + position, & + outbuf, & + outcount, & + datatype, & + comm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: inbuf(*) + integer, intent(in) :: insize + integer, intent(out) :: position + integer, intent(out) :: outbuf(*) + integer, intent(in) :: outcount + integer, intent(in) :: datatype + integer, intent(in) :: comm + integer, intent(out) :: ierror + call MPI_Unpack( & + inbuf, & + insize, & + position, & + outbuf, & + outcount, & + abi2mpi_datatype(datatype), & + abi2mpi_comm(comm), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Unpack + +subroutine MPIABI_Unpack_external( & + datarep, & + inbuf, & + insize, & + position, & + outbuf, & + outcount, & + datatype, & + ierror & +) + use mpiwrapper + implicit none + character(*), intent(in) :: datarep + integer, intent(in) :: inbuf(*) + integer(MPIABI_ADDRESS_KIND), intent(in) :: insize + integer(MPIABI_ADDRESS_KIND), intent(out) :: position + integer, intent(out) :: outbuf(*) + integer, intent(in) :: outcount + integer, intent(in) :: datatype + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: wrap_position + call MPI_Unpack_external( & + datarep, & + inbuf, & + abi2mpi_address(insize), & + wrap_position, & + outbuf, & + outcount, & + abi2mpi_datatype(datatype), & + ierror & + ) + position = mpi2abi_address(wrap_position) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Unpack_external + +subroutine MPIABI_Allgather( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(out) :: ierror + call MPI_Allgather( & + sendbuf, & + sendcount, & + abi2mpi_datatype(sendtype), & + recvbuf, & + recvcount, & + abi2mpi_datatype(recvtype), & + abi2mpi_comm(comm), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Allgather + +subroutine MPIABI_Allgather_init( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + info, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Allgather_init( & + sendbuf, & + sendcount, & + abi2mpi_datatype(sendtype), & + recvbuf, & + recvcount, & + abi2mpi_datatype(recvtype), & + abi2mpi_comm(comm), & + abi2mpi_info(info), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Allgather_init + +subroutine MPIABI_Allgatherv( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcounts, & + displs, & + recvtype, & + comm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: displs(*) + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(out) :: ierror + call MPI_Allgatherv( & + sendbuf, & + sendcount, & + abi2mpi_datatype(sendtype), & + recvbuf, & + recvcounts, & + displs, & + abi2mpi_datatype(recvtype), & + abi2mpi_comm(comm), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Allgatherv + +subroutine MPIABI_Allgatherv_init( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcounts, & + displs, & + recvtype, & + comm, & + info, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: displs(*) + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Allgatherv_init( & + sendbuf, & + sendcount, & + abi2mpi_datatype(sendtype), & + recvbuf, & + recvcounts, & + displs, & + abi2mpi_datatype(recvtype), & + abi2mpi_comm(comm), & + abi2mpi_info(info), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Allgatherv_init + +subroutine MPIABI_Allreduce( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + comm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: op + integer, intent(in) :: comm + integer, intent(out) :: ierror + call MPI_Allreduce( & + sendbuf, & + recvbuf, & + count, & + abi2mpi_datatype(datatype), & + abi2mpi_op(op), & + abi2mpi_comm(comm), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Allreduce + +subroutine MPIABI_Allreduce_init( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + comm, & + info, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: op + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Allreduce_init( & + sendbuf, & + recvbuf, & + count, & + abi2mpi_datatype(datatype), & + abi2mpi_op(op), & + abi2mpi_comm(comm), & + abi2mpi_info(info), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Allreduce_init + +subroutine MPIABI_Alltoall( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(out) :: ierror + call MPI_Alltoall( & + sendbuf, & + sendcount, & + abi2mpi_datatype(sendtype), & + recvbuf, & + recvcount, & + abi2mpi_datatype(recvtype), & + abi2mpi_comm(comm), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Alltoall + +subroutine MPIABI_Alltoall_init( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + info, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Alltoall_init( & + sendbuf, & + sendcount, & + abi2mpi_datatype(sendtype), & + recvbuf, & + recvcount, & + abi2mpi_datatype(recvtype), & + abi2mpi_comm(comm), & + abi2mpi_info(info), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Alltoall_init + +subroutine MPIABI_Alltoallv( & + sendbuf, & + sendcounts, & + sdispls, & + sendtype, & + recvbuf, & + recvcounts, & + rdispls, & + recvtype, & + comm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + integer, intent(in) :: sendtype + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: rdispls(*) + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(out) :: ierror + call MPI_Alltoallv( & + sendbuf, & + sendcounts, & + sdispls, & + abi2mpi_datatype(sendtype), & + recvbuf, & + recvcounts, & + rdispls, & + abi2mpi_datatype(recvtype), & + abi2mpi_comm(comm), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Alltoallv + +subroutine MPIABI_Alltoallv_init( & + sendbuf, & + sendcounts, & + sdispls, & + sendtype, & + recvbuf, & + recvcounts, & + rdispls, & + recvtype, & + comm, & + info, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + integer, intent(in) :: sendtype + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: rdispls(*) + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Alltoallv_init( & + sendbuf, & + sendcounts, & + sdispls, & + abi2mpi_datatype(sendtype), & + recvbuf, & + recvcounts, & + rdispls, & + abi2mpi_datatype(recvtype), & + abi2mpi_comm(comm), & + abi2mpi_info(info), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Alltoallv_init + +subroutine MPIABI_Alltoallw( & + sendbuf, & + sendcounts, & + sdispls, & + sendtypes, & + recvbuf, & + recvcounts, & + rdispls, & + recvtypes, & + comm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + integer, intent(in) :: sendtypes(*) + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: rdispls(*) + integer, intent(in) :: recvtypes(*) + integer, intent(in) :: comm + integer, intent(out) :: ierror + integer, allocatable :: wrap_sendtypes(:) + integer, allocatable :: wrap_recvtypes(:) + integer :: comm_size + integer :: i + call MPI_Comm_size(abi2mpi_comm(comm), comm_size, ierror) + if (ierror /= MPI_SUCCESS) then + ierror = mpi2abi_errorcode(ierror) + return + end if + allocate(wrap_sendtypes(comm_size)) + allocate(wrap_recvtypes(comm_size)) + do i = 1, comm_size + wrap_sendtypes(i) = abi2mpi_datatype(sendtypes(i)) + end do + do i = 1, comm_size + wrap_recvtypes(i) = abi2mpi_datatype(recvtypes(i)) + end do + call MPI_Alltoallw( & + sendbuf, & + sendcounts, & + sdispls, & + wrap_sendtypes, & + recvbuf, & + recvcounts, & + rdispls, & + wrap_recvtypes, & + abi2mpi_comm(comm), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) + deallocate(wrap_sendtypes) + deallocate(wrap_recvtypes) +end subroutine MPIABI_Alltoallw + +subroutine MPIABI_Alltoallw_init( & + sendbuf, & + sendcounts, & + sdispls, & + sendtypes, & + recvbuf, & + recvcounts, & + rdispls, & + recvtypes, & + comm, & + info, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + integer, intent(in) :: sendtypes(*) + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: rdispls(*) + integer, intent(in) :: recvtypes(*) + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + integer, allocatable :: wrap_sendtypes(:) + integer, allocatable :: wrap_recvtypes(:) + integer :: comm_size + integer :: i + call MPI_Comm_size(abi2mpi_comm(comm), comm_size, ierror) + if (ierror /= MPI_SUCCESS) then + ierror = mpi2abi_errorcode(ierror) + return + end if + allocate(wrap_sendtypes(comm_size)) + allocate(wrap_recvtypes(comm_size)) + do i = 1, comm_size + wrap_sendtypes(i) = abi2mpi_datatype(sendtypes(i)) + end do + do i = 1, comm_size + wrap_recvtypes(i) = abi2mpi_datatype(recvtypes(i)) + end do + call MPI_Alltoallw_init( & + sendbuf, & + sendcounts, & + sdispls, & + wrap_sendtypes, & + recvbuf, & + recvcounts, & + rdispls, & + wrap_recvtypes, & + abi2mpi_comm(comm), & + abi2mpi_info(info), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) + deallocate(wrap_sendtypes) + deallocate(wrap_recvtypes) +end subroutine MPIABI_Alltoallw_init + +subroutine MPIABI_Barrier( & + comm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(out) :: ierror + call MPI_Barrier( & + abi2mpi_comm(comm), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Barrier + +subroutine MPIABI_Barrier_init( & + comm, & + info, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Barrier_init( & + abi2mpi_comm(comm), & + abi2mpi_info(info), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Barrier_init + +subroutine MPIABI_Bcast( & + buffer, & + count, & + datatype, & + root, & + comm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: buffer(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(out) :: ierror + call MPI_Bcast( & + buffer, & + count, & + abi2mpi_datatype(datatype), & + root, & + abi2mpi_comm(comm), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Bcast + +subroutine MPIABI_Bcast_init( & + buffer, & + count, & + datatype, & + root, & + comm, & + info, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: buffer(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Bcast_init( & + buffer, & + count, & + abi2mpi_datatype(datatype), & + root, & + abi2mpi_comm(comm), & + abi2mpi_info(info), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Bcast_init + +subroutine MPIABI_Exscan( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + comm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: op + integer, intent(in) :: comm + integer, intent(out) :: ierror + call MPI_Exscan( & + sendbuf, & + recvbuf, & + count, & + abi2mpi_datatype(datatype), & + abi2mpi_op(op), & + abi2mpi_comm(comm), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Exscan + +subroutine MPIABI_Exscan_init( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + comm, & + info, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: op + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Exscan_init( & + sendbuf, & + recvbuf, & + count, & + abi2mpi_datatype(datatype), & + abi2mpi_op(op), & + abi2mpi_comm(comm), & + abi2mpi_info(info), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Exscan_init + +subroutine MPIABI_Gather( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + root, & + comm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(out) :: ierror + call MPI_Gather( & + sendbuf, & + sendcount, & + abi2mpi_datatype(sendtype), & + recvbuf, & + recvcount, & + abi2mpi_datatype(recvtype), & + root, & + abi2mpi_comm(comm), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Gather + +subroutine MPIABI_Gather_init( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + root, & + comm, & + info, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Gather_init( & + sendbuf, & + sendcount, & + abi2mpi_datatype(sendtype), & + recvbuf, & + recvcount, & + abi2mpi_datatype(recvtype), & + root, & + abi2mpi_comm(comm), & + abi2mpi_info(info), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Gather_init + +subroutine MPIABI_Gatherv( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcounts, & + displs, & + recvtype, & + root, & + comm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: displs(*) + integer, intent(in) :: recvtype + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(out) :: ierror + call MPI_Gatherv( & + sendbuf, & + sendcount, & + abi2mpi_datatype(sendtype), & + recvbuf, & + recvcounts, & + displs, & + abi2mpi_datatype(recvtype), & + root, & + abi2mpi_comm(comm), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Gatherv + +subroutine MPIABI_Gatherv_init( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcounts, & + displs, & + recvtype, & + root, & + comm, & + info, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: displs(*) + integer, intent(in) :: recvtype + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Gatherv_init( & + sendbuf, & + sendcount, & + abi2mpi_datatype(sendtype), & + recvbuf, & + recvcounts, & + displs, & + abi2mpi_datatype(recvtype), & + root, & + abi2mpi_comm(comm), & + abi2mpi_info(info), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Gatherv_init + +subroutine MPIABI_Iallgather( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Iallgather( & + sendbuf, & + sendcount, & + abi2mpi_datatype(sendtype), & + recvbuf, & + recvcount, & + abi2mpi_datatype(recvtype), & + abi2mpi_comm(comm), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Iallgather + +subroutine MPIABI_Iallgatherv( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcounts, & + displs, & + recvtype, & + comm, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: displs(*) + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Iallgatherv( & + sendbuf, & + sendcount, & + abi2mpi_datatype(sendtype), & + recvbuf, & + recvcounts, & + displs, & + abi2mpi_datatype(recvtype), & + abi2mpi_comm(comm), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Iallgatherv + +subroutine MPIABI_Iallreduce( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + comm, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: op + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Iallreduce( & + sendbuf, & + recvbuf, & + count, & + abi2mpi_datatype(datatype), & + abi2mpi_op(op), & + abi2mpi_comm(comm), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Iallreduce + +subroutine MPIABI_Ialltoall( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Ialltoall( & + sendbuf, & + sendcount, & + abi2mpi_datatype(sendtype), & + recvbuf, & + recvcount, & + abi2mpi_datatype(recvtype), & + abi2mpi_comm(comm), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Ialltoall + +subroutine MPIABI_Ialltoallv( & + sendbuf, & + sendcounts, & + sdispls, & + sendtype, & + recvbuf, & + recvcounts, & + rdispls, & + recvtype, & + comm, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + integer, intent(in) :: sendtype + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: rdispls(*) + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Ialltoallv( & + sendbuf, & + sendcounts, & + sdispls, & + abi2mpi_datatype(sendtype), & + recvbuf, & + recvcounts, & + rdispls, & + abi2mpi_datatype(recvtype), & + abi2mpi_comm(comm), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Ialltoallv + +subroutine MPIABI_Ialltoallw( & + sendbuf, & + sendcounts, & + sdispls, & + sendtypes, & + recvbuf, & + recvcounts, & + rdispls, & + recvtypes, & + comm, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + integer, intent(in) :: sendtypes(*) + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: rdispls(*) + integer, intent(in) :: recvtypes(*) + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + integer, allocatable :: wrap_sendtypes(:) + integer, allocatable :: wrap_recvtypes(:) + integer :: comm_size + integer :: i + call MPI_Comm_size(abi2mpi_comm(comm), comm_size, ierror) + if (ierror /= MPI_SUCCESS) then + ierror = mpi2abi_errorcode(ierror) + return + end if + allocate(wrap_sendtypes(comm_size)) + allocate(wrap_recvtypes(comm_size)) + do i = 1, comm_size + wrap_sendtypes(i) = abi2mpi_datatype(sendtypes(i)) + end do + do i = 1, comm_size + wrap_recvtypes(i) = abi2mpi_datatype(recvtypes(i)) + end do + call MPI_Ialltoallw( & + sendbuf, & + sendcounts, & + sdispls, & + wrap_sendtypes, & + recvbuf, & + recvcounts, & + rdispls, & + wrap_recvtypes, & + abi2mpi_comm(comm), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) + deallocate(wrap_sendtypes) + deallocate(wrap_recvtypes) +end subroutine MPIABI_Ialltoallw + +subroutine MPIABI_Ibarrier( & + comm, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Ibarrier( & + abi2mpi_comm(comm), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Ibarrier + +subroutine MPIABI_Ibcast( & + buffer, & + count, & + datatype, & + root, & + comm, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: buffer(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Ibcast( & + buffer, & + count, & + abi2mpi_datatype(datatype), & + root, & + abi2mpi_comm(comm), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Ibcast + +subroutine MPIABI_Iexscan( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + comm, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: op + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Iexscan( & + sendbuf, & + recvbuf, & + count, & + abi2mpi_datatype(datatype), & + abi2mpi_op(op), & + abi2mpi_comm(comm), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Iexscan + +subroutine MPIABI_Igather( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + root, & + comm, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Igather( & + sendbuf, & + sendcount, & + abi2mpi_datatype(sendtype), & + recvbuf, & + recvcount, & + abi2mpi_datatype(recvtype), & + root, & + abi2mpi_comm(comm), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Igather + +subroutine MPIABI_Igatherv( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcounts, & + displs, & + recvtype, & + root, & + comm, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: displs(*) + integer, intent(in) :: recvtype + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Igatherv( & + sendbuf, & + sendcount, & + abi2mpi_datatype(sendtype), & + recvbuf, & + recvcounts, & + displs, & + abi2mpi_datatype(recvtype), & + root, & + abi2mpi_comm(comm), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Igatherv + +subroutine MPIABI_Ireduce( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + root, & + comm, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: op + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Ireduce( & + sendbuf, & + recvbuf, & + count, & + abi2mpi_datatype(datatype), & + abi2mpi_op(op), & + root, & + abi2mpi_comm(comm), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Ireduce + +subroutine MPIABI_Ireduce_scatter( & + sendbuf, & + recvbuf, & + recvcounts, & + datatype, & + op, & + comm, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: datatype + integer, intent(in) :: op + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Ireduce_scatter( & + sendbuf, & + recvbuf, & + recvcounts, & + abi2mpi_datatype(datatype), & + abi2mpi_op(op), & + abi2mpi_comm(comm), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Ireduce_scatter + +subroutine MPIABI_Ireduce_scatter_block( & + sendbuf, & + recvbuf, & + recvcount, & + datatype, & + op, & + comm, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: datatype + integer, intent(in) :: op + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Ireduce_scatter_block( & + sendbuf, & + recvbuf, & + recvcount, & + abi2mpi_datatype(datatype), & + abi2mpi_op(op), & + abi2mpi_comm(comm), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Ireduce_scatter_block + +subroutine MPIABI_Iscan( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + comm, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: op + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Iscan( & + sendbuf, & + recvbuf, & + count, & + abi2mpi_datatype(datatype), & + abi2mpi_op(op), & + abi2mpi_comm(comm), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Iscan + +subroutine MPIABI_Iscatter( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + root, & + comm, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Iscatter( & + sendbuf, & + sendcount, & + abi2mpi_datatype(sendtype), & + recvbuf, & + recvcount, & + abi2mpi_datatype(recvtype), & + root, & + abi2mpi_comm(comm), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Iscatter + +subroutine MPIABI_Iscatterv( & + sendbuf, & + sendcounts, & + sdispls, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + root, & + comm, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + integer, intent(in) :: sendtype + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Iscatterv( & + sendbuf, & + sendcounts, & + sdispls, & + abi2mpi_datatype(sendtype), & + recvbuf, & + recvcount, & + abi2mpi_datatype(recvtype), & + root, & + abi2mpi_comm(comm), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Iscatterv + +subroutine MPIABI_Op_commutative( & + op, & + commute, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: op + logical, intent(out) :: commute + integer, intent(out) :: ierror + call MPI_Op_commutative( & + abi2mpi_op(op), & + commute, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Op_commutative + +subroutine MPIABI_Op_create( & + user_fn, & + commute, & + op, & + ierror & +) + use mpiwrapper + implicit none + external :: user_fn + logical, intent(in) :: commute + integer, intent(out) :: op + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER < 9999900 + write(0, '("The Fortran function MPI_Op_create is not available in MPItrampoline")') + call MPI_Abort(MPI_COMM_SELF, 1, ierror) + stop +#else + external :: wrap_user_fn + wrap_user_fn = abi2mpi_external(user_fn) + call MPI_Op_create( & + wrap_user_fn, & + commute, & + op, & + ierror & + ) + op = mpi2abi_op(op) + ierror = mpi2abi_errorcode(ierror) +#endif +end subroutine MPIABI_Op_create + +subroutine MPIABI_Op_free( & + op, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: op + integer, intent(out) :: ierror + call MPI_Op_free( & + op, & + ierror & + ) + op = mpi2abi_op(op) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Op_free + +subroutine MPIABI_Reduce( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + root, & + comm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: op + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(out) :: ierror + call MPI_Reduce( & + sendbuf, & + recvbuf, & + count, & + abi2mpi_datatype(datatype), & + abi2mpi_op(op), & + root, & + abi2mpi_comm(comm), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Reduce + +subroutine MPIABI_Reduce_init( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + root, & + comm, & + info, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: op + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Reduce_init( & + sendbuf, & + recvbuf, & + count, & + abi2mpi_datatype(datatype), & + abi2mpi_op(op), & + root, & + abi2mpi_comm(comm), & + abi2mpi_info(info), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Reduce_init + +subroutine MPIABI_Reduce_local( & + inbuf, & + inoutbuf, & + count, & + datatype, & + op, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: inbuf(*) + integer, intent(out) :: inoutbuf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: op + integer, intent(out) :: ierror + call MPI_Reduce_local( & + inbuf, & + inoutbuf, & + count, & + abi2mpi_datatype(datatype), & + abi2mpi_op(op), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Reduce_local + +subroutine MPIABI_Reduce_scatter( & + sendbuf, & + recvbuf, & + recvcounts, & + datatype, & + op, & + comm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: datatype + integer, intent(in) :: op + integer, intent(in) :: comm + integer, intent(out) :: ierror + call MPI_Reduce_scatter( & + sendbuf, & + recvbuf, & + recvcounts, & + abi2mpi_datatype(datatype), & + abi2mpi_op(op), & + abi2mpi_comm(comm), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Reduce_scatter + +subroutine MPIABI_Reduce_scatter_block( & + sendbuf, & + recvbuf, & + recvcount, & + datatype, & + op, & + comm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: datatype + integer, intent(in) :: op + integer, intent(in) :: comm + integer, intent(out) :: ierror + call MPI_Reduce_scatter_block( & + sendbuf, & + recvbuf, & + recvcount, & + abi2mpi_datatype(datatype), & + abi2mpi_op(op), & + abi2mpi_comm(comm), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Reduce_scatter_block + +subroutine MPIABI_Reduce_scatter_block_init( & + sendbuf, & + recvbuf, & + recvcount, & + datatype, & + op, & + comm, & + info, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: datatype + integer, intent(in) :: op + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Reduce_scatter_block_init( & + sendbuf, & + recvbuf, & + recvcount, & + abi2mpi_datatype(datatype), & + abi2mpi_op(op), & + abi2mpi_comm(comm), & + abi2mpi_info(info), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Reduce_scatter_block_init + +subroutine MPIABI_Reduce_scatter_init( & + sendbuf, & + recvbuf, & + recvcounts, & + datatype, & + op, & + comm, & + info, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: datatype + integer, intent(in) :: op + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Reduce_scatter_init( & + sendbuf, & + recvbuf, & + recvcounts, & + abi2mpi_datatype(datatype), & + abi2mpi_op(op), & + abi2mpi_comm(comm), & + abi2mpi_info(info), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Reduce_scatter_init + +subroutine MPIABI_Scan( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + comm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: op + integer, intent(in) :: comm + integer, intent(out) :: ierror + call MPI_Scan( & + sendbuf, & + recvbuf, & + count, & + abi2mpi_datatype(datatype), & + abi2mpi_op(op), & + abi2mpi_comm(comm), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Scan + +subroutine MPIABI_Scan_init( & + sendbuf, & + recvbuf, & + count, & + datatype, & + op, & + comm, & + info, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: op + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Scan_init( & + sendbuf, & + recvbuf, & + count, & + abi2mpi_datatype(datatype), & + abi2mpi_op(op), & + abi2mpi_comm(comm), & + abi2mpi_info(info), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Scan_init + +subroutine MPIABI_Scatter( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + root, & + comm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(out) :: ierror + call MPI_Scatter( & + sendbuf, & + sendcount, & + abi2mpi_datatype(sendtype), & + recvbuf, & + recvcount, & + abi2mpi_datatype(recvtype), & + root, & + abi2mpi_comm(comm), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Scatter + +subroutine MPIABI_Scatter_init( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + root, & + comm, & + info, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Scatter_init( & + sendbuf, & + sendcount, & + abi2mpi_datatype(sendtype), & + recvbuf, & + recvcount, & + abi2mpi_datatype(recvtype), & + root, & + abi2mpi_comm(comm), & + abi2mpi_info(info), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Scatter_init + +subroutine MPIABI_Scatterv( & + sendbuf, & + sendcounts, & + displs, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + root, & + comm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: displs(*) + integer, intent(in) :: sendtype + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(out) :: ierror + call MPI_Scatterv( & + sendbuf, & + sendcounts, & + displs, & + abi2mpi_datatype(sendtype), & + recvbuf, & + recvcount, & + abi2mpi_datatype(recvtype), & + root, & + abi2mpi_comm(comm), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Scatterv + +subroutine MPIABI_Scatterv_init( & + sendbuf, & + sendcounts, & + displs, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + root, & + comm, & + info, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: displs(*) + integer, intent(in) :: sendtype + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Scatterv_init( & + sendbuf, & + sendcounts, & + displs, & + abi2mpi_datatype(sendtype), & + recvbuf, & + recvcount, & + abi2mpi_datatype(recvtype), & + root, & + abi2mpi_comm(comm), & + abi2mpi_info(info), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Scatterv_init + +subroutine MPIABI_Type_get_value_index( & + value_type, & + index_type, & + pair_type, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: value_type + integer, intent(in) :: index_type + integer, intent(out) :: pair_type + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER < 401 + write(0, '("The Fortran function MPI_Type_get_value_index is not available in the wrapped MPI implementation")') + call MPI_Abort(MPI_COMM_SELF, 1, ierror) + stop +#else + call MPI_Type_get_value_index( & + abi2mpi_datatype(value_type), & + abi2mpi_datatype(index_type), & + pair_type, & + ierror & + ) + pair_type = mpi2abi_datatype(pair_type) + ierror = mpi2abi_errorcode(ierror) +#endif +end subroutine MPIABI_Type_get_value_index + +subroutine MPIABI_Comm_compare( & + comm1, & + comm2, & + result, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm1 + integer, intent(in) :: comm2 + integer, intent(out) :: result + integer, intent(out) :: ierror + call MPI_Comm_compare( & + abi2mpi_comm(comm1), & + abi2mpi_comm(comm2), & + result, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Comm_compare + +subroutine MPIABI_Comm_create( & + comm, & + group, & + newcomm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(in) :: group + integer, intent(out) :: newcomm + integer, intent(out) :: ierror + call MPI_Comm_create( & + abi2mpi_comm(comm), & + abi2mpi_group(group), & + newcomm, & + ierror & + ) + newcomm = mpi2abi_comm(newcomm) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Comm_create + +subroutine MPIABI_Comm_create_from_group( & + group, & + stringtag, & + info, & + errhandler, & + newcomm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: group + character(*), intent(in) :: stringtag + integer, intent(in) :: info + integer, intent(in) :: errhandler + integer, intent(out) :: newcomm + integer, intent(out) :: ierror + call MPI_Comm_create_from_group( & + abi2mpi_group(group), & + stringtag, & + abi2mpi_info(info), & + abi2mpi_errhandler(errhandler), & + newcomm, & + ierror & + ) + newcomm = mpi2abi_comm(newcomm) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Comm_create_from_group + +subroutine MPIABI_Comm_create_group( & + comm, & + group, & + tag, & + newcomm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(in) :: group + integer, intent(in) :: tag + integer, intent(out) :: newcomm + integer, intent(out) :: ierror + call MPI_Comm_create_group( & + abi2mpi_comm(comm), & + abi2mpi_group(group), & + tag, & + newcomm, & + ierror & + ) + newcomm = mpi2abi_comm(newcomm) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Comm_create_group + +subroutine MPIABI_Comm_create_keyval( & + comm_copy_attr_fn, & + comm_delete_attr_fn, & + comm_keyval, & + extra_state, & + ierror & +) + use mpiwrapper + implicit none + external :: comm_copy_attr_fn + external :: comm_delete_attr_fn + integer, intent(out) :: comm_keyval + integer, intent(out) :: extra_state(*) + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER < 9999900 + write(0, '("The Fortran function MPI_Comm_create_keyval is not available in MPItrampoline")') + call MPI_Abort(MPI_COMM_SELF, 1, ierror) + stop +#else + external :: wrap_comm_copy_attr_fn + external :: wrap_comm_delete_attr_fn + wrap_comm_copy_attr_fn = abi2mpi_external(comm_copy_attr_fn) + wrap_comm_delete_attr_fn = abi2mpi_external(comm_delete_attr_fn) + call MPI_Comm_create_keyval( & + wrap_comm_copy_attr_fn, & + wrap_comm_delete_attr_fn, & + comm_keyval, & + extra_state, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +#endif +end subroutine MPIABI_Comm_create_keyval + +subroutine MPIABI_Comm_delete_attr( & + comm, & + comm_keyval, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(in) :: comm_keyval + integer, intent(out) :: ierror + call MPI_Comm_delete_attr( & + abi2mpi_comm(comm), & + comm_keyval, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Comm_delete_attr + +subroutine MPIABI_Comm_dup( & + comm, & + newcomm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(out) :: newcomm + integer, intent(out) :: ierror + call MPI_Comm_dup( & + abi2mpi_comm(comm), & + newcomm, & + ierror & + ) + newcomm = mpi2abi_comm(newcomm) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Comm_dup + +subroutine MPIABI_Comm_dup_with_info( & + comm, & + info, & + newcomm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: newcomm + integer, intent(out) :: ierror + call MPI_Comm_dup_with_info( & + abi2mpi_comm(comm), & + abi2mpi_info(info), & + newcomm, & + ierror & + ) + newcomm = mpi2abi_comm(newcomm) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Comm_dup_with_info + +subroutine MPIABI_Comm_free( & + comm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: comm + integer, intent(out) :: ierror + call MPI_Comm_free( & + comm, & + ierror & + ) + comm = mpi2abi_comm(comm) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Comm_free + +subroutine MPIABI_Comm_get_name( & + comm, & + comm_name, & + resultlen, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + character(*), intent(out) :: comm_name + integer, intent(out) :: resultlen + integer, intent(out) :: ierror + call MPI_Comm_get_name( & + abi2mpi_comm(comm), & + comm_name, & + resultlen, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Comm_get_name + +subroutine MPIABI_Comm_free_keyval( & + comm_keyval, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: comm_keyval + integer, intent(out) :: ierror + call MPI_Comm_free_keyval( & + comm_keyval, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Comm_free_keyval + +subroutine MPIABI_Comm_get_attr( & + comm, & + comm_keyval, & + attribute_val, & + flag, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(in) :: comm_keyval + integer, intent(out) :: attribute_val(*) + logical, intent(out) :: flag + integer, intent(out) :: ierror + call MPI_Comm_get_attr( & + abi2mpi_comm(comm), & + comm_keyval, & + attribute_val, & + flag, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Comm_get_attr + +subroutine MPIABI_Comm_get_info( & + comm, & + info_used, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(out) :: info_used + integer, intent(out) :: ierror + call MPI_Comm_get_info( & + abi2mpi_comm(comm), & + info_used, & + ierror & + ) + info_used = mpi2abi_info(info_used) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Comm_get_info + +subroutine MPIABI_Comm_group( & + comm, & + group, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(out) :: group + integer, intent(out) :: ierror + call MPI_Comm_group( & + abi2mpi_comm(comm), & + group, & + ierror & + ) + group = mpi2abi_group(group) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Comm_group + +subroutine MPIABI_Comm_idup( & + comm, & + newcomm, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(out) :: newcomm + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Comm_idup( & + abi2mpi_comm(comm), & + newcomm, & + request, & + ierror & + ) + newcomm = mpi2abi_comm(newcomm) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Comm_idup + +subroutine MPIABI_Comm_idup_with_info( & + comm, & + info, & + newcomm, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: newcomm + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Comm_idup_with_info( & + abi2mpi_comm(comm), & + abi2mpi_info(info), & + newcomm, & + request, & + ierror & + ) + newcomm = mpi2abi_comm(newcomm) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Comm_idup_with_info + +subroutine MPIABI_Comm_rank( & + comm, & + rank, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(out) :: rank + integer, intent(out) :: ierror + call MPI_Comm_rank( & + abi2mpi_comm(comm), & + rank, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Comm_rank + +subroutine MPIABI_Comm_remote_group( & + comm, & + group, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(out) :: group + integer, intent(out) :: ierror + call MPI_Comm_remote_group( & + abi2mpi_comm(comm), & + group, & + ierror & + ) + group = mpi2abi_group(group) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Comm_remote_group + +subroutine MPIABI_Comm_remote_size( & + comm, & + size, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(out) :: size + integer, intent(out) :: ierror + call MPI_Comm_remote_size( & + abi2mpi_comm(comm), & + size, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Comm_remote_size + +subroutine MPIABI_Comm_set_attr( & + comm, & + comm_keyval, & + attribute_val, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(in) :: comm_keyval + integer, intent(out) :: attribute_val(*) + integer, intent(out) :: ierror + call MPI_Comm_set_attr( & + abi2mpi_comm(comm), & + comm_keyval, & + attribute_val, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Comm_set_attr + +subroutine MPIABI_Comm_set_info( & + comm, & + info, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: ierror + call MPI_Comm_set_info( & + abi2mpi_comm(comm), & + abi2mpi_info(info), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Comm_set_info + +subroutine MPIABI_Comm_set_name( & + comm, & + comm_name, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + character(*), intent(in) :: comm_name + integer, intent(out) :: ierror + call MPI_Comm_set_name( & + abi2mpi_comm(comm), & + comm_name, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Comm_set_name + +subroutine MPIABI_Comm_size( & + comm, & + size, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(out) :: size + integer, intent(out) :: ierror + call MPI_Comm_size( & + abi2mpi_comm(comm), & + size, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Comm_size + +subroutine MPIABI_Comm_split( & + comm, & + color, & + key, & + newcomm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(in) :: color + integer, intent(in) :: key + integer, intent(out) :: newcomm + integer, intent(out) :: ierror + call MPI_Comm_split( & + abi2mpi_comm(comm), & + color, & + key, & + newcomm, & + ierror & + ) + newcomm = mpi2abi_comm(newcomm) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Comm_split + +subroutine MPIABI_Group_free( & + group, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: group + integer, intent(out) :: ierror + call MPI_Group_free( & + group, & + ierror & + ) + group = mpi2abi_group(group) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Group_free + +subroutine MPIABI_Comm_split_type( & + comm, & + split_type, & + key, & + info, & + newcomm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(in) :: split_type + integer, intent(in) :: key + integer, intent(in) :: info + integer, intent(out) :: newcomm + integer, intent(out) :: ierror + call MPI_Comm_split_type( & + abi2mpi_comm(comm), & + split_type, & + key, & + abi2mpi_info(info), & + newcomm, & + ierror & + ) + newcomm = mpi2abi_comm(newcomm) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Comm_split_type + +subroutine MPIABI_Comm_test_inter( & + comm, & + flag, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + logical, intent(out) :: flag + integer, intent(out) :: ierror + call MPI_Comm_test_inter( & + abi2mpi_comm(comm), & + flag, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Comm_test_inter + +subroutine MPIABI_Group_compare( & + group1, & + group2, & + result, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: group1 + integer, intent(in) :: group2 + integer, intent(out) :: result + integer, intent(out) :: ierror + call MPI_Group_compare( & + abi2mpi_group(group1), & + abi2mpi_group(group2), & + result, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Group_compare + +subroutine MPIABI_Group_difference( & + group1, & + group2, & + newgroup, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: group1 + integer, intent(in) :: group2 + integer, intent(out) :: newgroup + integer, intent(out) :: ierror + call MPI_Group_difference( & + abi2mpi_group(group1), & + abi2mpi_group(group2), & + newgroup, & + ierror & + ) + newgroup = mpi2abi_group(newgroup) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Group_difference + +subroutine MPIABI_Group_excl( & + group, & + n, & + ranks, & + newgroup, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: group + integer, intent(in) :: n + integer, intent(in) :: ranks(n) + integer, intent(out) :: newgroup + integer, intent(out) :: ierror + call MPI_Group_excl( & + abi2mpi_group(group), & + n, & + ranks, & + newgroup, & + ierror & + ) + newgroup = mpi2abi_group(newgroup) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Group_excl + +subroutine MPIABI_Group_from_session_pset( & + session, & + pset_name, & + newgroup, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: session + character(*), intent(in) :: pset_name + integer, intent(out) :: newgroup + integer, intent(out) :: ierror + call MPI_Group_from_session_pset( & + abi2mpi_session(session), & + pset_name, & + newgroup, & + ierror & + ) + newgroup = mpi2abi_group(newgroup) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Group_from_session_pset + +subroutine MPIABI_Group_incl( & + group, & + n, & + ranks, & + newgroup, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: group + integer, intent(in) :: n + integer, intent(in) :: ranks(n) + integer, intent(out) :: newgroup + integer, intent(out) :: ierror + call MPI_Group_incl( & + abi2mpi_group(group), & + n, & + ranks, & + newgroup, & + ierror & + ) + newgroup = mpi2abi_group(newgroup) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Group_incl + +subroutine MPIABI_Group_intersection( & + group1, & + group2, & + newgroup, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: group1 + integer, intent(in) :: group2 + integer, intent(out) :: newgroup + integer, intent(out) :: ierror + call MPI_Group_intersection( & + abi2mpi_group(group1), & + abi2mpi_group(group2), & + newgroup, & + ierror & + ) + newgroup = mpi2abi_group(newgroup) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Group_intersection + +subroutine MPIABI_Group_range_excl( & + group, & + n, & + ranges, & + newgroup, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: group + integer, intent(in) :: n + integer, intent(in) :: ranges(n) + integer, intent(out) :: newgroup + integer, intent(out) :: ierror + call MPI_Group_range_excl( & + abi2mpi_group(group), & + n, & + ranges, & + newgroup, & + ierror & + ) + newgroup = mpi2abi_group(newgroup) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Group_range_excl + +subroutine MPIABI_Group_range_incl( & + group, & + n, & + ranges, & + newgroup, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: group + integer, intent(in) :: n + integer, intent(in) :: ranges(n) + integer, intent(out) :: newgroup + integer, intent(out) :: ierror + call MPI_Group_range_incl( & + abi2mpi_group(group), & + n, & + ranges, & + newgroup, & + ierror & + ) + newgroup = mpi2abi_group(newgroup) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Group_range_incl + +subroutine MPIABI_Group_rank( & + group, & + rank, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: group + integer, intent(out) :: rank + integer, intent(out) :: ierror + call MPI_Group_rank( & + abi2mpi_group(group), & + rank, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Group_rank + +subroutine MPIABI_Group_size( & + group, & + size, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: group + integer, intent(out) :: size + integer, intent(out) :: ierror + call MPI_Group_size( & + abi2mpi_group(group), & + size, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Group_size + +subroutine MPIABI_Group_translate_ranks( & + group1, & + n, & + ranks1, & + group2, & + ranks2, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: group1 + integer, intent(in) :: n + integer, intent(in) :: ranks1(n) + integer, intent(in) :: group2 + integer, intent(in) :: ranks2(n) + integer, intent(out) :: ierror + call MPI_Group_translate_ranks( & + abi2mpi_group(group1), & + n, & + ranks1, & + abi2mpi_group(group2), & + ranks2, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Group_translate_ranks + +subroutine MPIABI_Group_union( & + group1, & + group2, & + newgroup, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: group1 + integer, intent(in) :: group2 + integer, intent(out) :: newgroup + integer, intent(out) :: ierror + call MPI_Group_union( & + abi2mpi_group(group1), & + abi2mpi_group(group2), & + newgroup, & + ierror & + ) + newgroup = mpi2abi_group(newgroup) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Group_union + +subroutine MPIABI_Intercomm_create( & + local_comm, & + local_leader, & + peer_comm, & + remote_leader, & + tag, & + newintercomm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: local_comm + integer, intent(in) :: local_leader + integer, intent(in) :: peer_comm + integer, intent(in) :: remote_leader + integer, intent(in) :: tag + integer, intent(out) :: newintercomm + integer, intent(out) :: ierror + call MPI_Intercomm_create( & + abi2mpi_comm(local_comm), & + local_leader, & + abi2mpi_comm(peer_comm), & + remote_leader, & + tag, & + newintercomm, & + ierror & + ) + newintercomm = mpi2abi_comm(newintercomm) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Intercomm_create + +subroutine MPIABI_Intercomm_create_from_groups( & + local_group, & + local_leader, & + remote_group, & + remote_leader, & + stringtag, & + info, & + errhandler, & + newintercomm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: local_group + integer, intent(in) :: local_leader + integer, intent(in) :: remote_group + integer, intent(in) :: remote_leader + character(*), intent(in) :: stringtag + integer, intent(in) :: info + integer, intent(in) :: errhandler + integer, intent(out) :: newintercomm + integer, intent(out) :: ierror + call MPI_Intercomm_create_from_groups( & + abi2mpi_group(local_group), & + local_leader, & + abi2mpi_group(remote_group), & + remote_leader, & + stringtag, & + abi2mpi_info(info), & + abi2mpi_errhandler(errhandler), & + newintercomm, & + ierror & + ) + newintercomm = mpi2abi_comm(newintercomm) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Intercomm_create_from_groups + +subroutine MPIABI_Intercomm_merge( & + intercomm, & + high, & + newintracomm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: intercomm + integer, intent(in) :: high + integer, intent(out) :: newintracomm + integer, intent(out) :: ierror + call MPI_Intercomm_merge( & + abi2mpi_comm(intercomm), & + high, & + newintracomm, & + ierror & + ) + newintracomm = mpi2abi_comm(newintracomm) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Intercomm_merge + +subroutine MPIABI_Type_create_keyval( & + type_copy_attr_fn, & + type_delete_attr_fn, & + type_keyval, & + extra_state, & + ierror & +) + use mpiwrapper + implicit none + external :: type_copy_attr_fn + external :: type_delete_attr_fn + integer, intent(out) :: type_keyval + integer, intent(out) :: extra_state(*) + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER < 9999900 + write(0, '("The Fortran function MPI_Type_create_keyval is not available in MPItrampoline")') + call MPI_Abort(MPI_COMM_SELF, 1, ierror) + stop +#else + external :: wrap_type_copy_attr_fn + external :: wrap_type_delete_attr_fn + wrap_type_copy_attr_fn = abi2mpi_external(type_copy_attr_fn) + wrap_type_delete_attr_fn = abi2mpi_external(type_delete_attr_fn) + call MPI_Type_create_keyval( & + wrap_type_copy_attr_fn, & + wrap_type_delete_attr_fn, & + type_keyval, & + extra_state, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +#endif +end subroutine MPIABI_Type_create_keyval + +subroutine MPIABI_Type_delete_attr( & + datatype, & + type_keyval, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: datatype + integer, intent(in) :: type_keyval + integer, intent(out) :: ierror + call MPI_Type_delete_attr( & + abi2mpi_datatype(datatype), & + type_keyval, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_delete_attr + +subroutine MPIABI_Type_free_keyval( & + type_keyval, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: type_keyval + integer, intent(out) :: ierror + call MPI_Type_free_keyval( & + type_keyval, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_free_keyval + +subroutine MPIABI_Type_get_attr( & + datatype, & + type_keyval, & + attribute_val, & + flag, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: datatype + integer, intent(in) :: type_keyval + integer, intent(out) :: attribute_val(*) + logical, intent(out) :: flag + integer, intent(out) :: ierror + call MPI_Type_get_attr( & + abi2mpi_datatype(datatype), & + type_keyval, & + attribute_val, & + flag, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_get_attr + +subroutine MPIABI_Type_get_name( & + datatype, & + type_name, & + resultlen, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: datatype + character(*), intent(out) :: type_name + integer, intent(out) :: resultlen + integer, intent(out) :: ierror + call MPI_Type_get_name( & + abi2mpi_datatype(datatype), & + type_name, & + resultlen, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_get_name + +subroutine MPIABI_Type_set_attr( & + datatype, & + type_keyval, & + attribute_val, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: datatype + integer, intent(in) :: type_keyval + integer, intent(out) :: attribute_val(*) + integer, intent(out) :: ierror + call MPI_Type_set_attr( & + abi2mpi_datatype(datatype), & + type_keyval, & + attribute_val, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_set_attr + +subroutine MPIABI_Type_set_name( & + datatype, & + type_name, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: datatype + character(*), intent(in) :: type_name + integer, intent(out) :: ierror + call MPI_Type_set_name( & + abi2mpi_datatype(datatype), & + type_name, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_set_name + +subroutine MPIABI_Win_create_keyval( & + win_copy_attr_fn, & + win_delete_attr_fn, & + win_keyval, & + extra_state, & + ierror & +) + use mpiwrapper + implicit none + external :: win_copy_attr_fn + external :: win_delete_attr_fn + integer, intent(out) :: win_keyval + integer, intent(out) :: extra_state(*) + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER < 9999900 + write(0, '("The Fortran function MPI_Win_create_keyval is not available in MPItrampoline")') + call MPI_Abort(MPI_COMM_SELF, 1, ierror) + stop +#else + external :: wrap_win_copy_attr_fn + external :: wrap_win_delete_attr_fn + wrap_win_copy_attr_fn = abi2mpi_external(win_copy_attr_fn) + wrap_win_delete_attr_fn = abi2mpi_external(win_delete_attr_fn) + call MPI_Win_create_keyval( & + wrap_win_copy_attr_fn, & + wrap_win_delete_attr_fn, & + win_keyval, & + extra_state, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +#endif +end subroutine MPIABI_Win_create_keyval + +subroutine MPIABI_Win_delete_attr( & + win, & + win_keyval, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: win + integer, intent(in) :: win_keyval + integer, intent(out) :: ierror + call MPI_Win_delete_attr( & + abi2mpi_win(win), & + win_keyval, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Win_delete_attr + +subroutine MPIABI_Win_free_keyval( & + win_keyval, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: win_keyval + integer, intent(out) :: ierror + call MPI_Win_free_keyval( & + win_keyval, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Win_free_keyval + +subroutine MPIABI_Win_get_attr( & + win, & + win_keyval, & + attribute_val, & + flag, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: win + integer, intent(in) :: win_keyval + integer, intent(out) :: attribute_val(*) + logical, intent(out) :: flag + integer, intent(out) :: ierror + call MPI_Win_get_attr( & + abi2mpi_win(win), & + win_keyval, & + attribute_val, & + flag, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Win_get_attr + +subroutine MPIABI_Win_get_name( & + win, & + win_name, & + resultlen, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: win + character(*), intent(out) :: win_name + integer, intent(out) :: resultlen + integer, intent(out) :: ierror + call MPI_Win_get_name( & + abi2mpi_win(win), & + win_name, & + resultlen, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Win_get_name + +subroutine MPIABI_Win_set_attr( & + win, & + win_keyval, & + attribute_val, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: win + integer, intent(in) :: win_keyval + integer, intent(out) :: attribute_val(*) + integer, intent(out) :: ierror + call MPI_Win_set_attr( & + abi2mpi_win(win), & + win_keyval, & + attribute_val, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Win_set_attr + +subroutine MPIABI_Win_set_name( & + win, & + win_name, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: win + character(*), intent(in) :: win_name + integer, intent(out) :: ierror + call MPI_Win_set_name( & + abi2mpi_win(win), & + win_name, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Win_set_name + +subroutine MPIABI_Cart_coords( & + comm, & + rank, & + maxdims, & + coords, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(in) :: rank + integer, intent(in) :: maxdims + integer, intent(out) :: coords(maxdims) + integer, intent(out) :: ierror + call MPI_Cart_coords( & + abi2mpi_comm(comm), & + rank, & + maxdims, & + coords, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Cart_coords + +subroutine MPIABI_Cart_create( & + comm_old, & + ndims, & + dims, & + periods, & + reorder, & + comm_cart, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm_old + integer, intent(in) :: ndims + integer, intent(in) :: dims(ndims) + logical, intent(in) :: periods(ndims) + logical, intent(in) :: reorder + integer, intent(out) :: comm_cart + integer, intent(out) :: ierror + call MPI_Cart_create( & + abi2mpi_comm(comm_old), & + ndims, & + dims, & + periods, & + reorder, & + comm_cart, & + ierror & + ) + comm_cart = mpi2abi_comm(comm_cart) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Cart_create + +subroutine MPIABI_Cart_get( & + comm, & + maxdims, & + dims, & + periods, & + coords, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(in) :: maxdims + integer, intent(out) :: dims(maxdims) + integer, intent(out) :: periods(maxdims) + integer, intent(out) :: coords(maxdims) + integer, intent(out) :: ierror + call MPI_Cart_get( & + abi2mpi_comm(comm), & + maxdims, & + dims, & + periods, & + coords, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Cart_get + +subroutine MPIABI_Cart_map( & + comm, & + ndims, & + dims, & + periods, & + newrank, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(in) :: ndims + integer, intent(in) :: dims(ndims) + integer, intent(in) :: periods(ndims) + integer, intent(out) :: newrank + integer, intent(out) :: ierror + call MPI_Cart_map( & + abi2mpi_comm(comm), & + ndims, & + dims, & + periods, & + newrank, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Cart_map + +subroutine MPIABI_Cart_rank( & + comm, & + coords, & + rank, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(in) :: coords(*) + integer, intent(out) :: rank + integer, intent(out) :: ierror + call MPI_Cart_rank( & + abi2mpi_comm(comm), & + coords, & + rank, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Cart_rank + +subroutine MPIABI_Cart_shift( & + comm, & + direction, & + disp, & + rank_source, & + rank_dest, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(in) :: direction + integer, intent(in) :: disp + integer, intent(out) :: rank_source + integer, intent(out) :: rank_dest + integer, intent(out) :: ierror + call MPI_Cart_shift( & + abi2mpi_comm(comm), & + direction, & + disp, & + rank_source, & + rank_dest, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Cart_shift + +subroutine MPIABI_Cart_sub( & + comm, & + remain_dims, & + newcomm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + logical, intent(in) :: remain_dims(*) + integer, intent(out) :: newcomm + integer, intent(out) :: ierror + call MPI_Cart_sub( & + abi2mpi_comm(comm), & + remain_dims, & + newcomm, & + ierror & + ) + newcomm = mpi2abi_comm(newcomm) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Cart_sub + +subroutine MPIABI_Cartdim_get( & + comm, & + ndims, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(out) :: ndims + integer, intent(out) :: ierror + call MPI_Cartdim_get( & + abi2mpi_comm(comm), & + ndims, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Cartdim_get + +subroutine MPIABI_Dims_create( & + nnodes, & + ndims, & + dims, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: nnodes + integer, intent(in) :: ndims + integer, intent(in) :: dims(ndims) + integer, intent(out) :: ierror + call MPI_Dims_create( & + nnodes, & + ndims, & + dims, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Dims_create + +subroutine MPIABI_Dist_graph_create( & + comm_old, & + n, & + sources, & + degrees, & + destinations, & + weights, & + info, & + reorder, & + comm_dist_graph, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm_old + integer, intent(in) :: n + integer, intent(in) :: sources(n) + integer, intent(in) :: degrees(n) + integer, intent(in) :: destinations(*) + integer, intent(in) :: weights(*) + integer, intent(in) :: info + logical, intent(in) :: reorder + integer, intent(out) :: comm_dist_graph + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_weights + integer :: wrap_weights(*) + pointer(ptr_weights, wrap_weights) + ptr_weights = abi2mpi_weight_ptr(loc(weights)) + call MPI_Dist_graph_create( & + abi2mpi_comm(comm_old), & + n, & + sources, & + degrees, & + destinations, & + wrap_weights, & + abi2mpi_info(info), & + reorder, & + comm_dist_graph, & + ierror & + ) + comm_dist_graph = mpi2abi_comm(comm_dist_graph) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Dist_graph_create + +subroutine MPIABI_Dist_graph_create_adjacent( & + comm_old, & + indegree, & + sources, & + sourceweights, & + outdegree, & + destinations, & + destweights, & + info, & + reorder, & + comm_dist_graph, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm_old + integer, intent(in) :: indegree + integer, intent(in) :: sources(indegree) + integer, intent(in) :: sourceweights(*) + integer, intent(in) :: outdegree + integer, intent(in) :: destinations(outdegree) + integer, intent(in) :: destweights(*) + integer, intent(in) :: info + integer, intent(in) :: reorder + integer, intent(out) :: comm_dist_graph + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_sourceweights + integer :: wrap_sourceweights(*) + pointer(ptr_sourceweights, wrap_sourceweights) + integer(MPI_ADDRESS_KIND) :: ptr_destweights + integer :: wrap_destweights(*) + pointer(ptr_destweights, wrap_destweights) + ptr_sourceweights = abi2mpi_weight_ptr(loc(sourceweights)) + ptr_destweights = abi2mpi_weight_ptr(loc(destweights)) + call MPI_Dist_graph_create_adjacent( & + abi2mpi_comm(comm_old), & + indegree, & + sources, & + wrap_sourceweights, & + outdegree, & + destinations, & + wrap_destweights, & + abi2mpi_info(info), & + reorder, & + comm_dist_graph, & + ierror & + ) + comm_dist_graph = mpi2abi_comm(comm_dist_graph) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Dist_graph_create_adjacent + +subroutine MPIABI_Dist_graph_neighbors( & + comm, & + maxindegree, & + sources, & + sourceweights, & + maxoutdegree, & + destinations, & + destweights, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(in) :: maxindegree + integer, intent(out) :: sources(maxindegree) + integer, intent(out) :: sourceweights(*) + integer, intent(in) :: maxoutdegree + integer, intent(out) :: destinations(maxoutdegree) + integer, intent(out) :: destweights(*) + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_sourceweights + integer :: wrap_sourceweights(*) + pointer(ptr_sourceweights, wrap_sourceweights) + integer(MPI_ADDRESS_KIND) :: ptr_destweights + integer :: wrap_destweights(*) + pointer(ptr_destweights, wrap_destweights) + call MPI_Dist_graph_neighbors( & + abi2mpi_comm(comm), & + maxindegree, & + sources, & + wrap_sourceweights, & + maxoutdegree, & + destinations, & + wrap_destweights, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Dist_graph_neighbors + +subroutine MPIABI_Dist_graph_neighbors_count( & + comm, & + indegree, & + outdegree, & + weighted, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(out) :: indegree + integer, intent(out) :: outdegree + integer, intent(out) :: weighted + integer, intent(out) :: ierror + call MPI_Dist_graph_neighbors_count( & + abi2mpi_comm(comm), & + indegree, & + outdegree, & + weighted, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Dist_graph_neighbors_count + +subroutine MPIABI_Graph_create( & + comm_old, & + nnodes, & + index, & + edges, & + reorder, & + comm_graph, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm_old + integer, intent(in) :: nnodes + integer, intent(in) :: index(nnodes) + integer, intent(in) :: edges(nnodes) + integer, intent(in) :: reorder + integer, intent(out) :: comm_graph + integer, intent(out) :: ierror + call MPI_Graph_create( & + abi2mpi_comm(comm_old), & + nnodes, & + index, & + edges, & + reorder, & + comm_graph, & + ierror & + ) + comm_graph = mpi2abi_comm(comm_graph) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Graph_create + +subroutine MPIABI_Graph_get( & + comm, & + maxindex, & + maxedges, & + index, & + edges, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(in) :: maxindex + integer, intent(in) :: maxedges + integer, intent(out) :: index(maxindex) + integer, intent(out) :: edges(maxedges) + integer, intent(out) :: ierror + call MPI_Graph_get( & + abi2mpi_comm(comm), & + maxindex, & + maxedges, & + index, & + edges, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Graph_get + +subroutine MPIABI_Graph_map( & + comm, & + nnodes, & + index, & + edges, & + newrank, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(in) :: nnodes + integer, intent(in) :: index(nnodes) + integer, intent(in) :: edges(nnodes) + integer, intent(out) :: newrank + integer, intent(out) :: ierror + call MPI_Graph_map( & + abi2mpi_comm(comm), & + nnodes, & + index, & + edges, & + newrank, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Graph_map + +subroutine MPIABI_Graph_neighbors( & + comm, & + rank, & + maxneighbors, & + neighbors, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(in) :: rank + integer, intent(in) :: maxneighbors + integer, intent(out) :: neighbors(maxneighbors) + integer, intent(out) :: ierror + call MPI_Graph_neighbors( & + abi2mpi_comm(comm), & + rank, & + maxneighbors, & + neighbors, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Graph_neighbors + +subroutine MPIABI_Graph_neighbors_count( & + comm, & + rank, & + nneighbors, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(in) :: rank + integer, intent(out) :: nneighbors + integer, intent(out) :: ierror + call MPI_Graph_neighbors_count( & + abi2mpi_comm(comm), & + rank, & + nneighbors, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Graph_neighbors_count + +subroutine MPIABI_Graphdims_get( & + comm, & + nnodes, & + nedges, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(out) :: nnodes + integer, intent(out) :: nedges + integer, intent(out) :: ierror + call MPI_Graphdims_get( & + abi2mpi_comm(comm), & + nnodes, & + nedges, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Graphdims_get + +subroutine MPIABI_Ineighbor_allgather( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Ineighbor_allgather( & + sendbuf, & + sendcount, & + abi2mpi_datatype(sendtype), & + recvbuf, & + recvcount, & + abi2mpi_datatype(recvtype), & + abi2mpi_comm(comm), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Ineighbor_allgather + +subroutine MPIABI_Ineighbor_allgatherv( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcounts, & + displs, & + recvtype, & + comm, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: displs(*) + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Ineighbor_allgatherv( & + sendbuf, & + sendcount, & + abi2mpi_datatype(sendtype), & + recvbuf, & + recvcounts, & + displs, & + abi2mpi_datatype(recvtype), & + abi2mpi_comm(comm), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Ineighbor_allgatherv + +subroutine MPIABI_Ineighbor_alltoall( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Ineighbor_alltoall( & + sendbuf, & + sendcount, & + abi2mpi_datatype(sendtype), & + recvbuf, & + recvcount, & + abi2mpi_datatype(recvtype), & + abi2mpi_comm(comm), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Ineighbor_alltoall + +subroutine MPIABI_Ineighbor_alltoallv( & + sendbuf, & + sendcounts, & + sdispls, & + sendtype, & + recvbuf, & + recvcounts, & + rdispls, & + recvtype, & + comm, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + integer, intent(in) :: sendtype + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: rdispls(*) + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Ineighbor_alltoallv( & + sendbuf, & + sendcounts, & + sdispls, & + abi2mpi_datatype(sendtype), & + recvbuf, & + recvcounts, & + rdispls, & + abi2mpi_datatype(recvtype), & + abi2mpi_comm(comm), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Ineighbor_alltoallv + +subroutine MPIABI_Ineighbor_alltoallw( & + sendbuf, & + sendcounts, & + sdispls, & + sendtypes, & + recvbuf, & + recvcounts, & + rdispls, & + recvtypes, & + comm, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer(MPIABI_ADDRESS_KIND), intent(in) :: sdispls(*) + integer, intent(in) :: sendtypes(*) + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer(MPIABI_ADDRESS_KIND), intent(in) :: rdispls(*) + integer, intent(in) :: recvtypes(*) + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND), allocatable :: wrap_sdispls(:) + integer, allocatable :: wrap_sendtypes(:) + integer(MPI_ADDRESS_KIND), allocatable :: wrap_rdispls(:) + integer, allocatable :: wrap_recvtypes(:) + integer :: comm_size + integer :: i + call MPI_Comm_size(abi2mpi_comm(comm), comm_size, ierror) + if (ierror /= MPI_SUCCESS) then + ierror = mpi2abi_errorcode(ierror) + return + end if + allocate(wrap_sdispls(comm_size)) + allocate(wrap_sendtypes(comm_size)) + allocate(wrap_rdispls(comm_size)) + allocate(wrap_recvtypes(comm_size)) + do i = 1, comm_size + wrap_sdispls(i) = abi2mpi_address(sdispls(i)) + end do + do i = 1, comm_size + wrap_sendtypes(i) = abi2mpi_datatype(sendtypes(i)) + end do + do i = 1, comm_size + wrap_rdispls(i) = abi2mpi_address(rdispls(i)) + end do + do i = 1, comm_size + wrap_recvtypes(i) = abi2mpi_datatype(recvtypes(i)) + end do + call MPI_Ineighbor_alltoallw( & + sendbuf, & + sendcounts, & + wrap_sdispls, & + wrap_sendtypes, & + recvbuf, & + recvcounts, & + wrap_rdispls, & + wrap_recvtypes, & + abi2mpi_comm(comm), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) + deallocate(wrap_sdispls) + deallocate(wrap_sendtypes) + deallocate(wrap_rdispls) + deallocate(wrap_recvtypes) +end subroutine MPIABI_Ineighbor_alltoallw + +subroutine MPIABI_Neighbor_allgather( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(out) :: ierror + call MPI_Neighbor_allgather( & + sendbuf, & + sendcount, & + abi2mpi_datatype(sendtype), & + recvbuf, & + recvcount, & + abi2mpi_datatype(recvtype), & + abi2mpi_comm(comm), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Neighbor_allgather + +subroutine MPIABI_Neighbor_allgather_init( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + info, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Neighbor_allgather_init( & + sendbuf, & + sendcount, & + abi2mpi_datatype(sendtype), & + recvbuf, & + recvcount, & + abi2mpi_datatype(recvtype), & + abi2mpi_comm(comm), & + abi2mpi_info(info), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Neighbor_allgather_init + +subroutine MPIABI_Neighbor_allgatherv( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcounts, & + displs, & + recvtype, & + comm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer(MPIABI_ADDRESS_KIND), intent(in) :: displs(*) + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND), allocatable :: wrap_displs(:) + integer :: comm_size + integer :: i + call MPI_Comm_size(abi2mpi_comm(comm), comm_size, ierror) + if (ierror /= MPI_SUCCESS) then + ierror = mpi2abi_errorcode(ierror) + return + end if + allocate(wrap_displs(comm_size)) + do i = 1, comm_size + wrap_displs(i) = abi2mpi_address(displs(i)) + end do + call MPI_Neighbor_allgatherv( & + sendbuf, & + sendcount, & + abi2mpi_datatype(sendtype), & + recvbuf, & + recvcounts, & + wrap_displs, & + abi2mpi_datatype(recvtype), & + abi2mpi_comm(comm), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) + deallocate(wrap_displs) +end subroutine MPIABI_Neighbor_allgatherv + +subroutine MPIABI_Neighbor_allgatherv_init( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcounts, & + displs, & + recvtype, & + comm, & + info, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer(MPIABI_ADDRESS_KIND), intent(in) :: displs(*) + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND), allocatable :: wrap_displs(:) + integer :: comm_size + integer :: i + call MPI_Comm_size(abi2mpi_comm(comm), comm_size, ierror) + if (ierror /= MPI_SUCCESS) then + ierror = mpi2abi_errorcode(ierror) + return + end if + allocate(wrap_displs(comm_size)) + do i = 1, comm_size + wrap_displs(i) = abi2mpi_address(displs(i)) + end do + call MPI_Neighbor_allgatherv_init( & + sendbuf, & + sendcount, & + abi2mpi_datatype(sendtype), & + recvbuf, & + recvcounts, & + wrap_displs, & + abi2mpi_datatype(recvtype), & + abi2mpi_comm(comm), & + abi2mpi_info(info), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) + deallocate(wrap_displs) +end subroutine MPIABI_Neighbor_allgatherv_init + +subroutine MPIABI_Neighbor_alltoall( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(out) :: ierror + call MPI_Neighbor_alltoall( & + sendbuf, & + sendcount, & + abi2mpi_datatype(sendtype), & + recvbuf, & + recvcount, & + abi2mpi_datatype(recvtype), & + abi2mpi_comm(comm), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Neighbor_alltoall + +subroutine MPIABI_Neighbor_alltoall_init( & + sendbuf, & + sendcount, & + sendtype, & + recvbuf, & + recvcount, & + recvtype, & + comm, & + info, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Neighbor_alltoall_init( & + sendbuf, & + sendcount, & + abi2mpi_datatype(sendtype), & + recvbuf, & + recvcount, & + abi2mpi_datatype(recvtype), & + abi2mpi_comm(comm), & + abi2mpi_info(info), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Neighbor_alltoall_init + +subroutine MPIABI_Neighbor_alltoallv( & + sendbuf, & + sendcounts, & + sdispls, & + sendtype, & + recvbuf, & + recvcounts, & + rdispls, & + recvtype, & + comm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + integer, intent(in) :: sendtype + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: rdispls(*) + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(out) :: ierror + call MPI_Neighbor_alltoallv( & + sendbuf, & + sendcounts, & + sdispls, & + abi2mpi_datatype(sendtype), & + recvbuf, & + recvcounts, & + rdispls, & + abi2mpi_datatype(recvtype), & + abi2mpi_comm(comm), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Neighbor_alltoallv + +subroutine MPIABI_Neighbor_alltoallv_init( & + sendbuf, & + sendcounts, & + sdispls, & + sendtype, & + recvbuf, & + recvcounts, & + rdispls, & + recvtype, & + comm, & + info, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer, intent(in) :: sdispls(*) + integer, intent(in) :: sendtype + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer, intent(in) :: rdispls(*) + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Neighbor_alltoallv_init( & + sendbuf, & + sendcounts, & + sdispls, & + abi2mpi_datatype(sendtype), & + recvbuf, & + recvcounts, & + rdispls, & + abi2mpi_datatype(recvtype), & + abi2mpi_comm(comm), & + abi2mpi_info(info), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Neighbor_alltoallv_init + +subroutine MPIABI_Neighbor_alltoallw( & + sendbuf, & + sendcounts, & + sdispls, & + sendtypes, & + recvbuf, & + recvcounts, & + rdispls, & + recvtypes, & + comm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer(MPIABI_ADDRESS_KIND), intent(in) :: sdispls(*) + integer, intent(in) :: sendtypes(*) + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer(MPIABI_ADDRESS_KIND), intent(in) :: rdispls(*) + integer, intent(in) :: recvtypes(*) + integer, intent(in) :: comm + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND), allocatable :: wrap_sdispls(:) + integer, allocatable :: wrap_sendtypes(:) + integer(MPI_ADDRESS_KIND), allocatable :: wrap_rdispls(:) + integer, allocatable :: wrap_recvtypes(:) + integer :: comm_size + integer :: i + call MPI_Comm_size(abi2mpi_comm(comm), comm_size, ierror) + if (ierror /= MPI_SUCCESS) then + ierror = mpi2abi_errorcode(ierror) + return + end if + allocate(wrap_sdispls(comm_size)) + allocate(wrap_sendtypes(comm_size)) + allocate(wrap_rdispls(comm_size)) + allocate(wrap_recvtypes(comm_size)) + do i = 1, comm_size + wrap_sdispls(i) = abi2mpi_address(sdispls(i)) + end do + do i = 1, comm_size + wrap_sendtypes(i) = abi2mpi_datatype(sendtypes(i)) + end do + do i = 1, comm_size + wrap_rdispls(i) = abi2mpi_address(rdispls(i)) + end do + do i = 1, comm_size + wrap_recvtypes(i) = abi2mpi_datatype(recvtypes(i)) + end do + call MPI_Neighbor_alltoallw( & + sendbuf, & + sendcounts, & + wrap_sdispls, & + wrap_sendtypes, & + recvbuf, & + recvcounts, & + wrap_rdispls, & + wrap_recvtypes, & + abi2mpi_comm(comm), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) + deallocate(wrap_sdispls) + deallocate(wrap_sendtypes) + deallocate(wrap_rdispls) + deallocate(wrap_recvtypes) +end subroutine MPIABI_Neighbor_alltoallw + +subroutine MPIABI_Neighbor_alltoallw_init( & + sendbuf, & + sendcounts, & + sdispls, & + sendtypes, & + recvbuf, & + recvcounts, & + rdispls, & + recvtypes, & + comm, & + info, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcounts(*) + integer(MPIABI_ADDRESS_KIND), intent(in) :: sdispls(*) + integer, intent(in) :: sendtypes(*) + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcounts(*) + integer(MPIABI_ADDRESS_KIND), intent(in) :: rdispls(*) + integer, intent(in) :: recvtypes(*) + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND), allocatable :: wrap_sdispls(:) + integer, allocatable :: wrap_sendtypes(:) + integer(MPI_ADDRESS_KIND), allocatable :: wrap_rdispls(:) + integer, allocatable :: wrap_recvtypes(:) + integer :: comm_size + integer :: i + call MPI_Comm_size(abi2mpi_comm(comm), comm_size, ierror) + if (ierror /= MPI_SUCCESS) then + ierror = mpi2abi_errorcode(ierror) + return + end if + allocate(wrap_sdispls(comm_size)) + allocate(wrap_sendtypes(comm_size)) + allocate(wrap_rdispls(comm_size)) + allocate(wrap_recvtypes(comm_size)) + do i = 1, comm_size + wrap_sdispls(i) = abi2mpi_address(sdispls(i)) + end do + do i = 1, comm_size + wrap_sendtypes(i) = abi2mpi_datatype(sendtypes(i)) + end do + do i = 1, comm_size + wrap_rdispls(i) = abi2mpi_address(rdispls(i)) + end do + do i = 1, comm_size + wrap_recvtypes(i) = abi2mpi_datatype(recvtypes(i)) + end do + call MPI_Neighbor_alltoallw_init( & + sendbuf, & + sendcounts, & + wrap_sdispls, & + wrap_sendtypes, & + recvbuf, & + recvcounts, & + wrap_rdispls, & + wrap_recvtypes, & + abi2mpi_comm(comm), & + abi2mpi_info(info), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) + deallocate(wrap_sdispls) + deallocate(wrap_sendtypes) + deallocate(wrap_rdispls) + deallocate(wrap_recvtypes) +end subroutine MPIABI_Neighbor_alltoallw_init + +subroutine MPIABI_Topo_test( & + comm, & + status, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(out) :: status + integer, intent(out) :: ierror + call MPI_Topo_test( & + abi2mpi_comm(comm), & + status, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Topo_test + +subroutine MPIABI_Add_error_class( & + errorclass, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: errorclass + integer, intent(out) :: ierror + call MPI_Add_error_class( & + errorclass, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Add_error_class + +subroutine MPIABI_Add_error_code( & + errorclass, & + errorcode, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: errorclass + integer, intent(out) :: errorcode + integer, intent(out) :: ierror + call MPI_Add_error_code( & + errorclass, & + errorcode, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Add_error_code + +subroutine MPIABI_Add_error_string( & + errorcode, & + string, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: errorcode + character(*), intent(in) :: string + integer, intent(out) :: ierror + call MPI_Add_error_string( & + errorcode, & + string, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Add_error_string + +subroutine MPIABI_Alloc_mem( & + size, & + info, & + baseptr, & + ierror & +) + use mpiwrapper + implicit none + integer(MPIABI_ADDRESS_KIND), intent(in) :: size + integer, intent(in) :: info + integer, intent(out) :: baseptr(*) + integer, intent(out) :: ierror + call MPI_Alloc_mem( & + abi2mpi_address(size), & + abi2mpi_info(info), & + baseptr, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Alloc_mem + +subroutine MPIABI_Comm_call_errhandler( & + comm, & + errorcode, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(in) :: errorcode + integer, intent(out) :: ierror + call MPI_Comm_call_errhandler( & + abi2mpi_comm(comm), & + errorcode, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Comm_call_errhandler + +subroutine MPIABI_Comm_create_errhandler( & + comm_errhandler_fn, & + errhandler, & + ierror & +) + use mpiwrapper + implicit none + external :: comm_errhandler_fn + integer, intent(out) :: errhandler + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER < 9999900 + write(0, '("The Fortran function MPI_Comm_create_errhandler is not available in MPItrampoline")') + call MPI_Abort(MPI_COMM_SELF, 1, ierror) + stop +#else + external :: wrap_comm_errhandler_fn + wrap_comm_errhandler_fn = abi2mpi_external(comm_errhandler_fn) + call MPI_Comm_create_errhandler( & + wrap_comm_errhandler_fn, & + errhandler, & + ierror & + ) + errhandler = mpi2abi_errhandler(errhandler) + ierror = mpi2abi_errorcode(ierror) +#endif +end subroutine MPIABI_Comm_create_errhandler + +subroutine MPIABI_Comm_get_errhandler( & + comm, & + errhandler, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(out) :: errhandler + integer, intent(out) :: ierror + call MPI_Comm_get_errhandler( & + abi2mpi_comm(comm), & + errhandler, & + ierror & + ) + errhandler = mpi2abi_errhandler(errhandler) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Comm_get_errhandler + +subroutine MPIABI_Comm_set_errhandler( & + comm, & + errhandler, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(in) :: errhandler + integer, intent(out) :: ierror + call MPI_Comm_set_errhandler( & + abi2mpi_comm(comm), & + abi2mpi_errhandler(errhandler), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Comm_set_errhandler + +subroutine MPIABI_Errhandler_free( & + errhandler, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: errhandler + integer, intent(out) :: ierror + call MPI_Errhandler_free( & + errhandler, & + ierror & + ) + errhandler = mpi2abi_errhandler(errhandler) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Errhandler_free + +subroutine MPIABI_Error_class( & + errorcode, & + errorclass, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: errorcode + integer, intent(out) :: errorclass + integer, intent(out) :: ierror + call MPI_Error_class( & + errorcode, & + errorclass, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Error_class + +subroutine MPIABI_Error_string( & + errorcode, & + string, & + resultlen, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: errorcode + character(*), intent(out) :: string + integer, intent(out) :: resultlen + integer, intent(out) :: ierror + call MPI_Error_string( & + errorcode, & + string, & + resultlen, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Error_string + +subroutine MPIABI_File_call_errhandler( & + fh, & + errorcode, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer, intent(in) :: errorcode + integer, intent(out) :: ierror + call MPI_File_call_errhandler( & + abi2mpi_file(fh), & + errorcode, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_call_errhandler + +subroutine MPIABI_File_create_errhandler( & + file_errhandler_fn, & + errhandler, & + ierror & +) + use mpiwrapper + implicit none + external :: file_errhandler_fn + integer, intent(out) :: errhandler + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER < 9999900 + write(0, '("The Fortran function MPI_File_create_errhandler is not available in MPItrampoline")') + call MPI_Abort(MPI_COMM_SELF, 1, ierror) + stop +#else + external :: wrap_file_errhandler_fn + wrap_file_errhandler_fn = abi2mpi_external(file_errhandler_fn) + call MPI_File_create_errhandler( & + wrap_file_errhandler_fn, & + errhandler, & + ierror & + ) + errhandler = mpi2abi_errhandler(errhandler) + ierror = mpi2abi_errorcode(ierror) +#endif +end subroutine MPIABI_File_create_errhandler + +subroutine MPIABI_File_get_errhandler( & + file, & + errhandler, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: file + integer, intent(out) :: errhandler + integer, intent(out) :: ierror + call MPI_File_get_errhandler( & + abi2mpi_file(file), & + errhandler, & + ierror & + ) + errhandler = mpi2abi_errhandler(errhandler) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_get_errhandler + +subroutine MPIABI_File_set_errhandler( & + file, & + errhandler, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: file + integer, intent(in) :: errhandler + integer, intent(out) :: ierror + call MPI_File_set_errhandler( & + abi2mpi_file(file), & + abi2mpi_errhandler(errhandler), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_set_errhandler + +subroutine MPIABI_Free_mem( & + base, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: base(*) + integer, intent(out) :: ierror + call MPI_Free_mem( & + base, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Free_mem + +subroutine MPIABI_Get_hw_resource_info( & + hw_info, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: hw_info + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER < 401 + write(0, '("The Fortran function MPI_Get_hw_resource_info is not available in the wrapped MPI implementation")') + call MPI_Abort(MPI_COMM_SELF, 1, ierror) + stop +#else + call MPI_Get_hw_resource_info( & + hw_info, & + ierror & + ) + hw_info = mpi2abi_info(hw_info) + ierror = mpi2abi_errorcode(ierror) +#endif +end subroutine MPIABI_Get_hw_resource_info + +subroutine MPIABI_Get_library_version( & + version, & + resultlen, & + ierror & +) + use mpiwrapper + implicit none + character(*), intent(out) :: version + integer, intent(out) :: resultlen + integer, intent(out) :: ierror + call MPI_Get_library_version( & + version, & + resultlen, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Get_library_version + +subroutine MPIABI_Get_processor_name( & + name, & + resultlen, & + ierror & +) + use mpiwrapper + implicit none + character(*), intent(out) :: name + integer, intent(out) :: resultlen + integer, intent(out) :: ierror + call MPI_Get_processor_name( & + name, & + resultlen, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Get_processor_name + +subroutine MPIABI_Get_version( & + version, & + subversion, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: version + integer, intent(out) :: subversion + integer, intent(out) :: ierror + call MPI_Get_version( & + version, & + subversion, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Get_version + +subroutine MPIABI_Remove_error_class( & + errorclass, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: errorclass + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER < 401 + write(0, '("The Fortran function MPI_Remove_error_class is not available in the wrapped MPI implementation")') + call MPI_Abort(MPI_COMM_SELF, 1, ierror) + stop +#else + call MPI_Remove_error_class( & + errorclass, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +#endif +end subroutine MPIABI_Remove_error_class + +subroutine MPIABI_Remove_error_code( & + errorcode, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: errorcode + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER < 401 + write(0, '("The Fortran function MPI_Remove_error_code is not available in the wrapped MPI implementation")') + call MPI_Abort(MPI_COMM_SELF, 1, ierror) + stop +#else + call MPI_Remove_error_code( & + errorcode, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +#endif +end subroutine MPIABI_Remove_error_code + +subroutine MPIABI_Remove_error_string( & + errorcode, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: errorcode + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER < 401 + write(0, '("The Fortran function MPI_Remove_error_string is not available in the wrapped MPI implementation")') + call MPI_Abort(MPI_COMM_SELF, 1, ierror) + stop +#else + call MPI_Remove_error_string( & + errorcode, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +#endif +end subroutine MPIABI_Remove_error_string + +subroutine MPIABI_Session_call_errhandler( & + session, & + errorcode, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: session + integer, intent(in) :: errorcode + integer, intent(out) :: ierror + call MPI_Session_call_errhandler( & + abi2mpi_session(session), & + errorcode, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Session_call_errhandler + +subroutine MPIABI_Session_create_errhandler( & + session_errhandler_fn, & + errhandler, & + ierror & +) + use mpiwrapper + implicit none + external :: session_errhandler_fn + integer, intent(out) :: errhandler + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER < 9999900 + write(0, '("The Fortran function MPI_Session_create_errhandler is not available in MPItrampoline")') + call MPI_Abort(MPI_COMM_SELF, 1, ierror) + stop +#else + external :: wrap_session_errhandler_fn + wrap_session_errhandler_fn = abi2mpi_external(session_errhandler_fn) + call MPI_Session_create_errhandler( & + wrap_session_errhandler_fn, & + errhandler, & + ierror & + ) + errhandler = mpi2abi_errhandler(errhandler) + ierror = mpi2abi_errorcode(ierror) +#endif +end subroutine MPIABI_Session_create_errhandler + +subroutine MPIABI_Session_get_errhandler( & + session, & + errhandler, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: session + integer, intent(out) :: errhandler + integer, intent(out) :: ierror + call MPI_Session_get_errhandler( & + abi2mpi_session(session), & + errhandler, & + ierror & + ) + errhandler = mpi2abi_errhandler(errhandler) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Session_get_errhandler + +subroutine MPIABI_Session_set_errhandler( & + session, & + errhandler, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: session + integer, intent(in) :: errhandler + integer, intent(out) :: ierror + call MPI_Session_set_errhandler( & + abi2mpi_session(session), & + abi2mpi_errhandler(errhandler), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Session_set_errhandler + +subroutine MPIABI_Win_call_errhandler( & + win, & + errorcode, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: win + integer, intent(in) :: errorcode + integer, intent(out) :: ierror + call MPI_Win_call_errhandler( & + abi2mpi_win(win), & + errorcode, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Win_call_errhandler + +subroutine MPIABI_Win_create_errhandler( & + win_errhandler_fn, & + errhandler, & + ierror & +) + use mpiwrapper + implicit none + external :: win_errhandler_fn + integer, intent(out) :: errhandler + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER < 9999900 + write(0, '("The Fortran function MPI_Win_create_errhandler is not available in MPItrampoline")') + call MPI_Abort(MPI_COMM_SELF, 1, ierror) + stop +#else + external :: wrap_win_errhandler_fn + wrap_win_errhandler_fn = abi2mpi_external(win_errhandler_fn) + call MPI_Win_create_errhandler( & + wrap_win_errhandler_fn, & + errhandler, & + ierror & + ) + errhandler = mpi2abi_errhandler(errhandler) + ierror = mpi2abi_errorcode(ierror) +#endif +end subroutine MPIABI_Win_create_errhandler + +subroutine MPIABI_Win_get_errhandler( & + win, & + errhandler, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: win + integer, intent(out) :: errhandler + integer, intent(out) :: ierror + call MPI_Win_get_errhandler( & + abi2mpi_win(win), & + errhandler, & + ierror & + ) + errhandler = mpi2abi_errhandler(errhandler) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Win_get_errhandler + +subroutine MPIABI_Win_set_errhandler( & + win, & + errhandler, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: win + integer, intent(in) :: errhandler + integer, intent(out) :: ierror + call MPI_Win_set_errhandler( & + abi2mpi_win(win), & + abi2mpi_errhandler(errhandler), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Win_set_errhandler + +function MPIABI_Wtick( & +) result(result) + use mpiwrapper + implicit none + double precision :: result + result = MPI_Wtick( & + ) +end function MPIABI_Wtick + +function MPIABI_Wtime( & +) result(result) + use mpiwrapper + implicit none + double precision :: result + result = MPI_Wtime( & + ) +end function MPIABI_Wtime + +subroutine MPIABI_Info_create( & + info, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: info + integer, intent(out) :: ierror + call MPI_Info_create( & + info, & + ierror & + ) + info = mpi2abi_info(info) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Info_create + +subroutine MPIABI_Info_create_env( & + info, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: info + integer, intent(out) :: ierror + call MPI_Info_create_env( & + info, & + ierror & + ) + info = mpi2abi_info(info) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Info_create_env + +subroutine MPIABI_Info_delete( & + info, & + key, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: info + character(*), intent(in) :: key + integer, intent(out) :: ierror + call MPI_Info_delete( & + abi2mpi_info(info), & + key, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Info_delete + +subroutine MPIABI_Info_dup( & + info, & + newinfo, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: info + integer, intent(out) :: newinfo + integer, intent(out) :: ierror + call MPI_Info_dup( & + abi2mpi_info(info), & + newinfo, & + ierror & + ) + newinfo = mpi2abi_info(newinfo) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Info_dup + +subroutine MPIABI_Info_free( & + info, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: info + integer, intent(out) :: ierror + call MPI_Info_free( & + info, & + ierror & + ) + info = mpi2abi_info(info) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Info_free + +subroutine MPIABI_Info_get_nkeys( & + info, & + nkeys, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: info + integer, intent(out) :: nkeys + integer, intent(out) :: ierror + call MPI_Info_get_nkeys( & + abi2mpi_info(info), & + nkeys, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Info_get_nkeys + +subroutine MPIABI_Info_get_nthkey( & + info, & + n, & + key, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: info + integer, intent(in) :: n + character(*), intent(out) :: key + integer, intent(out) :: ierror + call MPI_Info_get_nthkey( & + abi2mpi_info(info), & + n, & + key, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Info_get_nthkey + +subroutine MPIABI_Info_get_string( & + info, & + key, & + buflen, & + value, & + flag, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: info + character(*), intent(in) :: key + integer, intent(out) :: buflen + character(*), intent(out) :: value + logical, intent(out) :: flag + integer, intent(out) :: ierror + call MPI_Info_get_string( & + abi2mpi_info(info), & + key, & + buflen, & + value, & + flag, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Info_get_string + +subroutine MPIABI_Info_set( & + info, & + key, & + value, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: info + character(*), intent(in) :: key + character(*), intent(in) :: value + integer, intent(out) :: ierror + call MPI_Info_set( & + abi2mpi_info(info), & + key, & + value, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Info_set + +subroutine MPIABI_Abort( & + comm, & + errorcode, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(in) :: errorcode + integer, intent(out) :: ierror + call MPI_Abort( & + abi2mpi_comm(comm), & + errorcode, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Abort + +subroutine MPIABI_Close_port( & + port_name, & + ierror & +) + use mpiwrapper + implicit none + character(*), intent(in) :: port_name + integer, intent(out) :: ierror + call MPI_Close_port( & + port_name, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Close_port + +subroutine MPIABI_Comm_accept( & + port_name, & + info, & + root, & + comm, & + newcomm, & + ierror & +) + use mpiwrapper + implicit none + character(*), intent(in) :: port_name + integer, intent(in) :: info + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(out) :: newcomm + integer, intent(out) :: ierror + call MPI_Comm_accept( & + port_name, & + abi2mpi_info(info), & + root, & + abi2mpi_comm(comm), & + newcomm, & + ierror & + ) + newcomm = mpi2abi_comm(newcomm) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Comm_accept + +subroutine MPIABI_Comm_connect( & + port_name, & + info, & + root, & + comm, & + newcomm, & + ierror & +) + use mpiwrapper + implicit none + character(*), intent(in) :: port_name + integer, intent(in) :: info + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(out) :: newcomm + integer, intent(out) :: ierror + call MPI_Comm_connect( & + port_name, & + abi2mpi_info(info), & + root, & + abi2mpi_comm(comm), & + newcomm, & + ierror & + ) + newcomm = mpi2abi_comm(newcomm) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Comm_connect + +subroutine MPIABI_Comm_disconnect( & + comm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: comm + integer, intent(out) :: ierror + call MPI_Comm_disconnect( & + comm, & + ierror & + ) + comm = mpi2abi_comm(comm) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Comm_disconnect + +subroutine MPIABI_Comm_get_parent( & + parent, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: parent + integer, intent(out) :: ierror + call MPI_Comm_get_parent( & + parent, & + ierror & + ) + parent = mpi2abi_comm(parent) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Comm_get_parent + +subroutine MPIABI_Comm_join( & + fd, & + intercomm, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fd + integer, intent(out) :: intercomm + integer, intent(out) :: ierror + call MPI_Comm_join( & + fd, & + intercomm, & + ierror & + ) + intercomm = mpi2abi_comm(intercomm) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Comm_join + +subroutine MPIABI_Comm_spawn( & + command, & + argv, & + maxprocs, & + info, & + root, & + comm, & + intercomm, & + array_of_errcodes, & + ierror & +) + use mpiwrapper + implicit none + character(*), intent(in) :: command + character(*), intent(in) :: argv(*) + integer, intent(in) :: maxprocs + integer, intent(in) :: info + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(out) :: intercomm + integer, intent(out) :: array_of_errcodes(maxprocs) + integer, intent(out) :: ierror + integer :: wrap_array_of_errcodes(maxprocs) + integer :: i + call MPI_Comm_spawn( & + command, & + argv, & + maxprocs, & + abi2mpi_info(info), & + root, & + abi2mpi_comm(comm), & + intercomm, & + wrap_array_of_errcodes, & + ierror & + ) + intercomm = mpi2abi_comm(intercomm) + do i = 1, maxprocs + array_of_errcodes(i) = mpi2abi_errorcode(wrap_array_of_errcodes(i)) + end do + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Comm_spawn + +subroutine MPIABI_Comm_spawn_multiple( & + count, & + array_of_commands, & + array_of_argv, & + array_of_maxprocs, & + array_of_info, & + root, & + comm, & + intercomm, & + array_of_errcodes, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: count + character(*), intent(in) :: array_of_commands(count) + character(*), intent(in) :: array_of_argv(count, *) + integer, intent(in) :: array_of_maxprocs(count) + integer, intent(in) :: array_of_info(count) + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(out) :: intercomm + integer, intent(out) :: array_of_errcodes(*) + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER < 9999900 + write(0, '("The Fortran function MPI_Comm_spawn_multiple is not available in MPItrampoline")') + call MPI_Abort(MPI_COMM_SELF, 1, ierror) + stop +#else + integer :: wrap_array_of_info(count) + integer :: wrap_array_of_errcodes(*) + integer :: i + do i = 1, count + wrap_array_of_info(i) = abi2mpi_info(array_of_info(i)) + end do + call MPI_Comm_spawn_multiple( & + count, & + array_of_commands, & + array_of_argv, & + array_of_maxprocs, & + wrap_array_of_info, & + root, & + abi2mpi_comm(comm), & + intercomm, & + wrap_array_of_errcodes, & + ierror & + ) + intercomm = mpi2abi_comm(intercomm) + do i = 1, * + array_of_errcodes(i) = mpi2abi_errorcode(wrap_array_of_errcodes(i)) + end do + ierror = mpi2abi_errorcode(ierror) +#endif +end subroutine MPIABI_Comm_spawn_multiple + +subroutine MPIABI_Finalize( & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: ierror + call MPI_Finalize( & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Finalize + +subroutine MPIABI_Finalized( & + flag, & + ierror & +) + use mpiwrapper + implicit none + logical, intent(out) :: flag + integer, intent(out) :: ierror + call MPI_Finalized( & + flag, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Finalized + +subroutine MPIABI_Init( & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: ierror + call MPI_Init( & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Init + +subroutine MPIABI_Init_thread( & + required, & + provided, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: required + integer, intent(out) :: provided + integer, intent(out) :: ierror + integer :: wrap_required + integer :: wrap_provided + wrap_required = abi2mpi_threadlevel(required) + call MPI_Init_thread( & + wrap_required, & + wrap_provided, & + ierror & + ) + provided = mpi2abi_threadlevel(wrap_provided) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Init_thread + +subroutine MPIABI_Initialized( & + flag, & + ierror & +) + use mpiwrapper + implicit none + logical, intent(out) :: flag + integer, intent(out) :: ierror + call MPI_Initialized( & + flag, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Initialized + +subroutine MPIABI_Is_thread_main( & + flag, & + ierror & +) + use mpiwrapper + implicit none + logical, intent(out) :: flag + integer, intent(out) :: ierror + call MPI_Is_thread_main( & + flag, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Is_thread_main + +subroutine MPIABI_Lookup_name( & + service_name, & + info, & + port_name, & + ierror & +) + use mpiwrapper + implicit none + character(*), intent(in) :: service_name + integer, intent(in) :: info + character(*), intent(out) :: port_name + integer, intent(out) :: ierror + call MPI_Lookup_name( & + service_name, & + abi2mpi_info(info), & + port_name, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Lookup_name + +subroutine MPIABI_Open_port( & + info, & + port_name, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: info + character(*), intent(out) :: port_name + integer, intent(out) :: ierror + call MPI_Open_port( & + abi2mpi_info(info), & + port_name, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Open_port + +subroutine MPIABI_Publish_name( & + service_name, & + info, & + port_name, & + ierror & +) + use mpiwrapper + implicit none + character(*), intent(in) :: service_name + integer, intent(in) :: info + character(*), intent(in) :: port_name + integer, intent(out) :: ierror + call MPI_Publish_name( & + service_name, & + abi2mpi_info(info), & + port_name, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Publish_name + +subroutine MPIABI_Query_thread( & + provided, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: provided + integer, intent(out) :: ierror + integer :: wrap_provided + call MPI_Query_thread( & + wrap_provided, & + ierror & + ) + provided = mpi2abi_threadlevel(wrap_provided) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Query_thread + +subroutine MPIABI_Session_finalize( & + session, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: session + integer, intent(out) :: ierror + call MPI_Session_finalize( & + session, & + ierror & + ) + session = mpi2abi_session(session) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Session_finalize + +subroutine MPIABI_Session_get_info( & + session, & + info_used, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: session + integer, intent(out) :: info_used + integer, intent(out) :: ierror + call MPI_Session_get_info( & + abi2mpi_session(session), & + info_used, & + ierror & + ) + info_used = mpi2abi_info(info_used) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Session_get_info + +subroutine MPIABI_Session_get_nth_pset( & + session, & + info, & + n, & + pset_len, & + pset_name, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: session + integer, intent(in) :: info + integer, intent(in) :: n + integer, intent(out) :: pset_len + character(*), intent(out) :: pset_name + integer, intent(out) :: ierror + call MPI_Session_get_nth_pset( & + abi2mpi_session(session), & + abi2mpi_info(info), & + n, & + pset_len, & + pset_name, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Session_get_nth_pset + +subroutine MPIABI_Session_get_num_psets( & + session, & + info, & + npset_names, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: session + integer, intent(in) :: info + integer, intent(out) :: npset_names + integer, intent(out) :: ierror + call MPI_Session_get_num_psets( & + abi2mpi_session(session), & + abi2mpi_info(info), & + npset_names, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Session_get_num_psets + +subroutine MPIABI_Session_get_pset_info( & + session, & + pset_name, & + info, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: session + character(*), intent(in) :: pset_name + integer, intent(out) :: info + integer, intent(out) :: ierror + call MPI_Session_get_pset_info( & + abi2mpi_session(session), & + pset_name, & + info, & + ierror & + ) + info = mpi2abi_info(info) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Session_get_pset_info + +subroutine MPIABI_Session_init( & + info, & + errhandler, & + session, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: info + integer, intent(in) :: errhandler + integer, intent(out) :: session + integer, intent(out) :: ierror + call MPI_Session_init( & + abi2mpi_info(info), & + abi2mpi_errhandler(errhandler), & + session, & + ierror & + ) + session = mpi2abi_session(session) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Session_init + +subroutine MPIABI_Unpublish_name( & + service_name, & + info, & + port_name, & + ierror & +) + use mpiwrapper + implicit none + character(*), intent(in) :: service_name + integer, intent(in) :: info + character(*), intent(in) :: port_name + integer, intent(out) :: ierror + call MPI_Unpublish_name( & + service_name, & + abi2mpi_info(info), & + port_name, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Unpublish_name + +subroutine MPIABI_Accumulate( & + origin_addr, & + origin_count, & + origin_datatype, & + target_rank, & + target_disp, & + target_count, & + target_datatype, & + op, & + win, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: origin_addr(*) + integer, intent(in) :: origin_count + integer, intent(in) :: origin_datatype + integer, intent(in) :: target_rank + integer(MPIABI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + integer, intent(in) :: target_datatype + integer, intent(in) :: op + integer, intent(in) :: win + integer, intent(out) :: ierror + call MPI_Accumulate( & + origin_addr, & + origin_count, & + abi2mpi_datatype(origin_datatype), & + target_rank, & + abi2mpi_address(target_disp), & + target_count, & + abi2mpi_datatype(target_datatype), & + abi2mpi_op(op), & + abi2mpi_win(win), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Accumulate + +subroutine MPIABI_Compare_and_swap( & + origin_addr, & + compare_addr, & + result_addr, & + datatype, & + target_rank, & + target_disp, & + win, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: origin_addr(*) + integer, intent(in) :: compare_addr(*) + integer, intent(out) :: result_addr(*) + integer, intent(in) :: datatype + integer, intent(in) :: target_rank + integer(MPIABI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: win + integer, intent(out) :: ierror + call MPI_Compare_and_swap( & + origin_addr, & + compare_addr, & + result_addr, & + abi2mpi_datatype(datatype), & + target_rank, & + abi2mpi_address(target_disp), & + abi2mpi_win(win), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Compare_and_swap + +subroutine MPIABI_Fetch_and_op( & + origin_addr, & + result_addr, & + datatype, & + target_rank, & + target_disp, & + op, & + win, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: origin_addr(*) + integer, intent(out) :: result_addr(*) + integer, intent(in) :: datatype + integer, intent(in) :: target_rank + integer(MPIABI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: op + integer, intent(in) :: win + integer, intent(out) :: ierror + call MPI_Fetch_and_op( & + origin_addr, & + result_addr, & + abi2mpi_datatype(datatype), & + target_rank, & + abi2mpi_address(target_disp), & + abi2mpi_op(op), & + abi2mpi_win(win), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Fetch_and_op + +subroutine MPIABI_Get( & + origin_addr, & + origin_count, & + origin_datatype, & + target_rank, & + target_disp, & + target_count, & + target_datatype, & + win, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: origin_addr(*) + integer, intent(in) :: origin_count + integer, intent(in) :: origin_datatype + integer, intent(in) :: target_rank + integer(MPIABI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + integer, intent(in) :: target_datatype + integer, intent(in) :: win + integer, intent(out) :: ierror + call MPI_Get( & + origin_addr, & + origin_count, & + abi2mpi_datatype(origin_datatype), & + target_rank, & + abi2mpi_address(target_disp), & + target_count, & + abi2mpi_datatype(target_datatype), & + abi2mpi_win(win), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Get + +subroutine MPIABI_Get_accumulate( & + origin_addr, & + origin_count, & + origin_datatype, & + result_addr, & + result_count, & + result_datatype, & + target_rank, & + target_disp, & + target_count, & + target_datatype, & + op, & + win, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: origin_addr(*) + integer, intent(in) :: origin_count + integer, intent(in) :: origin_datatype + integer, intent(out) :: result_addr(*) + integer, intent(in) :: result_count + integer, intent(in) :: result_datatype + integer, intent(in) :: target_rank + integer(MPIABI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + integer, intent(in) :: target_datatype + integer, intent(in) :: op + integer, intent(in) :: win + integer, intent(out) :: ierror + call MPI_Get_accumulate( & + origin_addr, & + origin_count, & + abi2mpi_datatype(origin_datatype), & + result_addr, & + result_count, & + abi2mpi_datatype(result_datatype), & + target_rank, & + abi2mpi_address(target_disp), & + target_count, & + abi2mpi_datatype(target_datatype), & + abi2mpi_op(op), & + abi2mpi_win(win), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Get_accumulate + +subroutine MPIABI_Put( & + origin_addr, & + origin_count, & + origin_datatype, & + target_rank, & + target_disp, & + target_count, & + target_datatype, & + win, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: origin_addr(*) + integer, intent(in) :: origin_count + integer, intent(in) :: origin_datatype + integer, intent(in) :: target_rank + integer(MPIABI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + integer, intent(in) :: target_datatype + integer, intent(in) :: win + integer, intent(out) :: ierror + call MPI_Put( & + origin_addr, & + origin_count, & + abi2mpi_datatype(origin_datatype), & + target_rank, & + abi2mpi_address(target_disp), & + target_count, & + abi2mpi_datatype(target_datatype), & + abi2mpi_win(win), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Put + +subroutine MPIABI_Raccumulate( & + origin_addr, & + origin_count, & + origin_datatype, & + target_rank, & + target_disp, & + target_count, & + target_datatype, & + op, & + win, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: origin_addr(*) + integer, intent(in) :: origin_count + integer, intent(in) :: origin_datatype + integer, intent(in) :: target_rank + integer(MPIABI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + integer, intent(in) :: target_datatype + integer, intent(in) :: op + integer, intent(in) :: win + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Raccumulate( & + origin_addr, & + origin_count, & + abi2mpi_datatype(origin_datatype), & + target_rank, & + abi2mpi_address(target_disp), & + target_count, & + abi2mpi_datatype(target_datatype), & + abi2mpi_op(op), & + abi2mpi_win(win), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Raccumulate + +subroutine MPIABI_Rget( & + origin_addr, & + origin_count, & + origin_datatype, & + target_rank, & + target_disp, & + target_count, & + target_datatype, & + win, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: origin_addr(*) + integer, intent(in) :: origin_count + integer, intent(in) :: origin_datatype + integer, intent(in) :: target_rank + integer(MPIABI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + integer, intent(in) :: target_datatype + integer, intent(in) :: win + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Rget( & + origin_addr, & + origin_count, & + abi2mpi_datatype(origin_datatype), & + target_rank, & + abi2mpi_address(target_disp), & + target_count, & + abi2mpi_datatype(target_datatype), & + abi2mpi_win(win), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Rget + +subroutine MPIABI_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, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: origin_addr(*) + integer, intent(in) :: origin_count + integer, intent(in) :: origin_datatype + integer, intent(out) :: result_addr(*) + integer, intent(in) :: result_count + integer, intent(in) :: result_datatype + integer, intent(in) :: target_rank + integer(MPIABI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + integer, intent(in) :: target_datatype + integer, intent(in) :: op + integer, intent(in) :: win + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Rget_accumulate( & + origin_addr, & + origin_count, & + abi2mpi_datatype(origin_datatype), & + result_addr, & + result_count, & + abi2mpi_datatype(result_datatype), & + target_rank, & + abi2mpi_address(target_disp), & + target_count, & + abi2mpi_datatype(target_datatype), & + abi2mpi_op(op), & + abi2mpi_win(win), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Rget_accumulate + +subroutine MPIABI_Rput( & + origin_addr, & + origin_count, & + origin_datatype, & + target_rank, & + target_disp, & + target_count, & + target_datatype, & + win, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: origin_addr(*) + integer, intent(in) :: origin_count + integer, intent(in) :: origin_datatype + integer, intent(in) :: target_rank + integer(MPIABI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + integer, intent(in) :: target_datatype + integer, intent(in) :: win + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_Rput( & + origin_addr, & + origin_count, & + abi2mpi_datatype(origin_datatype), & + target_rank, & + abi2mpi_address(target_disp), & + target_count, & + abi2mpi_datatype(target_datatype), & + abi2mpi_win(win), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Rput + +subroutine MPIABI_Win_allocate( & + size, & + disp_unit, & + info, & + comm, & + baseptr, & + win, & + ierror & +) + use mpiwrapper + implicit none + integer(MPIABI_ADDRESS_KIND), intent(in) :: size + integer, intent(in) :: disp_unit + integer, intent(in) :: info + integer, intent(in) :: comm + integer, intent(out) :: baseptr(*) + integer, intent(out) :: win + integer, intent(out) :: ierror + call MPI_Win_allocate( & + abi2mpi_address(size), & + disp_unit, & + abi2mpi_info(info), & + abi2mpi_comm(comm), & + baseptr, & + win, & + ierror & + ) + win = mpi2abi_win(win) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Win_allocate + +subroutine MPIABI_Win_allocate_shared( & + size, & + disp_unit, & + info, & + comm, & + baseptr, & + win, & + ierror & +) + use mpiwrapper + implicit none + integer(MPIABI_ADDRESS_KIND), intent(in) :: size + integer, intent(in) :: disp_unit + integer, intent(in) :: info + integer, intent(in) :: comm + integer, intent(out) :: baseptr(*) + integer, intent(out) :: win + integer, intent(out) :: ierror + call MPI_Win_allocate_shared( & + abi2mpi_address(size), & + disp_unit, & + abi2mpi_info(info), & + abi2mpi_comm(comm), & + baseptr, & + win, & + ierror & + ) + win = mpi2abi_win(win) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Win_allocate_shared + +subroutine MPIABI_Win_attach( & + win, & + base, & + size, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: win + integer, intent(out) :: base(*) + integer(MPIABI_ADDRESS_KIND), intent(in) :: size + integer, intent(out) :: ierror + call MPI_Win_attach( & + abi2mpi_win(win), & + base, & + abi2mpi_address(size), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Win_attach + +subroutine MPIABI_Win_complete( & + win, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: win + integer, intent(out) :: ierror + call MPI_Win_complete( & + abi2mpi_win(win), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Win_complete + +subroutine MPIABI_Win_create( & + base, & + size, & + disp_unit, & + info, & + comm, & + win, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: base(*) + integer(MPIABI_ADDRESS_KIND), intent(in) :: size + integer, intent(in) :: disp_unit + integer, intent(in) :: info + integer, intent(in) :: comm + integer, intent(out) :: win + integer, intent(out) :: ierror + call MPI_Win_create( & + base, & + abi2mpi_address(size), & + disp_unit, & + abi2mpi_info(info), & + abi2mpi_comm(comm), & + win, & + ierror & + ) + win = mpi2abi_win(win) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Win_create + +subroutine MPIABI_Win_create_dynamic( & + info, & + comm, & + win, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: info + integer, intent(in) :: comm + integer, intent(out) :: win + integer, intent(out) :: ierror + call MPI_Win_create_dynamic( & + abi2mpi_info(info), & + abi2mpi_comm(comm), & + win, & + ierror & + ) + win = mpi2abi_win(win) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Win_create_dynamic + +subroutine MPIABI_Win_detach( & + win, & + base, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: win + integer, intent(in) :: base(*) + integer, intent(out) :: ierror + call MPI_Win_detach( & + abi2mpi_win(win), & + base, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Win_detach + +subroutine MPIABI_Win_fence( & + assert, & + win, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: assert + integer, intent(in) :: win + integer, intent(out) :: ierror + call MPI_Win_fence( & + assert, & + abi2mpi_win(win), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Win_fence + +subroutine MPIABI_Win_flush( & + rank, & + win, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: rank + integer, intent(in) :: win + integer, intent(out) :: ierror + call MPI_Win_flush( & + rank, & + abi2mpi_win(win), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Win_flush + +subroutine MPIABI_Win_flush_all( & + win, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: win + integer, intent(out) :: ierror + call MPI_Win_flush_all( & + abi2mpi_win(win), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Win_flush_all + +subroutine MPIABI_Win_flush_local( & + rank, & + win, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: rank + integer, intent(in) :: win + integer, intent(out) :: ierror + call MPI_Win_flush_local( & + rank, & + abi2mpi_win(win), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Win_flush_local + +subroutine MPIABI_Win_flush_local_all( & + win, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: win + integer, intent(out) :: ierror + call MPI_Win_flush_local_all( & + abi2mpi_win(win), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Win_flush_local_all + +subroutine MPIABI_Win_free( & + win, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: win + integer, intent(out) :: ierror + call MPI_Win_free( & + win, & + ierror & + ) + win = mpi2abi_win(win) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Win_free + +subroutine MPIABI_Win_get_group( & + win, & + group, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: win + integer, intent(out) :: group + integer, intent(out) :: ierror + call MPI_Win_get_group( & + abi2mpi_win(win), & + group, & + ierror & + ) + group = mpi2abi_group(group) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Win_get_group + +subroutine MPIABI_Win_get_info( & + win, & + info_used, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: win + integer, intent(out) :: info_used + integer, intent(out) :: ierror + call MPI_Win_get_info( & + abi2mpi_win(win), & + info_used, & + ierror & + ) + info_used = mpi2abi_info(info_used) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Win_get_info + +subroutine MPIABI_Win_lock( & + lock_type, & + rank, & + assert, & + win, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: lock_type + integer, intent(in) :: rank + integer, intent(in) :: assert + integer, intent(in) :: win + integer, intent(out) :: ierror + call MPI_Win_lock( & + lock_type, & + rank, & + assert, & + abi2mpi_win(win), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Win_lock + +subroutine MPIABI_Win_lock_all( & + assert, & + win, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: assert + integer, intent(in) :: win + integer, intent(out) :: ierror + call MPI_Win_lock_all( & + assert, & + abi2mpi_win(win), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Win_lock_all + +subroutine MPIABI_Win_post( & + group, & + assert, & + win, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: group + integer, intent(in) :: assert + integer, intent(in) :: win + integer, intent(out) :: ierror + call MPI_Win_post( & + abi2mpi_group(group), & + assert, & + abi2mpi_win(win), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Win_post + +subroutine MPIABI_Win_set_info( & + win, & + info, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: win + integer, intent(in) :: info + integer, intent(out) :: ierror + call MPI_Win_set_info( & + abi2mpi_win(win), & + abi2mpi_info(info), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Win_set_info + +subroutine MPIABI_Win_shared_query( & + win, & + rank, & + size, & + disp_unit, & + baseptr, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: win + integer, intent(in) :: rank + integer(MPIABI_ADDRESS_KIND), intent(out) :: size + integer, intent(out) :: disp_unit + integer, intent(out) :: baseptr(*) + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: wrap_size + call MPI_Win_shared_query( & + abi2mpi_win(win), & + rank, & + wrap_size, & + disp_unit, & + baseptr, & + ierror & + ) + size = mpi2abi_address(wrap_size) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Win_shared_query + +subroutine MPIABI_Win_start( & + group, & + assert, & + win, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: group + integer, intent(in) :: assert + integer, intent(in) :: win + integer, intent(out) :: ierror + call MPI_Win_start( & + abi2mpi_group(group), & + assert, & + abi2mpi_win(win), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Win_start + +subroutine MPIABI_Win_sync( & + win, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: win + integer, intent(out) :: ierror + call MPI_Win_sync( & + abi2mpi_win(win), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Win_sync + +subroutine MPIABI_Win_test( & + win, & + flag, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: win + logical, intent(out) :: flag + integer, intent(out) :: ierror + call MPI_Win_test( & + abi2mpi_win(win), & + flag, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Win_test + +subroutine MPIABI_Win_unlock( & + rank, & + win, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: rank + integer, intent(in) :: win + integer, intent(out) :: ierror + call MPI_Win_unlock( & + rank, & + abi2mpi_win(win), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Win_unlock + +subroutine MPIABI_Win_unlock_all( & + win, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: win + integer, intent(out) :: ierror + call MPI_Win_unlock_all( & + abi2mpi_win(win), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Win_unlock_all + +subroutine MPIABI_Win_wait( & + win, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: win + integer, intent(out) :: ierror + call MPI_Win_wait( & + abi2mpi_win(win), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Win_wait + +subroutine MPIABI_Grequest_complete( & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: request + integer, intent(out) :: ierror + call MPI_Grequest_complete( & + abi2mpi_request(request), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Grequest_complete + +subroutine MPIABI_Grequest_start( & + query_fn, & + free_fn, & + cancel_fn, & + extra_state, & + request, & + ierror & +) + use mpiwrapper + implicit none + external :: query_fn + external :: free_fn + external :: cancel_fn + integer, intent(out) :: extra_state(*) + integer, intent(out) :: request + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER < 9999900 + write(0, '("The Fortran function MPI_Grequest_start is not available in MPItrampoline")') + call MPI_Abort(MPI_COMM_SELF, 1, ierror) + stop +#else + external :: wrap_query_fn + external :: wrap_free_fn + external :: wrap_cancel_fn + wrap_query_fn = abi2mpi_external(query_fn) + wrap_free_fn = abi2mpi_external(free_fn) + wrap_cancel_fn = abi2mpi_external(cancel_fn) + call MPI_Grequest_start( & + wrap_query_fn, & + wrap_free_fn, & + wrap_cancel_fn, & + extra_state, & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +#endif +end subroutine MPIABI_Grequest_start + +subroutine MPIABI_Status_set_cancelled( & + status, & + flag, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + logical, intent(in) :: flag + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + ptr_status = abi2mpi_status_ptr_uninitialized(status, tmp_status) + call MPI_Status_set_cancelled( & + wrap_status, & + flag, & + ierror & + ) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Status_set_cancelled + +subroutine MPIABI_Status_set_elements( & + status, & + datatype, & + count, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(in) :: datatype + integer, intent(in) :: count + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + ptr_status = abi2mpi_status_ptr_uninitialized(status, tmp_status) + call MPI_Status_set_elements( & + wrap_status, & + abi2mpi_datatype(datatype), & + count, & + ierror & + ) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Status_set_elements + +subroutine MPIABI_Status_set_error( & + status, & + err, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(in) :: err + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER < 401 + write(0, '("The Fortran function MPI_Status_set_error is not available in the wrapped MPI implementation")') + call MPI_Abort(MPI_COMM_SELF, 1, ierror) + stop +#else + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + ptr_status = abi2mpi_status_ptr_uninitialized(status, tmp_status) + call MPI_Status_set_error( & + wrap_status, & + err, & + ierror & + ) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +#endif +end subroutine MPIABI_Status_set_error + +subroutine MPIABI_Status_set_source( & + status, & + source, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(in) :: source + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER < 401 + write(0, '("The Fortran function MPI_Status_set_source is not available in the wrapped MPI implementation")') + call MPI_Abort(MPI_COMM_SELF, 1, ierror) + stop +#else + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + ptr_status = abi2mpi_status_ptr_uninitialized(status, tmp_status) + call MPI_Status_set_source( & + wrap_status, & + source, & + ierror & + ) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +#endif +end subroutine MPIABI_Status_set_source + +subroutine MPIABI_Status_set_tag( & + status, & + tag, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(in) :: tag + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER < 401 + write(0, '("The Fortran function MPI_Status_set_tag is not available in the wrapped MPI implementation")') + call MPI_Abort(MPI_COMM_SELF, 1, ierror) + stop +#else + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + ptr_status = abi2mpi_status_ptr_uninitialized(status, tmp_status) + call MPI_Status_set_tag( & + wrap_status, & + tag, & + ierror & + ) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +#endif +end subroutine MPIABI_Status_set_tag + +subroutine MPIABI_File_close( & + fh, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: fh + integer, intent(out) :: ierror + call MPI_File_close( & + fh, & + ierror & + ) + fh = mpi2abi_file(fh) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_close + +subroutine MPIABI_File_delete( & + filename, & + info, & + ierror & +) + use mpiwrapper + implicit none + character(*), intent(in) :: filename + integer, intent(in) :: info + integer, intent(out) :: ierror + call MPI_File_delete( & + filename, & + abi2mpi_info(info), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_delete + +subroutine MPIABI_File_get_amode( & + fh, & + amode, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer, intent(out) :: amode + integer, intent(out) :: ierror + call MPI_File_get_amode( & + abi2mpi_file(fh), & + amode, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_get_amode + +subroutine MPIABI_File_get_atomicity( & + fh, & + flag, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + logical, intent(out) :: flag + integer, intent(out) :: ierror + call MPI_File_get_atomicity( & + abi2mpi_file(fh), & + flag, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_get_atomicity + +subroutine MPIABI_File_get_byte_offset( & + fh, & + offset, & + disp, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer(MPIABI_OFFSET_KIND), intent(in) :: offset + integer(MPIABI_OFFSET_KIND), intent(out) :: disp + integer, intent(out) :: ierror + integer(MPI_OFFSET_KIND) :: wrap_disp + call MPI_File_get_byte_offset( & + abi2mpi_file(fh), & + abi2mpi_offset(offset), & + wrap_disp, & + ierror & + ) + disp = mpi2abi_offset(wrap_disp) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_get_byte_offset + +subroutine MPIABI_File_get_group( & + fh, & + group, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer, intent(out) :: group + integer, intent(out) :: ierror + call MPI_File_get_group( & + abi2mpi_file(fh), & + group, & + ierror & + ) + group = mpi2abi_group(group) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_get_group + +subroutine MPIABI_File_get_info( & + fh, & + info_used, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer, intent(out) :: info_used + integer, intent(out) :: ierror + call MPI_File_get_info( & + abi2mpi_file(fh), & + info_used, & + ierror & + ) + info_used = mpi2abi_info(info_used) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_get_info + +subroutine MPIABI_File_get_position( & + fh, & + offset, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer(MPIABI_OFFSET_KIND), intent(out) :: offset + integer, intent(out) :: ierror + integer(MPI_OFFSET_KIND) :: wrap_offset + call MPI_File_get_position( & + abi2mpi_file(fh), & + wrap_offset, & + ierror & + ) + offset = mpi2abi_offset(wrap_offset) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_get_position + +subroutine MPIABI_File_get_position_shared( & + fh, & + offset, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer(MPIABI_OFFSET_KIND), intent(out) :: offset + integer, intent(out) :: ierror + integer(MPI_OFFSET_KIND) :: wrap_offset + call MPI_File_get_position_shared( & + abi2mpi_file(fh), & + wrap_offset, & + ierror & + ) + offset = mpi2abi_offset(wrap_offset) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_get_position_shared + +subroutine MPIABI_File_get_size( & + fh, & + size, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer(MPIABI_OFFSET_KIND), intent(out) :: size + integer, intent(out) :: ierror + integer(MPI_OFFSET_KIND) :: wrap_size + call MPI_File_get_size( & + abi2mpi_file(fh), & + wrap_size, & + ierror & + ) + size = mpi2abi_offset(wrap_size) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_get_size + +subroutine MPIABI_File_get_type_extent( & + fh, & + datatype, & + extent, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer, intent(in) :: datatype + integer(MPIABI_ADDRESS_KIND), intent(out) :: extent + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: wrap_extent + call MPI_File_get_type_extent( & + abi2mpi_file(fh), & + abi2mpi_datatype(datatype), & + wrap_extent, & + ierror & + ) + extent = mpi2abi_address(wrap_extent) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_get_type_extent + +subroutine MPIABI_File_get_view( & + fh, & + disp, & + etype, & + filetype, & + datarep, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer(MPIABI_OFFSET_KIND), intent(out) :: disp + integer, intent(out) :: etype + integer, intent(out) :: filetype + character(*), intent(out) :: datarep + integer, intent(out) :: ierror + integer(MPI_OFFSET_KIND) :: wrap_disp + call MPI_File_get_view( & + abi2mpi_file(fh), & + wrap_disp, & + etype, & + filetype, & + datarep, & + ierror & + ) + disp = mpi2abi_offset(wrap_disp) + etype = mpi2abi_datatype(etype) + filetype = mpi2abi_datatype(filetype) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_get_view + +subroutine MPIABI_File_iread( & + fh, & + buf, & + count, & + datatype, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer, intent(out) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_File_iread( & + abi2mpi_file(fh), & + buf, & + count, & + abi2mpi_datatype(datatype), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_iread + +subroutine MPIABI_File_iread_all( & + fh, & + buf, & + count, & + datatype, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer, intent(out) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_File_iread_all( & + abi2mpi_file(fh), & + buf, & + count, & + abi2mpi_datatype(datatype), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_iread_all + +subroutine MPIABI_File_iread_at( & + fh, & + offset, & + buf, & + count, & + datatype, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer(MPIABI_OFFSET_KIND), intent(in) :: offset + integer, intent(out) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_File_iread_at( & + abi2mpi_file(fh), & + abi2mpi_offset(offset), & + buf, & + count, & + abi2mpi_datatype(datatype), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_iread_at + +subroutine MPIABI_File_iread_at_all( & + fh, & + offset, & + buf, & + count, & + datatype, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer(MPIABI_OFFSET_KIND), intent(in) :: offset + integer, intent(out) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_File_iread_at_all( & + abi2mpi_file(fh), & + abi2mpi_offset(offset), & + buf, & + count, & + abi2mpi_datatype(datatype), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_iread_at_all + +subroutine MPIABI_File_iread_shared( & + fh, & + buf, & + count, & + datatype, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer, intent(out) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_File_iread_shared( & + abi2mpi_file(fh), & + buf, & + count, & + abi2mpi_datatype(datatype), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_iread_shared + +subroutine MPIABI_File_iwrite( & + fh, & + buf, & + count, & + datatype, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_File_iwrite( & + abi2mpi_file(fh), & + buf, & + count, & + abi2mpi_datatype(datatype), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_iwrite + +subroutine MPIABI_File_iwrite_all( & + fh, & + buf, & + count, & + datatype, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_File_iwrite_all( & + abi2mpi_file(fh), & + buf, & + count, & + abi2mpi_datatype(datatype), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_iwrite_all + +subroutine MPIABI_File_iwrite_at( & + fh, & + offset, & + buf, & + count, & + datatype, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer(MPIABI_OFFSET_KIND), intent(in) :: offset + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_File_iwrite_at( & + abi2mpi_file(fh), & + abi2mpi_offset(offset), & + buf, & + count, & + abi2mpi_datatype(datatype), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_iwrite_at + +subroutine MPIABI_File_iwrite_at_all( & + fh, & + offset, & + buf, & + count, & + datatype, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer(MPIABI_OFFSET_KIND), intent(in) :: offset + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_File_iwrite_at_all( & + abi2mpi_file(fh), & + abi2mpi_offset(offset), & + buf, & + count, & + abi2mpi_datatype(datatype), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_iwrite_at_all + +subroutine MPIABI_File_iwrite_shared( & + fh, & + buf, & + count, & + datatype, & + request, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: request + integer, intent(out) :: ierror + call MPI_File_iwrite_shared( & + abi2mpi_file(fh), & + buf, & + count, & + abi2mpi_datatype(datatype), & + request, & + ierror & + ) + request = mpi2abi_request(request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_iwrite_shared + +subroutine MPIABI_File_open( & + comm, & + filename, & + amode, & + info, & + fh, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + character(*), intent(in) :: filename + integer, intent(in) :: amode + integer, intent(in) :: info + integer, intent(out) :: fh + integer, intent(out) :: ierror + call MPI_File_open( & + abi2mpi_comm(comm), & + filename, & + amode, & + abi2mpi_info(info), & + fh, & + ierror & + ) + fh = mpi2abi_file(fh) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_open + +subroutine MPIABI_File_preallocate( & + fh, & + size, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer(MPIABI_OFFSET_KIND), intent(in) :: size + integer, intent(out) :: ierror + call MPI_File_preallocate( & + abi2mpi_file(fh), & + abi2mpi_offset(size), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_preallocate + +subroutine MPIABI_File_read( & + fh, & + buf, & + count, & + datatype, & + status, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer, intent(out) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + ptr_status = abi2mpi_status_ptr_uninitialized(status, tmp_status) + call MPI_File_read( & + abi2mpi_file(fh), & + buf, & + count, & + abi2mpi_datatype(datatype), & + wrap_status, & + ierror & + ) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_read + +subroutine MPIABI_File_read_all( & + fh, & + buf, & + count, & + datatype, & + status, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer, intent(out) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + ptr_status = abi2mpi_status_ptr_uninitialized(status, tmp_status) + call MPI_File_read_all( & + abi2mpi_file(fh), & + buf, & + count, & + abi2mpi_datatype(datatype), & + wrap_status, & + ierror & + ) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_read_all + +subroutine MPIABI_File_read_all_begin( & + fh, & + buf, & + count, & + datatype, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer, intent(out) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: ierror + call MPI_File_read_all_begin( & + abi2mpi_file(fh), & + buf, & + count, & + abi2mpi_datatype(datatype), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_read_all_begin + +subroutine MPIABI_File_read_all_end( & + fh, & + buf, & + status, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer, intent(out) :: buf(*) + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + ptr_status = abi2mpi_status_ptr_uninitialized(status, tmp_status) + call MPI_File_read_all_end( & + abi2mpi_file(fh), & + buf, & + wrap_status, & + ierror & + ) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_read_all_end + +subroutine MPIABI_File_read_at( & + fh, & + offset, & + buf, & + count, & + datatype, & + status, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer(MPIABI_OFFSET_KIND), intent(in) :: offset + integer, intent(out) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + ptr_status = abi2mpi_status_ptr_uninitialized(status, tmp_status) + call MPI_File_read_at( & + abi2mpi_file(fh), & + abi2mpi_offset(offset), & + buf, & + count, & + abi2mpi_datatype(datatype), & + wrap_status, & + ierror & + ) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_read_at + +subroutine MPIABI_File_read_at_all( & + fh, & + offset, & + buf, & + count, & + datatype, & + status, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer(MPIABI_OFFSET_KIND), intent(in) :: offset + integer, intent(out) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + ptr_status = abi2mpi_status_ptr_uninitialized(status, tmp_status) + call MPI_File_read_at_all( & + abi2mpi_file(fh), & + abi2mpi_offset(offset), & + buf, & + count, & + abi2mpi_datatype(datatype), & + wrap_status, & + ierror & + ) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_read_at_all + +subroutine MPIABI_File_read_at_all_begin( & + fh, & + offset, & + buf, & + count, & + datatype, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer(MPIABI_OFFSET_KIND), intent(in) :: offset + integer, intent(out) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: ierror + call MPI_File_read_at_all_begin( & + abi2mpi_file(fh), & + abi2mpi_offset(offset), & + buf, & + count, & + abi2mpi_datatype(datatype), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_read_at_all_begin + +subroutine MPIABI_File_read_at_all_end( & + fh, & + buf, & + status, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer, intent(out) :: buf(*) + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + ptr_status = abi2mpi_status_ptr_uninitialized(status, tmp_status) + call MPI_File_read_at_all_end( & + abi2mpi_file(fh), & + buf, & + wrap_status, & + ierror & + ) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_read_at_all_end + +subroutine MPIABI_File_read_ordered( & + fh, & + buf, & + count, & + datatype, & + status, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer, intent(out) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + ptr_status = abi2mpi_status_ptr_uninitialized(status, tmp_status) + call MPI_File_read_ordered( & + abi2mpi_file(fh), & + buf, & + count, & + abi2mpi_datatype(datatype), & + wrap_status, & + ierror & + ) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_read_ordered + +subroutine MPIABI_File_read_ordered_begin( & + fh, & + buf, & + count, & + datatype, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer, intent(out) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: ierror + call MPI_File_read_ordered_begin( & + abi2mpi_file(fh), & + buf, & + count, & + abi2mpi_datatype(datatype), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_read_ordered_begin + +subroutine MPIABI_File_read_ordered_end( & + fh, & + buf, & + status, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer, intent(out) :: buf(*) + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + ptr_status = abi2mpi_status_ptr_uninitialized(status, tmp_status) + call MPI_File_read_ordered_end( & + abi2mpi_file(fh), & + buf, & + wrap_status, & + ierror & + ) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_read_ordered_end + +subroutine MPIABI_File_read_shared( & + fh, & + buf, & + count, & + datatype, & + status, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer, intent(out) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + ptr_status = abi2mpi_status_ptr_uninitialized(status, tmp_status) + call MPI_File_read_shared( & + abi2mpi_file(fh), & + buf, & + count, & + abi2mpi_datatype(datatype), & + wrap_status, & + ierror & + ) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_read_shared + +subroutine MPIABI_File_seek( & + fh, & + offset, & + whence, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer(MPIABI_OFFSET_KIND), intent(in) :: offset + integer, intent(in) :: whence + integer, intent(out) :: ierror + call MPI_File_seek( & + abi2mpi_file(fh), & + abi2mpi_offset(offset), & + whence, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_seek + +subroutine MPIABI_File_seek_shared( & + fh, & + offset, & + whence, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer(MPIABI_OFFSET_KIND), intent(in) :: offset + integer, intent(in) :: whence + integer, intent(out) :: ierror + call MPI_File_seek_shared( & + abi2mpi_file(fh), & + abi2mpi_offset(offset), & + whence, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_seek_shared + +subroutine MPIABI_File_set_atomicity( & + fh, & + flag, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + logical, intent(in) :: flag + integer, intent(out) :: ierror + call MPI_File_set_atomicity( & + abi2mpi_file(fh), & + flag, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_set_atomicity + +subroutine MPIABI_File_set_info( & + fh, & + info, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer, intent(in) :: info + integer, intent(out) :: ierror + call MPI_File_set_info( & + abi2mpi_file(fh), & + abi2mpi_info(info), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_set_info + +subroutine MPIABI_File_set_size( & + fh, & + size, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer(MPIABI_OFFSET_KIND), intent(in) :: size + integer, intent(out) :: ierror + call MPI_File_set_size( & + abi2mpi_file(fh), & + abi2mpi_offset(size), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_set_size + +subroutine MPIABI_File_set_view( & + fh, & + disp, & + etype, & + filetype, & + datarep, & + info, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer(MPIABI_OFFSET_KIND), intent(in) :: disp + integer, intent(in) :: etype + integer, intent(in) :: filetype + character(*), intent(in) :: datarep + integer, intent(in) :: info + integer, intent(out) :: ierror + call MPI_File_set_view( & + abi2mpi_file(fh), & + abi2mpi_offset(disp), & + abi2mpi_datatype(etype), & + abi2mpi_datatype(filetype), & + datarep, & + abi2mpi_info(info), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_set_view + +subroutine MPIABI_File_sync( & + fh, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer, intent(out) :: ierror + call MPI_File_sync( & + abi2mpi_file(fh), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_sync + +subroutine MPIABI_File_write( & + fh, & + buf, & + count, & + datatype, & + status, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + ptr_status = abi2mpi_status_ptr_uninitialized(status, tmp_status) + call MPI_File_write( & + abi2mpi_file(fh), & + buf, & + count, & + abi2mpi_datatype(datatype), & + wrap_status, & + ierror & + ) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_write + +subroutine MPIABI_File_write_all( & + fh, & + buf, & + count, & + datatype, & + status, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + ptr_status = abi2mpi_status_ptr_uninitialized(status, tmp_status) + call MPI_File_write_all( & + abi2mpi_file(fh), & + buf, & + count, & + abi2mpi_datatype(datatype), & + wrap_status, & + ierror & + ) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_write_all + +subroutine MPIABI_File_write_all_begin( & + fh, & + buf, & + count, & + datatype, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: ierror + call MPI_File_write_all_begin( & + abi2mpi_file(fh), & + buf, & + count, & + abi2mpi_datatype(datatype), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_write_all_begin + +subroutine MPIABI_File_write_all_end( & + fh, & + buf, & + status, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer, intent(in) :: buf(*) + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + ptr_status = abi2mpi_status_ptr_uninitialized(status, tmp_status) + call MPI_File_write_all_end( & + abi2mpi_file(fh), & + buf, & + wrap_status, & + ierror & + ) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_write_all_end + +subroutine MPIABI_File_write_at( & + fh, & + offset, & + buf, & + count, & + datatype, & + status, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer(MPIABI_OFFSET_KIND), intent(in) :: offset + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + ptr_status = abi2mpi_status_ptr_uninitialized(status, tmp_status) + call MPI_File_write_at( & + abi2mpi_file(fh), & + abi2mpi_offset(offset), & + buf, & + count, & + abi2mpi_datatype(datatype), & + wrap_status, & + ierror & + ) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_write_at + +subroutine MPIABI_File_write_at_all( & + fh, & + offset, & + buf, & + count, & + datatype, & + status, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer(MPIABI_OFFSET_KIND), intent(in) :: offset + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + ptr_status = abi2mpi_status_ptr_uninitialized(status, tmp_status) + call MPI_File_write_at_all( & + abi2mpi_file(fh), & + abi2mpi_offset(offset), & + buf, & + count, & + abi2mpi_datatype(datatype), & + wrap_status, & + ierror & + ) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_write_at_all + +subroutine MPIABI_File_write_at_all_begin( & + fh, & + offset, & + buf, & + count, & + datatype, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer(MPIABI_OFFSET_KIND), intent(in) :: offset + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: ierror + call MPI_File_write_at_all_begin( & + abi2mpi_file(fh), & + abi2mpi_offset(offset), & + buf, & + count, & + abi2mpi_datatype(datatype), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_write_at_all_begin + +subroutine MPIABI_File_write_at_all_end( & + fh, & + buf, & + status, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer, intent(in) :: buf(*) + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + ptr_status = abi2mpi_status_ptr_uninitialized(status, tmp_status) + call MPI_File_write_at_all_end( & + abi2mpi_file(fh), & + buf, & + wrap_status, & + ierror & + ) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_write_at_all_end + +subroutine MPIABI_File_write_ordered( & + fh, & + buf, & + count, & + datatype, & + status, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + ptr_status = abi2mpi_status_ptr_uninitialized(status, tmp_status) + call MPI_File_write_ordered( & + abi2mpi_file(fh), & + buf, & + count, & + abi2mpi_datatype(datatype), & + wrap_status, & + ierror & + ) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_write_ordered + +subroutine MPIABI_File_write_ordered_begin( & + fh, & + buf, & + count, & + datatype, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: ierror + call MPI_File_write_ordered_begin( & + abi2mpi_file(fh), & + buf, & + count, & + abi2mpi_datatype(datatype), & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_write_ordered_begin + +subroutine MPIABI_File_write_ordered_end( & + fh, & + buf, & + status, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer, intent(in) :: buf(*) + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + ptr_status = abi2mpi_status_ptr_uninitialized(status, tmp_status) + call MPI_File_write_ordered_end( & + abi2mpi_file(fh), & + buf, & + wrap_status, & + ierror & + ) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_write_ordered_end + +subroutine MPIABI_File_write_shared( & + fh, & + buf, & + count, & + datatype, & + status, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: fh + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + ptr_status = abi2mpi_status_ptr_uninitialized(status, tmp_status) + call MPI_File_write_shared( & + abi2mpi_file(fh), & + buf, & + count, & + abi2mpi_datatype(datatype), & + wrap_status, & + ierror & + ) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_write_shared + +subroutine MPIABI_Register_datarep( & + datarep, & + read_conversion_fn, & + write_conversion_fn, & + dtype_file_extent_fn, & + extra_state, & + ierror & +) + use mpiwrapper + implicit none + character(*), intent(in) :: datarep + external :: read_conversion_fn + external :: write_conversion_fn + external :: dtype_file_extent_fn + integer, intent(out) :: extra_state(*) + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER < 9999900 + write(0, '("The Fortran function MPI_Register_datarep is not available in MPItrampoline")') + call MPI_Abort(MPI_COMM_SELF, 1, ierror) + stop +#else + external :: wrap_read_conversion_fn + external :: wrap_write_conversion_fn + external :: wrap_dtype_file_extent_fn + wrap_read_conversion_fn = abi2mpi_external(read_conversion_fn) + wrap_write_conversion_fn = abi2mpi_external(write_conversion_fn) + wrap_dtype_file_extent_fn = abi2mpi_external(dtype_file_extent_fn) + call MPI_Register_datarep( & + datarep, & + wrap_read_conversion_fn, & + wrap_write_conversion_fn, & + wrap_dtype_file_extent_fn, & + extra_state, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +#endif +end subroutine MPIABI_Register_datarep + +subroutine MPIABI_F_sync_reg( & + buf & +) + use mpiwrapper + implicit none + integer, intent(out) :: buf(*) + call MPI_F_sync_reg( & + buf & + ) +end subroutine MPIABI_F_sync_reg + +subroutine MPIABI_Type_create_f90_complex( & + p, & + r, & + newtype, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: p + integer, intent(in) :: r + integer, intent(out) :: newtype + integer, intent(out) :: ierror + call MPI_Type_create_f90_complex( & + p, & + r, & + newtype, & + ierror & + ) + newtype = mpi2abi_datatype(newtype) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_create_f90_complex + +subroutine MPIABI_Type_create_f90_integer( & + r, & + newtype, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: r + integer, intent(out) :: newtype + integer, intent(out) :: ierror + call MPI_Type_create_f90_integer( & + r, & + newtype, & + ierror & + ) + newtype = mpi2abi_datatype(newtype) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_create_f90_integer + +subroutine MPIABI_Type_create_f90_real( & + p, & + r, & + newtype, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: p + integer, intent(in) :: r + integer, intent(out) :: newtype + integer, intent(out) :: ierror + call MPI_Type_create_f90_real( & + p, & + r, & + newtype, & + ierror & + ) + newtype = mpi2abi_datatype(newtype) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_create_f90_real + +subroutine MPIABI_Type_match_size( & + typeclass, & + size, & + newtype, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: typeclass + integer, intent(in) :: size + integer, intent(out) :: newtype + integer, intent(out) :: ierror + call MPI_Type_match_size( & + typeclass, & + size, & + newtype, & + ierror & + ) + newtype = mpi2abi_datatype(newtype) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_match_size + +subroutine MPIABI_Pcontrol( & + level & +) + use mpiwrapper + implicit none + integer, intent(in) :: level + call MPI_Pcontrol( & + level & + ) +end subroutine MPIABI_Pcontrol + +subroutine MPIABI_Attr_delete( & + comm, & + keyval, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(in) :: keyval + integer, intent(out) :: ierror + call MPI_Attr_delete( & + abi2mpi_comm(comm), & + keyval, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Attr_delete + +subroutine MPIABI_Attr_get( & + comm, & + keyval, & + attribute_val, & + flag, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(in) :: keyval + integer, intent(out) :: attribute_val(*) + logical, intent(out) :: flag + integer, intent(out) :: ierror + call MPI_Attr_get( & + abi2mpi_comm(comm), & + keyval, & + attribute_val, & + flag, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Attr_get + +subroutine MPIABI_Attr_put( & + comm, & + keyval, & + attribute_val, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(in) :: keyval + integer, intent(out) :: attribute_val(*) + integer, intent(out) :: ierror + call MPI_Attr_put( & + abi2mpi_comm(comm), & + keyval, & + attribute_val, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Attr_put + +subroutine MPIABI_Get_elements_x( & + status, & + datatype, & + count, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: status(MPIABI_STATUS_SIZE) + integer, intent(in) :: datatype + integer(MPIABI_COUNT_KIND), intent(out) :: count + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + integer(MPI_COUNT_KIND) :: wrap_count + ptr_status = abi2mpi_status_ptr(status, tmp_status) + call MPI_Get_elements_x( & + wrap_status, & + abi2mpi_datatype(datatype), & + wrap_count, & + ierror & + ) + count = mpi2abi_count(wrap_count) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Get_elements_x + +subroutine MPIABI_Info_get( & + info, & + key, & + valuelen, & + value, & + flag, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: info + character(*), intent(in) :: key + integer, intent(in) :: valuelen + character(*), intent(out) :: value + logical, intent(out) :: flag + integer, intent(out) :: ierror + call MPI_Info_get( & + abi2mpi_info(info), & + key, & + valuelen, & + value, & + flag, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Info_get + +subroutine MPIABI_Info_get_valuelen( & + info, & + key, & + valuelen, & + flag, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: info + character(*), intent(in) :: key + integer, intent(out) :: valuelen + logical, intent(out) :: flag + integer, intent(out) :: ierror + call MPI_Info_get_valuelen( & + abi2mpi_info(info), & + key, & + valuelen, & + flag, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Info_get_valuelen + +subroutine MPIABI_Keyval_create( & + copy_fn, & + delete_fn, & + keyval, & + extra_state, & + ierror & +) + use mpiwrapper + implicit none + external :: copy_fn + external :: delete_fn + integer, intent(out) :: keyval + integer, intent(out) :: extra_state(*) + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER < 9999900 + write(0, '("The Fortran function MPI_Keyval_create is not available in MPItrampoline")') + call MPI_Abort(MPI_COMM_SELF, 1, ierror) + stop +#else + external :: wrap_copy_fn + external :: wrap_delete_fn + wrap_copy_fn = abi2mpi_external(copy_fn) + wrap_delete_fn = abi2mpi_external(delete_fn) + call MPI_Keyval_create( & + wrap_copy_fn, & + wrap_delete_fn, & + keyval, & + extra_state, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +#endif +end subroutine MPIABI_Keyval_create + +subroutine MPIABI_Keyval_free( & + keyval, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: keyval + integer, intent(out) :: ierror + call MPI_Keyval_free( & + keyval, & + ierror & + ) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Keyval_free + +subroutine MPIABI_Status_set_elements_x( & + status, & + datatype, & + count, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(in) :: datatype + integer(MPIABI_COUNT_KIND), intent(in) :: count + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: ptr_status + integer :: wrap_status(MPI_STATUS_SIZE) + pointer(ptr_status, wrap_status) + integer :: tmp_status(MPI_STATUS_SIZE) + ptr_status = abi2mpi_status_ptr_uninitialized(status, tmp_status) + call MPI_Status_set_elements_x( & + wrap_status, & + abi2mpi_datatype(datatype), & + abi2mpi_count(count), & + ierror & + ) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Status_set_elements_x + +subroutine MPIABI_Type_get_extent_x( & + datatype, & + lb, & + extent, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: datatype + integer(MPIABI_COUNT_KIND), intent(out) :: lb + integer(MPIABI_COUNT_KIND), intent(out) :: extent + integer, intent(out) :: ierror + integer(MPI_COUNT_KIND) :: wrap_lb + integer(MPI_COUNT_KIND) :: wrap_extent + call MPI_Type_get_extent_x( & + abi2mpi_datatype(datatype), & + wrap_lb, & + wrap_extent, & + ierror & + ) + lb = mpi2abi_count(wrap_lb) + extent = mpi2abi_count(wrap_extent) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_get_extent_x + +subroutine MPIABI_Type_get_true_extent_x( & + datatype, & + true_lb, & + true_extent, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: datatype + integer(MPIABI_COUNT_KIND), intent(out) :: true_lb + integer(MPIABI_COUNT_KIND), intent(out) :: true_extent + integer, intent(out) :: ierror + integer(MPI_COUNT_KIND) :: wrap_true_lb + integer(MPI_COUNT_KIND) :: wrap_true_extent + call MPI_Type_get_true_extent_x( & + abi2mpi_datatype(datatype), & + wrap_true_lb, & + wrap_true_extent, & + ierror & + ) + true_lb = mpi2abi_count(wrap_true_lb) + true_extent = mpi2abi_count(wrap_true_extent) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_get_true_extent_x + +subroutine MPIABI_Type_size_x( & + datatype, & + size, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: datatype + integer(MPIABI_COUNT_KIND), intent(out) :: size + integer, intent(out) :: ierror + integer(MPI_COUNT_KIND) :: wrap_size + call MPI_Type_size_x( & + abi2mpi_datatype(datatype), & + wrap_size, & + ierror & + ) + size = mpi2abi_count(wrap_size) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_size_x + +subroutine MPIABI_Address( & + location, & + address, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(out) :: location(*) + integer(MPIABI_ADDRESS_KIND), intent(out) :: address + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: wrap_address + call MPI_Address( & + location, & + wrap_address, & + ierror & + ) + address = mpi2abi_address(wrap_address) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Address + +subroutine MPIABI_Type_hindexed( & + count, & + array_of_blocklengths, & + array_of_displacements, & + oldtype, & + newtype, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: count + integer, intent(out) :: array_of_blocklengths + integer(MPIABI_ADDRESS_KIND), intent(out) :: array_of_displacements + integer, intent(in) :: oldtype + integer, intent(out) :: newtype + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: wrap_array_of_displacements + call MPI_Type_hindexed( & + count, & + array_of_blocklengths, & + wrap_array_of_displacements, & + abi2mpi_datatype(oldtype), & + newtype, & + ierror & + ) + array_of_displacements = mpi2abi_address(wrap_array_of_displacements) + newtype = mpi2abi_datatype(newtype) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_hindexed + +subroutine MPIABI_Type_hvector( & + count, & + blocklength, & + stride, & + oldtype, & + newtype, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: count + integer, intent(in) :: blocklength + integer(MPIABI_ADDRESS_KIND), intent(in) :: stride + integer, intent(in) :: oldtype + integer, intent(out) :: newtype + integer, intent(out) :: ierror + call MPI_Type_hvector( & + count, & + blocklength, & + abi2mpi_address(stride), & + abi2mpi_datatype(oldtype), & + newtype, & + ierror & + ) + newtype = mpi2abi_datatype(newtype) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_hvector + +subroutine MPIABI_Type_struct( & + count, & + array_of_blocklengths, & + array_of_displacements, & + array_of_types, & + newtype, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: count + integer, intent(out) :: array_of_blocklengths + integer(MPIABI_ADDRESS_KIND), intent(out) :: array_of_displacements + integer, intent(out) :: array_of_types + integer, intent(out) :: newtype + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: wrap_array_of_displacements + call MPI_Type_struct( & + count, & + array_of_blocklengths, & + wrap_array_of_displacements, & + array_of_types, & + newtype, & + ierror & + ) + array_of_displacements = mpi2abi_address(wrap_array_of_displacements) + array_of_types = mpi2abi_datatype(array_of_types) + newtype = mpi2abi_datatype(newtype) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_struct + +subroutine MPIABI_Type_extent( & + datatype, & + extent, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: datatype + integer(MPIABI_ADDRESS_KIND), intent(out) :: extent + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: wrap_extent + call MPI_Type_extent( & + abi2mpi_datatype(datatype), & + wrap_extent, & + ierror & + ) + extent = mpi2abi_address(wrap_extent) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_extent + +subroutine MPIABI_Type_lb( & + datatype, & + displacement, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: datatype + integer(MPIABI_ADDRESS_KIND), intent(out) :: displacement + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: wrap_displacement + call MPI_Type_lb( & + abi2mpi_datatype(datatype), & + wrap_displacement, & + ierror & + ) + displacement = mpi2abi_address(wrap_displacement) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_lb + +subroutine MPIABI_Type_ub( & + datatype, & + displacement, & + ierror & +) + use mpiwrapper + implicit none + integer, intent(in) :: datatype + integer(MPIABI_ADDRESS_KIND), intent(out) :: displacement + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) :: wrap_displacement + call MPI_Type_ub( & + abi2mpi_datatype(datatype), & + wrap_displacement, & + ierror & + ) + displacement = mpi2abi_address(wrap_displacement) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_ub + diff --git a/mpiwrapper/mpiwrapper_functions.manual.F90 b/mpiwrapper/mpiwrapper_functions.manual.F90 new file mode 100644 index 00000000..b8d4dbc2 --- /dev/null +++ b/mpiwrapper/mpiwrapper_functions.manual.F90 @@ -0,0 +1,4825 @@ +#include "mpiwrapper.h" + +#define MPI_VERSION_NUMBER (100 * MPI_Fortran_VERSION_MAJOR + MPI_Fortran_VERSION_MINOR) + +! Fake MPI 4 support, just enough to make the compiler happy +#ifndef HAVE_MPI_BUFFER_AUTOMATIC +#define MPI_BUFFER_AUTOMATIC MPIABI_BUFFER_AUTOMATIC +#endif + +! A.3 C Bindings + +! A.3.1 Point-to-Point Communication C Bindings + +subroutine MPIABI_Bsend(buf, count, datatype, dest, tag, comm, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: ierror + call MPI_Bsend(buf, count, abi2mpi_datatype(datatype), abi2mpi_proc(dest), abi2mpi_tag(tag), abi2mpi_comm(comm)) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Bsend + +subroutine MPIABI_Bsend_init(buf, count, datatype, dest, tag, comm, request, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + integer wrap_request + call MPI_Bsend_init(buf, count, abi2mpi_datatype(datatype), abi2mpi_proc(dest), abi2mpi_tag(tag), abi2mpi_comm(comm), & + wrap_request, ierror) + request = mpi2abi_request(wrap_request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Bsend_init + +subroutine MPIABI_Buffer_attach(buffer, size, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: buffer(*) + integer, intent(in) :: size + integer, intent(out) :: ierror + integer(MPIABI_ADDRESS_KIND) buffer_addr + integer(MPI_ADDRESS_KIND) wrap_buffer_addr + integer wrap_buffer(*) + pointer (wrap_buffer_addr, wrap_buffer) + buffer_addr = loc(buffer) + if (buffer_addr == loc(MPIABI_BUFFER_AUTOMATIC)) then + wrap_buffer_addr = loc(MPI_BUFFER_AUTOMATIC) + else + wrap_buffer_addr = buffer_addr + end if + call MPI_Buffer_attach(wrap_buffer, size, ierror) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Buffer_attach + +subroutine MPIABI_Buffer_detach(buffer_addr, size, ierror) + use mpiwrapper + implicit none + integer(MPIABI_ADDRESS_KIND), intent(out) :: buffer_addr + integer, intent(out) :: size + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) wrap_buffer_addr + call MPI_Buffer_detach(wrap_buffer_addr, size, ierror) + if (wrap_buffer_addr == loc(MPI_BUFFER_AUTOMATIC)) then + buffer_addr = loc(MPIABI_BUFFER_AUTOMATIC) + else + buffer_addr = wrap_buffer_addr + end if + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Buffer_detach + +subroutine MPIABI_Buffer_flush(ierror) + use mpiwrapper + implicit none + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER >= 410 + call MPI_Buffer_flush(ierror) + ierror = mpi2abi_errorcode(ierror) +#else + call assert(.false.) +#endif +end subroutine MPIABI_Buffer_flush + +subroutine MPIABI_Buffer_iflush(request, ierror) + use mpiwrapper + implicit none + integer, intent(inout) :: request + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER >= 410 + integer wrap_request + call MPI_Buffer_iflush(wrap_request, ierror) + request = mpi2abi_request(wrap_request) + ierror = mpi2abi_errorcode(ierror) +#else + call assert(.false.) +#endif +end subroutine MPIABI_Buffer_iflush + +subroutine MPIABI_Cancel(request, ierror) + use mpiwrapper + implicit none + integer, intent(inout) :: request + integer, intent(out) :: ierror + integer wrap_request + wrap_request = abi2mpi_request(request) + call MPI_Cancel(wrap_request, ierror) + request = mpi2abi_request(wrap_request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Cancel + +subroutine MPIABI_Comm_attach_buffer(comm, buffer, size, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(in) :: buffer(*) + integer, intent(in) :: size + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER >= 410 + integer(MPIABI_ADDRESS_KIND) buffer_addr + integer(MPI_ADDRESS_KIND) wrap_buffer_addr + integer wrap_buffer(*) + pointer (wrap_buffer_addr, wrap_buffer) + buffer_addr = loc(buffer) + if (buffer_addr == loc(MPIABI_BUFFER_AUTOMATIC)) then + wrap_buffer_addr = loc(MPI_BUFFER_AUTOMATIC) + else + wrap_buffer_addr = buffer_addr + end if + call MPI_Comm_attach_buffer(abi2mpi_comm(comm), wrap_buffer, size, ierror) + ierror = mpi2abi_errorcode(ierror) +#else + call assert(.false.) +#endif +end subroutine MPIABI_Comm_attach_buffer + +subroutine MPIABI_Comm_detach_buffer(comm, buffer_addr, size, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer(MPIABI_ADDRESS_KIND), intent(out) :: buffer_addr + integer, intent(out) :: size + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER >= 410 + integer(MPI_ADDRESS_KIND) wrap_buffer_addr + call MPI_Comm_detach_buffer(abi2mpi_comm(comm), wrap_buffer_addr, size, ierror) + if (wrap_buffer_addr == loc(MPI_BUFFER_AUTOMATIC)) then + buffer_addr = loc(MPIABI_BUFFER_AUTOMATIC) + else + buffer_addr = wrap_buffer_addr + end if + ierror = mpi2abi_errorcode(ierror) +#else + call assert(.false.) +#endif +end subroutine MPIABI_Comm_detach_buffer + +subroutine MPIABI_Comm_flush_buffer(comm, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER >= 410 + call MPI_Comm_flush_buffer(abi2mpi_comm(comm), ierror) + ierror = mpi2abi_errorcode(ierror) +#else + call assert(.false.) +#endif +end subroutine MPIABI_Comm_flush_buffer + +subroutine MPIABI_Comm_iflush_buffer(comm, request, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER >= 410 + integer wrap_request + call MPI_Comm_iflush_buffer(abi2mpi_comm(comm), wrap_request, ierror) + request = mpi2abi_request(wrap_request) + ierror = mpi2abi_errorcode(ierror) +#else + call assert(.false.) +#endif +end subroutine MPIABI_Comm_iflush_buffer + +subroutine MPIABI_Get_count(status, datatype, count, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: status(MPIABI_STATUS_SIZE) + integer, intent(in) :: datatype + integer, intent(out) :: count + integer, intent(out) :: ierror + integer wrap_status(MPI_STATUS_SIZE) + call abi2mpi_status(status, wrap_status) + call MPI_Get_count(wrap_status, abi2mpi_datatype(datatype), count, ierror) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Get_count + +subroutine MPIABI_Ibsend(buf, count, datatype, dest, tag, comm, request, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + integer wrap_request + call MPI_Ibsend(buf, count, abi2mpi_datatype(datatype), abi2mpi_proc(dest), abi2mpi_tag(tag), abi2mpi_comm(comm), wrap_request, & + ierror) + request = mpi2abi_request(wrap_request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Ibsend + +subroutine MPIABI_Improbe(source, tag, comm, flag, message, status, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: source + integer, intent(in) :: tag + integer, intent(in) :: comm + logical, intent(in) :: flag + integer, intent(out) :: message ! TODO FIX THIS + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer wrap_status_storage(MPI_STATUS_SIZE) + integer(MPIABI_ADDRESS_KIND) wrap_status_ptr + integer wrap_status(MPI_STATUS_SIZE) + pointer (wrap_status_ptr, wrap_status) + wrap_status_ptr = abi2mpi_status_ptr_uninitialized(status, wrap_status_storage) + call MPI_Improbe(abi2mpi_proc(source), abi2mpi_tag(tag), abi2mpi_comm(comm), flag, abi2mpi_message(message), wrap_status, ierror) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Improbe + +subroutine MPIABI_Imrecv(buf, count, datatype, message, request, ierror) + use mpiwrapper + implicit none + integer, intent(out) :: buf + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: message + integer, intent(out) :: request + integer, intent(out) :: ierror + integer wrap_request + call MPI_Imrecv(buf, count, abi2mpi_datatype(datatype), abi2mpi_message(message), wrap_request, ierror) + request = mpi2abi_request(wrap_request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Imrecv + +subroutine MPIABI_Iprobe(source, tag, comm, flag, status, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: source + integer, intent(in) :: tag + integer, intent(in) :: comm + logical, intent(out) :: flag + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer wrap_status_storage(MPI_STATUS_SIZE) + integer(MPIABI_ADDRESS_KIND) wrap_status_ptr + integer wrap_status(MPI_STATUS_SIZE) + pointer (wrap_status_ptr, wrap_status) + wrap_status_ptr = abi2mpi_status_ptr_uninitialized(status, wrap_status_storage) + call MPI_Iprobe(abi2mpi_proc(source), abi2mpi_tag(tag), abi2mpi_comm(comm), flag, wrap_status, ierror) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Iprobe + +subroutine MPIABI_Irecv(buf, count, datatype, source, tag, comm, request, ierror) + use mpiwrapper + implicit none + integer, intent(out) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: source + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + integer wrap_request + call MPI_Irecv(buf, count, abi2mpi_datatype(datatype), abi2mpi_proc(source), abi2mpi_tag(tag), abi2mpi_comm(comm), wrap_request, & + ierror) + request = mpi2abi_request(wrap_request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Irecv + +subroutine MPIABI_Irsend(buf, count, datatype, dest, tag, comm, request, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + integer wrap_request + call MPI_Irsend(buf, count, abi2mpi_datatype(datatype), abi2mpi_proc(dest), abi2mpi_tag(tag), abi2mpi_comm(comm), wrap_request, & + ierror) + request = mpi2abi_request(wrap_request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Irsend + +subroutine MPIABI_Isend(buf, count, datatype, dest, tag, comm, request, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + integer wrap_request + call MPI_Isend(buf, count, abi2mpi_datatype(datatype), abi2mpi_proc(dest), abi2mpi_tag(tag), abi2mpi_comm(comm), wrap_request, & + ierror) + request = mpi2abi_request(wrap_request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Isend + +subroutine MPIABI_Isendrecv(sendbuf, sendcount, sendtype, dest, sendtag, recvbuf, recvcount, recvtype, source, recvtag, comm, & + request, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype + integer, intent(in) :: dest + integer, intent(in) :: sendtag + integer, intent(out) :: recvbuf + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: source + integer, intent(in) :: recvtag + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + integer wrap_request + call MPI_Isendrecv(sendbuf, sendcount, abi2mpi_datatype(sendtype), abi2mpi_proc(dest), abi2mpi_tag(sendtag), recvbuf, recvcount, & + abi2mpi_datatype(recvtype), abi2mpi_proc(source), abi2mpi_tag(recvtag), abi2mpi_comm(comm), wrap_request, ierror) + request = mpi2abi_request(wrap_request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Isendrecv + +subroutine MPIABI_Isendrecv_replace(buf, count, datatype, dest, sendtag, source, recvtag, comm, request, ierror) + use mpiwrapper + implicit none + integer, intent(inout) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: sendtag + integer, intent(in) :: source + integer, intent(in) :: recvtag + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + integer wrap_request + call MPI_Isendrecv_replace(buf, count, abi2mpi_datatype(datatype), abi2mpi_proc(dest), abi2mpi_tag(sendtag), & + abi2mpi_proc(source), abi2mpi_tag(recvtag), abi2mpi_comm(comm), wrap_request, ierror) + request = mpi2abi_request(wrap_request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Isendrecv_replace + +subroutine MPIABI_Issend(buf, count, datatype, dest, tag, comm, request, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + integer wrap_request + call MPI_Issend(buf, count, abi2mpi_datatype(datatype), abi2mpi_proc(dest), abi2mpi_tag(tag), abi2mpi_comm(comm), wrap_request, & + ierror) + request = mpi2abi_request(wrap_request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Issend + +subroutine MPIABI_Mprobe(source, tag, comm, message, status, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: source + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(in) :: message + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer wrap_status_storage(MPI_STATUS_SIZE) + integer(MPIABI_ADDRESS_KIND) wrap_status_ptr + integer wrap_status(MPI_STATUS_SIZE) + pointer (wrap_status_ptr, wrap_status) + wrap_status_ptr = abi2mpi_status_ptr_uninitialized(status, wrap_status_storage) + call MPI_Mprobe(abi2mpi_proc(source), abi2mpi_tag(tag), abi2mpi_comm(comm), abi2mpi_message(message), status, ierror) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Mprobe + +subroutine MPIABI_Mrecv(buf, count, datatype, message, status, ierror) + use mpiwrapper + implicit none + integer, intent(out) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: message + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer wrap_status_storage(MPI_STATUS_SIZE) + integer(MPIABI_ADDRESS_KIND) wrap_status_ptr + integer wrap_status(MPI_STATUS_SIZE) + pointer (wrap_status_ptr, wrap_status) + wrap_status_ptr = abi2mpi_status_ptr_uninitialized(status, wrap_status_storage) + call MPI_Mrecv(buf, count, abi2mpi_datatype(datatype), abi2mpi_message(message), status, ierror) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Mrecv + +subroutine MPIABI_Probe(source, tag, comm, status, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: source + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer wrap_status_storage(MPI_STATUS_SIZE) + integer(MPIABI_ADDRESS_KIND) wrap_status_ptr + integer wrap_status(MPI_STATUS_SIZE) + pointer (wrap_status_ptr, wrap_status) + wrap_status_ptr = abi2mpi_status_ptr_uninitialized(status, wrap_status_storage) + call MPI_Probe(abi2mpi_proc(source), abi2mpi_tag(tag), abi2mpi_comm(comm), wrap_status, ierror) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Probe + +subroutine MPIABI_Recv(buf, count, datatype, source, tag, comm, status, ierror) + use mpiwrapper + implicit none + integer, intent(out) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: source + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer wrap_status_storage(MPI_STATUS_SIZE) + integer(MPIABI_ADDRESS_KIND) wrap_status_ptr + integer wrap_status(MPI_STATUS_SIZE) + pointer (wrap_status_ptr, wrap_status) + wrap_status_ptr = abi2mpi_status_ptr_uninitialized(status, wrap_status_storage) + call MPI_Recv(buf, count, abi2mpi_datatype(datatype), abi2mpi_proc(source), abi2mpi_tag(tag), abi2mpi_comm(comm), wrap_status, & + ierror) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Recv + +subroutine MPIABI_Recv_init(buf, count, datatype, source, tag, comm, request, ierror) + use mpiwrapper + implicit none + integer, intent(out) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: source + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + integer wrap_request + call MPI_Recv_init(buf, count, abi2mpi_datatype(datatype), abi2mpi_proc(source), abi2mpi_tag(tag), abi2mpi_comm(comm), & + wrap_request, ierror) + request = mpi2abi_request(wrap_request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Recv_init + +subroutine MPIABI_Request_free(request, ierror) + use mpiwrapper + implicit none + integer, intent(inout) :: request + integer, intent(out) :: ierror + integer wrap_request + wrap_request = abi2mpi_request(request) + call MPI_Request_free(wrap_request, ierror) + request = mpi2abi_request(wrap_request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Request_free + +subroutine MPIABI_Request_get_status(request, flag, status, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: request + logical, intent(out) :: flag + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer wrap_status_storage(MPI_STATUS_SIZE) + integer(MPIABI_ADDRESS_KIND) wrap_status_ptr + integer wrap_status(MPI_STATUS_SIZE) + pointer (wrap_status_ptr, wrap_status) + wrap_status_ptr = abi2mpi_status_ptr_uninitialized(status, wrap_status_storage) + call MPI_Request_get_status(abi2mpi_request(request), flag, wrap_status, ierror) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Request_get_status + +subroutine MPIABI_Request_get_status_all(count, array_of_requests, flag, array_of_statuses, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: count + integer, intent(in) :: array_of_requests(count) + logical, intent(out) :: flag + integer, intent(out) :: array_of_statuses(MPIABI_STATUS_SIZE, count) + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER >= 410 + integer wrap_array_of_requests(count) + integer wrap_array_of_statuses(MPI_STATUS_SIZE, count) + integer n + do n = 1, count + wrap_array_of_requests(n) = abi2mpi_request(array_of_requests(n)) + end do + if (loc(array_of_statuses) == loc(MPIABI_STATUSES_IGNORE)) then + call MPI_Request_get_status_all(count, wrap_array_of_requests, flag, MPI_STATUSES_IGNORE, ierror) + else + call MPI_Request_get_status_all(count, wrap_array_of_requests, flag, wrap_array_of_statuses, ierror) + do n = 1, count + call mpi2abi_status(wrap_array_of_statuses(:, n), array_of_statuses(:, n)) + end do + end if + ierror = mpi2abi_errorcode(ierror) +#else + call assert(.false.) +#endif +end subroutine MPIABI_Request_get_status_all + +subroutine MPIABI_Request_get_status_any(count, array_of_requests, index, flag, status, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: count + integer, intent(in) :: array_of_requests(count) + integer, intent(out) :: index + logical, intent(out) :: flag + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER >= 410 + integer wrap_array_of_requests(count) + integer wrap_status(MPI_STATUS_SIZE) + integer n + do n = 1, count + wrap_array_of_requests(n) = abi2mpi_request(array_of_requests(n)) + end do + call MPI_Request_get_status_any(count, wrap_array_of_requests, index, flag, wrap_status, ierror) + call mpi2abi_status(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +#else + call assert(.false.) +#endif +end subroutine MPIABI_Request_get_status_any + +subroutine MPIABI_Request_get_status_some(incount, array_of_requests, outcount, array_of_indices, array_of_statuses, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: incount + integer, intent(in) :: array_of_requests(incount) + integer, intent(out) :: outcount + integer, intent(out) :: array_of_indices(incount) + integer, intent(out) :: array_of_statuses(MPIABI_STATUS_SIZE, incount) + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER >= 410 + integer wrap_array_of_requests(incount) + integer wrap_array_of_statuses(MPI_STATUS_SIZE, incount) + integer n + do n = 1, incount + wrap_array_of_requests(n) = abi2mpi_request(array_of_requests(n)) + end do + call MPI_Request_get_status_some(incount, wrap_array_of_requests, outcount, array_of_indices, wrap_array_of_statuses, ierror) + do n = 1, outcount + call mpi2abi_status(wrap_array_of_statuses(:, n), array_of_statuses(:, n)) + end do + ierror = mpi2abi_errorcode(ierror) +#else + call assert(.false.) +#endif +end subroutine MPIABI_Request_get_status_some + +subroutine MPIABI_Rsend(buf, count, datatype, dest, tag, comm, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: ierror + call MPI_Rsend(buf, count, abi2mpi_datatype(datatype), abi2mpi_proc(dest), abi2mpi_tag(tag), abi2mpi_comm(comm), ierror) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Rsend + +subroutine MPIABI_Rsend_init(buf, count, datatype, dest, tag, comm, request, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + integer wrap_request + call MPI_Rsend_init(buf, count, abi2mpi_datatype(datatype), abi2mpi_proc(dest), abi2mpi_tag(tag), abi2mpi_comm(comm), & + wrap_request, ierror) + request = mpi2abi_request(wrap_request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Rsend_init + +subroutine MPIABI_Send(buf, count, datatype, dest, tag, comm, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: ierror + call MPI_Send(buf, count, abi2mpi_datatype(datatype), abi2mpi_proc(dest), abi2mpi_tag(tag), abi2mpi_comm(comm), ierror) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Send + +subroutine MPIABI_Send_init(buf, count, datatype, dest, tag, comm, request, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + integer wrap_request + call MPI_Send_init(buf, count, abi2mpi_datatype(datatype), abi2mpi_proc(dest), abi2mpi_tag(tag), abi2mpi_comm(comm), & + wrap_request, ierror) + request = mpi2abi_request(wrap_request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Send_init + +subroutine MPIABI_Sendrecv(sendbuf, sendcount, sendtype, dest, sendtag, recvbuf, recvcount, recvtype, source, recvtag, comm, & + status, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype + integer, intent(in) :: dest + integer, intent(in) :: sendtag + integer, intent(out) :: recvbuf + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: source + integer, intent(in) :: recvtag + integer, intent(in) :: comm + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer wrap_status_storage(MPI_STATUS_SIZE) + integer(MPIABI_ADDRESS_KIND) wrap_status_ptr + integer wrap_status(MPI_STATUS_SIZE) + pointer (wrap_status_ptr, wrap_status) + wrap_status_ptr = abi2mpi_status_ptr_uninitialized(status, wrap_status_storage) + call MPI_Sendrecv(sendbuf, sendcount, abi2mpi_datatype(sendtype), abi2mpi_proc(dest), abi2mpi_tag(sendtag), recvbuf, recvcount, & + abi2mpi_datatype(recvtype), abi2mpi_proc(source), abi2mpi_tag(recvtag), abi2mpi_comm(comm), wrap_status, ierror) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Sendrecv + +subroutine MPIABI_Sendrecv_replace(buf, count, datatype, dest, sendtag, source, recvtag, comm, status, ierror) + use mpiwrapper + implicit none + integer, intent(inout) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: sendtag + integer, intent(in) :: source + integer, intent(in) :: recvtag + integer, intent(in) :: comm + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer wrap_status_storage(MPI_STATUS_SIZE) + integer(MPIABI_ADDRESS_KIND) wrap_status_ptr + integer wrap_status(MPI_STATUS_SIZE) + pointer (wrap_status_ptr, wrap_status) + wrap_status_ptr = abi2mpi_status_ptr_uninitialized(status, wrap_status_storage) + call MPI_Sendrecv_replace(buf, count, abi2mpi_datatype(datatype), abi2mpi_proc(dest), abi2mpi_tag(sendtag), & + abi2mpi_proc(source), abi2mpi_tag(recvtag), abi2mpi_comm(comm), wrap_status, ierror) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Sendrecv_replace + +subroutine MPIABI_Session_attach_buffer(session, buffer, size, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: session + integer, intent(in) :: buffer(*) + integer, intent(in) :: size + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER >= 410 + integer(MPIABI_ADDRESS_KIND) buffer_addr + integer(MPI_ADDRESS_KIND) wrap_buffer_addr + integer wrap_buffer(*) + pointer (wrap_buffer_addr, wrap_buffer) + buffer_addr = loc(buffer) + if (buffer_addr == loc(MPIABI_BUFFER_AUTOMATIC)) then + wrap_buffer_addr = loc(MPI_BUFFER_AUTOMATIC) + else + wrap_buffer_addr = buffer_addr + end if + call MPI_Session_attach_buffer(abi2mpi_session(session), wrap_buffer, size, ierror) + ierror = mpi2abi_errorcode(ierror) +#else + call assert(.false.) +#endif +end subroutine MPIABI_Session_attach_buffer + +subroutine MPIABI_Session_detach_buffer(session, buffer_addr, size, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: session + integer(MPIABI_ADDRESS_KIND), intent(out) :: buffer_addr + integer, intent(out) :: size + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER >= 410 + integer(MPI_ADDRESS_KIND) wrap_buffer_addr + call MPI_Session_detach_buffer(abi2mpi_session(session), wrap_buffer_addr, size, ierror) + if (wrap_buffer_addr == loc(MPI_BUFFER_AUTOMATIC)) then + buffer_addr = loc(MPIABI_BUFFER_AUTOMATIC) + else + buffer_addr = wrap_buffer_addr + end if + ierror = mpi2abi_errorcode(ierror) +#else + call assert(.false.) +#endif +end subroutine MPIABI_Session_detach_buffer + +subroutine MPIABI_Session_flush_buffer(session, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: session + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER >= 410 + call MPI_Session_flush_buffer(abi2mpi_session(session), ierror) + ierror = mpi2abi_errorcode(ierror) +#else + call assert(.false.) +#endif +end subroutine MPIABI_Session_flush_buffer + +subroutine MPIABI_Session_iflush_buffer(session, request, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: session + integer, intent(out) :: request + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER >= 410 + integer wrap_request + call MPI_Session_iflush_buffer(abi2mpi_session(session), wrap_request, ierror) + request = mpi2abi_request(wrap_request) + ierror = mpi2abi_errorcode(ierror) +#else + call assert(.false.) +#endif +end subroutine MPIABI_Session_iflush_buffer + +subroutine MPIABI_Ssend(buf, count, datatype, dest, tag, comm, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: ierror + call MPI_Ssend(buf, count, abi2mpi_datatype(datatype), abi2mpi_proc(dest), abi2mpi_tag(tag), abi2mpi_comm(comm), ierror) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Ssend + +subroutine MPIABI_Ssend_init(buf, count, datatype, dest, tag, comm, request, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: buf(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: dest + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, intent(out) :: request + integer, intent(out) :: ierror + integer wrap_request + call MPI_Ssend_init(buf, count, abi2mpi_datatype(datatype), abi2mpi_proc(dest), abi2mpi_tag(tag), abi2mpi_comm(comm), & + wrap_request, ierror) + request = mpi2abi_request(wrap_request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Ssend_init + +subroutine MPIABI_Start(request, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: request + integer, intent(out) :: ierror + call MPI_Start(abi2mpi_request(request), ierror) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Start + +subroutine MPIABI_Startall(count, array_of_requests, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: count + integer, intent(in) :: array_of_requests(count) + integer, intent(out) :: ierror + integer wrap_array_of_requests(count) + integer n + do n = 1, count + wrap_array_of_requests(n) = abi2mpi_request(array_of_requests(n)) + end do + call MPI_Startall(count, wrap_array_of_requests, ierror) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Startall + +subroutine MPIABI_Status_get_error(status, err, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: err + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER >= 410 + integer wrap_status(MPI_STATUS_SIZE) + call abi2mpi_status(status, wrap_status) + call MPI_Status_get_error(wrap_status, err, ierror) + err = mpi2abi_errorcode(err) + ierror = mpi2abi_errorcode(ierror) +#else + call assert(.false.) +#endif +end subroutine MPIABI_Status_get_error + +subroutine MPIABI_Status_get_source(status, source, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: source + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER >= 410 + integer wrap_status(MPI_STATUS_SIZE) + call abi2mpi_status(status, wrap_status) + call MPI_Status_get_source(wrap_status, source, ierror) + source = mpi2abi_proc(source) + ierror = mpi2abi_errorcode(ierror) +#else + call assert(.false.) +#endif +end subroutine MPIABI_Status_get_source + +subroutine MPIABI_Status_get_tag(status, tag, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: tag + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER >= 410 + integer wrap_status(MPI_STATUS_SIZE) + call abi2mpi_status(status, wrap_status) + call MPI_Status_get_tag(wrap_status, tag, ierror) + tag = mpi2abi_proc(tag) + ierror = mpi2abi_errorcode(ierror) +#else + call assert(.false.) +#endif +end subroutine MPIABI_Status_get_tag + +subroutine MPIABI_Test(request, flag, status, ierror) + use mpiwrapper + implicit none + integer, intent(inout) :: request + logical, intent(out) :: flag + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer wrap_request + integer wrap_status_storage(MPI_STATUS_SIZE) + integer(MPIABI_ADDRESS_KIND) wrap_status_ptr + integer wrap_status(MPI_STATUS_SIZE) + pointer (wrap_status_ptr, wrap_status) + wrap_request = abi2mpi_request(request) + wrap_status_ptr = abi2mpi_status_ptr_uninitialized(status, wrap_status_storage) + call MPI_Test(wrap_request, flag, wrap_status, ierror) + if (flag) then + request = mpi2abi_request(wrap_request) + call mpi2abi_status_ptr(wrap_status, status) + end if + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Test + +subroutine MPIABI_Test_cancelled(status, flag, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: status(MPIABI_STATUS_SIZE) + logical, intent(out) :: flag + integer, intent(out) :: ierror + integer wrap_status(MPI_STATUS_SIZE) + call abi2mpi_status(status, wrap_status) + call MPI_Test_cancelled(wrap_status, flag, ierror) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Test_cancelled + +subroutine MPIABI_Testall(count, array_of_requests, flag, array_of_statuses, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: count + integer, intent(inout) :: array_of_requests(count) + logical, intent(out) :: flag + integer, intent(out) :: array_of_statuses(MPIABI_STATUS_SIZE, count) + integer, intent(out) :: ierror + integer wrap_array_of_requests(count) + integer wrap_array_of_statuses(MPI_STATUS_SIZE, count) + integer n + do n = 1, count + wrap_array_of_requests(n) = abi2mpi_request(array_of_requests(n)) + end do + if (loc(array_of_statuses) == loc(MPIABI_STATUSES_IGNORE)) then + call MPI_Testall(count, wrap_array_of_requests, flag, MPI_STATUSES_IGNORE, ierror) + if (flag) then + array_of_requests = mpi2abi_request(wrap_array_of_requests) + end if + else + call MPI_Testall(count, wrap_array_of_requests, flag, wrap_array_of_statuses, ierror) + if (flag) then + array_of_requests = mpi2abi_request(wrap_array_of_requests) + do n = 1, count + call mpi2abi_status(wrap_array_of_statuses(:, n), array_of_statuses(:, n)) + end do + end if + end if + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Testall + +subroutine MPIABI_Testany(count, array_of_requests, index, flag, status, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: count + integer, intent(inout) :: array_of_requests(count) + integer, intent(out) :: index + logical, intent(out) :: flag + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer wrap_array_of_requests(count) + integer wrap_status_storage(MPI_STATUS_SIZE) + integer(MPIABI_ADDRESS_KIND) wrap_status_ptr + integer wrap_status(MPI_STATUS_SIZE) + pointer (wrap_status_ptr, wrap_status) + integer n + do n = 1, count + wrap_array_of_requests(n) = abi2mpi_request(array_of_requests(n)) + end do + wrap_status_ptr = abi2mpi_status_ptr_uninitialized(status, wrap_status_storage) + call MPI_Testany(count, wrap_array_of_requests, index, flag, wrap_status, ierror) + if (flag) then + array_of_requests(index) = mpi2abi_request(wrap_array_of_requests(index)) + call mpi2abi_status_ptr(wrap_status, status) + end if + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Testany + +subroutine MPIABI_Testsome(incount, array_of_requests, outcount, array_of_indices, array_of_statuses, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: incount + integer, intent(inout) :: array_of_requests(incount) + integer, intent(out) :: outcount + integer, intent(out) :: array_of_indices(incount) + integer, intent(out) :: array_of_statuses(MPIABI_STATUS_SIZE, incount) + integer, intent(out) :: ierror + integer wrap_array_of_requests(incount) + integer wrap_array_of_statuses(MPI_STATUS_SIZE, incount) + integer n + do n = 1, incount + wrap_array_of_requests(n) = abi2mpi_request(array_of_requests(n)) + end do + if (loc(array_of_statuses) == loc(MPIABI_STATUSES_IGNORE)) then + call MPI_Testsome(incount, wrap_array_of_requests, outcount, array_of_indices, MPI_STATUSES_IGNORE, ierror) + else + call MPI_Testsome(incount, wrap_array_of_requests, outcount, array_of_indices, wrap_array_of_statuses, ierror) + do n = 1, outcount + array_of_requests(array_of_indices(n)) = mpi2abi_request(wrap_array_of_requests(array_of_indices(n))) + call mpi2abi_status(wrap_array_of_statuses(:, n), array_of_statuses(:, n)) + end do + end if + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Testsome + +subroutine MPIABI_Wait(request, status, ierror) + use mpiwrapper + implicit none + integer, intent(inout) :: request + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer wrap_request + integer wrap_status_storage(MPI_STATUS_SIZE) + integer(MPIABI_ADDRESS_KIND) wrap_status_ptr + integer wrap_status(MPI_STATUS_SIZE) + pointer (wrap_status_ptr, wrap_status) + wrap_request = abi2mpi_request(request) + wrap_status_ptr = abi2mpi_status_ptr_uninitialized(status, wrap_status_storage) + call MPI_Wait(wrap_request, wrap_status, ierror) + request = mpi2abi_request(wrap_request) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Wait + +subroutine MPIABI_Waitall(count, array_of_requests, array_of_statuses, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: count + integer, intent(inout) :: array_of_requests(count) + integer, intent(out) :: array_of_statuses(MPIABI_STATUS_SIZE, count) + integer, intent(out) :: ierror + integer wrap_array_of_requests(count) + integer wrap_array_of_statuses(MPI_STATUS_SIZE, count) + integer n + do n = 1, count + wrap_array_of_requests(n) = abi2mpi_request(array_of_requests(n)) + end do + if (loc(array_of_statuses) == loc(MPIABI_STATUSES_IGNORE)) then + call MPI_Waitall(count, wrap_array_of_requests, MPI_STATUSES_IGNORE, ierror) + array_of_requests = mpi2abi_request(wrap_array_of_requests) + else + call MPI_Waitall(count, wrap_array_of_requests, wrap_array_of_statuses, ierror) + array_of_requests = mpi2abi_request(wrap_array_of_requests) + do n = 1, count + call mpi2abi_status(wrap_array_of_statuses(:, n), array_of_statuses(:, n)) + end do + end if + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Waitall + +subroutine MPIABI_Waitany(count, array_of_requests, index, status, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: count + integer, intent(inout) :: array_of_requests(count) + integer, intent(out) :: index + integer, intent(out) :: status(MPIABI_STATUS_SIZE) + integer, intent(out) :: ierror + integer wrap_array_of_requests(count) + integer wrap_status_storage(MPI_STATUS_SIZE) + integer(MPIABI_ADDRESS_KIND) wrap_status_ptr + integer wrap_status(MPI_STATUS_SIZE) + pointer (wrap_status_ptr, wrap_status) + integer n + do n = 1, count + wrap_array_of_requests(n) = abi2mpi_request(array_of_requests(n)) + end do + wrap_status_ptr = abi2mpi_status_ptr_uninitialized(status, wrap_status_storage) + call MPI_Waitany(count, wrap_array_of_requests, index, wrap_status, ierror) + array_of_requests(index) = mpi2abi_request(wrap_array_of_requests(index)) + call mpi2abi_status_ptr(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Waitany + +subroutine MPIABI_Waitsome(incount, array_of_requests, outcount, array_of_indices, array_of_statuses, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: incount + integer, intent(inout) :: array_of_requests(incount) + integer, intent(out) :: outcount + integer, intent(out) :: array_of_indices(incount) + integer, intent(out) :: array_of_statuses(MPIABI_STATUS_SIZE, incount) + integer, intent(out) :: ierror + integer wrap_array_of_requests(incount) + integer wrap_array_of_statuses(MPI_STATUS_SIZE, incount) + integer n + do n = 1, incount + wrap_array_of_requests(n) = abi2mpi_request(array_of_requests(n)) + end do + if (loc(array_of_statuses) == loc(MPIABI_STATUSES_IGNORE)) then + call MPI_Waitsome(incount, wrap_array_of_requests, outcount, array_of_indices, MPI_STATUSES_IGNORE, ierror) + else + call MPI_Waitsome(incount, wrap_array_of_requests, outcount, array_of_indices, wrap_array_of_statuses, ierror) + do n = 1, outcount + array_of_requests(array_of_indices(n)) = mpi2abi_request(wrap_array_of_requests(array_of_indices(n))) + call mpi2abi_status(wrap_array_of_statuses(:, n), array_of_statuses(:, n)) + end do + end if + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Waitsome + +! A.3.2 Partitioned Communication C Bindings + +! subroutine MPIABI_Parrived(request, partition, flag, ierror) +! use mpiwrapper +! implicit none +! call MPI_Parrived(request, partition, flag, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Parrived +! +! subroutine MPIABI_Pready(partition, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Pready(partition, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Pready +! +! subroutine MPIABI_Pready_list(length, array_of_partitions, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Pready_list(length, array_of_partitions, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Pready_list +! +! subroutine MPIABI_Pready_range(partition_low, partition_high, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Pready_range(partition_low, partition_high, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Pready_range +! +! subroutine MPIABI_Precv_init(buf, partitions, count, datatype, source, tag, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Precv_init(buf, partitions, count, datatype, source, tag, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Precv_init +! +! subroutine MPIABI_Psend_init(buf, partitions, count, datatype, dest, tag, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Psend_init(buf, partitions, count, datatype, dest, tag, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Psend_init + +! A.3.3 Datatypes C Bindings + +integer(MPIABI_ADDRESS_KIND) function MPIABI_Aint_add(base, disp) + use mpiwrapper + implicit none + integer(MPIABI_ADDRESS_KIND), intent(in) :: base + integer(MPIABI_ADDRESS_KIND), intent(in) :: disp + ! This function is not defined by MPICH so we implement it ourselves + MPIABI_Aint_add = base + disp +end function MPIABI_Aint_add + +integer(MPIABI_ADDRESS_KIND) function MPIABI_Aint_diff(addr1, addr2) + use mpiwrapper + implicit none + integer(MPIABI_ADDRESS_KIND), intent(in) :: addr1 + integer(MPIABI_ADDRESS_KIND), intent(in) :: addr2 + ! This function is not defined by MPICH so we implement it ourselves + MPIABI_Aint_diff = addr1 - addr2 +end function MPIABI_Aint_diff + +subroutine MPIABI_Get_address(location, address, ierror) + use mpiwrapper + implicit none + integer :: location(*) + integer(MPIABI_ADDRESS_KIND), intent(out) :: address + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) wrap_address + call MPI_Get_address(location, wrap_address, ierror) + address = wrap_address + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Get_address + +subroutine MPIABI_Get_elements(status, datatype, count, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: status(MPIABI_STATUS_SIZE) + integer, intent(in) :: datatype + integer, intent(out) :: count + integer, intent(out) :: ierror + integer wrap_status(MPI_STATUS_SIZE) + call abi2mpi_status(status, wrap_status) + call MPI_Get_elements(wrap_status, abi2mpi_datatype(datatype), count, ierror) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Get_elements + +subroutine MPIABI_Pack(inbuf, incount, datatype, outbuf, outsize, position, comm, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: inbuf(*) + integer, intent(in) :: incount + integer, intent(in) :: datatype + integer outbuf(*) + integer(MPIABI_ADDRESS_KIND), intent(in) :: outsize + integer(MPIABI_ADDRESS_KIND), intent(inout) :: position + integer, intent(in) :: comm + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) wrap_outsize + integer(MPI_ADDRESS_KIND) wrap_position + wrap_outsize = outsize + wrap_position = position + call MPI_Pack(inbuf, incount, abi2mpi_datatype(datatype), outbuf, wrap_outsize, wrap_position, abi2mpi_comm(comm), ierror) + position = wrap_position + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Pack + +subroutine MPIABI_Pack_external(datarep, inbuf, incount, datatype, outbuf, outsize, position, ierror) + use mpiwrapper + implicit none + character(*), intent(in) :: datarep + integer, intent(in) :: inbuf(*) + integer, intent(in) :: incount + integer, intent(in) :: datatype + integer outbuf(*) + integer(MPIABI_ADDRESS_KIND), intent(in) :: outsize + integer(MPIABI_ADDRESS_KIND), intent(inout) :: position + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) wrap_outsize + integer(MPI_ADDRESS_KIND) wrap_position + wrap_outsize = outsize + wrap_position = position + call MPI_Pack_external(datarep, inbuf, incount, abi2mpi_datatype(datatype), outbuf, wrap_outsize, wrap_position, ierror) + position = wrap_position + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Pack_external + +subroutine MPIABI_Pack_external_size(datarep, incount, datatype, size, ierror) + use mpiwrapper + implicit none + character(*), intent(in) :: datarep + integer, intent(in) :: incount + integer, intent(in) :: datatype + integer(MPIABI_ADDRESS_KIND), intent(out) :: size + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) wrap_size + call MPI_Pack_external_size(datarep, incount, abi2mpi_datatype(datatype), wrap_size, ierror) + size = wrap_size + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Pack_external_size + +subroutine MPIABI_Pack_size(incount, datatype, comm, size, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: incount + integer, intent(in) :: datatype + integer, intent(in) :: comm + integer, intent(out) :: size + integer, intent(out) :: ierror + call MPI_Pack_size(incount, abi2mpi_datatype(datatype), abi2mpi_comm(comm), size, ierror) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Pack_size + +subroutine MPIABI_Type_commit(datatype, ierror) + use mpiwrapper + implicit none + integer, intent(inout) :: datatype + integer, intent(out) :: ierror + integer wrap_datatype + wrap_datatype = abi2mpi_datatype(datatype) + call MPI_Type_commit(wrap_datatype, ierror) + datatype = mpi2abi_datatype(wrap_datatype) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_commit + +subroutine MPIABI_Type_contiguous(count, oldtype, newtype, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: count + integer, intent(in) :: oldtype + integer, intent(out) :: newtype + integer, intent(out) :: ierror + integer wrap_newtype + call MPI_Type_contiguous(count, abi2mpi_datatype(oldtype), wrap_newtype, ierror) + newtype = mpi2abi_datatype(wrap_newtype) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_contiguous + +subroutine MPIABI_Type_create_darray(size, rank, ndims, array_of_gsizes, array_of_distribs, array_of_dargs, array_of_psizes, & + order, oldtype, newtype, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: size + integer, intent(in) :: rank + integer, intent(in) :: ndims + integer, intent(in) :: array_of_gsizes(ndims) + integer, intent(in) :: array_of_distribs(ndims) + integer, intent(in) :: array_of_dargs(ndims) + integer, intent(in) :: array_of_psizes(ndims) + integer, intent(in) :: order + integer, intent(in) :: oldtype + integer, intent(out) :: newtype + integer, intent(out) :: ierror + integer wrap_array_of_distribs(ndims) + integer wrap_newtype + integer n + do n = 1, ndims + wrap_array_of_distribs(n) = abi2mpi_distrib(array_of_distribs(n)) + end do + call MPI_Type_create_darray(size, rank, ndims, array_of_gsizes, array_of_distribs, array_of_dargs, array_of_psizes, & + abi2mpi_order(order), abi2mpi_datatype(oldtype), wrap_newtype, ierror) + newtype = mpi2abi_datatype(newtype) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_create_darray + +subroutine MPIABI_Type_create_hindexed(count, array_of_blocklengths, array_of_displacements, oldtype, newtype, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: count + integer, intent(in) :: array_of_blocklengths(count) + integer, intent(in) :: array_of_displacements(count) + integer, intent(in) :: oldtype + integer, intent(out) :: newtype + integer, intent(out) :: ierror + integer wrap_newtype + call MPI_Type_create_hindexed(count, array_of_blocklengths, array_of_displacements, abi2mpi_datatype(oldtype), wrap_newtype, & + ierror) + newtype = mpi2abi_datatype(wrap_newtype) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_create_hindexed + +subroutine MPIABI_Type_create_hindexed_block(count, blocklength, array_of_displacements, oldtype, newtype, ierror) + use mpiwrapper + implicit none + integer, intent(in) ::count + integer, intent(in) ::blocklength + integer, intent(in) ::array_of_displacements + integer, intent(in) ::oldtype + integer, intent(out) ::newtype + integer, intent(out) ::ierror + integer wrap_newtype + call MPI_Type_create_hindexed_block(count, blocklength, array_of_displacements, abi2mpi_datatype(oldtype), wrap_newtype, ierror) + newtype = mpi2abi_datatype(wrap_newtype) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_create_hindexed_block + +subroutine MPIABI_Type_create_hvector(count, blocklength, stride, oldtype, newtype, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: count + integer, intent(in) :: blocklength + integer, intent(in) :: stride + integer, intent(in) :: oldtype + integer, intent(out) :: newtype + integer, intent(out) :: ierror + integer wrap_newtype + call MPI_Type_create_hvector(count, blocklength, stride, abi2mpi_datatype(oldtype), wrap_newtype, ierror) + newtype = mpi2abi_datatype(wrap_newtype) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_create_hvector + +subroutine MPIABI_Type_create_indexed_block(count, blocklength, array_of_displacements, oldtype, newtype, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: count + integer, intent(in) :: blocklength + integer, intent(in) :: array_of_displacements + integer, intent(in) :: oldtype + integer, intent(out) :: newtype + integer, intent(out) :: ierror + integer wrap_newtype + call MPI_Type_create_indexed_block(count, blocklength, array_of_displacements, abi2mpi_datatype(oldtype), wrap_newtype, ierror) + newtype = mpi2abi_datatype(wrap_newtype) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_create_indexed_block + +subroutine MPIABI_Type_create_resized(oldtype, lb, extent, newtype, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: oldtype + integer(MPIABI_ADDRESS_KIND), intent(in) :: lb + integer(MPIABI_ADDRESS_KIND), intent(in) :: extent + integer, intent(out) :: newtype + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) wrap_lb + integer(MPI_ADDRESS_KIND) wrap_extent + integer wrap_newtype + wrap_lb = lb + wrap_extent = extent + call MPI_Type_create_resized(abi2mpi_datatype(oldtype), wrap_lb, wrap_extent, wrap_newtype, ierror) + newtype = mpi2abi_datatype(wrap_newtype) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_create_resized + +subroutine MPIABI_Type_create_struct(count, array_of_blocklengths, array_of_displacements, array_of_types, newtype, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: count + integer, intent(in) :: array_of_blocklengths(count) + integer(MPIABI_ADDRESS_KIND), intent(in) :: array_of_displacements(count) + integer, intent(in) :: array_of_types(count) + integer, intent(out) :: newtype + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) wrap_array_of_displacements(count) + integer wrap_array_of_types(count) + integer wrap_newtype + integer n + do n = 1, count + wrap_array_of_displacements(n) = array_of_displacements(n) + wrap_array_of_types(n) = abi2mpi_datatype(array_of_types(n)) + end do + call MPI_Type_create_struct(count, array_of_blocklengths, wrap_array_of_displacements, wrap_array_of_types, wrap_newtype, ierror) + newtype = mpi2abi_datatype(wrap_newtype) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_create_struct + +subroutine MPIABI_Type_create_subarray(ndims, array_of_sizes, array_of_subsizes, array_of_starts, order, oldtype, newtype, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: ndims + integer, intent(in) :: array_of_sizes(ndims) + integer, intent(in) :: array_of_subsizes(ndims) + integer, intent(in) :: array_of_starts(ndims) + integer, intent(in) :: order + integer, intent(in) :: oldtype + integer, intent(out) :: newtype + integer, intent(out) :: ierror + integer wrap_newtype + call MPI_Type_create_subarray(ndims, array_of_sizes, array_of_subsizes, array_of_starts, abi2mpi_order(order), & + abi2mpi_datatype(oldtype), wrap_newtype, ierror) + newtype = mpi2abi_datatype(wrap_newtype) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_create_subarray + +subroutine MPIABI_Type_dup(oldtype, newtype, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: oldtype + integer, intent(out) :: newtype + integer, intent(out) :: ierror + integer wrap_newtype + call MPI_Type_dup(abi2mpi_datatype(oldtype), wrap_newtype, ierror) + newtype = mpi2abi_datatype(wrap_newtype) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_dup + +subroutine MPIABI_Type_free(datatype, ierror) + use mpiwrapper + implicit none + integer, intent(inout) :: datatype + integer, intent(out) :: ierror + integer wrap_datatype + wrap_datatype = abi2mpi_datatype(datatype) + call MPI_Type_free(wrap_datatype, ierror) + datatype = mpi2abi_datatype(wrap_datatype) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_free + +subroutine MPIABI_Type_get_contents(datatype, max_integers, max_addresses, max_datatypes, array_of_integers, array_of_addresses, & + array_of_datatypes, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: datatype + integer, intent(in) :: max_integers + integer, intent(in) :: max_addresses + integer, intent(in) :: max_datatypes + integer, intent(out) :: array_of_integers(max_integers) + integer(MPIABI_ADDRESS_KIND), intent(out) :: array_of_addresses(max_addresses) + integer, intent(out) :: array_of_datatypes(max_datatypes) + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) wrap_array_of_addresses(max_addresses) + integer wrap_array_of_datatypes(max_datatypes) + integer n + call MPI_Type_get_contents(abi2mpi_datatype(datatype), max_integers, max_addresses, max_datatypes, array_of_integers, & + wrap_array_of_addresses, wrap_array_of_datatypes, ierror) + do n = 1, max_addresses + array_of_addresses(n) = wrap_array_of_addresses(n) + end do + do n = 1, max_datatypes + array_of_datatypes(n) = abi2mpi_datatype(wrap_array_of_datatypes(n)) + end do + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_get_contents + +subroutine MPIABI_Type_get_envelope(datatype, num_integers, num_addresses, num_datatypes, combiner, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: datatype + integer, intent(out) :: num_integers + integer, intent(out) :: num_addresses + integer, intent(out) :: num_datatypes + integer, intent(out) :: combiner + integer, intent(out) :: ierror + integer wrap_combiner + call MPI_Type_get_envelope(abi2mpi_datatype(datatype), num_integers, num_addresses, num_datatypes, wrap_combiner, ierror) + combiner = mpi2abi_combiner(wrap_combiner) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_get_envelope + +subroutine MPIABI_Type_get_extent(datatype, lb, extent, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: datatype + integer(MPIABI_ADDRESS_KIND), intent(out) :: lb + integer(MPIABI_ADDRESS_KIND), intent(out) :: extent + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) wrap_lb + integer(MPI_ADDRESS_KIND) wrap_extent + call MPI_Type_get_extent(abi2mpi_datatype(datatype), wrap_lb, wrap_extent, ierror) + lb = wrap_lb + extent = wrap_extent + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_get_extent + +subroutine MPIABI_Type_get_true_extent(datatype, true_lb, true_extent, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: datatype + integer(MPIABI_ADDRESS_KIND), intent(out) :: true_lb + integer(MPIABI_ADDRESS_KIND), intent(out) :: true_extent + integer, intent(out) :: ierror + integer(MPI_ADDRESS_KIND) wrap_true_lb + integer(MPI_ADDRESS_KIND) wrap_true_extent + call MPI_Type_get_true_extent(datatype, true_lb, true_extent, ierror) + true_lb = wrap_true_lb + true_extent = wrap_true_extent + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_get_true_extent + +subroutine MPIABI_Type_indexed(count, array_of_blocklengths, array_of_displacements, oldtype, newtype, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: count + integer, intent(in) :: array_of_blocklengths(count) + integer, intent(in) :: array_of_displacements(count) + integer, intent(in) :: oldtype + integer, intent(out) :: newtype + integer, intent(out) :: ierror + integer wrap_newtype + call MPI_Type_indexed(count, array_of_blocklengths, array_of_displacements, abi2mpi_datatype(oldtype), wrap_newtype, ierror) + newtype = mpi2abi_datatype(wrap_newtype) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_indexed + +subroutine MPIABI_Type_size(datatype, size, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: datatype + integer, intent(out) :: size + integer, intent(out) :: ierror + call MPI_Type_size(abi2mpi_datatype(datatype), size, ierror) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_size + +subroutine MPIABI_Type_vector(count, blocklength, stride, oldtype, newtype, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: count + integer, intent(in) :: blocklength + integer, intent(in) :: stride + integer, intent(in) :: oldtype + integer, intent(out) :: newtype + integer, intent(out) :: ierror + integer wrap_newtype + call MPI_Type_vector(count, blocklength, stride, abi2mpi_datatype(oldtype), wrap_newtype, ierror) + newtype = mpi2abi_datatype(wrap_newtype) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Type_vector + +subroutine MPIABI_Unpack(inbuf, insize, position, outbuf, outcount, datatype, comm, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: inbuf(*) + integer, intent(in) :: insize + integer, intent(inout) :: position + integer, intent(out) :: outbuf(*) + integer, intent(in) :: outcount + integer, intent(in) :: datatype + integer, intent(in) :: comm + integer, intent(out) :: ierror + call MPI_Unpack(inbuf, insize, position, outbuf, outcount, abi2mpi_datatype(datatype), abi2mpi_comm(comm), ierror) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Unpack + +subroutine MPIABI_Unpack_external(datarep, inbuf, insize, position, outbuf, outcount, datatype, ierror) + use mpiwrapper + implicit none + character(*), intent(in) :: datarep + integer, intent(in) :: inbuf + integer, intent(in) :: insize + integer, intent(inout) :: position + integer, intent(out) :: outbuf + integer, intent(in) :: outcount + integer, intent(in) :: datatype + integer, intent(out) :: ierror + call MPI_Unpack_external(datarep, inbuf, insize, position, outbuf, outcount, abi2mpi_datatype(datatype), ierror) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Unpack_external + +! A.3.4 Collective Communication C Bindings + +subroutine MPIABI_Allgather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(out) :: ierror + integer wrap_sendbuf(1) + integer(MPI_ADDRESS_KIND) wrap_sendbuf_ptr + wrap_sendbuf_ptr = abi2mpi_buffer_ptr(loc(sendbuf)) + call MPI_Allgather(wrap_sendbuf, sendcount, abi2mpi_datatype(sendtype), recvbuf, recvcount, abi2mpi_datatype(recvtype), & + abi2mpi_comm(comm), ierror) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Allgather + +subroutine MPIABI_Allgather_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: sendbuf(*) + integer, intent(in) :: sendcount + integer, intent(in) :: sendtype + integer, intent(out) :: recvbuf(*) + integer, intent(in) :: recvcount + integer, intent(in) :: recvtype + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + integer wrap_sendbuf(1) + integer(MPI_ADDRESS_KIND) wrap_sendbuf_ptr + integer wrap_request + wrap_sendbuf_ptr = abi2mpi_buffer_ptr(loc(sendbuf)) + call MPI_Allgather_init(wrap_sendbuf, sendcount, abi2mpi_datatype(sendtype), recvbuf, recvcount, abi2mpi_datatype(recvtype), & + abi2mpi_comm(comm), abi2mpi_info(info), wrap_request, ierror) + request = mpi2abi_request(wrap_request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Allgather_init + +! subroutine MPIABI_Allgatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Allgatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Allgatherv +! +! subroutine MPIABI_Allgatherv_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Allgatherv_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Allgatherv_c +! +! subroutine MPIABI_Allgatherv_init(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Allgatherv_init(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Allgatherv_init +! +! subroutine MPIABI_Allgatherv_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Allgatherv_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Allgatherv_init_c +! +! subroutine MPIABI_Allreduce(sendbuf, recvbuf, count, datatype, op, comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Allreduce(sendbuf, recvbuf, count, datatype, op, comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Allreduce +! +! subroutine MPIABI_Allreduce_c(sendbuf, recvbuf, count, datatype, op, comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Allreduce_c(sendbuf, recvbuf, count, datatype, op, comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Allreduce_c +! +! subroutine MPIABI_Allreduce_init(sendbuf, recvbuf, count, datatype, op, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Allreduce_init(sendbuf, recvbuf, count, datatype, op, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Allreduce_init +! +! subroutine MPIABI_Allreduce_init_c(sendbuf, recvbuf, count, datatype, op, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Allreduce_init_c(sendbuf, recvbuf, count, datatype, op, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Allreduce_init_c +! +! subroutine MPIABI_Alltoall(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Alltoall(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Alltoall +! +! subroutine MPIABI_Alltoall_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Alltoall_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Alltoall_c +! +! subroutine MPIABI_Alltoall_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Alltoall_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Alltoall_init +! +! subroutine MPIABI_Alltoall_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Alltoall_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Alltoall_init_c +! +! subroutine MPIABI_Alltoallv(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Alltoallv(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Alltoallv +! +! subroutine MPIABI_Alltoallv_c(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Alltoallv_c(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Alltoallv_c +! +! subroutine MPIABI_Alltoallv_init(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Alltoallv_init(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Alltoallv_init +! +! subroutine MPIABI_Alltoallv_init_c(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Alltoallv_init_c(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Alltoallv_init_c +! +! subroutine MPIABI_Alltoallw(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Alltoallw(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Alltoallw +! +! subroutine MPIABI_Alltoallw_c(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Alltoallw_c(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Alltoallw_c +! +! subroutine MPIABI_Alltoallw_init(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Alltoallw_init(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Alltoallw_init +! +! subroutine MPIABI_Alltoallw_init_c(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Alltoallw_init_c(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Alltoallw_init_c + +subroutine MPIABI_Barrier(comm, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(out) :: ierror + call MPI_Barrier(abi2mpi_comm(comm), ierror) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Barrier + +subroutine MPIABI_Barrier_init(comm, info, request, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + integer wrap_request + call MPI_Barrier_init(abi2mpi_comm(comm), abi2mpi_info(info), wrap_request, ierror) + request = mpi2abi_request(wrap_request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Barrier_init + +subroutine MPIABI_Bcast(buffer, count, datatype, root, comm, ierror) + use mpiwrapper + implicit none + integer buffer(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(out) :: ierror + call MPI_Bcast(buffer, count, abi2mpi_datatype(datatype), abi2mpi_root(root), abi2mpi_comm(comm), ierror) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Bcast + +subroutine MPIABI_Bcast_init(buffer, count, datatype, root, comm, info, request, ierror) + use mpiwrapper + implicit none + integer buffer(*) + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: root + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: request + integer, intent(out) :: ierror + integer wrap_request + call MPI_Bcast_init(buffer, count, abi2mpi_datatype(datatype), abi2mpi_root(root), abi2mpi_comm(comm), abi2mpi_info(info), & + wrap_request, ierror) + request = mpi2abi_request(wrap_request) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Bcast_init + +! subroutine MPIABI_Exscan(sendbuf, recvbuf, count, datatype, op, comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Exscan(sendbuf, recvbuf, count, datatype, op, comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Exscan +! +! subroutine MPIABI_Exscan_c(sendbuf, recvbuf, count, datatype, op, comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Exscan_c(sendbuf, recvbuf, count, datatype, op, comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Exscan_c +! +! subroutine MPIABI_Exscan_init(sendbuf, recvbuf, count, datatype, op, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Exscan_init(sendbuf, recvbuf, count, datatype, op, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Exscan_init +! +! subroutine MPIABI_Exscan_init_c(sendbuf, recvbuf, count, datatype, op, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Exscan_init_c(sendbuf, recvbuf, count, datatype, op, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Exscan_init_c +! +! subroutine MPIABI_Gather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Gather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Gather +! +! subroutine MPIABI_Gather_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Gather_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Gather_c +! +! subroutine MPIABI_Gather_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Gather_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Gather_init +! +! subroutine MPIABI_Gather_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Gather_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Gather_init_c +! +! subroutine MPIABI_Gatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Gatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Gatherv +! +! subroutine MPIABI_Gatherv_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Gatherv_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Gatherv_c +! +! subroutine MPIABI_Gatherv_init(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Gatherv_init(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Gatherv_init +! +! subroutine MPIABI_Gatherv_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Gatherv_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Gatherv_init_c +! +! subroutine MPIABI_Iallgather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Iallgather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Iallgather +! +! subroutine MPIABI_Iallgather_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Iallgather_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Iallgather_c +! +! subroutine MPIABI_Iallgatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Iallgatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Iallgatherv +! +! subroutine MPIABI_Iallgatherv_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Iallgatherv_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Iallgatherv_c +! +! subroutine MPIABI_Iallreduce(sendbuf, recvbuf, count, datatype, op, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Iallreduce(sendbuf, recvbuf, count, datatype, op, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Iallreduce +! +! subroutine MPIABI_Iallreduce_c(sendbuf, recvbuf, count, datatype, op, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Iallreduce_c(sendbuf, recvbuf, count, datatype, op, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Iallreduce_c +! +! subroutine MPIABI_Ialltoall(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Ialltoall(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Ialltoall +! +! subroutine MPIABI_Ialltoall_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Ialltoall_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Ialltoall_c +! +! subroutine MPIABI_Ialltoallv(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Ialltoallv(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Ialltoallv +! +! subroutine MPIABI_Ialltoallv_c(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Ialltoallv_c(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Ialltoallv_c +! +! subroutine MPIABI_Ialltoallw(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Ialltoallw(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Ialltoallw +! +! subroutine MPIABI_Ialltoallw_c(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Ialltoallw_c(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Ialltoallw_c +! +! subroutine MPIABI_Ibarrier(comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Ibarrier(comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Ibarrier +! +! subroutine MPIABI_Ibcast(buffer, count, datatype, root, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Ibcast(buffer, count, datatype, root, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Ibcast +! +! subroutine MPIABI_Ibcast_c(buffer, count, datatype, root, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Ibcast_c(buffer, count, datatype, root, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Ibcast_c +! +! subroutine MPIABI_Iexscan(sendbuf, recvbuf, count, datatype, op, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Iexscan(sendbuf, recvbuf, count, datatype, op, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Iexscan +! +! subroutine MPIABI_Iexscan_c(sendbuf, recvbuf, count, datatype, op, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Iexscan_c(sendbuf, recvbuf, count, datatype, op, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Iexscan_c +! +! subroutine MPIABI_Igather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Igather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Igather +! +! subroutine MPIABI_Igather_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Igather_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Igather_c +! +! subroutine MPIABI_Igatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Igatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Igatherv +! +! subroutine MPIABI_Igatherv_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Igatherv_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Igatherv_c +! +! subroutine MPIABI_Ireduce(sendbuf, recvbuf, count, datatype, op, root, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Ireduce(sendbuf, recvbuf, count, datatype, op, root, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Ireduce +! +! subroutine MPIABI_Ireduce_c(sendbuf, recvbuf, count, datatype, op, root, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Ireduce_c(sendbuf, recvbuf, count, datatype, op, root, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Ireduce_c +! +! subroutine MPIABI_Ireduce_scatter(sendbuf, recvbuf, recvcounts, datatype, op, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Ireduce_scatter(sendbuf, recvbuf, recvcounts, datatype, op, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Ireduce_scatter +! +! subroutine MPIABI_Ireduce_scatter_block(sendbuf, recvbuf, recvcount, datatype, op, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Ireduce_scatter_block(sendbuf, recvbuf, recvcount, datatype, op, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Ireduce_scatter_block +! +! subroutine MPIABI_Ireduce_scatter_block_c(sendbuf, recvbuf, recvcount, datatype, op, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Ireduce_scatter_block_c(sendbuf, recvbuf, recvcount, datatype, op, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Ireduce_scatter_block_c +! +! subroutine MPIABI_Ireduce_scatter_c(sendbuf, recvbuf, recvcounts, datatype, op, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Ireduce_scatter_c(sendbuf, recvbuf, recvcounts, datatype, op, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Ireduce_scatter_c +! +! subroutine MPIABI_Iscan(sendbuf, recvbuf, count, datatype, op, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Iscan(sendbuf, recvbuf, count, datatype, op, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Iscan +! +! subroutine MPIABI_Iscan_c(sendbuf, recvbuf, count, datatype, op, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Iscan_c(sendbuf, recvbuf, count, datatype, op, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Iscan_c +! +! subroutine MPIABI_Iscatter(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Iscatter(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Iscatter +! +! subroutine MPIABI_Iscatter_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Iscatter_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Iscatter_c +! +! subroutine MPIABI_Iscatterv(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Iscatterv(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Iscatterv +! +! subroutine MPIABI_Iscatterv_c(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Iscatterv_c(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Iscatterv_c +! +! subroutine MPIABI_Op_commutative(op, commute, ierror) +! use mpiwrapper +! implicit none +! call MPI_Op_commutative(op, commute, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Op_commutative +! +! subroutine MPIABI_Op_create(user_fn, commute, op, ierror) +! use mpiwrapper +! implicit none +! call MPI_Op_create(user_fn, commute, op, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Op_create +! +! subroutine MPIABI_Op_create_c(user_fn, commute, op, ierror) +! use mpiwrapper +! implicit none +! call MPI_Op_create_c(user_fn, commute, op, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Op_create_c +! +! subroutine MPIABI_Op_free(op, ierror) +! use mpiwrapper +! implicit none +! call MPI_Op_free(op, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Op_free +! +! subroutine MPIABI_Reduce(sendbuf, recvbuf, count, datatype, op, root, comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Reduce(sendbuf, recvbuf, count, datatype, op, root, comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Reduce +! +! subroutine MPIABI_Reduce_c(sendbuf, recvbuf, count, datatype, op, root, comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Reduce_c(sendbuf, recvbuf, count, datatype, op, root, comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Reduce_c +! +! subroutine MPIABI_Reduce_init(sendbuf, recvbuf, count, datatype, op, root, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Reduce_init(sendbuf, recvbuf, count, datatype, op, root, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Reduce_init +! +! subroutine MPIABI_Reduce_init_c(sendbuf, recvbuf, count, datatype, op, root, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Reduce_init_c(sendbuf, recvbuf, count, datatype, op, root, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Reduce_init_c +! +! subroutine MPIABI_Reduce_local(inbuf, inoutbuf, count, datatype, op, ierror) +! use mpiwrapper +! implicit none +! call MPI_Reduce_local(inbuf, inoutbuf, count, datatype, op, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Reduce_local +! +! subroutine MPIABI_Reduce_local_c(inbuf, inoutbuf, count, datatype, op, ierror) +! use mpiwrapper +! implicit none +! call MPI_Reduce_local_c(inbuf, inoutbuf, count, datatype, op, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Reduce_local_c +! +! subroutine MPIABI_Reduce_scatter(sendbuf, recvbuf, recvcounts, datatype, op, comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Reduce_scatter(sendbuf, recvbuf, recvcounts, datatype, op, comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Reduce_scatter +! +! subroutine MPIABI_Reduce_scatter_block(sendbuf, recvbuf, recvcount, datatype, op, comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Reduce_scatter_block(sendbuf, recvbuf, recvcount, datatype, op, comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Reduce_scatter_block +! +! subroutine MPIABI_Reduce_scatter_block_c(sendbuf, recvbuf, recvcount, datatype, op, comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Reduce_scatter_block_c(sendbuf, recvbuf, recvcount, datatype, op, comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Reduce_scatter_block_c +! +! subroutine MPIABI_Reduce_scatter_block_init(sendbuf, recvbuf, recvcount, datatype, op, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Reduce_scatter_block_init(sendbuf, recvbuf, recvcount, datatype, op, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Reduce_scatter_block_init +! +! subroutine MPIABI_Reduce_scatter_block_init_c(sendbuf, recvbuf, recvcount, datatype, op, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Reduce_scatter_block_init_c(sendbuf, recvbuf, recvcount, datatype, op, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Reduce_scatter_block_init_c +! +! subroutine MPIABI_Reduce_scatter_c(sendbuf, recvbuf, recvcounts, datatype, op, comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Reduce_scatter_c(sendbuf, recvbuf, recvcounts, datatype, op, comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Reduce_scatter_c +! +! subroutine MPIABI_Reduce_scatter_init(sendbuf, recvbuf, recvcounts, datatype, op, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Reduce_scatter_init(sendbuf, recvbuf, recvcounts, datatype, op, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Reduce_scatter_init +! +! subroutine MPIABI_Reduce_scatter_init_c(sendbuf, recvbuf, recvcounts, datatype, op, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Reduce_scatter_init_c(sendbuf, recvbuf, recvcounts, datatype, op, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Reduce_scatter_init_c +! +! subroutine MPIABI_Scan(sendbuf, recvbuf, count, datatype, op, comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Scan(sendbuf, recvbuf, count, datatype, op, comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Scan +! +! subroutine MPIABI_Scan_c(sendbuf, recvbuf, count, datatype, op, comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Scan_c(sendbuf, recvbuf, count, datatype, op, comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Scan_c +! +! subroutine MPIABI_Scan_init(sendbuf, recvbuf, count, datatype, op, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Scan_init(sendbuf, recvbuf, count, datatype, op, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Scan_init +! +! subroutine MPIABI_Scan_init_c(sendbuf, recvbuf, count, datatype, op, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Scan_init_c(sendbuf, recvbuf, count, datatype, op, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Scan_init_c +! +! subroutine MPIABI_Scatter(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Scatter(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Scatter +! +! subroutine MPIABI_Scatter_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Scatter_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Scatter_c +! +! subroutine MPIABI_Scatter_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Scatter_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Scatter_init +! +! subroutine MPIABI_Scatter_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Scatter_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Scatter_init_c +! +! subroutine MPIABI_Scatterv(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Scatterv(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Scatterv +! +! subroutine MPIABI_Scatterv_c(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Scatterv_c(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Scatterv_c +! +! subroutine MPIABI_Scatterv_init(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Scatterv_init(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Scatterv_init +! +! subroutine MPIABI_Scatterv_init_c(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Scatterv_init_c(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Scatterv_init_c +! +! subroutine MPIABI_Type_get_value_index(value_type, index_type, pair_type, ierror) +! use mpiwrapper +! implicit none +! call MPI_Type_get_value_index(value_type, index_type, pair_type, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Type_get_value_index +! +! ! A.3.5 Groups, Contexts, Communicators, and Caching C Bindings +! +! subroutine MPIABI_Comm_compare(comm1, comm2, result, ierror) +! use mpiwrapper +! implicit none +! call MPI_Comm_compare(comm1, comm2, result, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Comm_compare +! +! subroutine MPIABI_Comm_create(comm, group, newcomm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Comm_create(comm, group, newcomm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Comm_create +! +! subroutine MPIABI_Comm_create_from_group(group, stringtag, info, errhandler, newcomm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Comm_create_from_group(group, stringtag, info, errhandler, newcomm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Comm_create_from_group +! +! subroutine MPIABI_Comm_create_group(comm, group, tag, newcomm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Comm_create_group(comm, group, tag, newcomm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Comm_create_group +! +! subroutine MPIABI_Comm_create_keyval(comm_copy_attr_fn, comm_delete_attr_fn, comm_keyval, extra_state, ierror) +! use mpiwrapper +! implicit none +! call MPI_Comm_create_keyval(comm_copy_attr_fn, comm_delete_attr_fn, comm_keyval, extra_state, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Comm_create_keyval +! +! subroutine MPIABI_Comm_delete_attr(comm, comm_keyval, ierror) +! use mpiwrapper +! implicit none +! call MPI_Comm_delete_attr(comm, comm_keyval, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Comm_delete_attr +! +! subroutine MPIABI_Comm_dup(comm, newcomm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Comm_dup(comm, newcomm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Comm_dup +! +! subroutine MPIABI_Comm_dup_with_info(comm, info, newcomm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Comm_dup_with_info(comm, info, newcomm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Comm_dup_with_info +! +! subroutine MPIABI_Comm_free(comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Comm_free(comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Comm_free +! +! subroutine MPIABI_Comm_get_name(comm, comm_name, resultlen, ierror) +! use mpiwrapper +! implicit none +! call MPI_Comm_get_name(comm, comm_name, resultlen, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Comm_get_name +! +! subroutine MPIABI_Comm_free_keyval(comm_keyval, ierror) +! use mpiwrapper +! implicit none +! call MPI_Comm_free_keyval(comm_keyval, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Comm_free_keyval +! +! subroutine MPIABI_Comm_get_attr(comm, comm_keyval, attribute_val, flag, ierror) +! use mpiwrapper +! implicit none +! call MPI_Comm_get_attr(comm, comm_keyval, attribute_val, flag, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Comm_get_attr +! +! subroutine MPIABI_Comm_get_info(comm, info_used, ierror) +! use mpiwrapper +! implicit none +! call MPI_Comm_get_info(comm, info_used, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Comm_get_info +! +! subroutine MPIABI_Comm_group(comm, group, ierror) +! use mpiwrapper +! implicit none +! call MPI_Comm_group(comm, group, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Comm_group +! +! subroutine MPIABI_Comm_idup(comm, newcomm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Comm_idup(comm, newcomm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Comm_idup +! +! subroutine MPIABI_Comm_idup_with_info(comm, info, newcomm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Comm_idup_with_info(comm, info, newcomm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Comm_idup_with_info + +subroutine MPIABI_Comm_rank(comm, rank, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(out) :: rank + integer, intent(out) :: ierror + integer wrap_comm + wrap_comm = abi2mpi_comm(comm) + call MPI_Comm_rank(wrap_comm, rank, ierror) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Comm_rank + +! subroutine MPIABI_Comm_remote_group(comm, group, ierror) +! use mpiwrapper +! implicit none +! call MPI_Comm_remote_group(comm, group, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Comm_remote_group +! +! subroutine MPIABI_Comm_remote_size(comm, size, ierror) +! use mpiwrapper +! implicit none +! call MPI_Comm_remote_size(comm, size, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Comm_remote_size +! +! subroutine MPIABI_Comm_set_attr(comm, comm_keyval, attribute_val, ierror) +! use mpiwrapper +! implicit none +! call MPI_Comm_set_attr(comm, comm_keyval, attribute_val, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Comm_set_attr +! +! subroutine MPIABI_Comm_set_info(comm, info, ierror) +! use mpiwrapper +! implicit none +! call MPI_Comm_set_info(comm, info, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Comm_set_info +! +! subroutine MPIABI_Comm_set_name(comm, comm_name, ierror) +! use mpiwrapper +! implicit none +! call MPI_Comm_set_name(comm, comm_name, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Comm_set_name + +subroutine MPIABI_Comm_size(comm, size, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(out) :: size + integer, intent(out) :: ierror + integer wrap_comm + wrap_comm = abi2mpi_comm(comm) + call MPI_Comm_size(wrap_comm, size, ierror) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Comm_size + +subroutine MPIABI_Comm_split(comm, color, key, newcomm, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(in) :: color + integer, intent(in) :: key + integer, intent(out) :: newcomm + integer, intent(out) :: ierror + integer wrap_newcomm + call MPI_Comm_split(abi2mpi_comm(comm), color, key, wrap_newcomm, ierror) + newcomm = mpi2abi_comm(wrap_newcomm) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Comm_split + +! subroutine MPIABI_Group_free(group, ierror) +! use mpiwrapper +! implicit none +! call MPI_Group_free(group, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Group_free +! +! subroutine MPIABI_Comm_split_type(comm, split_type, key, info, newcomm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Comm_split_type(comm, split_type, key, info, newcomm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Comm_split_type +! +! subroutine MPIABI_Comm_test_inter(comm, flag, ierror) +! use mpiwrapper +! implicit none +! call MPI_Comm_test_inter(comm, flag, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Comm_test_inter +! +! subroutine MPIABI_Group_compare(group1, group2, result, ierror) +! use mpiwrapper +! implicit none +! call MPI_Group_compare(group1, group2, result, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Group_compare +! +! subroutine MPIABI_Group_difference(group1, group2, newgroup, ierror) +! use mpiwrapper +! implicit none +! call MPI_Group_difference(group1, group2, newgroup, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Group_difference +! +! subroutine MPIABI_Group_excl(group, n, ranks, newgroup, ierror) +! use mpiwrapper +! implicit none +! call MPI_Group_excl(group, n, ranks, newgroup, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Group_excl +! +! subroutine MPIABI_Group_from_session_pset(session, pset_name, newgroup, ierror) +! use mpiwrapper +! implicit none +! call MPI_Group_from_session_pset(session, pset_name, newgroup, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Group_from_session_pset +! +! subroutine MPIABI_Group_incl(group, n, ranks, newgroup, ierror) +! use mpiwrapper +! implicit none +! call MPI_Group_incl(group, n, ranks, newgroup, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Group_incl +! +! subroutine MPIABI_Group_intersection(group1, group2, newgroup, ierror) +! use mpiwrapper +! implicit none +! call MPI_Group_intersection(group1, group2, newgroup, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Group_intersection +! +! subroutine MPIABI_Group_range_excl(group, n, ranges, newgroup, ierror) +! use mpiwrapper +! implicit none +! call MPI_Group_range_excl(group, n, ranges, newgroup, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Group_range_excl +! +! subroutine MPIABI_Group_range_incl(group, n, ranges, newgroup, ierror) +! use mpiwrapper +! implicit none +! call MPI_Group_range_incl(group, n, ranges, newgroup, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Group_range_incl +! +! subroutine MPIABI_Group_rank(group, rank, ierror) +! use mpiwrapper +! implicit none +! call MPI_Group_rank(group, rank, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Group_rank +! +! subroutine MPIABI_Group_size(group, size, ierror) +! use mpiwrapper +! implicit none +! call MPI_Group_size(group, size, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Group_size +! +! subroutine MPIABI_Group_translate_ranks(group1, n, ranks1, group2, ranks2, ierror) +! use mpiwrapper +! implicit none +! call MPI_Group_translate_ranks(group1, n, ranks1, group2, ranks2, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Group_translate_ranks +! +! subroutine MPIABI_Group_union(group1, group2, newgroup, ierror) +! use mpiwrapper +! implicit none +! call MPI_Group_union(group1, group2, newgroup, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Group_union +! +! subroutine MPIABI_Intercomm_create(local_comm, local_leader, peer_comm, remote_leader, tag, newintercomm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Intercomm_create(local_comm, local_leader, peer_comm, remote_leader, tag, newintercomm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Intercomm_create +! +! subroutine MPIABI_Intercomm_create_from_groups(local_group, local_leader, remote_group, remote_leader, stringtag, info, errhandler, newintercomm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Intercomm_create_from_groups(local_group, local_leader, remote_group, remote_leader, stringtag, info, errhandler, newintercomm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Intercomm_create_from_groups +! +! subroutine MPIABI_Intercomm_merge(intercomm, high, newintracomm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Intercomm_merge(intercomm, high, newintracomm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Intercomm_merge +! +! subroutine MPIABI_Type_create_keyval(type_copy_attr_fn, type_delete_attr_fn, type_keyval, extra_state, ierror) +! use mpiwrapper +! implicit none +! call MPI_Type_create_keyval(type_copy_attr_fn, type_delete_attr_fn, type_keyval, extra_state, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Type_create_keyval +! +! subroutine MPIABI_Type_delete_attr(datatype, type_keyval, ierror) +! use mpiwrapper +! implicit none +! call MPI_Type_delete_attr(datatype, type_keyval, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Type_delete_attr +! +! subroutine MPIABI_Type_free_keyval(type_keyval, ierror) +! use mpiwrapper +! implicit none +! call MPI_Type_free_keyval(type_keyval, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Type_free_keyval +! +! subroutine MPIABI_Type_get_attr(datatype, type_keyval, attribute_val, flag, ierror) +! use mpiwrapper +! implicit none +! call MPI_Type_get_attr(datatype, type_keyval, attribute_val, flag, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Type_get_attr +! +! subroutine MPIABI_Type_get_name(datatype, type_name, resultlen, ierror) +! use mpiwrapper +! implicit none +! call MPI_Type_get_name(datatype, type_name, resultlen, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Type_get_name +! +! subroutine MPIABI_Type_set_attr(datatype, type_keyval, attribute_val, ierror) +! use mpiwrapper +! implicit none +! call MPI_Type_set_attr(datatype, type_keyval, attribute_val, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Type_set_attr +! +! subroutine MPIABI_Type_set_name(datatype, type_name, ierror) +! use mpiwrapper +! implicit none +! call MPI_Type_set_name(datatype, type_name, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Type_set_name +! +! subroutine MPIABI_Win_create_keyval(win_copy_attr_fn, win_delete_attr_fn, win_keyval, extra_state, ierror) +! use mpiwrapper +! implicit none +! call MPI_Win_create_keyval(win_copy_attr_fn, win_delete_attr_fn, win_keyval, extra_state, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_create_keyval +! +! subroutine MPIABI_Win_delete_attr(win, win_keyval, ierror) +! use mpiwrapper +! implicit none +! call MPI_Win_delete_attr(win, win_keyval, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_delete_attr +! +! subroutine MPIABI_Win_free_keyval(win_keyval, ierror) +! use mpiwrapper +! implicit none +! call MPI_Win_free_keyval(win_keyval, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_free_keyval +! +! subroutine MPIABI_Win_get_attr(win, win_keyval, attribute_val, flag, ierror) +! use mpiwrapper +! implicit none +! call MPI_Win_get_attr(win, win_keyval, attribute_val, flag, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_get_attr +! +! subroutine MPIABI_Win_get_name(win, win_name, resultlen, ierror) +! use mpiwrapper +! implicit none +! call MPI_Win_get_name(win, win_name, resultlen, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_get_name +! +! subroutine MPIABI_Win_set_attr(win, win_keyval, attribute_val, ierror) +! use mpiwrapper +! implicit none +! call MPI_Win_set_attr(win, win_keyval, attribute_val, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_set_attr +! +! subroutine MPIABI_Win_set_name(win, win_name, ierror) +! use mpiwrapper +! implicit none +! call MPI_Win_set_name(win, win_name, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_set_name +! +! ! A.3.6 Virtual Topologies for MPI Processes C Bindings +! +! subroutine MPIABI_Cart_coords(comm, rank, maxdims, coords, ierror) +! use mpiwrapper +! implicit none +! call MPI_Cart_coords(comm, rank, maxdims, coords, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Cart_coords +! +! subroutine MPIABI_Cart_create(comm_old, ndims, dims, periods, reorder, comm_cart, ierror) +! use mpiwrapper +! implicit none +! call MPI_Cart_create(comm_old, ndims, dims, periods, reorder, comm_cart, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Cart_create +! +! subroutine MPIABI_Cart_get(comm, maxdims, dims, periods, coords, ierror) +! use mpiwrapper +! implicit none +! call MPI_Cart_get(comm, maxdims, dims, periods, coords, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Cart_get +! +! subroutine MPIABI_Cart_map(comm, ndims, dims, periods, newrank, ierror) +! use mpiwrapper +! implicit none +! call MPI_Cart_map(comm, ndims, dims, periods, newrank, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Cart_map +! +! subroutine MPIABI_Cart_rank(comm, coords, rank, ierror) +! use mpiwrapper +! implicit none +! call MPI_Cart_rank(comm, coords, rank, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Cart_rank +! +! subroutine MPIABI_Cart_shift(comm, direction, disp, rank_source, rank_dest, ierror) +! use mpiwrapper +! implicit none +! call MPI_Cart_shift(comm, direction, disp, rank_source, rank_dest, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Cart_shift +! +! subroutine MPIABI_Cart_sub(comm, remain_dims, newcomm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Cart_sub(comm, remain_dims, newcomm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Cart_Sub +! +! subroutine MPIABI_Cartdim_get(comm, ndims, ierror) +! use mpiwrapper +! implicit none +! call MPI_Cartdim_get(comm, ndims, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Cartdim_get +! +! subroutine MPIABI_Dims_create(nnodes, ndims, dims, ierror) +! use mpiwrapper +! implicit none +! call MPI_Dims_create(nnodes, ndims, dims, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Dims_create +! +! subroutine MPIABI_Dist_graph_create(comm_old, n, sources, degrees, destinations, weights, info, reorder, comm_dist_graph, ierror) +! use mpiwrapper +! implicit none +! call MPI_Dist_graph_create(comm_old, n, sources, degrees, destinations, weights, info, reorder, comm_dist_graph, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Dist_graph_create +! +! subroutine MPIABI_Dist_graph_create_adjacent(comm_old, indegree, sources, sourceweights, outdegree, destinations, destweights, info, reorder, comm_dist_graph, ierror) +! use mpiwrapper +! implicit none +! call MPI_Dist_graph_create_adjacent(comm_old, indegree, sources, sourceweights, outdegree, destinations, destweights, info, reorder, comm_dist_graph, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Dist_graph_create_adjacent +! +! subroutine MPIABI_Dist_graph_neighbors(comm, maxindegree, sources, sourceweights, maxoutdegree, destinations, destweights, ierror) +! use mpiwrapper +! implicit none +! call MPI_Dist_graph_neighbors(comm, maxindegree, sources, sourceweights, maxoutdegree, destinations, destweights, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Dist_graph_neighbors +! +! subroutine MPIABI_Dist_graph_neighbors_count(comm, indegree, outdegree, weighted, ierror) +! use mpiwrapper +! implicit none +! call MPI_Dist_graph_neighbors_count(comm, indegree, outdegree, weighted, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Dist_graph_neighbors_count +! +! subroutine MPIABI_Graph_create(comm_old, nnodes, index, edges, reorder, comm_graph, ierror) +! use mpiwrapper +! implicit none +! call MPI_Graph_create(comm_old, nnodes, index, edges, reorder, comm_graph, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Graph_create +! +! subroutine MPIABI_Graph_get(comm, maxindex, maxedges, index, edges, ierror) +! use mpiwrapper +! implicit none +! call MPI_Graph_get(comm, maxindex, maxedges, index, edges, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Graph_get +! +! subroutine MPIABI_Graph_map(comm, nnodes, index, edges, newrank, ierror) +! use mpiwrapper +! implicit none +! call MPI_Graph_map(comm, nnodes, index, edges, newrank, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Graph_map +! +! subroutine MPIABI_Graph_neighbors(comm, rank, maxneighbors, neighbors, ierror) +! use mpiwrapper +! implicit none +! call MPI_Graph_neighbors(comm, rank, maxneighbors, neighbors, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Graph_neighbors +! +! subroutine MPIABI_Graph_neighbors_count(comm, rank, nneighbors, ierror) +! use mpiwrapper +! implicit none +! call MPI_Graph_neighbors_count(comm, rank, nneighbors, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Graph_neighbors_count +! +! subroutine MPIABI_Graphdims_get(comm, nnodes, nedges, ierror) +! use mpiwrapper +! implicit none +! call MPI_Graphdims_get(comm, nnodes, nedges, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Graphdims_get +! +! subroutine MPIABI_Ineighbor_allgather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Ineighbor_allgather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Ineighbor_allgather +! +! subroutine MPIABI_Ineighbor_allgather_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Ineighbor_allgather_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Ineighbor_allgather_c +! +! subroutine MPIABI_Ineighbor_allgatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Ineighbor_allgatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Ineighbor_allgatherv +! +! subroutine MPIABI_Ineighbor_allgatherv_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Ineighbor_allgatherv_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Ineighbor_allgatherv_c +! +! subroutine MPIABI_Ineighbor_alltoall(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Ineighbor_alltoall(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Ineighbor_alltoall +! +! subroutine MPIABI_Ineighbor_alltoall_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Ineighbor_alltoall_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Ineighbor_alltoall_c +! +! subroutine MPIABI_Ineighbor_alltoallv(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Ineighbor_alltoallv(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Ineighbor_alltoallv +! +! subroutine MPIABI_Ineighbor_alltoallv_c(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Ineighbor_alltoallv_c(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Ineighbor_alltoallv_c +! +! subroutine MPIABI_Ineighbor_alltoallw(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Ineighbor_alltoallw(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Ineighbor_alltoallw +! +! subroutine MPIABI_Ineighbor_alltoallw_c(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Ineighbor_alltoallw_c(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Ineighbor_alltoallw_c +! +! subroutine MPIABI_Neighbor_allgather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Neighbor_allgather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Neighbor_allgather +! +! subroutine MPIABI_Neighbor_allgather_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Neighbor_allgather_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Neighbor_allgather_c +! +! subroutine MPIABI_Neighbor_allgather_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Neighbor_allgather_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Neighbor_allgather_init +! +! subroutine MPIABI_Neighbor_allgather_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Neighbor_allgather_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Neighbor_allgather_init_c +! +! subroutine MPIABI_Neighbor_allgatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Neighbor_allgatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Neighbor_allgatherv +! +! subroutine MPIABI_Neighbor_allgatherv_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Neighbor_allgatherv_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Neighbor_allgatherv_c +! +! subroutine MPIABI_Neighbor_allgatherv_init(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Neighbor_allgatherv_init(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Neighbor_allgatherv_init +! +! subroutine MPIABI_Neighbor_allgatherv_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Neighbor_allgatherv_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Neighbor_allgatherv_init_c +! +! subroutine MPIABI_Neighbor_alltoall(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Neighbor_alltoall(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Neighbor_alltoall +! +! subroutine MPIABI_Neighbor_alltoall_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Neighbor_alltoall_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Neighbor_alltoall_c +! +! subroutine MPIABI_Neighbor_alltoall_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Neighbor_alltoall_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Neighbor_alltoall_init +! +! subroutine MPIABI_Neighbor_alltoall_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Neighbor_alltoall_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Neighbor_alltoall_init_c +! +! subroutine MPIABI_Neighbor_alltoallv(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Neighbor_alltoallv(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Neighbor_alltoallv +! +! subroutine MPIABI_Neighbor_alltoallv_c(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Neighbor_alltoallv_c(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Neighbor_alltoallv_c +! +! subroutine MPIABI_Neighbor_alltoallv_init(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Neighbor_alltoallv_init(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Neighbor_alltoallv_init +! +! subroutine MPIABI_Neighbor_alltoallv_init_c(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Neighbor_alltoallv_init_c(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Neighbor_alltoallv_init_c +! +! subroutine MPIABI_Neighbor_alltoallw(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Neighbor_alltoallw(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Neighbor_alltoallw +! +! subroutine MPIABI_Neighbor_alltoallw_c(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Neighbor_alltoallw_c(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Neighbor_alltoallw_c +! +! subroutine MPIABI_Neighbor_alltoallw_init(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Neighbor_alltoallw_init(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Neighbor_alltoallw_init +! +! subroutine MPIABI_Neighbor_alltoallw_init_c(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, info, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Neighbor_alltoallw_init_c(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, info, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Neighbor_alltoallw_init_c +! +! subroutine MPIABI_Topo_test(comm, status, ierror) +! use mpiwrapper +! implicit none +! call MPI_Topo_test(comm, status, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Topo_test +! +! ! A.3.7 MPI Environmental Management C Bindings +! +! subroutine MPIABI_Add_error_class(errorclass, ierror) +! use mpiwrapper +! implicit none +! call MPI_Add_error_class(errorclass, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Add_error_class +! +! subroutine MPIABI_Add_error_code(errorclass, errorcode, ierror) +! use mpiwrapper +! implicit none +! call MPI_Add_error_code(errorclass, errorcode, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Add_error_code +! +! subroutine MPIABI_Add_error_string(errorcode, string, ierror) +! use mpiwrapper +! implicit none +! call MPI_Add_error_string(errorcode, string, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Add_error_string +! +! subroutine MPIABI_Alloc_mem(size, info, baseptr, ierror) +! use mpiwrapper +! implicit none +! call MPI_Alloc_mem(size, info, baseptr, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Alloc_mem +! +! subroutine MPIABI_Comm_call_errhandler(comm, errorcode, ierror) +! use mpiwrapper +! implicit none +! call MPI_Comm_call_errhandler(comm, errorcode, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Comm_call_errhandler +! +! subroutine MPIABI_Comm_create_errhandler(comm_errhandler_fn, errhandler, ierror) +! use mpiwrapper +! implicit none +! call MPI_Comm_create_errhandler(comm_errhandler_fn, errhandler, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Comm_create_errhandler +! +! subroutine MPIABI_Comm_get_errhandler(comm, errhandler, ierror) +! use mpiwrapper +! implicit none +! call MPI_Comm_get_errhandler(comm, errhandler, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Comm_get_errhandler +! +! subroutine MPIABI_Comm_set_errhandler(comm, errhandler, ierror) +! use mpiwrapper +! implicit none +! call MPI_Comm_set_errhandler(comm, errhandler, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Comm_set_errhandler +! +! subroutine MPIABI_Errhandler_free(errhandler, ierror) +! use mpiwrapper +! implicit none +! call MPI_Errhandler_free(errhandler, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Errhandler_free +! +! subroutine MPIABI_Error_class(errorcode, errorclass, ierror) +! use mpiwrapper +! implicit none +! call MPI_Error_class(errorcode, errorclass, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Error_class +! +! subroutine MPIABI_Error_string(errorcode, string, resultlen, ierror) +! use mpiwrapper +! implicit none +! call MPI_Error_string(errorcode, string, resultlen, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Error_string +! +! subroutine MPIABI_File_call_errhandler(fh, errorcode, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_call_errhandler(fh, errorcode, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_call_errhandler +! +! subroutine MPIABI_File_create_errhandler(file_errhandler_fn, errhandler, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_create_errhandler(file_errhandler_fn, errhandler, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_create_errhandler +! +! subroutine MPIABI_File_get_errhandler(file, errhandler, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_get_errhandler(file, errhandler, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_get_errhandler +! +! subroutine MPIABI_File_set_errhandler(file, errhandler, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_set_errhandler(file, errhandler, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_set_errhandler +! +! subroutine MPIABI_Free_mem(base, ierror) +! use mpiwrapper +! implicit none +! call MPI_Free_mem(base, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Free_mem +! +! subroutine MPIABI_Get_hw_resource_info(hw_info, ierror) +! use mpiwrapper +! implicit none +! call MPI_Get_hw_resource_info(hw_info, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Get_hw_resource_info +! +! subroutine MPIABI_Get_library_version(version, resultlen, ierror) +! use mpiwrapper +! implicit none +! call MPI_Get_library_version(version, resultlen, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Get_library_version +! +! subroutine MPIABI_Get_processor_name(name, resultlen, ierror) +! use mpiwrapper +! implicit none +! call MPI_Get_processor_name(name, resultlen, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Get_processor_name +! +! subroutine MPIABI_Get_version(version, subversion, ierror) +! use mpiwrapper +! implicit none +! call MPI_Get_version(version, subversion, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Get_version +! +! subroutine MPIABI_Remove_error_class(errorclass, ierror) +! use mpiwrapper +! implicit none +! call MPI_Remove_error_class(errorclass, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Remove_error_class +! +! subroutine MPIABI_Remove_error_code(errorcode, ierror) +! use mpiwrapper +! implicit none +! call MPI_Remove_error_code(errorcode, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Remove_error_code +! +! subroutine MPIABI_Remove_error_string(errorcode, ierror) +! use mpiwrapper +! implicit none +! call MPI_Remove_error_string(errorcode, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Remove_error_string +! +! subroutine MPIABI_Session_call_errhandler(session, errorcode, ierror) +! use mpiwrapper +! implicit none +! call MPI_Session_call_errhandler(session, errorcode, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Session_call_errhandler +! +! subroutine MPIABI_Session_create_errhandler(session_errhandler_fn, errhandler, ierror) +! use mpiwrapper +! implicit none +! call MPI_Session_create_errhandler(session_errhandler_fn, errhandler, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Session_create_errhandler +! +! subroutine MPIABI_Session_get_errhandler(session, errhandler, ierror) +! use mpiwrapper +! implicit none +! call MPI_Session_get_errhandler(session, errhandler, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Session_get_errhandler +! +! subroutine MPIABI_Session_set_errhandler(session, errhandler, ierror) +! use mpiwrapper +! implicit none +! call MPI_Session_set_errhandler(session, errhandler, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Session_set_errhandler +! +! subroutine MPIABI_Win_call_errhandler(win, errorcode, ierror) +! use mpiwrapper +! implicit none +! call MPI_Win_call_errhandler(win, errorcode, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_call_errhandler +! +! subroutine MPIABI_Win_create_errhandler(win_errhandler_fn, errhandler, ierror) +! use mpiwrapper +! implicit none +! call MPI_Win_create_errhandler(win_errhandler_fn, errhandler, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_create_errhandler +! +! subroutine MPIABI_Win_get_errhandler(win, errhandler, ierror) +! use mpiwrapper +! implicit none +! call MPI_Win_get_errhandler(win, errhandler, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_get_errhandler +! +! subroutine MPIABI_Win_set_errhandler(win, errhandler, ierror) +! use mpiwrapper +! implicit none +! call MPI_Win_set_errhandler(win, errhandler, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_set_errhandler + +double precision function MPIABI_Wtick() + use mpiwrapper + implicit none + MPIABI_Wtick = MPI_Wtick() +end function MPIABI_Wtick + +double precision function MPIABI_Wtime() + use mpiwrapper + implicit none + MPIABI_Wtime = MPI_Wtime() +end function MPIABI_Wtime + +! A.3.8 The Info Object C Bindings + +! subroutine MPIABI_Info_create(info, ierror) +! use mpiwrapper +! implicit none +! call MPI_Info_create(info, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Info_create +! +! subroutine MPIABI_Info_create_env(argc, argv, info, ierror) +! use mpiwrapper +! implicit none +! call MPI_Info_create_env(argc, argv, info, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Info_create_env +! +! subroutine MPIABI_Info_delete(info, key, ierror) +! use mpiwrapper +! implicit none +! call MPI_Info_delete(info, key, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Info_delete +! +! subroutine MPIABI_Info_dup(info, newinfo, ierror) +! use mpiwrapper +! implicit none +! call MPI_Info_dup(info, newinfo, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Info_dup +! +! subroutine MPIABI_Info_free(info, ierror) +! use mpiwrapper +! implicit none +! call MPI_Info_free(info, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Info_free +! +! subroutine MPIABI_Info_get_nkeys(info, nkeys, ierror) +! use mpiwrapper +! implicit none +! call MPI_Info_get_nkeys(info, nkeys, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Info_get_nkeys +! +! subroutine MPIABI_Info_get_nthkey(info, n, key, ierror) +! use mpiwrapper +! implicit none +! call MPI_Info_get_nthkey(info, n, key, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Info_get_nthkey +! +! subroutine MPIABI_Info_get_string(info, key, buflen, value, flag, ierror) +! use mpiwrapper +! implicit none +! call MPI_Info_get_string(info, key, buflen, value, flag, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Info_get_string +! +! subroutine MPIABI_Info_set(info, key, value, ierror) +! use mpiwrapper +! implicit none +! call MPI_Info_set(info, key, value, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Info_set + +! A.3.9 Process Creation and Management C Bindings + +subroutine MPIABI_Abort(comm, errorcode, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: comm + integer, intent(in) :: errorcode + integer, intent(out) :: ierror + call MPI_Abort(abi2mpi_comm(comm), errorcode, ierror) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Abort + +! subroutine MPIABI_Close_port(port_name, ierror) +! use mpiwrapper +! implicit none +! call MPI_Close_port(port_name, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Close_port +! +! subroutine MPIABI_Comm_accept(port_name, info, root, comm, newcomm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Comm_accept(port_name, info, root, comm, newcomm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Comm_accept +! +! subroutine MPIABI_Comm_connect(port_name, info, root, comm, newcomm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Comm_connect(port_name, info, root, comm, newcomm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Comm_connect +! +! subroutine MPIABI_Comm_disconnect(comm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Comm_disconnect(comm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Comm_disconnect +! +! subroutine MPIABI_Comm_get_parent(parent, ierror) +! use mpiwrapper +! implicit none +! call MPI_Comm_get_parent(parent, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Comm_get_parent +! +! subroutine MPIABI_Comm_join(fd, intercomm, ierror) +! use mpiwrapper +! implicit none +! call MPI_Comm_join(fd, intercomm, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Comm_join +! +! subroutine MPIABI_Comm_spawn(command, argv, maxprocs, info, root, comm, intercomm, array_of_errcodes, ierror) +! use mpiwrapper +! implicit none +! call MPI_Comm_spawn(command, argv, maxprocs, info, root, comm, intercomm, array_of_errcodes, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Comm_spawn +! +! subroutine MPIABI_Comm_spawn_multiple(count, array_of_commands, array_of_argv, array_of_maxprocs, array_of_info, root, comm, intercomm, array_of_errcodes, ierror) +! use mpiwrapper +! implicit none +! call MPI_Comm_spawn_multiple(count, array_of_commands, array_of_argv, array_of_maxprocs, array_of_info, root, comm, intercomm, array_of_errcodes, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Comm_spawn_multiple + +subroutine MPIABI_Finalize(ierror) + use mpiwrapper + implicit none + integer, intent(out) :: ierror + call MPI_Finalize(ierror) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Finalize + +subroutine MPIABI_Finalized(flag, ierror) + use mpiwrapper + implicit none + logical, intent(out) :: flag + integer, intent(out) :: ierror + call MPI_Finalized(flag, ierror) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Finalized + +subroutine MPIABI_Init(ierror) + use mpiwrapper + implicit none + integer, intent(out) :: ierror + call MPI_Init(ierror) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Init + +subroutine MPIABI_Init_thread(required, provided, ierror) + use mpiwrapper + implicit none + integer, intent(in) :: required + integer, intent(out) :: provided + integer, intent(out) :: ierror + call MPI_Init_thread(abi2mpi_threadlevel(required), abi2mpi_threadlevel(provided), ierror) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Init_thread + +subroutine MPIABI_Initialized(flag, ierror) + use mpiwrapper + implicit none + logical, intent(out) :: flag + integer, intent(out) :: ierror + call MPI_Initialized(flag, ierror) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Initialized + +subroutine MPIABI_Is_thread_main(flag, ierror) + use mpiwrapper + implicit none + logical, intent(out) :: flag + integer, intent(out) :: ierror + call MPI_Is_thread_main(flag, ierror) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Is_thread_main + +! subroutine MPIABI_Lookup_name(service_name, info, port_name, ierror) +! use mpiwrapper +! implicit none +! call MPI_Lookup_name(service_name, info, port_name, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Lookup_name +! +! subroutine MPIABI_Open_port(info, port_name, ierror) +! use mpiwrapper +! implicit none +! call MPI_Open_port(info, port_name, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Open_port +! +! subroutine MPIABI_Publish_name(service_name, info, port_name, ierror) +! use mpiwrapper +! implicit none +! call MPI_Publish_name(service_name, info, port_name, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Publish_name + +subroutine MPIABI_Query_thread(provided, ierror) + use mpiwrapper + implicit none + integer, intent(out) :: provided + integer, intent(out) :: ierror + integer wrap_provided + call MPI_Query_thread(wrap_provided, ierror) + provided = mpi2abi_threadlevel(wrap_provided) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Query_thread + +! subroutine MPIABI_Session_finalize(session, ierror) +! use mpiwrapper +! implicit none +! call MPI_Session_finalize(session, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Session_finalize +! +! subroutine MPIABI_Session_get_info(session, info_used, ierror) +! use mpiwrapper +! implicit none +! call MPI_Session_get_info(session, info_used, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Session_get_info +! +! subroutine MPIABI_Session_get_nth_pset(session, info, n, pset_len, pset_name, ierror) +! use mpiwrapper +! implicit none +! call MPI_Session_get_nth_pset(session, info, n, pset_len, pset_name, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Session_get_nth_pset +! +! subroutine MPIABI_Session_get_num_psets(session, info, npset_names, ierror) +! use mpiwrapper +! implicit none +! call MPI_Session_get_num_psets(session, info, npset_names, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Session_get_num_psets +! +! subroutine MPIABI_Session_get_pset_info(session, pset_name, info, ierror) +! use mpiwrapper +! implicit none +! call MPI_Session_get_pset_info(session, pset_name, info, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Session_get_pset_info +! +! subroutine MPIABI_Session_init(info, errhandler, session, ierror) +! use mpiwrapper +! implicit none +! call MPI_Session_init(info, errhandler, session, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Session_init +! +! subroutine MPIABI_Unpublish_name(service_name, info, port_name, ierror) +! use mpiwrapper +! implicit none +! call MPI_Unpublish_name(service_name, info, port_name, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Unpublish_name +! +! ! A.3.10 One-Sided Communications C Bindings +! +! subroutine MPIABI_Accumulate(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, op, win) +! use mpiwrapper +! implicit none +! call MPI_Accumulate(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, op, win) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Accumulate +! +! subroutine MPIABI_Accumulate_c(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, op, win) +! use mpiwrapper +! implicit none +! call MPI_Accumulate_c(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, op, win) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Accumulate_c +! +! subroutine MPIABI_Compare_and_swap(origin_addr, compare_addr, result_addr, datatype, target_rank, target_disp, win) +! use mpiwrapper +! implicit none +! call MPI_Compare_and_swap(origin_addr, compare_addr, result_addr, datatype, target_rank, target_disp, win) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Compare_and_swap +! +! subroutine MPIABI_Fetch_and_op(origin_addr, result_addr, datatype, target_rank, target_disp, op, win) +! use mpiwrapper +! implicit none +! call MPI_Fetch_and_op(origin_addr, result_addr, datatype, target_rank, target_disp, op, win) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Fetch_and_op +! +! subroutine MPIABI_Get(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win) +! use mpiwrapper +! implicit none +! call MPI_Get(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Get +! +! subroutine MPIABI_Get_accumulate(origin_addr, origin_count, origin_datatype, result_addr, result_count, result_datatype, target_rank, target_disp, target_count, target_datatype, op, win) +! use mpiwrapper +! implicit none +! call 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) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Get_accumulate +! +! subroutine MPIABI_Get_accumulate_c(origin_addr, origin_count, origin_datatype, result_addr, result_count, result_datatype, target_rank, target_disp, target_count, target_datatype, op, win) +! use mpiwrapper +! implicit none +! call MPI_Get_accumulate_c(origin_addr, origin_count, origin_datatype, result_addr, result_count, result_datatype, target_rank, target_disp, target_count, target_datatype, op, win) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Get_accumulate_c +! +! subroutine MPIABI_Get_c(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win) +! use mpiwrapper +! implicit none +! call MPI_Get_c(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Get_c +! +! subroutine MPIABI_Put(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win) +! use mpiwrapper +! implicit none +! call MPI_Put(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Put +! +! subroutine MPIABI_Put_c(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win) +! use mpiwrapper +! implicit none +! call MPI_Put_c(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Put_c +! +! subroutine MPIABI_Raccumulate(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, op, win, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Raccumulate(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, op, win, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Raccumulate +! +! subroutine MPIABI_Raccumulate_c(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, op, win, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Raccumulate_c(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, op, win, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Raccumulate_c +! +! subroutine MPIABI_Rget(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Rget(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Rget +! +! subroutine MPIABI_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, ierror) +! use mpiwrapper +! implicit none +! call 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, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Rget_accumulate +! +! subroutine MPIABI_Rget_accumulate_c(origin_addr, origin_count, origin_datatype, result_addr, result_count, result_datatype, target_rank, target_disp, target_count, target_datatype, op, win, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Rget_accumulate_c(origin_addr, origin_count, origin_datatype, result_addr, result_count, result_datatype, target_rank, target_disp, target_count, target_datatype, op, win, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Rget_accumulate_c +! +! subroutine MPIABI_Rget_c(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Rget_c(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Rget_c +! +! subroutine MPIABI_Rput(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Rput(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Rput +! +! subroutine MPIABI_Rput_c(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Rput_c(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Rput_c +! +! subroutine MPIABI_Win_allocate(size, disp_unit, info, comm, baseptr, win) +! use mpiwrapper +! implicit none +! call MPI_Win_allocate(size, disp_unit, info, comm, baseptr, win) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_allocate +! +! subroutine MPIABI_Win_allocate_c(size, disp_unit, info, comm, baseptr, win) +! use mpiwrapper +! implicit none +! call MPI_Win_allocate_c(size, disp_unit, info, comm, baseptr, win) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_allocate_c +! +! subroutine MPIABI_Win_allocate_shared(size, disp_unit, info, comm, baseptr, win) +! use mpiwrapper +! implicit none +! call MPI_Win_allocate_shared(size, disp_unit, info, comm, baseptr, win) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_allocate_shared +! +! subroutine MPIABI_Win_allocate_shared_c(size, disp_unit, info, comm, baseptr, win) +! use mpiwrapper +! implicit none +! call MPI_Win_allocate_shared_c(size, disp_unit, info, comm, baseptr, win) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_allocate_shared_c +! +! subroutine MPIABI_Win_attach(win, base, size, ierror) +! use mpiwrapper +! implicit none +! call MPI_Win_attach(win, base, size, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_attach +! +! subroutine MPIABI_Win_complete(win) +! use mpiwrapper +! implicit none +! call MPI_Win_complete(win) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_complete +! +! subroutine MPIABI_Win_create(base, size, disp_unit, info, comm, win) +! use mpiwrapper +! implicit none +! call MPI_Win_create(base, size, disp_unit, info, comm, win) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_create +! +! subroutine MPIABI_Win_create_c(base, size, disp_unit, info, comm, win) +! use mpiwrapper +! implicit none +! call MPI_Win_create_c(base, size, disp_unit, info, comm, win) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_create_c +! +! subroutine MPIABI_Win_create_dynamic(info, comm, win) +! use mpiwrapper +! implicit none +! call MPI_Win_create_dynamic(info, comm, win) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_create_dynamic +! +! subroutine MPIABI_Win_detach(win, base, ierror) +! use mpiwrapper +! implicit none +! call MPI_Win_detach(win, base, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_detach +! +! subroutine MPIABI_Win_fence(assert, win) +! use mpiwrapper +! implicit none +! call MPI_Win_fence(assert, win) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_fence +! +! subroutine MPIABI_Win_flush(rank, win) +! use mpiwrapper +! implicit none +! call MPI_Win_flush(rank, win) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_flush +! +! subroutine MPIABI_Win_flush_all(win) +! use mpiwrapper +! implicit none +! call MPI_Win_flush_all(win) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_flush_all +! +! subroutine MPIABI_Win_flush_local(rank, win) +! use mpiwrapper +! implicit none +! call MPI_Win_flush_local(rank, win) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_flush_local +! +! subroutine MPIABI_Win_flush_local_all(win) +! use mpiwrapper +! implicit none +! call MPI_Win_flush_local_all(win) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_flush_local_all +! +! subroutine MPIABI_Win_free(win) +! use mpiwrapper +! implicit none +! call MPI_Win_free(win) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_free +! +! subroutine MPIABI_Win_get_group(win, group, ierror) +! use mpiwrapper +! implicit none +! call MPI_Win_get_group(win, group, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_get_group +! +! subroutine MPIABI_Win_get_info(win, info_used, ierror) +! use mpiwrapper +! implicit none +! call MPI_Win_get_info(win, info_used, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_get_info +! +! subroutine MPIABI_Win_lock(lock_type, rank, assert, win) +! use mpiwrapper +! implicit none +! call MPI_Win_lock(lock_type, rank, assert, win) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_lock +! +! subroutine MPIABI_Win_lock_all(assert, win) +! use mpiwrapper +! implicit none +! call MPI_Win_lock_all(assert, win) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_lock_all +! +! subroutine MPIABI_Win_post(group, assert, win) +! use mpiwrapper +! implicit none +! call MPI_Win_post(group, assert, win) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_post +! +! subroutine MPIABI_Win_set_info(win, info, ierror) +! use mpiwrapper +! implicit none +! call MPI_Win_set_info(win, info, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_set_info +! +! subroutine MPIABI_Win_shared_query(win, rank, size, disp_unit, baseptr, ierror) +! use mpiwrapper +! implicit none +! call MPI_Win_shared_query(win, rank, size, disp_unit, baseptr, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_shared_query +! +! subroutine MPIABI_Win_shared_query_c(win, rank, size, disp_unit, baseptr, ierror) +! use mpiwrapper +! implicit none +! call MPI_Win_shared_query_c(win, rank, size, disp_unit, baseptr, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_shared_query_c +! +! subroutine MPIABI_Win_start(group, assert, win) +! use mpiwrapper +! implicit none +! call MPI_Win_start(group, assert, win) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_start +! +! subroutine MPIABI_Win_sync(win) +! use mpiwrapper +! implicit none +! call MPI_Win_sync(win) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_sync +! +! subroutine MPIABI_Win_test(win, flag, ierror) +! use mpiwrapper +! implicit none +! call MPI_Win_test(win, flag, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_test +! +! subroutine MPIABI_Win_unlock(rank, win) +! use mpiwrapper +! implicit none +! call MPI_Win_unlock(rank, win) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_unlock +! +! subroutine MPIABI_Win_unlock_all(win) +! use mpiwrapper +! implicit none +! call MPI_Win_unlock_all(win) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_unlock_all +! +! subroutine MPIABI_Win_wait(win) +! use mpiwrapper +! implicit none +! call MPI_Win_wait(win) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Win_wait +! +! ! A.3.11 External Interfaces C Bindings +! +! subroutine MPIABI_Grequest_complete(request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Grequest_complete(request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Grequest_complete +! +! subroutine MPIABI_Grequest_start(query_fn, free_fn, cancel_fn, extra_state, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_Grequest_start(query_fn, free_fn, cancel_fn, extra_state, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Grequest_start + +subroutine MPIABI_Status_set_cancelled(status, flag, ierror) + use mpiwrapper + implicit none + integer, intent(inout) :: status(MPIABI_STATUS_SIZE) + logical, intent(in) :: flag + integer, intent(out) :: ierror + integer wrap_status(MPI_STATUS_SIZE) + call abi2mpi_status(status, wrap_status) + call MPI_Status_set_cancelled(wrap_status, flag, ierror) + call mpi2abi_status(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Status_set_cancelled + +subroutine MPIABI_Status_set_elements(status, datatype, count, ierror) + use mpiwrapper + implicit none + integer, intent(inout) :: status(MPIABI_STATUS_SIZE) + integer, intent(in) :: datatype + integer, intent(in) :: count + integer, intent(out) :: ierror + integer wrap_status(MPI_STATUS_SIZE) + call abi2mpi_status(status, wrap_status) + call MPI_Status_set_elements(wrap_status, abi2mpi_datatype(datatype), count, ierror) + call mpi2abi_status(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_Status_set_elements + +subroutine MPIABI_Status_set_error(status, err, ierror) + use mpiwrapper + implicit none + integer, intent(inout) :: status(MPIABI_STATUS_SIZE) + integer, intent(in) :: err + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER >= 410 + integer wrap_status(MPI_STATUS_SIZE) + call abi2mpi_status(status, wrap_status) + call MPI_Status_set_error(wrap_status, abi2mpi_errorcode(err), ierror) + call mpi2abi_status(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +#else + call assert(.false.) +#endif +end subroutine MPIABI_Status_set_error + +subroutine MPIABI_Status_set_source(status, source, ierror) + use mpiwrapper + implicit none + integer, intent(inout) :: status(MPIABI_STATUS_SIZE) + integer, intent(in) :: source + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER >= 410 + integer wrap_status(MPI_STATUS_SIZE) + call abi2mpi_status(status, wrap_status) + call MPI_Status_set_source(wrap_status, abi2mpi_proc(source), ierror) + call mpi2abi_status(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +#else + call assert(.false.) +#endif +end subroutine MPIABI_Status_set_source + +subroutine MPIABI_Status_set_tag(status, tag, ierror) + use mpiwrapper + implicit none + integer, intent(inout) :: status(MPIABI_STATUS_SIZE) + integer, intent(in) :: tag + integer, intent(out) :: ierror +#if MPI_VERSION_NUMBER >= 410 + integer wrap_status(MPI_STATUS_SIZE) + call abi2mpi_status(status, wrap_status) + call MPI_Status_set_tag(wrap_status, abi2mpi_tag(tag), ierror) + call mpi2abi_status(wrap_status, status) + ierror = mpi2abi_errorcode(ierror) +#else + call assert(.false.) +#endif +end subroutine MPIABI_Status_set_tag + +! A.3.12 I/O C Bindings + +subroutine MPIABI_File_close(fh, ierror) + use mpiwrapper + implicit none + integer, intent(inout) :: fh + integer, intent(out) :: ierror + integer wrap_fh + wrap_fh = abi2mpi_file(fh) + call MPI_File_close(wrap_fh, ierror) + fh = mpi2abi_file(wrap_fh) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_close + +subroutine MPIABI_File_delete(filename, info, ierror) + use mpiwrapper + implicit none + character(*), intent(in) :: filename + integer, intent(in) :: info + integer, intent(out) :: ierror + call MPI_File_delete(filename, abi2mpi_info(info), ierror) + ierror = mpi2abi_errorcode(ierror) +end subroutine MPIABI_File_delete + +! subroutine MPIABI_File_get_amode(fh, amode, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_get_amode(fh, amode, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_get_amode +! +! subroutine MPIABI_File_get_atomicity(fh, flag, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_get_atomicity(fh, flag, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_get_atomicity +! +! subroutine MPIABI_File_get_byte_offset(fh, offset, disp, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_get_byte_offset(fh, offset, disp, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_get_byte_offset +! +! subroutine MPIABI_File_get_group(fh, group, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_get_group(fh, group, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_get_group +! +! subroutine MPIABI_File_get_info(fh, info_used, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_get_info(fh, info_used, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_get_info +! +! subroutine MPIABI_File_get_position(fh, offset, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_get_position(fh, offset, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_get_position +! +! subroutine MPIABI_File_get_position_shared(fh, offset, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_get_position_shared(fh, offset, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_get_position_shared +! +! subroutine MPIABI_File_get_size(fh, size, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_get_size(fh, size, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_get_size +! +! subroutine MPIABI_File_get_type_extent(fh, datatype, extent, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_get_type_extent(fh, datatype, extent, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_get_type_extent +! +! subroutine MPIABI_File_get_type_extent_c(fh, datatype, extent, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_get_type_extent_c(fh, datatype, extent, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_get_type_extent_c +! +! subroutine MPIABI_File_get_view(fh, disp, etype, filetype, datarep, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_get_view(fh, disp, etype, filetype, datarep, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_get_view +! +! subroutine MPIABI_File_iread(fh, buf, count, datatype, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_iread(fh, buf, count, datatype, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_iread +! +! subroutine MPIABI_File_iread_all(fh, buf, count, datatype, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_iread_all(fh, buf, count, datatype, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_iread_all +! +! subroutine MPIABI_File_iread_all_c(fh, buf, count, datatype, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_iread_all_c(fh, buf, count, datatype, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_iread_all_c +! +! subroutine MPIABI_File_iread_at(fh, offset, buf, count, datatype, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_iread_at(fh, offset, buf, count, datatype, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_iread_at +! +! subroutine MPIABI_File_iread_at_all(fh, offset, buf, count, datatype, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_iread_at_all(fh, offset, buf, count, datatype, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_iread_at_all +! +! subroutine MPIABI_File_iread_at_all_c(fh, offset, buf, count, datatype, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_iread_at_all_c(fh, offset, buf, count, datatype, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_iread_at_all_c +! +! subroutine MPIABI_File_iread_at_c(fh, offset, buf, count, datatype, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_iread_at_c(fh, offset, buf, count, datatype, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_iread_at_c +! +! subroutine MPIABI_File_iread_c(fh, buf, count, datatype, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_iread_c(fh, buf, count, datatype, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_iread_c +! +! subroutine MPIABI_File_iread_shared(fh, buf, count, datatype, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_iread_shared(fh, buf, count, datatype, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_iread_shared +! +! subroutine MPIABI_File_iread_shared_c(fh, buf, count, datatype, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_iread_shared_c(fh, buf, count, datatype, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_iread_shared_c +! +! subroutine MPIABI_File_iwrite(fh, buf, count, datatype, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_iwrite(fh, buf, count, datatype, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_iwrite +! +! subroutine MPIABI_File_iwrite_all(fh, buf, count, datatype, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_iwrite_all(fh, buf, count, datatype, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_iwrite_all +! +! subroutine MPIABI_File_iwrite_all_c(fh, buf, count, datatype, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_iwrite_all_c(fh, buf, count, datatype, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_iwrite_all_c +! +! subroutine MPIABI_File_iwrite_at(fh, offset, buf, count, datatype, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_iwrite_at(fh, offset, buf, count, datatype, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_iwrite_at +! +! subroutine MPIABI_File_iwrite_at_all(fh, offset, buf, count, datatype, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_iwrite_at_all(fh, offset, buf, count, datatype, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_iwrite_at_all +! +! subroutine MPIABI_File_iwrite_at_all_c(fh, offset, buf, count, datatype, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_iwrite_at_all_c(fh, offset, buf, count, datatype, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_iwrite_at_all_c +! +! subroutine MPIABI_File_iwrite_at_c(fh, offset, buf, count, datatype, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_iwrite_at_c(fh, offset, buf, count, datatype, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_iwrite_at_c +! +! subroutine MPIABI_File_iwrite_c(fh, buf, count, datatype, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_iwrite_c(fh, buf, count, datatype, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_iwrite_c +! +! subroutine MPIABI_File_iwrite_shared(fh, buf, count, datatype, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_iwrite_shared(fh, buf, count, datatype, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_iwrite_shared +! +! subroutine MPIABI_File_iwrite_shared_c(fh, buf, count, datatype, request, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_iwrite_shared_c(fh, buf, count, datatype, request, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_iwrite_shared_c +! +! subroutine MPIABI_File_open(comm, filename, amode, info, fh, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_open(comm, filename, amode, info, fh, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_open +! +! subroutine MPIABI_File_preallocate(fh, size, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_preallocate(fh, size, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_preallocate +! +! subroutine MPIABI_File_read(fh, buf, count, datatype, status, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_read(fh, buf, count, datatype, status, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_read +! +! subroutine MPIABI_File_read_all(fh, buf, count, datatype, status, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_read_all(fh, buf, count, datatype, status, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_read_all +! +! subroutine MPIABI_File_read_all_begin(fh, buf, count, datatype, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_read_all_begin(fh, buf, count, datatype, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_read_all_begin +! +! subroutine MPIABI_File_read_all_begin_c(fh, buf, count, datatype, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_read_all_begin_c(fh, buf, count, datatype, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_read_all_begin_c +! +! subroutine MPIABI_File_read_all_c(fh, buf, count, datatype, status, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_read_all_c(fh, buf, count, datatype, status, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_read_all_c +! +! subroutine MPIABI_File_read_all_end(fh, buf, status, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_read_all_end(fh, buf, status, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_read_all_end +! +! subroutine MPIABI_File_read_at(fh, offset, buf, count, datatype, status, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_read_at(fh, offset, buf, count, datatype, status, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_read_at +! +! subroutine MPIABI_File_read_at_all(fh, offset, buf, count, datatype, status, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_read_at_all(fh, offset, buf, count, datatype, status, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_read_at_all +! +! subroutine MPIABI_File_read_at_all_begin(fh, offset, buf, count, datatype, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_read_at_all_begin(fh, offset, buf, count, datatype, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_read_at_all_begin +! +! subroutine MPIABI_File_read_at_all_begin_c(fh, offset, buf, count, datatype, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_read_at_all_begin_c(fh, offset, buf, count, datatype, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_read_at_all_begin_c +! +! subroutine MPIABI_File_read_at_all_c(fh, offset, buf, count, datatype, status, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_read_at_all_c(fh, offset, buf, count, datatype, status, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_read_at_all_c +! +! subroutine MPIABI_File_read_at_all_end(fh, buf, status, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_read_at_all_end(fh, buf, status, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_read_at_all_end +! +! subroutine MPIABI_File_read_at_c(fh, offset, buf, count, datatype, status, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_read_at_c(fh, offset, buf, count, datatype, status, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_read_at_c +! +! subroutine MPIABI_File_read_c(fh, buf, count, datatype, status, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_read_c(fh, buf, count, datatype, status, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_read_c +! +! subroutine MPIABI_File_read_ordered(fh, buf, count, datatype, status, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_read_ordered(fh, buf, count, datatype, status, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_read_ordered +! +! subroutine MPIABI_File_read_ordered_begin(fh, buf, count, datatype, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_read_ordered_begin(fh, buf, count, datatype, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_read_ordered_begin +! +! subroutine MPIABI_File_read_ordered_begin_c(fh, buf, count, datatype, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_read_ordered_begin_c(fh, buf, count, datatype, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_read_ordered_begin_c +! +! subroutine MPIABI_File_read_ordered_c(fh, buf, count, datatype, status, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_read_ordered_c(fh, buf, count, datatype, status, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_read_ordered_c +! +! subroutine MPIABI_File_read_ordered_end(fh, buf, status, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_read_ordered_end(fh, buf, status, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_read_ordered_end +! +! subroutine MPIABI_File_read_shared(fh, buf, count, datatype, status, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_read_shared(fh, buf, count, datatype, status, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_read_shared +! +! subroutine MPIABI_File_read_shared_c(fh, buf, count, datatype, status, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_read_shared_c(fh, buf, count, datatype, status, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_read_shared_c +! +! subroutine MPIABI_File_seek(fh, offset, whence, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_seek(fh, offset, whence, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_seek +! +! subroutine MPIABI_File_seek_shared(fh, offset, whence, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_seek_shared(fh, offset, whence, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_seek_shared +! +! subroutine MPIABI_File_set_atomicity(fh, flag, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_set_atomicity(fh, flag, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_set_atomicity +! +! subroutine MPIABI_File_set_info(fh, info, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_set_info(fh, info, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_set_info +! +! subroutine MPIABI_File_set_size(fh, size, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_set_size(fh, size, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_set_size +! +! subroutine MPIABI_File_set_view(fh, disp, etype, filetype, datarep, info, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_set_view(fh, disp, etype, filetype, datarep, info, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_set_view +! +! subroutine MPIABI_File_sync(fh, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_sync(fh, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_sync +! +! subroutine MPIABI_File_write(fh, buf, count, datatype, status, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_write(fh, buf, count, datatype, status, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_write +! +! subroutine MPIABI_File_write_all(fh, buf, count, datatype, status, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_write_all(fh, buf, count, datatype, status, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_write_all +! +! subroutine MPIABI_File_write_all_begin(fh, buf, count, datatype, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_write_all_begin(fh, buf, count, datatype, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_write_all_begin +! +! subroutine MPIABI_File_write_all_begin_c(fh, buf, count, datatype, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_write_all_begin_c(fh, buf, count, datatype, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_write_all_begin_c +! +! subroutine MPIABI_File_write_all_c(fh, buf, count, datatype, status, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_write_all_c(fh, buf, count, datatype, status, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_write_all_c +! +! subroutine MPIABI_File_write_all_end(fh, buf, status, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_write_all_end(fh, buf, status, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_write_all_end +! +! subroutine MPIABI_File_write_at(fh, offset, buf, count, datatype, status, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_write_at(fh, offset, buf, count, datatype, status, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_write_at +! +! subroutine MPIABI_File_write_at_all(fh, offset, buf, count, datatype, status, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_write_at_all(fh, offset, buf, count, datatype, status, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_write_at_all +! +! subroutine MPIABI_File_write_at_all_begin(fh, offset, buf, count, datatype, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_write_at_all_begin(fh, offset, buf, count, datatype, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_write_at_all_begin +! +! subroutine MPIABI_File_write_at_all_begin_c(fh, offset, buf, count, datatype, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_write_at_all_begin_c(fh, offset, buf, count, datatype, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_write_at_all_begin_c +! +! subroutine MPIABI_File_write_at_all_c(fh, offset, buf, count, datatype, status, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_write_at_all_c(fh, offset, buf, count, datatype, status, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_write_at_all_c +! +! subroutine MPIABI_File_write_at_all_end(fh, buf, status, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_write_at_all_end(fh, buf, status, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_write_at_all_end +! +! subroutine MPIABI_File_write_at_c(fh, offset, buf, count, datatype, status, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_write_at_c(fh, offset, buf, count, datatype, status, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_write_at_c +! +! subroutine MPIABI_File_write_c(fh, buf, count, datatype, status, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_write_c(fh, buf, count, datatype, status, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_write_c +! +! subroutine MPIABI_File_write_ordered(fh, buf, count, datatype, status, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_write_ordered(fh, buf, count, datatype, status, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_write_ordered +! +! subroutine MPIABI_File_write_ordered_begin(fh, buf, count, datatype, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_write_ordered_begin(fh, buf, count, datatype, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_write_ordered_begin +! +! subroutine MPIABI_File_write_ordered_begin_c(fh, buf, count, datatype, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_write_ordered_begin_c(fh, buf, count, datatype, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_write_ordered_begin_c +! +! subroutine MPIABI_File_write_ordered_c(fh, buf, count, datatype, status, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_write_ordered_c(fh, buf, count, datatype, status, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_write_ordered_c +! +! subroutine MPIABI_File_write_ordered_end(fh, buf, status, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_write_ordered_end(fh, buf, status, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_write_ordered_end +! +! subroutine MPIABI_File_write_shared(fh, buf, count, datatype, status, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_write_shared(fh, buf, count, datatype, status, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_write_shared +! +! subroutine MPIABI_File_write_shared_c(fh, buf, count, datatype, status, ierror) +! use mpiwrapper +! implicit none +! call MPI_File_write_shared_c(fh, buf, count, datatype, status, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_File_write_shared_c +! +! subroutine MPIABI_Register_datarep(datarep, read_conversion_fn, write_conversion_fn, dtype_file_extent_fn, extra_state, ierror) +! use mpiwrapper +! implicit none +! call MPI_Register_datarep(datarep, read_conversion_fn, write_conversion_fn, dtype_file_extent_fn, extra_state, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Register_datarep +! +! subroutine MPIABI_Register_datarep_c(datarep, read_conversion_fn, write_conversion_fn, dtype_file_extent_fn, extra_state, ierror) +! use mpiwrapper +! implicit none +! call MPI_Register_datarep_c(datarep, read_conversion_fn, write_conversion_fn, dtype_file_extent_fn, extra_state, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Register_datarep_c +! +! ! A.3.13 Language Bindings C Bindings +! +! ! A.3.14 Tools / Profiling Interface C Bindings +! +! subroutine MPIABI_Pcontrol(level, ierror) +! use mpiwrapper +! implicit none +! call MPI_Pcontrol(level, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Pcontrol +! +! ! A.3.16 Deprecated C Bindings +! +! subroutine MPIABI_Attr_delete(comm, keyval, ierror) +! use mpiwrapper +! implicit none +! call MPI_Attr_delete(comm, keyval, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Attr_delete +! +! subroutine MPIABI_Attr_get(comm, keyval, attribute_val, flag, ierror) +! use mpiwrapper +! implicit none +! call MPI_Attr_get(comm, keyval, attribute_val, flag, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Attr_get +! +! subroutine MPIABI_Attr_put(comm, keyval, attribute_val, ierror) +! use mpiwrapper +! implicit none +! call MPI_Attr_put(comm, keyval, attribute_val, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Attr_put +! +! subroutine MPIABI_Get_elements_x(status, datatype, count, ierror) +! use mpiwrapper +! implicit none +! call MPI_Get_elements_x(status, datatype, count, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Get_elements_x +! +! subroutine MPIABI_Info_get(info, key, valuelen, value, flag, ierror) +! use mpiwrapper +! implicit none +! call MPI_Info_get(info, key, valuelen, value, flag, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Info_get +! +! subroutine MPIABI_Info_get_valuelen(info, key, valuelen, flag, ierror) +! use mpiwrapper +! implicit none +! call MPI_Info_get_valuelen(info, key, valuelen, flag, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Info_get_valuelen +! +! subroutine MPIABI_Keyval_create(copy_fn, delete_fn, keyval, extra_state, ierror) +! use mpiwrapper +! implicit none +! call MPI_Keyval_create(copy_fn, delete_fn, keyval, extra_state, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Keyval_create +! +! subroutine MPIABI_Keyval_free(keyval, ierror) +! use mpiwrapper +! implicit none +! call MPI_Keyval_free(keyval, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Keyval_free +! +! subroutine MPIABI_Status_set_elements_x(status, datatype, count, ierror) +! use mpiwrapper +! implicit none +! call MPI_Status_set_elements_x(status, datatype, count, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Status_set_elements_x +! +! subroutine MPIABI_Type_get_extent_x(datatype, lb, extent, ierror) +! use mpiwrapper +! implicit none +! call MPI_Type_get_extent_x(datatype, lb, extent, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Type_get_extent_x +! +! subroutine MPIABI_Type_get_true_extent_x(datatype, true_lb, true_extent, ierror) +! use mpiwrapper +! implicit none +! call MPI_Type_get_true_extent_x(datatype, true_lb, true_extent, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Type_get_true_extent_x +! +! subroutine MPIABI_Type_size_x(datatype, size, ierror) +! use mpiwrapper +! implicit none +! call MPI_Type_size_x(datatype, size, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Type_size_x +! +! ! Removed C Bindings +! +! subroutine MPIABI_Address(location, address, ierror) +! use mpiwrapper +! implicit none +! call MPI_Address(location, address, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Address +! +! subroutine MPIABI_Type_hindexed(count, array_of_blocklengths, array_of_displacements, oldtype, newtype, ierror) +! use mpiwrapper +! implicit none +! call MPI_Type_hindexed(count, array_of_blocklengths, array_of_displacements, oldtype, newtype, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Type_hindexed +! +! subroutine MPIABI_Type_hvector(count, blocklength, stride, oldtype, newtype, ierror) +! use mpiwrapper +! implicit none +! call MPI_Type_hvector(count, blocklength, stride, oldtype, newtype, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Type_hvector +! +! subroutine MPIABI_Type_struct(count, array_of_blocklengths, array_of_displacements, array_of_types, newtype, ierror) +! use mpiwrapper +! implicit none +! call MPI_Type_struct(count, array_of_blocklengths, array_of_displacements, array_of_types, newtype, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Type_struct +! +! subroutine MPIABI_Type_extent(datatype, extent, ierror) +! use mpiwrapper +! implicit none +! call MPI_Type_extent(datatype, extent, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Type_extent +! +! subroutine MPIABI_Type_lb(datatype, displacement, ierror) +! use mpiwrapper +! implicit none +! call MPI_Type_lb(datatype, displacement, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Type_lb +! +! subroutine MPIABI_Type_ub(datatype, displacement, ierror) +! use mpiwrapper +! implicit none +! call MPI_Type_ub(datatype, displacement, ierror) +! ierror = mpi2abi_errorcode(ierror) +! end subroutine MPIABI_Type_ub diff --git a/src/init_mpi_f08.f90 b/src/init_mpi_f08.f90 deleted file mode 100644 index 8a0a080d..00000000 --- a/src/init_mpi_f08.f90 +++ /dev/null @@ -1,22 +0,0 @@ -subroutine mpitrampoline_init_mpi_f08() - - use mpi_f08 - - use mpi, only: & - mpi_comm_null1 => mpi_comm_null, & - mpi_comm_self1 => mpi_comm_self, & - mpi_comm_world1 => mpi_comm_world, & - - mpi_int1 => mpi_int, & - mpi_integer1 => mpi_integer - - implicit none - - mpi_int%mpi_val = mpi_int1 - mpi_integer%mpi_val = mpi_integer1 - - mpi_comm_null%mpi_val = mpi_comm_null1 - mpi_comm_self%mpi_val = mpi_comm_self1 - mpi_comm_world%mpi_val = mpi_comm_world1 - -end subroutine mpitrampoline_init_mpi_f08 diff --git a/src/mpi.c b/src/mpi.c deleted file mode 100644 index ef3e9dc7..00000000 --- a/src/mpi.c +++ /dev/null @@ -1,754 +0,0 @@ -#define _GNU_SOURCE -#define MPITRAMPOLINE_CONST - -// Wrap functions that can be called before MPItrampoline is initialized -#define MPI_Finalized MPItrampoline_Finalized -#define MPI_Get_library_version MPItrampoline_Get_library_version -#define MPI_Get_version MPItrampoline_Get_version -#define MPI_Initialized MPItrampoline_Initialized -#define PMPI_Finalized PMPItrampoline_Finalized -#define PMPI_Get_library_version PMPItrampoline_Get_library_version -#define PMPI_Get_version PMPItrampoline_Get_version -#define PMPI_Initialized PMPItrampoline_Initialized -#ifdef ENABLE_FORTRAN -#define mpi_finalized_ mpitrampoline_finalized_ -#define mpi_get_library_version_ mpitrampoline_get_library_version_ -#define mpi_get_version_ mpitrampoline_get_version_ -#define mpi_initialized_ mpitrampoline_initialized_ -#define pmpi_finalized_ pmpitrampoline_finalized_ -#define pmpi_get_library_version_ pmpitrampoline_get_library_version_ -#define pmpi_get_version_ pmpitrampoline_get_version_ -#define pmpi_initialized_ pmpitrampoline_initialized_ -#endif - -#include "mpi.h" -#include "mpi_defaults.h" - -#ifdef __linux__ -#include -#endif -#include - -#include -#include -#include -#include -#include -#include -#include - -//////////////////////////////////////////////////////////////////////////////// - -const char *const mpitrampoline_version = MPITRAMPOLINE_VERSION; -const int mpitrampoline_version_major = MPITRAMPOLINE_VERSION_MAJOR; -const int mpitrampoline_version_minor = MPITRAMPOLINE_VERSION_MINOR; -const int mpitrampoline_version_patch = MPITRAMPOLINE_VERSION_PATCH; - -const int mpiabi_version_major = MPIABI_VERSION_MAJOR; -const int mpiabi_version_minor = MPIABI_VERSION_MINOR; -const int mpiabi_version_patch = MPIABI_VERSION_PATCH; - -int mpiwrapper_version_major = -1; -int mpiwrapper_version_minor = -1; -int mpiwrapper_version_patch = -1; - -int mpiabi_loaded_version_major = -1; -int mpiabi_loaded_version_minor = -1; -int mpiabi_loaded_version_patch = -1; - -static bool did_init_mpitrampoline = false; - -//////////////////////////////////////////////////////////////////////////////// - -#include "mpi_defn_constants_c.h" -#include "mpi_defn_functions_c.h" - -// Wrap functions that can be called before MPItrampoline is initialized -#undef MPI_Finalized -#undef MPI_Get_library_version -#undef MPI_Get_version -#undef MPI_Initialized -#undef PMPI_Finalized -#undef PMPI_Get_library_version -#undef PMPI_Get_version -#undef PMPI_Initialized -#ifdef ENABLE_FORTRAN -#undef mpi_finalized_ -#undef mpi_get_library_version_ -#undef mpi_get_version_ -#undef mpi_initialized_ -#undef pmpi_finalized_ -#undef pmpi_get_library_version_ -#undef pmpi_get_version_ -#undef pmpi_initialized_ -#endif - -int MPI_Finalized(int *flag) { - if (did_init_mpitrampoline) - return MPItrampoline_Finalized(flag); - *flag = 0; - return MPI_SUCCESS; -} -int PMPI_Finalized(int *flag) { - if (did_init_mpitrampoline) - return PMPItrampoline_Finalized(flag); - return MPI_Finalized(flag); -} - -int MPI_Get_library_version(char *version, int *resultlen) { - if (did_init_mpitrampoline) - return MPItrampoline_Get_library_version(version, resultlen); - *resultlen = - snprintf(version, MPI_MAX_LIBRARY_VERSION_STRING, - "MPItrampoline %d.%d.%d, requiring MPI ABI %d.%d.%d, waiting " - "for manual initialization", - MPITRAMPOLINE_VERSION_MAJOR, MPITRAMPOLINE_VERSION_MINOR, - MPITRAMPOLINE_VERSION_PATCH, MPIABI_VERSION_MAJOR, - MPIABI_VERSION_MINOR, MPIABI_VERSION_PATCH); - return MPI_SUCCESS; -} -int PMPI_Get_library_version(char *version, int *resultlen) { - if (did_init_mpitrampoline) - return PMPItrampoline_Get_library_version(version, resultlen); - return MPI_Get_library_version(version, resultlen); -} - -int MPI_Get_version(int *version, int *subversion) { - if (did_init_mpitrampoline) - return MPItrampoline_Get_version(version, subversion); - *version = MPI_VERSION; - *subversion = MPI_SUBVERSION; - return MPI_SUCCESS; -} -int PMPI_Get_version(int *version, int *subversion) { - if (did_init_mpitrampoline) - return PMPItrampoline_Get_version(version, subversion); - return MPI_Get_version(version, subversion); -} - -int MPI_Initialized(int *flag) { - if (did_init_mpitrampoline) - return MPItrampoline_Initialized(flag); - *flag = 0; - return MPI_SUCCESS; -} -int PMPI_Initialized(int *flag) { - if (did_init_mpitrampoline) - return PMPItrampoline_Initialized(flag); - return MPI_Initialized(flag); -} - -#ifdef ENABLE_FORTRAN - -void mpitrampoline_finalized_(int *flag, MPIABI_Fint *ierror); -void mpi_finalized_(int *restrict flag, MPIABI_Fint *restrict ierror) { - if (did_init_mpitrampoline) - return mpitrampoline_finalized_(flag, ierror); - *flag = 0; - *ierror = MPI_SUCCESS; -} -void pmpi_finalized_(int *flag, MPIABI_Fint *ierror) { - mpi_finalized_(flag, ierror); -} - -void mpitrampoline_get_library_version_(char *version, int *resultlen, - MPIABI_Fint *ierror, - size_t version_len); -void mpi_get_library_version_(char *restrict version, int *restrict resultlen, - MPIABI_Fint *restrict ierror, - size_t version_len) { - if (did_init_mpitrampoline) - return mpitrampoline_get_library_version_(version, resultlen, ierror, - version_len); - *resultlen = - snprintf(version, version_len, - "MPItrampoline %d.%d.%d, requiring MPI ABI %d.%d.%d, waiting " - "for manual initialization", - MPITRAMPOLINE_VERSION_MAJOR, MPITRAMPOLINE_VERSION_MINOR, - MPITRAMPOLINE_VERSION_PATCH, MPIABI_VERSION_MAJOR, - MPIABI_VERSION_MINOR, MPIABI_VERSION_PATCH); - if (*resultlen >= version_len) - *resultlen = version_len - 1; - memset(version + *resultlen, ' ', version_len - *resultlen); - *ierror = MPI_SUCCESS; -} -void pmpi_get_library_version_(char *version, int *resultlen, - MPIABI_Fint *ierror, size_t version_len) { - mpi_get_library_version_(version, resultlen, ierror, version_len); -} - -void mpitrampoline_get_version_(int *version, int *subversion, - MPIABI_Fint *ierror); -void mpi_get_version_(int *restrict version, int *restrict subversion, - MPIABI_Fint *restrict ierror) { - if (did_init_mpitrampoline) - return mpitrampoline_get_version_(version, subversion, ierror); - *version = MPI_VERSION; - *subversion = MPI_SUBVERSION; - *ierror = MPI_SUCCESS; -} -void pmpi_get_version_(int *version, int *subversion, MPIABI_Fint *ierror) { - mpi_get_version_(version, subversion, ierror); -} - -void mpitrampoline_initialized_(int *flag, MPIABI_Fint *ierror); -void mpi_initialized_(int *restrict flag, MPIABI_Fint *restrict ierror) { - if (did_init_mpitrampoline) - return mpitrampoline_initialized_(flag, ierror); - *flag = 0; - *ierror = MPI_SUCCESS; -} -void pmpi_initialized_(int *flag, MPIABI_Fint *ierror) { - mpi_initialized_(flag, ierror); -} - -#endif - -#define MPI_Finalized MPItrampoline_Finalized -#define MPI_Get_library_version MPItrampoline_Get_library_version -#define MPI_Get_version MPItrampoline_Get_version -#define MPI_Initialized MPItrampoline_Initialized -#define PMPI_Finalized PMPItrampoline_Finalized -#define PMPI_Get_library_version PMPItrampoline_Get_library_version -#define PMPI_Get_version PMPItrampoline_Get_version -#define PMPI_Initialized PMPItrampoline_Initialized -#ifdef ENABLE_FORTRAN -#define mpi_finalized_ mpitrampoline_finalized_ -#define mpi_get_library_version_ mpitrampoline_get_library_version_ -#define mpi_get_version_ mpitrampoline_get_version_ -#define mpi_initialized_ mpitrampoline_initialized_ -#define pmpi_finalized_ pmpitrampoline_finalized_ -#define pmpi_get_library_version_ pmpitrampoline_get_library_version_ -#define pmpi_get_version_ pmpitrampoline_get_version_ -#define pmpi_initialized_ pmpitrampoline_initialized_ -#endif - -int MPI_Pcontrol(int level, ...) { return MPI_SUCCESS; } -int PMPI_Pcontrol(int level, ...) { return MPI_SUCCESS; } - -#ifdef ENABLE_FORTRAN - -// Sentinel values - -char **mpiabi_argv_null_ptr_; -char ***mpiabi_argvs_null_ptr_; - -MPI_Fint *mpiabi_bottom_ptr_; - -MPI_Fint *mpiabi_errcodes_ignore_ptr_; - -MPI_Fint *mpiabi_in_place_ptr_; - -MPI_Fint *mpiabi_status_ignore_ptr_; -MPI_Fint *mpiabi_statuses_ignore_ptr_; - -MPI_Fint *mpiabi_unweighted_ptr_; - -MPI_Fint *mpiabi_weights_empty_ptr_; - -#include "mpi_defn_constants_fortran.h" -#include "mpi_defn_functions_fortran.h" - -void mpitrampoline_init_mpi_f08_(); -#endif - -//////////////////////////////////////////////////////////////////////////////// - -static void abort_with_error() { - fprintf(stderr, - "MPItrampoline: ERROR: The environment variable " - "MPITRAMPOLINE_LIB is not set.\n" - "MPI functions are not available.\n" - "Set MPITRAMPOLINE_LIB to point to a wrapped MPI library.\n" - "See for details.\n"); - exit(1); -} - -static const char *get_default(const char *const varname) { - const char *var = NULL; - if (strcmp(varname, "MPITRAMPOLINE_DELAY_INIT") == 0) - var = MPITRAMPOLINE_DEFAULT_DELAY_INIT; - else if (strcmp(varname, "MPITRAMPOLINE_DLOPEN_BINDING") == 0) - var = MPITRAMPOLINE_DEFAULT_DLOPEN_BINDING; - else if (strcmp(varname, "MPITRAMPOLINE_DLOPEN_MODE") == 0) - var = MPITRAMPOLINE_DEFAULT_DLOPEN_MODE; - else if (strcmp(varname, "MPITRAMPOLINE_LIB") == 0) - var = MPITRAMPOLINE_DEFAULT_LIB; - else if (strcmp(varname, "MPITRAMPOLINE_PRELOAD") == 0) - var = MPITRAMPOLINE_DEFAULT_PRELOAD; - else if (strcmp(varname, "MPITRAMPOLINE_VERBOSE") == 0) - var = MPITRAMPOLINE_DEFAULT_VERBOSE; - if (var && var[0] == '\0') - var = NULL; - return var; -} - -static bool verbose = false; - -static const char *mpitrampoline_dir = NULL; - -// This path is correct only if MPItrampoline is built as shared -// library. If MPItrarmpoline is built as static library, then the -// path corresponds to the executable. This function also expects that -// MPItrampoline is installed into a `lib` directory. If not, then the -// path will point to the wrong directory. -static void set_mpitrampoline_dir() { - Dl_info info; - const int iret = dladdr(&mpiwrapper_version_major, &info); - if (!iret) { - fprintf(stderr, "MPItrampoline: Cannot determine path of mpitrampoline\n"); - exit(1); - } - char *const buf = strdup(info.dli_fname); - // Remove last two components - for (int i = 0; i < 2; ++i) { - char *const slash = strrchr(buf, '/'); - if (!slash) - break; - *slash = '\0'; - } - mpitrampoline_dir = buf; - if (verbose) - fprintf(stderr, "[MPItrampoline] mpitrampoline is installed in \"%s\"\n", - mpitrampoline_dir); -} - -// Generic string append functions -static void mem_alloc(char **restrict buf, size_t *restrict buf_len, - size_t *restrict buf_pos) { - *buf_len = 1000; - *buf = malloc(*buf_len); - *buf_pos = 0; -} -static void mem_append(char **restrict buf, size_t *restrict buf_len, - size_t *restrict buf_pos, const char *restrict str, - const size_t str_len) { - if (*buf_pos + str_len > *buf_len) { - *buf_len += *buf_pos + str_len; - *buf = realloc(*buf, *buf_len); - } - memcpy(*buf + *buf_pos, str, str_len); - *buf_pos += str_len; -} - -static const char *expand_template(const char *const var, - const char *const template, - const char *const value) { - if (!strstr(var, template)) - return var; - - if (!value) { - fprintf( - stderr, - "MPItrampoline: Cannot expand template \"%s\" because value is NULL\n", - template); - exit(1); - } - const size_t template_len = strlen(template); - const size_t value_len = strlen(value); - size_t var_pos = 0; - char *buf; - size_t buf_len, buf_pos; - mem_alloc(&buf, &buf_len, &buf_pos); - - for (;;) { - // Find template - const char *const tmpl = strstr(&var[var_pos], template); - // Copy characters up to template, or all remaining characters - const size_t ncopy = tmpl ? tmpl - &var[var_pos] : strlen(&var[var_pos]); - mem_append(&buf, &buf_len, &buf_pos, &var[var_pos], ncopy); - var_pos += ncopy; - // We are done if no template was found - if (!tmpl) - break; - // Copy template - mem_append(&buf, &buf_len, &buf_pos, value, value_len); - var_pos += template_len; - } - // Add trailing NUL character - mem_append(&buf, &buf_len, &buf_pos, "", 1); - - // We don't record whether strdup was called. We assume that this - // function `get_config` is called only a few times during - // startup, and that the memory leak is small enough to not - // matter. - return buf; -} - -static const char *get_config(const char *const varname) { - // Get configuration setting - const char *var = NULL; - if (!var) - // Check environment variable - var = getenv(varname); - if (!var) { - // Check global variable in main application - void *const symptr = dlsym(RTLD_DEFAULT, varname); - if (symptr) - var = *(const char **)symptr; - } - if (!var) - // Check default setting - var = get_default(varname); - if (!var) - return NULL; - - // Expand path to MPItrampoline - var = expand_template(var, "@MPITRAMPOLINE_DIR@", mpitrampoline_dir); - - return var; -} - -static void set_verbose() { - const char *const verbose_str = get_config("MPITRAMPOLINE_VERBOSE"); - verbose = verbose_str && *verbose_str != '\0'; -} - -enum dlopen_mode_t { - dlopen_mode_error, - dlopen_mode_dlmopen, - dlopen_mode_dlopen -}; -static enum dlopen_mode_t dlopen_mode = dlopen_mode_error; - -void set_dlopen_mode() { - const char *const dlopen_mode_str = get_config("MPITRAMPOLINE_DLOPEN_MODE"); - if (dlopen_mode_str == NULL || strcmp(dlopen_mode_str, "dlopen") == 0) { - dlopen_mode = dlopen_mode_dlopen; - } else if (strcmp(dlopen_mode_str, "dlmopen") == 0) { - dlopen_mode = dlopen_mode_dlmopen; - } else { - fprintf(stderr, - "MPItrampoline: The environment variable MPITRAMPOLINE_DLOPEN_MODE " - "is set to \"%s\".\n" - "Only the values \"dlopen\" (default) and \"dlmopen\" are allowed.", - dlopen_mode_str); - exit(1); - } -} - -enum dlopen_binding_t { - dlopen_binding_error, - dlopen_binding_lazy, - dlopen_binding_now -}; -static enum dlopen_binding_t dlopen_binding = dlopen_binding_error; - -void set_dlopen_binding() { - const char *const dlopen_binding_str = - get_config("MPITRAMPOLINE_DLOPEN_BINDING"); - if (dlopen_binding_str == NULL || strcmp(dlopen_binding_str, "lazy") == 0) { - dlopen_binding = dlopen_binding_lazy; - } else if (strcmp(dlopen_binding_str, "now") == 0) { - dlopen_binding = dlopen_binding_now; - } else { - fprintf(stderr, - "MPItrampoline: The environment variable " - "MPITRAMPOLINE_DLOPEN_BINDING is set to \"%s\".\n" - "Only the values \"lazy\" (default) and \"now\" are allowed.", - dlopen_binding_str); - exit(1); - } -} - -static int get_dlopen_flags() { - int dlopen_flags; - switch (dlopen_binding) { - case dlopen_binding_lazy: - if (verbose) - fprintf(stderr, "[MPItrampoline] Using RTLD_LAZY\n"); - dlopen_flags = RTLD_LAZY; - break; - case dlopen_binding_now: - if (verbose) - fprintf(stderr, "[MPItrampoline] Using RTLD_NOW\n"); - dlopen_flags = RTLD_NOW; - break; - default: - assert(0); - } - return dlopen_flags; -} - -#ifdef __linux__ -static bool have_dlopen_lmid = false; -static Lmid_t dlopen_lmid; -#endif - -static void *load_library(const char *const libname) { - const int dlopen_flags = get_dlopen_flags(); - - void *handle = NULL; - -#ifdef __APPLE__ - - if (verbose) - fprintf(stderr, "[MPItrampoline] Calling dlopen\n"); - handle = dlopen(libname, dlopen_flags | RTLD_LOCAL); - -#elif __linux__ - - switch (dlopen_mode) { - case dlopen_mode_dlmopen: - if (verbose) - fprintf(stderr, "[MPItrampoline] Calling dlmopen\n"); - const Lmid_t lmid = have_dlopen_lmid ? dlopen_lmid : LM_ID_NEWLM; - handle = dlmopen(lmid, libname, dlopen_flags); - break; - case dlopen_mode_dlopen: - if (verbose) - fprintf(stderr, "[MPItrampoline] Calling dlopen\n"); - handle = dlopen(libname, dlopen_flags | RTLD_LOCAL | RTLD_DEEPBIND); - break; - default: - assert(0); - } - -#else -#error "Unsupported operating system" -#endif - - if (!handle) { - fprintf(stderr, "MPItrampoline: Could not dlopen library \"%s\"\n", - libname); - const char *const error = dlerror(); - if (error) - fprintf(stderr, "MPItrampoline: dlerror: %s\n", error); - exit(1); - } - -#ifdef __linux__ - Lmid_t lmid; - const int ierr = dlinfo(handle, RTLD_DI_LMID, &lmid); - if (ierr) { - fprintf(stderr, "MPItrampoline: Could not determine link map id\n"); - const char *const error = dlerror(); - if (error) - fprintf(stderr, "MPItrampoline: dlerror: %s\n", error); - exit(1); - } - - if (have_dlopen_lmid) { - assert(dlopen_lmid == lmid); - } else { - dlopen_lmid = lmid; - have_dlopen_lmid = true; - } -#endif - - return handle; -} - -static void *get_symbol(void *handle, const char *name) { - void *ptr = dlsym(handle, name); - if (!ptr) { - fprintf(stderr, "MPItrampoline: Could not resolve symbol \"%s\"\n", name); - const char *const error = dlerror(); - if (error) - fprintf(stderr, "MPItrampoline: dlerror: %s\n", error); - exit(1); - } - return ptr; -} - -void mpitrampoline_init() { - // Ensure that the library is initialized only once - if (did_init_mpitrampoline) - return; - did_init_mpitrampoline = true; - - set_verbose(); - if (verbose) { - fprintf(stderr, "[MPItrampoline] This is MPItrampoline %d.%d.%d\n", - MPITRAMPOLINE_VERSION_MAJOR, MPITRAMPOLINE_VERSION_MINOR, - MPITRAMPOLINE_VERSION_PATCH); - fprintf(stderr, "[MPItrampoline] Requiring MPI ABI version %d.%d.%d\n", - MPIABI_VERSION_MAJOR, MPIABI_VERSION_MINOR, MPIABI_VERSION_PATCH); - } - - set_mpitrampoline_dir(); - - // On Linux (with glibc), we use `dlmopen` or `RTLD_DEEPBIND` to - // ensure that the loaded `mpiwrapper.so` looks for its MPI symbols - // only in its dependencies (the "real" MPI library), and not in - // MPItrampoline. If this happens, the resulting recursion leads to - // a stack overflow and thus a segfault. - // - // Using `dlmopen` is more reliable than using `dlopen` with - // `RTLD_DEEPBIND`. Unfortunately, this doesn't always work -- it - // doesn't always load all the (transitive) dependencies of the - // loaded library. I assume this is due to configuration errors in - // the way `libwrapper.so` or its dependencies (the "real" MPI - // libraries) are built. - // - // The respective mechanism on macOS is to use two-level namespaces - // for the plugin `mpiwrapper.so`. This is a link-time option for - // `mpiwrapper.so`, and is also the default (`-twolevel_namespace`). - // If `libmpiwrapper.so` is accidentally built with the linker - // option `-flat_namespace`, things break as described above. - - set_dlopen_mode(); - set_dlopen_binding(); - - const char *const preload_str = get_config("MPITRAMPOLINE_PRELOAD"); - if (preload_str) { - char *const preload = strdup(preload_str); - const char *const delim = ":"; - for (char *stringp = preload, *libname; - (libname = strsep(&stringp, delim));) { - if (*libname != '\0') { - if (verbose) - fprintf(stderr, "[MPItrampoline] Preloading library \"%s\"\n", - libname); - load_library(libname); - } - } - free(preload); - } - - const char *const libname = get_config("MPITRAMPOLINE_LIB"); - if (!libname) { - // The environment variable MPITRAMPOLINE_LIB is not set. We - // cannot provide an MPI implementation. - // - // Don't output a warning. Some configure scripts get confused by - // this. Instead, abort with an error if an MPI function is - // called. These four functions are the ones that can legally be - // called in the beginning. All other MPI functions will lead to - // segfaults. - MPIABI_Finalized = (void *)abort_with_error; - MPIABI_Init = (void *)abort_with_error; - MPIABI_Init_thread = (void *)abort_with_error; - MPIABI_Initialized = (void *)abort_with_error; -#if 0 - fprintf(stderr, - "MPItrampoline: WARNING: The environment variable " - "MPITRAMPOLINE_LIB is not set.\n" - "MPI functions will not be available.\n" - "Set MPITRAMPOLINE_LIB to point to a wrapped MPI library.\n" - "See for details.\n"); - // Don't abort when MPITRAMPOLINE_LIB is unset. It is convenient - // to let `configure` or similar tools run small executables. - sleep(1); - // exit(1); -#endif - return; - } - if (verbose) - fprintf(stderr, "[MPItrampoline] Using MPIwrapper library \"%s\"\n", - libname); - - void *handle = load_library(libname); - - mpiwrapper_version_major = - *(int const *)get_symbol(handle, "mpiwrapper_version_major"); - mpiwrapper_version_minor = - *(int const *)get_symbol(handle, "mpiwrapper_version_minor"); - mpiwrapper_version_patch = - *(int const *)get_symbol(handle, "mpiwrapper_version_patch"); - if (verbose) - fprintf(stderr, "[MPItrampoline] Loaded MPIwrapper %d.%d.%d\n", - mpiwrapper_version_major, mpiwrapper_version_minor, - mpiwrapper_version_patch); - - mpiabi_loaded_version_major = - *(int const *)get_symbol(handle, "mpiabi_version_major"); - mpiabi_loaded_version_minor = - *(int const *)get_symbol(handle, "mpiabi_version_minor"); - mpiabi_loaded_version_patch = - *(int const *)get_symbol(handle, "mpiabi_version_patch"); - if (verbose) - fprintf(stderr, "[MPItrampoline] Found MPI ABI version %d.%d.%d\n", - mpiabi_loaded_version_major, mpiabi_loaded_version_minor, - mpiabi_loaded_version_patch); - - if (mpiabi_loaded_version_major != mpiabi_version_major || - mpiabi_loaded_version_minor < mpiabi_version_minor) { - fprintf( - stderr, - "MPItrampoline: MPI ABI version mismatch:\n" - "This version of MPItrampoline requires MPI ABI version %d.%d.%d, " - "but the loaded MPIwrapper only provides MPI ABI version %d.%d.%d.\n" - "This is MPItrampoline version %d.%d.%d.\n" - "You loaded MPIwrapper version %d.%d.%d from file \"%s\".\n", - mpiabi_version_major, mpiabi_version_minor, mpiabi_version_patch, - mpiabi_loaded_version_major, mpiabi_loaded_version_minor, - mpiabi_loaded_version_patch, mpitrampoline_version_major, - mpitrampoline_version_minor, mpitrampoline_version_patch, - mpiwrapper_version_major, mpiwrapper_version_minor, - mpiwrapper_version_patch, libname); - exit(1); - } - - void (*const mpiwrapper_export_fortran_constants)() = - get_symbol(handle, "mpiwrapper_export_fortran_constants_"); - (*mpiwrapper_export_fortran_constants)(); - -#include "mpi_init_constants_c.h" -#include "mpi_init_functions_c.h" - -#ifdef ENABLE_FORTRAN - - mpiabi_argv_null_ptr_ = *(char ***)get_symbol(handle, "mpiabi_argv_null_"); - mpiabi_argvs_null_ptr_ = *(char ****)get_symbol(handle, "mpiabi_argvs_null_"); - mpiabi_bottom_ptr_ = *(MPIABI_Fint **)get_symbol(handle, "mpiabi_bottom_"); - mpiabi_errcodes_ignore_ptr_ = - *(MPIABI_Fint **)get_symbol(handle, "mpiabi_errcodes_ignore_"); - mpiabi_in_place_ptr_ = - *(MPIABI_Fint **)get_symbol(handle, "mpiabi_in_place_"); - mpiabi_status_ignore_ptr_ = - *(MPIABI_Fint **)get_symbol(handle, "mpiabi_status_ignore_"); - mpiabi_statuses_ignore_ptr_ = - *(MPIABI_Fint **)get_symbol(handle, "mpiabi_statuses_ignore_"); - mpiabi_unweighted_ptr_ = - *(MPIABI_Fint **)get_symbol(handle, "mpiabi_unweighted_"); - mpiabi_weights_empty_ptr_ = - *(MPIABI_Fint **)get_symbol(handle, "mpiabi_weights_empty_"); - -#include "mpi_init_constants_fortran.h" -#include "mpi_init_functions_fortran.h" - - // Set up high-level Fortran constants - mpitrampoline_init_mpi_f08_(); - -#endif - - if (verbose) { - char library_version[MPI_MAX_LIBRARY_VERSION_STRING]; - int resultlen; - MPI_Get_library_version(library_version, &resultlen); - fprintf(stderr, "[MPItrampoline] MPI library version:\n%s\n", - library_version); - } - - if (verbose) - fprintf(stderr, "[MPItrampoline] Initialization complete.\n"); -} - -#ifdef __APPLE__ -#define CONSTRUCTOR_PRIORITY -#else -#define CONSTRUCTOR_PRIORITY (1000) -#endif -static void __attribute__((__constructor__ CONSTRUCTOR_PRIORITY)) -mpitrampoline_init_auto() { - set_verbose(); - if (verbose) { - fprintf(stderr, "[MPItrampoline] This is MPItrampoline %d.%d.%d\n", - MPITRAMPOLINE_VERSION_MAJOR, MPITRAMPOLINE_VERSION_MINOR, - MPITRAMPOLINE_VERSION_PATCH); - fprintf(stderr, "[MPItrampoline] Requiring MPI ABI version %d.%d.%d\n", - MPIABI_VERSION_MAJOR, MPIABI_VERSION_MINOR, MPIABI_VERSION_PATCH); - } - - const char *const delay_init_str = get_config("MPITRAMPOLINE_DELAY_INIT"); - const bool delay_init = delay_init_str && *delay_init_str != '\0'; - if (delay_init) { - if (verbose) - fprintf(stderr, "[MPItrampoline] Delaying initialization; waiting for " - "explicit initialization\n"); - return; - } - - mpitrampoline_init(); -} diff --git a/src/mpi_defaults.h.in b/src/mpi_defaults.h.in deleted file mode 100644 index 45e1a591..00000000 --- a/src/mpi_defaults.h.in +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef MPI_DEFAULTS_H -#define MPI_DEFAULTS_H - -#define MPITRAMPOLINE_DEFAULT_DELAY_INIT "@MPITRAMPOLINE_DEFAULT_DELAY_INIT@" -#define MPITRAMPOLINE_DEFAULT_DLOPEN_BINDING \ - "@MPITRAMPOLINE_DEFAULT_DLOPEN_BINDING@" -#define MPITRAMPOLINE_DEFAULT_DLOPEN_MODE "@MPITRAMPOLINE_DEFAULT_DLOPEN_MODE@" -#define MPITRAMPOLINE_DEFAULT_LIB "@MPITRAMPOLINE_DEFAULT_LIB@" -#define MPITRAMPOLINE_DEFAULT_PRELOAD "@MPITRAMPOLINE_DEFAULT_PRELOAD@" -#define MPITRAMPOLINE_DEFAULT_VERBOSE "@MPITRAMPOLINE_DEFAULT_VERBOSE@" - -#endif // #ifndef MPI_DEFAULTS_H diff --git a/test/hello-world-c.c b/test/hello-world-c.c new file mode 100644 index 00000000..77c9301f --- /dev/null +++ b/test/hello-world-c.c @@ -0,0 +1,54 @@ +#include + +#include +#include + +int main(int argc, char **argv) { + printf("Hello, World!\n"); + + printf("Compiled with MPItrampoline %d.%d.%d\n", MPITRAMPOLINE_VERSION_MAJOR, + MPITRAMPOLINE_VERSION_MINOR, MPITRAMPOLINE_VERSION_PATCH); + printf("Running with MPItrampoline %d.%d.%d\n", mpitrampoline_version_major, + mpitrampoline_version_minor, mpitrampoline_version_patch); + + int version, subversion; + MPI_Get_version(&version, &subversion); + printf("Running on MPI standard version %d.%d\n", version, subversion); + char library_version[MPI_MAX_LIBRARY_VERSION_STRING]; + int resultlen; + MPI_Get_library_version(library_version, &resultlen); + printf("Running on %s\n", library_version); + + MPI_Init(&argc, &argv); + + int size, rank; + MPI_Comm_size(MPI_COMM_WORLD, &size); + MPI_Comm_rank(MPI_COMM_WORLD, &rank); + + if (argc >= 2) { + const int expected_size = atoi(argv[1]); + if (size != expected_size) { + fprintf(stderr, "rank %d, size %d, expected size %d\n", rank, size, + expected_size); + exit(1); + } + } + + if (rank == 0) + printf("Hello, World!\n"); + + int token; + if (rank > 0) + MPI_Recv(&token, 0, MPI_INT, rank - 1, 0, MPI_COMM_WORLD, + MPI_STATUS_IGNORE); + printf(" process %d/%d\n", rank, size); + if (rank < size - 1) + MPI_Send(&token, 0, MPI_INT, rank + 1, 0, MPI_COMM_WORLD); + MPI_Barrier(MPI_COMM_WORLD); + + if (rank == 0) + printf("Done.\n"); + MPI_Finalize(); + + return 0; +} diff --git a/test/hello-world-cxx.cxx b/test/hello-world-cxx.cxx new file mode 100644 index 00000000..bb219289 --- /dev/null +++ b/test/hello-world-cxx.cxx @@ -0,0 +1,57 @@ +#include + +#include +#include + +int main(int argc, char **argv) { + std::cout << "Hello, World!\n"; + + std::cout << "Compiled with MPItrampoline " << MPITRAMPOLINE_VERSION_MAJOR + << "." << MPITRAMPOLINE_VERSION_MINOR << "." + << MPITRAMPOLINE_VERSION_PATCH << "\n"; + std::cout << "Running with MPItrampoline " << mpitrampoline_version_major + << "." << mpitrampoline_version_minor << "." + << mpitrampoline_version_patch << "\n"; + + int version, subversion; + MPI_Get_version(&version, &subversion); + std::cout << "Running on MPI standard version " << version << "." + << subversion << "\n"; + char library_version[MPI_MAX_LIBRARY_VERSION_STRING]; + int resultlen; + MPI_Get_library_version(library_version, &resultlen); + std::cout << "Running on " << library_version << "\n"; + + MPI_Init(&argc, &argv); + + int size, rank; + MPI_Comm_size(MPI_COMM_WORLD, &size); + MPI_Comm_rank(MPI_COMM_WORLD, &rank); + + if (argc >= 2) { + const int expected_size = std::atoi(argv[1]); + if (size != expected_size) { + std::cerr << "rank " << rank << ", size " << size << ", expected size " + << expected_size << "\n"; + std::exit(1); + } + } + + if (rank == 0) + std::cout << "Hello, World!\n"; + + int token; + if (rank > 0) + MPI_Recv(&token, 0, MPI_INT, rank - 1, 0, MPI_COMM_WORLD, + MPI_STATUS_IGNORE); + std::cout << " process " << rank << "/" << size << "\n"; + if (rank < size - 1) + MPI_Send(&token, 0, MPI_INT, rank + 1, 0, MPI_COMM_WORLD); + MPI_Barrier(MPI_COMM_WORLD); + + if (rank == 0) + std::cout << "Done.\n"; + MPI_Finalize(); + + return 0; +} diff --git a/test/hello-world-f.f b/test/hello-world-f.f new file mode 100644 index 00000000..c7c8aa36 --- /dev/null +++ b/test/hello-world-f.f @@ -0,0 +1,39 @@ + program hello + implicit none + include "mpif.h" + + integer size, rank + integer token + integer ierror + + print '("Hello, World!")' + + print '("Running with MPItrampoline ",i0,".",i0,".",i0)', + $ MPITRAMPOLINE_VERSION_MAJOR, MPITRAMPOLINE_VERSION_MINOR, + $ MPITRAMPOLINE_VERSION_PATCH + + call MPI_Init(ierror) + + call MPI_Comm_size(MPI_COMM_WORLD, size, ierror) + call MPI_Comm_rank(MPI_COMM_WORLD, rank, ierror) + + if (rank == 0) then + print '("Hello, World!")' + end if + + if (rank > 0) then + call MPI_Recv(token, 0, MPI_INTEGER, rank - 1, 0, + $ MPI_COMM_WORLD, MPI_STATUS_IGNORE, ierror) + end if + print '(" process ",i0,"/",i0)', rank, size + if (rank < size - 1) then + call MPI_Send(token, 0, MPI_INTEGER, rank + 1, 0, + $ MPI_COMM_WORLD, ierror) + end if + call MPI_Barrier(MPI_COMM_WORLD, ierror) + + if (rank == 0) then + print '("Done.")' + end if + call MPI_Finalize(ierror) + end program hello diff --git a/test/hello-world-f90.f90 b/test/hello-world-f90.f90 new file mode 100644 index 00000000..1593b191 --- /dev/null +++ b/test/hello-world-f90.f90 @@ -0,0 +1,36 @@ +program hello + implicit none + include "mpif.h" + + integer size, rank + integer token + integer ierror + + print '("Hello, World!")' + + print '("Running with MPItrampoline ",i0,".",i0,".",i0)', & + MPITRAMPOLINE_VERSION_MAJOR, MPITRAMPOLINE_VERSION_MINOR, MPITRAMPOLINE_VERSION_PATCH + + call MPI_Init(ierror) + + call MPI_Comm_size(MPI_COMM_WORLD, size, ierror) + call MPI_Comm_rank(MPI_COMM_WORLD, rank, ierror) + + if (rank == 0) then + print '("Hello, World!")' + end if + + if (rank > 0) then + call MPI_Recv(token, 0, MPI_INTEGER, rank - 1, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE, ierror) + end if + print '(" process ",i0,"/",i0)', rank, size + if (rank < size - 1) then + call MPI_Send(token, 0, MPI_INTEGER, rank + 1, 0, MPI_COMM_WORLD, ierror) + end if + call MPI_Barrier(MPI_COMM_WORLD, ierror) + + if (rank == 0) then + print '("Done.")' + end if + call MPI_Finalize(ierror) +end program hello diff --git a/test/hello-world-fortran.f90 b/test/hello-world-fortran.f90 new file mode 100644 index 00000000..8bb4149b --- /dev/null +++ b/test/hello-world-fortran.f90 @@ -0,0 +1,36 @@ +program hello + use mpi + implicit none + + integer size, rank + integer token + integer ierror + + print '("Hello, World!")' + + print '("Running with MPItrampoline ",i0,".",i0,".",i0)', & + MPITRAMPOLINE_VERSION_MAJOR, MPITRAMPOLINE_VERSION_MINOR, MPITRAMPOLINE_VERSION_PATCH + + call MPI_Init(ierror) + + call MPI_Comm_size(MPI_COMM_WORLD, size, ierror) + call MPI_Comm_rank(MPI_COMM_WORLD, rank, ierror) + + if (rank == 0) then + print '("Hello, World!")' + end if + + if (rank > 0) then + call MPI_Recv(token, 0, MPI_INTEGER, rank - 1, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE, ierror) + end if + print '(" process ",i0,"/",i0)', rank, size + if (rank < size - 1) then + call MPI_Send(token, 0, MPI_INTEGER, rank + 1, 0, MPI_COMM_WORLD, ierror) + end if + call MPI_Barrier(MPI_COMM_WORLD, ierror) + + if (rank == 0) then + print '("Done.")' + end if + call MPI_Finalize(ierror) +end program hello diff --git a/test/hello-world-fortran08.f90 b/test/hello-world-fortran08.f90 new file mode 100644 index 00000000..7d3fd9e7 --- /dev/null +++ b/test/hello-world-fortran08.f90 @@ -0,0 +1,35 @@ +program hello + use mpi_f08 + implicit none + + integer size, rank + integer token + + print '("Hello, World!")' + + print '("Running with MPItrampoline ",i0,".",i0,".",i0)', & + MPITRAMPOLINE_VERSION_MAJOR, MPITRAMPOLINE_VERSION_MINOR, MPITRAMPOLINE_VERSION_PATCH + + call MPI_Init() + + call MPI_Comm_size(MPI_COMM_WORLD, size) + call MPI_Comm_rank(MPI_COMM_WORLD, rank) + + if (rank == 0) then + print '("Hello, World!")' + end if + + if (rank > 0) then + call MPI_Recv(token, 0, MPI_INTEGER, rank - 1, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE) + end if + print '(" process ",i0,"/",i0)', rank, size + if (rank < size - 1) then + call MPI_Send(token, 0, MPI_INTEGER, rank + 1, 0, MPI_COMM_WORLD) + end if + call MPI_Barrier(MPI_COMM_WORLD) + + if (rank == 0) then + print '("Done.")' + end if + call MPI_Finalize() +end program hello