diff --git a/.github/workflows/ShellCheck.yml b/.github/workflows/ShellCheck.yml index 92625e6e6..0b30b1965 100644 --- a/.github/workflows/ShellCheck.yml +++ b/.github/workflows/ShellCheck.yml @@ -6,11 +6,11 @@ on: - master - release-* tags: '*' - paths: + paths: &paths - 'bin/**' + - 'gen/gen.sh' pull_request: - paths: - - 'bin/**' + paths: *paths concurrency: # Skip intermediate builds: always. @@ -26,4 +26,4 @@ jobs: - name: Install dependencies run: sudo apt install shellcheck - name: Check scripts - run: shellcheck bin/* + run: shellcheck bin/* gen/gen.sh diff --git a/docs/src/configuration.md b/docs/src/configuration.md index 125a20bcc..18aa2c8d6 100644 --- a/docs/src/configuration.md +++ b/docs/src/configuration.md @@ -177,7 +177,10 @@ that does not rely on MPItrampoline. ### Requirements MPI.jl requires a shared library installation of a C MPI library, supporting the MPI 3.0 -standard or later. The following MPI implementations should work out-of-the-box with MPI.jl: +standard or later. An implementation of MPI 4.0 or later can additionally handle messages of +more than `typemax(Cint)` elements, via the large-count entry points; see +[`MPI.API.HAS_LARGE_COUNT`](@ref). The following MPI implementations should work +out-of-the-box with MPI.jl: - [Open MPI](https://www.open-mpi.org/) - [MPICH](https://www.mpich.org/) (v3.1 or later) @@ -189,6 +192,8 @@ standard or later. The following MPI implementations should work out-of-the-box - [Fujitsu MPI](https://www.fujitsu.com/global/about/resources/publications/technicalreview/2020-03/article07.html#cap-03) - [HPE MPT/HMPT](https://support.hpe.com/hpesc/public/docDisplay?docLocale=en_US&docId=a00105727en_us) +Additionally, any MPI library implementing the MPI 5.0 **MPI ABI** is supported. + ### [Configuration](@id configure_system_binary) Run `MPIPreferences.use_system_binary()`. This will attempt to locate and to identify any available MPI implementation, and create a file called `LocalPreferences.toml` adjacent to the current `Project.toml`. diff --git a/docs/src/reference/api.md b/docs/src/reference/api.md index 68d3fa89a..46dc77054 100644 --- a/docs/src/reference/api.md +++ b/docs/src/reference/api.md @@ -1,7 +1,62 @@ # Low-level API The `MPI.API` submodule provides a low-level interface which closely matches the MPI C API. -While these functions are not intended for general usage, they are useful for calling MPI routines not yet available in `MPI.jl` main interface, and is the basis for the high-level wrappers. The methods suffixed with `_c` allow `MPI_count` typed arguments (vs `int` for the standard ones). The size of `MPI_count` depends on the implementation, but usually allows `64bit` integer offsets. +While these functions are not intended for general usage, they are useful for calling MPI routines not yet available in `MPI.jl` main interface, and is the basis for the high-level wrappers. + +## Large counts + +The methods suffixed with `_c` are the MPI 4.0 large-count entry points: they take +`MPI_Count` typed arguments where the others take `int`. The size of `MPI_Count` depends +on the implementation, but usually allows 64-bit integer counts, so these are the methods +to use for messages of more than `typemax(Cint)` elements. + +They can be called against any supported MPI library. Where the library does not provide +them, each `MPI_Foo_c` falls back to the narrow `MPI_Foo` at precompilation time. That is +all-or-nothing: an implementation may ship only part of the set -- Intel MPI 2021.11 has +`MPI_Send_c` but not `MPI_Type_size_c` -- and because the count types below are one choice +for the whole package, using the large-count entry points that happen to be present would +leave a `Ref{MPI_Count}` reaching an entry point that wants a `Ptr{Cint}`. A count that does not fit in an `int` then raises an `InexactError` +instead of being silently truncated. [`MPI.API.HAS_LARGE_COUNT`](@ref) says which of the +two is in use. + +Note that having them does not by itself make messages of more than `typemax(Cint)` +elements possible. Displacements and datatype extents are `MPI_Aint`, which is +pointer-sized, so on a 32-bit build neither can describe more than 2 GiB however wide +`MPI_Count` is -- a 32-bit address space could not hold such a buffer anyway. + +The fallback is transparent for a count passed by value, since `ccall` converts it, but +not for one passed through a pointer. Type arrays and `Ref`s with +[`MPI.API.Count`](@ref), [`MPI.API.Displ`](@ref), or [`MPI.API.TypeDispl`](@ref) need to +have the type corresponding to the entry point they use. For example, a `Ref{MPI_Count}` +reaching a fallback that expects a `Ptr{Cint}` is a `MethodError`. (In other words, the +fallback mechanism is always safe.) + +Two functions taking callback arguments are deliberately excluded from that fallback because +their callback signatures differ between their non-large-count and large-count versions: +`MPI_Op_create_c` takes an `MPI_User_function_c` +(whose `len` argument is an `MPI_Count *`) rather than an `MPI_User_function` (an +`int *`), and `MPI_Register_datarep_c` likewise. Both raise +[`MPI.FeatureLevelError`](@ref) on a library that does not provide them. It is fine +to create an operator with a non-large-count version of these functions, and then call the +large-count version of a reduction operation. +(All MPI implementations we tested can automatically chunk large reduction counts when the +registered operator cannot handle them in one go.) + +## Feature levels + +Wrappers for procedures that the MPI library does not provide are replaced, when MPI.jl is +precompiled, by a `throw(`[`MPI.FeatureLevelError`](@ref)`)`. The reported minimum MPI +version comes from a table derived from the MPI standard's machine-readable binding +description; see `MPI.jl/gen/versions/README.md`. (Procedures that have been in MPI since +3.1 or earlier do not have such version information since MPI.jl requires MPI 3.0 or later anyway.) + +```@docs +MPI.API.@mpichk +MPI.API.HAS_LARGE_COUNT +MPI.API.Count +MPI.API.Displ +MPI.API.TypeDispl +``` ```@autodocs Modules = [MPI.API] diff --git a/docs/src/reference/buffers.md b/docs/src/reference/buffers.md index f6aab9c8c..d47b299a7 100644 --- a/docs/src/reference/buffers.md +++ b/docs/src/reference/buffers.md @@ -1,6 +1,15 @@ # Buffers -Buffers are used for sending and receiving data. MPI.jl provides the following buffer types: +Buffers are used for sending and receiving data. + +The buffers' element counts and displacements have the types [`MPI.API.Count`](@ref) and +[`MPI.API.Displ`](@ref). These are `MPI_Count` and `MPI_Aint` if the MPI library +provides the MPI 4.0 large-count entry points, and are `Cint` otherwise. That is, with a library +implementing MPI 4.0 or later, messages of more than `typemax(Cint)` elements work +without any special handling; with an older one, constructing such a buffer raises an +`InexactError`. (The count is never silently truncated.) + +MPI.jl provides the following buffer types: ```@docs MPI.IN_PLACE diff --git a/docs/src/reference/library.md b/docs/src/reference/library.md index 6b0e36758..5143e0cb2 100644 --- a/docs/src/reference/library.md +++ b/docs/src/reference/library.md @@ -9,6 +9,9 @@ MPI.MPI_LIBRARY_VERSION MPI.MPI_LIBRARY_VERSION_STRING ``` +Whether the library provides the MPI 4.0 large-count entry points is reported by +[`MPI.API.HAS_LARGE_COUNT`](@ref), and by [`MPI.versioninfo`](@ref). + ## Functions ```@docs diff --git a/ext/AMDGPUExt.jl b/ext/AMDGPUExt.jl index 3759c4c9c..29f94b628 100644 --- a/ext/AMDGPUExt.jl +++ b/ext/AMDGPUExt.jl @@ -4,7 +4,7 @@ using AMDGPU: AMDGPU using MPI: MPI, Buffer, Datatype function MPI.Buffer(arr::AMDGPU.ROCArray) - Buffer(arr, Cint(length(arr)), Datatype(eltype(arr))) + Buffer(arr, length(arr), Datatype(eltype(arr))) end end # AMDGPUExt diff --git a/ext/CUDAExt.jl b/ext/CUDAExt.jl index 3ea18f164..fd94bc69c 100644 --- a/ext/CUDAExt.jl +++ b/ext/CUDAExt.jl @@ -6,7 +6,7 @@ using MPI: MPI, Buffer, Datatype, mpi_ptr_type MPI.mpi_ptr_type(::CUDA.CuArray{T}) where T = CUDA.CuPtr{T} function MPI.Buffer(arr::CUDA.CuArray) - Buffer(arr, Cint(length(arr)), Datatype(eltype(arr))) + Buffer(arr, length(arr), Datatype(eltype(arr))) end end #CUDAExt diff --git a/ext/OneAPIExt.jl b/ext/OneAPIExt.jl index e3e530b0c..8b9d140e7 100644 --- a/ext/OneAPIExt.jl +++ b/ext/OneAPIExt.jl @@ -6,7 +6,7 @@ using MPI: MPI, Buffer, Datatype, mpi_ptr_type MPI.mpi_ptr_type(::oneAPI.oneArray{T}) where T = oneAPI.ZePtr{T} function MPI.Buffer(arr::oneAPI.oneArray) - Buffer(arr, Cint(length(arr)), Datatype(eltype(arr))) + Buffer(arr, length(arr), Datatype(eltype(arr))) end end # OneAPIExt diff --git a/gen/Project.toml b/gen/Project.toml index f1157b354..7b7fd4d0c 100644 --- a/gen/Project.toml +++ b/gen/Project.toml @@ -8,6 +8,13 @@ MPIPreferences = "3da0fdf6-3ccc-4f1b-acd9-58baa6c99267" OpenMPI_jll = "fe0851c0-eecd-5654-98d4-656369965a5c" [compat] -Clang = "0.17.1" -MPIPreferences = "0.1.3" -julia = "1.6" +# Which MPI standard version the generated bindings cover is decided here: the +# headers come from these JLLs. MPICH 5.0 is MPI 5.0, Open MPI 5.0 is MPI 3.1. +MPICH_jll = "5" +OpenMPI_jll = "5" +MPIPreferences = "0.1.8" +# Clang 0.17 needs Clang_jll <= 15, hence an LLVM 15 Julia, hence Julia 1.10. +# Pinned to its minor version because Clang.jl formats the whole generated file: +# be careful with version bumps, don't mix them with changes of the MPI version. +Clang = "~0.17" +julia = "~1.10" diff --git a/gen/gen.sh b/gen/gen.sh index 8950d966b..7779447f5 100755 --- a/gen/gen.sh +++ b/gen/gen.sh @@ -1,5 +1,66 @@ #!/usr/bin/env bash -{ - ${JULIA-julia} --project=@. -e 'import MPIgenerator; MPIgenerator.signatures()' - exit -} +# +# Regenerate ../src/api/generated_api.jl by running Clang.jl over an MPI +# implementation's headers. Run this by hand and commit the result. +# (Note: We could automate this in CI?) +# +# cd gen +# JULIA="julia +1.10" ./gen.sh # read MPICH's headers (the default) +# JULIA="julia +1.10" ./gen.sh OpenMPI_jll # read Open MPI's instead +# +# You need to use Julia 1.10. The pinned Clang.jl needs Clang_jll <= 15, which in turn +# needs the LLVM 15 that only this version of Julia uses. (You can use `juliaup add 1.10` +# to install it.) The shell variable JULIA may contain arguments, as in the juliaup example above. +# Leave this variable unset to use whatever `julia` is on your PATH. +# The first run downloads Clang_jll, which is over a gigabyte, so expect it to take a while. +# +# Which MPI standard version the bindings cover is decided by the JLL versions that +# gen/Project.toml pins. MPICH 5.0 provides MPI 5.0, Open MPI 5.0 provides only MPI 3.1. To move +# to a newer standard, raise the bound there and rerun. +# Note: Bumping the Clang bound changes the formatting of the whole output file, don't do this +# while also switching to a new MPI version. +# +# When reviewing the diff it is a good idea to look for: +# +# * signature changes to procedures that already existed -- const-correctness or an +# int -> MPI_Count change in a header would change the `ccall` argument type; +# * procedures whose C return value is not an error code. `@mpichk` would treat one as +# an errcode and throw on any nonzero result. Those are caught automatically from the +# `ccall` return type, so a new one shows up as `@mpicall`; a `Cint`-returning +# procedure that is not error-checked has to go in `mpicall` in src/MPIgenerator.jl; +# * names that collide with something hand-written in ../src/api/, which is what the +# ignorelist in src/generator.toml is for. +# +# A new MPI standard version also means refreshing src/versions.jl, which describes the +# minimum version of each procedure, and the set of functions which have large-count `MPI_*_c` +# entry points. They have their own script and their own instructions; see versions/README.md. + +set -euo pipefail +cd "$(dirname "$0")" + +binary=${1:-MPICH_jll} + +# Pin which implementation's headers to read, rather than following whatever +# MPIPreferences the surrounding environment resolves to. This may not even be one +# that the generator supports. Written directly instead of through +# `MPIPreferences.use_jll_binary` because `Pkg.instantiate` below already consults +# this preference (MPICH_jll's platform augmentation reads it at resolve time), so it +# has to be in place before any Julia code can run. +cat >LocalPreferences.toml < the MPI version that added it + # EMBIGGENED: procedures that have a large-count `MPI_*_c` entry point + # Both are derived from the MPI standard's own data; see gen/versions/README.md. + include("versions.jl") + + # Note: We could, in principle, also use the MPI standard itself to generate these functions, + # instead of looking at a particular MPI library. if MPIPreferences.binary == "MPICH_jll" import MPICH_jll: artifact_dir elseif MPIPreferences.binary == "OpenMPI_jll" @@ -10,6 +17,27 @@ module MPIgenerator error("Unknown MPI binary: $(MPIPreferences.binary)") end + """ + embiggened_base(sym, line) + + For a large-count entry point `MPI_Foo_c`, the narrow `MPI_Foo` to fall back on when + the MPI library does not provide it (see `@mpichk`'s `fallback=`), or `nothing`. + + A function which takes a callback argument that is also widened is excluded: `MPI_Op_create_c` takes an + `MPI_User_function_c` (`MPI_Count *len`) while `MPI_Op_create` takes an + `MPI_User_function` (`int *len`), so handing one creator's callback to the other + would make it load the wrong width. Same for `MPI_Register_datarep_c`. Such a function is + detected by a `*_function_c` argument type rather than listed by name. + """ + function embiggened_base(sym, line) + name = string(sym) + endswith(name, "_c") || return nothing + base = Symbol(chop(name; tail=2)) + base ∈ EMBIGGENED || return nothing + occursin(r"_function_c\}", line) && return nothing + return base + end + signatures() = begin @info "Generate MPI bindings from $(MPIPreferences.binary)" @@ -39,39 +67,67 @@ module MPIgenerator # custom MPI post-processing rm(joinpath(out, "common.jl")) # remove un-needed file - # these methods must be called with `@mpicall` instead of `@mpichk` + # These methods must be called with `@mpicall` instead of `@mpichk`. They do + # return an error code, but they are called during precompilation, before MPI.jl can + # turn one into an `MPIError` (whose message comes from `MPI_Error_string`). + # + # Functions whose return value is not an error code at all are detected below + # from their `ccall` return type instead of being listed here -- `MPI_Wtime` and + # `MPI_Wtick` return a `Cdouble`, `MPI_Aint_add` and `MPI_Aint_diff` an + # `MPI_Aint`. We cannot error-check them. mpicall = ( :MPI_Get_library_version, :MPI_Get_processor_name, :MPI_Get_version, - :MPI_Wtime, - :MPI_Wtick, ) - versioned = Dict( - :MPI_Dist_graph_create_adjacent => v"2.2", - :MPI_Dist_graph_neighbors_count => v"2.2", - :MPI_Dist_graph_neighbors => v"2.2", - :MPI_Dist_graph_create => v"2.2", - :MPI_Neighbor_allgatherv => v"3.0", - :MPI_Neighbor_alltoallv => v"3.0", - :MPI_Neighbor_allgather => v"3.0", - :MPI_Neighbor_alltoall => v"3.0", - ) + # Repo-relative rather than derived from the absolute path: `r".*MPI.jl"` keeps + # everything after the last "MPI.jl" in the path, which in a git worktree is + # ".claude/worktrees//gen/src/...", leaking the checkout into the banner. + src = joinpath(out, "api.jl") + fn = "MPI.jl/" * replace(relpath(@__FILE__, normpath(@__DIR__, "..", "..")), '\\' => '/') + lines = String["# WARNING: this signature file for $(MPIPreferences.binary) has been auto-generated, please edit $fn instead!\n"] + + # Collected below, then spliced in at the top: `@mpichk` reads HAS_LARGE_COUNT + # while expanding the wrappers in this file, so it has to be defined before them. + largecount = Symbol[] + body = String[] - src, fn = joinpath(out, "api.jl"), replace(@__FILE__, r".*MPI.jl" => "MPI.jl") - lines = String["# WARNING: this signature file for $(MPIPreferences.binary) has been auto-generated, please edit $fn instead !\n"] for line in readlines(src) - if (m = match(r"^ccall.*:([\w_]+)", lstrip(line))) ≢ nothing - sym = first(m.captures) |> Symbol - repl = sym ∈ mpicall ? "@mpicall ccall" : "@mpichk ccall" + if (m = match(r"^ccall\(\(:([\w_]+), libmpi\), ([^,]+),", lstrip(line))) ≢ nothing + sym, returntype = Symbol(m.captures[1]), strip(m.captures[2]) + errorchecked = returntype == "Cint" && sym ∉ mpicall + repl = errorchecked ? "@mpichk ccall" : "@mpicall ccall" line = replace(line, "Ptr{Cvoid}" => "MPIPtr", "ccall" => repl) - if (ver = get(versioned, sym, nothing)) ≢ nothing - line *= " $(repr(ver))" + if errorchecked + if (ver = get(INTRODUCED, sym, nothing)) ≢ nothing + line *= " $(repr(ver))" + end + if (base = embiggened_base(sym, line)) ≢ nothing + line *= " fallback=$base" + push!(largecount, sym) + end end end - push!(lines, replace(line, raw"\$" => '$')) + push!(body, replace(line, raw"\$" => '$')) end + + # An implementation may provide only some of the large-count entry points: Intel + # MPI 2021.11 has `MPI_Send_c` but not `MPI_Type_size_c`. Since `API.Count` and + # its companions are one choice for the whole package, falling back per function + # would let a `Ref{MPI_Count}` reach an entry point wanting a `Ptr{Cint}`. So the + # fallback is all-or-nothing, decided here over every one of them. + append!(lines, [ + "", + "const LARGE_COUNT_SYMBOLS = (", + join((" :$sym," for sym in largecount), "\n"), + ")", + "", + "const HAS_LARGE_COUNT =", + " all(sym -> !isnothing(dlsym(libmpi_handle, sym; throw_error=false)), LARGE_COUNT_SYMBOLS)", + "", + ]) + append!(lines, body) write(src, join(lines, "\n")) dst = normpath(@__DIR__, "..", "..", "src", "api", "generated_api.jl") diff --git a/gen/src/generator.toml b/gen/src/generator.toml index 0d385772d..a53fd1277 100644 --- a/gen/src/generator.toml +++ b/gen/src/generator.toml @@ -2,4 +2,25 @@ library_name = "libmpi" output_common_file_path = "./out/common.jl" output_api_file_path = "./out/api.jl" -output_ignorelist = ["^[PQ]MPI[XR]?_.*", "^MPI[XR]_.*", "^MPI_T_.*", "^MPI_Session_.*", "^MPI_Status_[\\w_]*f08.*", "^MPI_Group_from_session_pset.*"] +output_ignorelist = [ + # Not part of the MPI standard, or not a C binding that MPI.jl can call. + "^[PQ]MPI[XR]?_.*", + "^MPI[XR]_.*", + "^MPI_T_.*", + "^MPI_Session_.*", + "^MPI_Status_[\\w_]*f08.*", + "^MPI_Group_from_session_pset.*", + # Handle <-> Fortran/integer conversions. These return a handle rather than an error + # code, so `@mpichk` would mistake the handle for an errcode; `MPI_Comm_f2c` and + # friends are instead written by hand in src/api/api.jl, which also handles ABIs + # which implement these as macros. + # `MPI_Status_f2c` and `MPI_Status_c2f` do return error codes, so they are deliberately not ignored. + "^MPI_(Comm|Datatype|Errhandler|File|Group|Info|Message|Op|Request|Type|Win)_(f2c|c2f|toint|fromint)$", + # Predefined callbacks, not callable entry points. `MPI_DUP_FN` in particular is + # already a `@const_ref` in src/api/mpiabi.jl, so generating a function of that name + # is an invalid redefinition of a constant. + "^MPI_(DUP|NULL_COPY|NULL_DELETE)_FN$", + "^MPI_CONVERSION_FN_NULL.*", + # Variadic; Clang's rendering is not callable from Julia. + "^MPI_Pcontrol$", +] diff --git a/gen/src/versions.jl b/gen/src/versions.jl new file mode 100644 index 000000000..0d5e0d151 --- /dev/null +++ b/gen/src/versions.jl @@ -0,0 +1,487 @@ +# WARNING: auto-generated by MPI.jl/gen/versions/extract_versions.py, +# please edit that script instead! +# +# INTRODUCED maps a procedure to the MPI standard version that added it. +# Procedures available in MPI 3.1 or earlier are omitted: MPI.jl requires +# MPI 3.0 or later, so a version would not be useful. +const INTRODUCED = Dict{Symbol,VersionNumber}( + :MPI_Abi_get_fortran_booleans => v"5.0", + :MPI_Abi_get_fortran_info => v"5.0", + :MPI_Abi_get_info => v"5.0", + :MPI_Abi_get_version => v"5.0", + :MPI_Abi_set_fortran_booleans => v"5.0", + :MPI_Abi_set_fortran_info => v"5.0", + :MPI_Accumulate_c => v"4.0", + :MPI_Allgather_c => v"4.0", + :MPI_Allgather_init => v"4.0", + :MPI_Allgather_init_c => v"4.0", + :MPI_Allgatherv_c => v"4.0", + :MPI_Allgatherv_init => v"4.0", + :MPI_Allgatherv_init_c => v"4.0", + :MPI_Allreduce_c => v"4.0", + :MPI_Allreduce_init => v"4.0", + :MPI_Allreduce_init_c => v"4.0", + :MPI_Alltoall_c => v"4.0", + :MPI_Alltoall_init => v"4.0", + :MPI_Alltoall_init_c => v"4.0", + :MPI_Alltoallv_c => v"4.0", + :MPI_Alltoallv_init => v"4.0", + :MPI_Alltoallv_init_c => v"4.0", + :MPI_Alltoallw_c => v"4.0", + :MPI_Alltoallw_init => v"4.0", + :MPI_Alltoallw_init_c => v"4.0", + :MPI_Barrier_init => v"4.0", + :MPI_Bcast_c => v"4.0", + :MPI_Bcast_init => v"4.0", + :MPI_Bcast_init_c => v"4.0", + :MPI_Bsend_c => v"4.0", + :MPI_Bsend_init_c => v"4.0", + :MPI_Buffer_attach_c => v"4.0", + :MPI_Buffer_detach_c => v"4.0", + :MPI_Buffer_flush => v"4.1", + :MPI_Buffer_iflush => v"4.1", + :MPI_Comm_attach_buffer => v"4.1", + :MPI_Comm_attach_buffer_c => v"4.1", + :MPI_Comm_copy_attr_function => v"4.0", + :MPI_Comm_create_from_group => v"4.0", + :MPI_Comm_delete_attr_function => v"4.0", + :MPI_Comm_detach_buffer => v"4.1", + :MPI_Comm_detach_buffer_c => v"4.1", + :MPI_Comm_errhandler_function => v"4.0", + :MPI_Comm_flush_buffer => v"4.1", + :MPI_Comm_fromint => v"5.0", + :MPI_Comm_idup_with_info => v"4.0", + :MPI_Comm_iflush_buffer => v"4.1", + :MPI_Comm_toint => v"5.0", + :MPI_Copy_function => v"4.0", + :MPI_Datarep_conversion_function => v"4.0", + :MPI_Datarep_extent_function => v"4.0", + :MPI_Delete_function => v"4.0", + :MPI_Dist_graph_create => v"2.2", + :MPI_Dist_graph_create_adjacent => v"2.2", + :MPI_Dist_graph_neighbors => v"2.2", + :MPI_Dist_graph_neighbors_count => v"2.2", + :MPI_Errhandler_fromint => v"5.0", + :MPI_Errhandler_toint => v"5.0", + :MPI_Exscan_c => v"4.0", + :MPI_Exscan_init => v"4.0", + :MPI_Exscan_init_c => v"4.0", + :MPI_F_sync_reg => v"4.0", + :MPI_File_errhandler_function => v"4.0", + :MPI_File_fromint => v"5.0", + :MPI_File_get_type_extent_c => v"4.0", + :MPI_File_iread_all_c => v"4.0", + :MPI_File_iread_at_all_c => v"4.0", + :MPI_File_iread_at_c => v"4.0", + :MPI_File_iread_c => v"4.0", + :MPI_File_iread_shared_c => v"4.0", + :MPI_File_iwrite_all_c => v"4.0", + :MPI_File_iwrite_at_all_c => v"4.0", + :MPI_File_iwrite_at_c => v"4.0", + :MPI_File_iwrite_c => v"4.0", + :MPI_File_iwrite_shared_c => v"4.0", + :MPI_File_read_all_begin_c => v"4.0", + :MPI_File_read_all_c => v"4.0", + :MPI_File_read_at_all_begin_c => v"4.0", + :MPI_File_read_at_all_c => v"4.0", + :MPI_File_read_at_c => v"4.0", + :MPI_File_read_c => v"4.0", + :MPI_File_read_ordered_begin_c => v"4.0", + :MPI_File_read_ordered_c => v"4.0", + :MPI_File_read_shared_c => v"4.0", + :MPI_File_toint => v"5.0", + :MPI_File_write_all_begin_c => v"4.0", + :MPI_File_write_all_c => v"4.0", + :MPI_File_write_at_all_begin_c => v"4.0", + :MPI_File_write_at_all_c => v"4.0", + :MPI_File_write_at_c => v"4.0", + :MPI_File_write_c => v"4.0", + :MPI_File_write_ordered_begin_c => v"4.0", + :MPI_File_write_ordered_c => v"4.0", + :MPI_File_write_shared_c => v"4.0", + :MPI_Gather_c => v"4.0", + :MPI_Gather_init => v"4.0", + :MPI_Gather_init_c => v"4.0", + :MPI_Gatherv_c => v"4.0", + :MPI_Gatherv_init => v"4.0", + :MPI_Gatherv_init_c => v"4.0", + :MPI_Get_accumulate_c => v"4.0", + :MPI_Get_c => v"4.0", + :MPI_Get_count_c => v"4.0", + :MPI_Get_elements_c => v"4.0", + :MPI_Get_hw_resource_info => v"4.1", + :MPI_Grequest_cancel_function => v"4.0", + :MPI_Grequest_free_function => v"4.0", + :MPI_Grequest_query_function => v"4.0", + :MPI_Group_from_session_pset => v"4.0", + :MPI_Group_fromint => v"5.0", + :MPI_Group_toint => v"5.0", + :MPI_Iallgather_c => v"4.0", + :MPI_Iallgatherv_c => v"4.0", + :MPI_Iallreduce_c => v"4.0", + :MPI_Ialltoall_c => v"4.0", + :MPI_Ialltoallv_c => v"4.0", + :MPI_Ialltoallw_c => v"4.0", + :MPI_Ibcast_c => v"4.0", + :MPI_Ibsend_c => v"4.0", + :MPI_Iexscan_c => v"4.0", + :MPI_Igather_c => v"4.0", + :MPI_Igatherv_c => v"4.0", + :MPI_Imrecv_c => v"4.0", + :MPI_Ineighbor_allgather_c => v"4.0", + :MPI_Ineighbor_allgatherv_c => v"4.0", + :MPI_Ineighbor_alltoall_c => v"4.0", + :MPI_Ineighbor_alltoallv_c => v"4.0", + :MPI_Ineighbor_alltoallw_c => v"4.0", + :MPI_Info_create_env => v"4.0", + :MPI_Info_fromint => v"5.0", + :MPI_Info_get_string => v"4.0", + :MPI_Info_toint => v"5.0", + :MPI_Intercomm_create_from_groups => v"4.0", + :MPI_Irecv_c => v"4.0", + :MPI_Ireduce_c => v"4.0", + :MPI_Ireduce_scatter_block_c => v"4.0", + :MPI_Ireduce_scatter_c => v"4.0", + :MPI_Irsend_c => v"4.0", + :MPI_Iscan_c => v"4.0", + :MPI_Iscatter_c => v"4.0", + :MPI_Iscatterv_c => v"4.0", + :MPI_Isend_c => v"4.0", + :MPI_Isendrecv => v"4.0", + :MPI_Isendrecv_c => v"4.0", + :MPI_Isendrecv_replace => v"4.0", + :MPI_Isendrecv_replace_c => v"4.0", + :MPI_Issend_c => v"4.0", + :MPI_Message_fromint => v"5.0", + :MPI_Message_toint => v"5.0", + :MPI_Mrecv_c => v"4.0", + :MPI_Neighbor_allgather => v"3.0", + :MPI_Neighbor_allgather_c => v"4.0", + :MPI_Neighbor_allgather_init => v"4.0", + :MPI_Neighbor_allgather_init_c => v"4.0", + :MPI_Neighbor_allgatherv => v"3.0", + :MPI_Neighbor_allgatherv_c => v"4.0", + :MPI_Neighbor_allgatherv_init => v"4.0", + :MPI_Neighbor_allgatherv_init_c => v"4.0", + :MPI_Neighbor_alltoall => v"3.0", + :MPI_Neighbor_alltoall_c => v"4.0", + :MPI_Neighbor_alltoall_init => v"4.0", + :MPI_Neighbor_alltoall_init_c => v"4.0", + :MPI_Neighbor_alltoallv => v"3.0", + :MPI_Neighbor_alltoallv_c => v"4.0", + :MPI_Neighbor_alltoallv_init => v"4.0", + :MPI_Neighbor_alltoallv_init_c => v"4.0", + :MPI_Neighbor_alltoallw_c => v"4.0", + :MPI_Neighbor_alltoallw_init => v"4.0", + :MPI_Neighbor_alltoallw_init_c => v"4.0", + :MPI_Op_create_c => v"4.0", + :MPI_Op_fromint => v"5.0", + :MPI_Op_toint => v"5.0", + :MPI_Pack_c => v"4.0", + :MPI_Pack_external_c => v"4.0", + :MPI_Pack_external_size_c => v"4.0", + :MPI_Pack_size_c => v"4.0", + :MPI_Parrived => v"4.0", + :MPI_Pready => v"4.0", + :MPI_Pready_list => v"4.0", + :MPI_Pready_range => v"4.0", + :MPI_Precv_init => v"4.0", + :MPI_Psend_init => v"4.0", + :MPI_Put_c => v"4.0", + :MPI_Raccumulate_c => v"4.0", + :MPI_Recv_c => v"4.0", + :MPI_Recv_init_c => v"4.0", + :MPI_Reduce_c => v"4.0", + :MPI_Reduce_init => v"4.0", + :MPI_Reduce_init_c => v"4.0", + :MPI_Reduce_local_c => v"4.0", + :MPI_Reduce_scatter_block_c => v"4.0", + :MPI_Reduce_scatter_block_init => v"4.0", + :MPI_Reduce_scatter_block_init_c => v"4.0", + :MPI_Reduce_scatter_c => v"4.0", + :MPI_Reduce_scatter_init => v"4.0", + :MPI_Reduce_scatter_init_c => v"4.0", + :MPI_Register_datarep_c => v"4.0", + :MPI_Remove_error_class => v"4.1", + :MPI_Remove_error_code => v"4.1", + :MPI_Remove_error_string => v"4.1", + :MPI_Request_fromint => v"5.0", + :MPI_Request_get_status_all => v"4.1", + :MPI_Request_get_status_any => v"4.1", + :MPI_Request_get_status_some => v"4.1", + :MPI_Request_toint => v"5.0", + :MPI_Rget_accumulate_c => v"4.0", + :MPI_Rget_c => v"4.0", + :MPI_Rput_c => v"4.0", + :MPI_Rsend_c => v"4.0", + :MPI_Rsend_init_c => v"4.0", + :MPI_Scan_c => v"4.0", + :MPI_Scan_init => v"4.0", + :MPI_Scan_init_c => v"4.0", + :MPI_Scatter_c => v"4.0", + :MPI_Scatter_init => v"4.0", + :MPI_Scatter_init_c => v"4.0", + :MPI_Scatterv_c => v"4.0", + :MPI_Scatterv_init => v"4.0", + :MPI_Scatterv_init_c => v"4.0", + :MPI_Send_c => v"4.0", + :MPI_Send_init_c => v"4.0", + :MPI_Sendrecv_c => v"4.0", + :MPI_Sendrecv_replace_c => v"4.0", + :MPI_Session_attach_buffer => v"4.1", + :MPI_Session_attach_buffer_c => v"4.1", + :MPI_Session_c2f => v"4.0", + :MPI_Session_call_errhandler => v"4.0", + :MPI_Session_create_errhandler => v"4.0", + :MPI_Session_detach_buffer => v"4.1", + :MPI_Session_detach_buffer_c => v"4.1", + :MPI_Session_errhandler_function => v"4.0", + :MPI_Session_f2c => v"4.0", + :MPI_Session_finalize => v"4.0", + :MPI_Session_flush_buffer => v"4.1", + :MPI_Session_fromint => v"5.0", + :MPI_Session_get_errhandler => v"4.0", + :MPI_Session_get_info => v"4.0", + :MPI_Session_get_nth_pset => v"4.0", + :MPI_Session_get_num_psets => v"4.0", + :MPI_Session_get_pset_info => v"4.0", + :MPI_Session_iflush_buffer => v"4.1", + :MPI_Session_init => v"4.0", + :MPI_Session_set_errhandler => v"4.0", + :MPI_Session_toint => v"5.0", + :MPI_Sizeof => v"4.0", + :MPI_Ssend_c => v"4.0", + :MPI_Ssend_init_c => v"4.0", + :MPI_Status_c2f08 => v"4.0", + :MPI_Status_f082c => v"4.0", + :MPI_Status_f082f => v"4.0", + :MPI_Status_f2f08 => v"4.0", + :MPI_Status_get_error => v"4.1", + :MPI_Status_get_source => v"4.1", + :MPI_Status_get_tag => v"4.1", + :MPI_Status_set_elements_c => v"4.0", + :MPI_Status_set_error => v"4.1", + :MPI_Status_set_source => v"4.1", + :MPI_Status_set_tag => v"4.1", + :MPI_T_category_get_events => v"4.0", + :MPI_T_category_get_num_events => v"4.0", + :MPI_T_event_callback_get_info => v"4.0", + :MPI_T_event_callback_set_info => v"4.0", + :MPI_T_event_cb_function => v"4.0", + :MPI_T_event_copy => v"4.0", + :MPI_T_event_dropped_cb_function => v"4.0", + :MPI_T_event_free_cb_function => v"4.0", + :MPI_T_event_get_index => v"4.0", + :MPI_T_event_get_info => v"4.0", + :MPI_T_event_get_num => v"4.0", + :MPI_T_event_get_source => v"4.0", + :MPI_T_event_get_timestamp => v"4.0", + :MPI_T_event_handle_alloc => v"4.0", + :MPI_T_event_handle_free => v"4.0", + :MPI_T_event_handle_get_info => v"4.0", + :MPI_T_event_handle_set_info => v"4.0", + :MPI_T_event_read => v"4.0", + :MPI_T_event_register_callback => v"4.0", + :MPI_T_event_set_dropped_handler => v"4.0", + :MPI_T_source_get_info => v"4.0", + :MPI_T_source_get_num => v"4.0", + :MPI_T_source_get_timestamp => v"4.0", + :MPI_Type_contiguous_c => v"4.0", + :MPI_Type_copy_attr_function => v"4.0", + :MPI_Type_create_darray_c => v"4.0", + :MPI_Type_create_hindexed_block_c => v"4.0", + :MPI_Type_create_hindexed_c => v"4.0", + :MPI_Type_create_hvector_c => v"4.0", + :MPI_Type_create_indexed_block_c => v"4.0", + :MPI_Type_create_resized_c => v"4.0", + :MPI_Type_create_struct_c => v"4.0", + :MPI_Type_create_subarray_c => v"4.0", + :MPI_Type_delete_attr_function => v"4.0", + :MPI_Type_fromint => v"5.0", + :MPI_Type_get_contents_c => v"4.0", + :MPI_Type_get_envelope_c => v"4.0", + :MPI_Type_get_extent_c => v"4.0", + :MPI_Type_get_true_extent_c => v"4.0", + :MPI_Type_get_value_index => v"4.1", + :MPI_Type_indexed_c => v"4.0", + :MPI_Type_size_c => v"4.0", + :MPI_Type_toint => v"5.0", + :MPI_Type_vector_c => v"4.0", + :MPI_Unpack_c => v"4.0", + :MPI_Unpack_external_c => v"4.0", + :MPI_User_function => v"4.0", + :MPI_Win_allocate_c => v"4.0", + :MPI_Win_allocate_shared_c => v"4.0", + :MPI_Win_copy_attr_function => v"4.0", + :MPI_Win_create_c => v"4.0", + :MPI_Win_delete_attr_function => v"4.0", + :MPI_Win_errhandler_function => v"4.0", + :MPI_Win_fromint => v"5.0", + :MPI_Win_shared_query_c => v"4.0", + :MPI_Win_toint => v"5.0", +) + +# Procedures with a large-count ("embiggened") `MPI_*_c` variant, i.e. those +# having at least one polymorphic parameter in the MPI standard's own +# machine-readable binding description. +const EMBIGGENED = Set{Symbol}([ + :MPI_Accumulate, + :MPI_Allgather, + :MPI_Allgather_init, + :MPI_Allgatherv, + :MPI_Allgatherv_init, + :MPI_Allreduce, + :MPI_Allreduce_init, + :MPI_Alltoall, + :MPI_Alltoall_init, + :MPI_Alltoallv, + :MPI_Alltoallv_init, + :MPI_Alltoallw, + :MPI_Alltoallw_init, + :MPI_Bcast, + :MPI_Bcast_init, + :MPI_Bsend, + :MPI_Bsend_init, + :MPI_Buffer_attach, + :MPI_Buffer_detach, + :MPI_Comm_attach_buffer, + :MPI_Comm_detach_buffer, + :MPI_Exscan, + :MPI_Exscan_init, + :MPI_File_get_type_extent, + :MPI_File_iread, + :MPI_File_iread_all, + :MPI_File_iread_at, + :MPI_File_iread_at_all, + :MPI_File_iread_shared, + :MPI_File_iwrite, + :MPI_File_iwrite_all, + :MPI_File_iwrite_at, + :MPI_File_iwrite_at_all, + :MPI_File_iwrite_shared, + :MPI_File_read, + :MPI_File_read_all, + :MPI_File_read_all_begin, + :MPI_File_read_at, + :MPI_File_read_at_all, + :MPI_File_read_at_all_begin, + :MPI_File_read_ordered, + :MPI_File_read_ordered_begin, + :MPI_File_read_shared, + :MPI_File_write, + :MPI_File_write_all, + :MPI_File_write_all_begin, + :MPI_File_write_at, + :MPI_File_write_at_all, + :MPI_File_write_at_all_begin, + :MPI_File_write_ordered, + :MPI_File_write_ordered_begin, + :MPI_File_write_shared, + :MPI_Gather, + :MPI_Gather_init, + :MPI_Gatherv, + :MPI_Gatherv_init, + :MPI_Get, + :MPI_Get_accumulate, + :MPI_Get_count, + :MPI_Get_elements, + :MPI_Iallgather, + :MPI_Iallgatherv, + :MPI_Iallreduce, + :MPI_Ialltoall, + :MPI_Ialltoallv, + :MPI_Ialltoallw, + :MPI_Ibcast, + :MPI_Ibsend, + :MPI_Iexscan, + :MPI_Igather, + :MPI_Igatherv, + :MPI_Imrecv, + :MPI_Ineighbor_allgather, + :MPI_Ineighbor_allgatherv, + :MPI_Ineighbor_alltoall, + :MPI_Ineighbor_alltoallv, + :MPI_Ineighbor_alltoallw, + :MPI_Irecv, + :MPI_Ireduce, + :MPI_Ireduce_scatter, + :MPI_Ireduce_scatter_block, + :MPI_Irsend, + :MPI_Iscan, + :MPI_Iscatter, + :MPI_Iscatterv, + :MPI_Isend, + :MPI_Isendrecv, + :MPI_Isendrecv_replace, + :MPI_Issend, + :MPI_Mrecv, + :MPI_Neighbor_allgather, + :MPI_Neighbor_allgather_init, + :MPI_Neighbor_allgatherv, + :MPI_Neighbor_allgatherv_init, + :MPI_Neighbor_alltoall, + :MPI_Neighbor_alltoall_init, + :MPI_Neighbor_alltoallv, + :MPI_Neighbor_alltoallv_init, + :MPI_Neighbor_alltoallw, + :MPI_Neighbor_alltoallw_init, + :MPI_Op_create, + :MPI_Pack, + :MPI_Pack_external, + :MPI_Pack_external_size, + :MPI_Pack_size, + :MPI_Put, + :MPI_Raccumulate, + :MPI_Recv, + :MPI_Recv_init, + :MPI_Reduce, + :MPI_Reduce_init, + :MPI_Reduce_local, + :MPI_Reduce_scatter, + :MPI_Reduce_scatter_block, + :MPI_Reduce_scatter_block_init, + :MPI_Reduce_scatter_init, + :MPI_Register_datarep, + :MPI_Rget, + :MPI_Rget_accumulate, + :MPI_Rput, + :MPI_Rsend, + :MPI_Rsend_init, + :MPI_Scan, + :MPI_Scan_init, + :MPI_Scatter, + :MPI_Scatter_init, + :MPI_Scatterv, + :MPI_Scatterv_init, + :MPI_Send, + :MPI_Send_init, + :MPI_Sendrecv, + :MPI_Sendrecv_replace, + :MPI_Session_attach_buffer, + :MPI_Session_detach_buffer, + :MPI_Ssend, + :MPI_Ssend_init, + :MPI_Status_set_elements, + :MPI_Type_contiguous, + :MPI_Type_create_darray, + :MPI_Type_create_hindexed, + :MPI_Type_create_hindexed_block, + :MPI_Type_create_hvector, + :MPI_Type_create_indexed_block, + :MPI_Type_create_resized, + :MPI_Type_create_struct, + :MPI_Type_create_subarray, + :MPI_Type_get_contents, + :MPI_Type_get_envelope, + :MPI_Type_get_extent, + :MPI_Type_get_true_extent, + :MPI_Type_indexed, + :MPI_Type_size, + :MPI_Type_vector, + :MPI_Unpack, + :MPI_Unpack_external, + :MPI_Win_allocate, + :MPI_Win_allocate_shared, + :MPI_Win_create, + :MPI_Win_shared_query, +]) diff --git a/gen/versions/README.md b/gen/versions/README.md new file mode 100644 index 000000000..99b20870b --- /dev/null +++ b/gen/versions/README.md @@ -0,0 +1,88 @@ +# Where `gen/src/versions.jl` comes from + +`extract_versions.py` derives two tables that `gen/src/MPIgenerator.jl` needs but +cannot read out of a C header: + +* **`INTRODUCED`** — the MPI standard version that added each procedure. The + generator appends it to the `@mpichk` call, so that a procedure missing from the + MPI library in use raises a `FeatureLevelError` describing the version it needs + rather than failing to resolve a symbol. +* **`EMBIGGENED`** — the procedures that have a large-count (MPI-4.0 + "embiggened") `MPI_*_c` entry point. The generator gives each of those a + fallback to the narrow entry point, so the high-level layer can call + `MPI_Foo_c` unconditionally. + +Run the script manually, and commit the result to the repo. This is not part of +`gen.sh` because it reaches out to the network and its result only changes when +a new MPI standard version is released. + +```sh +cd gen/versions +python3 extract_versions.py +``` + +You can get the two include directories from any Julia with the matching `MPICH_jll` +installed, e.g. + +```sh +julia -e 'using Pkg; Pkg.activate(mktempdir()); Pkg.add(PackageSpec(name="MPICH_jll", version=v"3.4.3+1")); using MPICH_jll; println(joinpath(MPICH_jll.artifact_dir, "include"))' +``` + +## Information sources used by the script + +Everything the script reads is public: + +* **`pympistandard` wheels from PyPI.** Each release ships one `apis.json` + extracted from the MPI Standard's own build, so its procedure set is + authoritative. Releases 0.1.0/0.1.1 have the MPI-4.0 dataset (515 procedures), + 0.1.2/0.2.0 the MPI-5.0 one (567). `apis.json` also gives every parameter's + *kind*: a `POLY*` kind is the standard's marker for a parameter that + widens in the large-count interface, which is where `EMBIGGENED` comes from. +* **MPICH headers** for the two earlier boundaries which `apis.json` does not resolve, + since only two datasets are published: MPICH 3.4.3 is MPI 3.1, MPICH 4.3.2 is MPI 4.1. + +`pympistandard` looks like it ought to answer the version question directly, but +it does not: `Procedure.introduced()` exists in `src/pympistandard/procedure.py` +but is commented out. The MPI standard's own change log +(`mpi-forum/mpi-standard`, `chap-changes/changes.tex`) is not usable either — the +`\mpifunc{}` names inside a per-version section are *mentions*, not additions, so +the 4.0-to-4.1 section lists 65 names including `MPI_COMM_DUP` and `MPI_CART_GET`. + +## Procedures available in MPI 3.1 or earlier are omitted + +MPI.jl requires MPI 3.0 or later, so recording "needs MPI 1.0" for `MPI_Send` +would not be useful, and the oldest MPICH available as a JLL is 3.3.2. +It would be difficult to split 1.0/2.0/2.1/2.2/3.0/3.1 apart. +Anything present in MPICH 3.4.3 therefore gets no entry, and `@mpichk` reports +such a procedure as simply unavailable in the library in use. + +The exception is `OVERRIDES` in the script. The eight MPI-2.2 and MPI-3.0 +procedures which MPI.jl has always version-gated by hand, because it actually does +support libraries older than those. `test/test_neighbor_*.jl` checks +`e.min_version <= MPI.Get_version()` on them, so they need real version numbers. + +## Cross-check against the standard sources + +The classification was verified against the `mpi-forum/mpi-standard` repository, +whose per-version tags (`mpi-4.0`, `mpi-4.1`, `mpi-5.0`) have the authoritative +bindings as `function_name("MPI_Foo")` entries inside `\begin{mpi-binding}` +blocks in `chap-*/*.tex`. That repository is private to MPI Forum members, which +is why the script does not depend on it. Extracting and diffing those name sets +gives 470 procedures at 4.0, 494 at 4.1 and 500 at 5.0, with nothing removed +between versions, and: + +* the 24 procedures new in 4.1 match the script's 4.1 classification exactly, + `MPI_Get_hw_resource_info` included — MPICH 4.3 does not run ahead of the + standard here; +* the 6 procedures new in 5.0 are the `MPI_Abi_*` family. The script also + classifies the 22 `MPI__toint`/`_fromint` functions as 5.0, which the + `function_name` sweep misses because they are declared in the ABI chapter + (`mpi-5.0/chap-abi/abi.tex`) rather than as ordinary bindings. 5.0 is correct + for them: they are absent from the 4.1 tag entirely. + +For a member of the MPI Forum, the diff is reproducible with + +```sh +gh api repos/mpi-forum/mpi-standard/tarball/mpi-4.1 | tar xz +grep -rhoE 'function_name\("MPI_[A-Za-z0-9_]+"\)' */chap-*/*.tex | sed 's/.*"\(.*\)".*/\1/' | sort -u +``` diff --git a/gen/versions/extract_versions.py b/gen/versions/extract_versions.py new file mode 100644 index 000000000..a17ec7c24 --- /dev/null +++ b/gen/versions/extract_versions.py @@ -0,0 +1,166 @@ +#!/usr/bin/env python3 +"""Derive, for every MPI procedure, the MPI standard version that introduced it. + +Emits ``gen/src/versions.jl``, which ``gen/src/MPIgenerator.jl`` reads to annotate +each generated wrapper with a minimum MPI version and to decide which wrappers get +a large-count fallback. + +Run by hand, not from ``gen.sh``; the output is committed to the repo. See README.md. + +Data sources +------------ +* ``pympistandard`` wheels from PyPI. Each ships one ``apis.json`` extracted from + the MPI Standard's own build, so the procedure sets are authoritative: + releases 0.1.0/0.1.1 have the MPI-4.0 dataset, 0.1.2/0.2.0 have the MPI-5.0 one. + ``apis.json`` also records each parameter's *kind*: a ``POLY*`` kind marks a + parameter that widens in the large-count ("embiggened") interface, which is how + we obtain the set of procedures that have an ``MPI_*_c`` variant. +* MPICH headers, to resolve the earlier boundaries not described by ``apis.json``: + MPICH 3.4.3 is MPI 3.1, MPICH 4.3.2 is MPI 4.1. + +Buckets, in order of application: + <= 3.1 -> no version recorded (MPI.jl requires MPI 3.0 or later anyway), + except for the hand-curated overrides below + 4.0 -> in the MPI-4.0 dataset but absent from MPICH 3.4.3 + 4.1 -> new since the MPI-4.0 dataset and present in MPICH 4.3.2 + 5.0 -> new since the MPI-4.0 dataset and absent from MPICH 4.3.2 +""" + +import json +import re +import sys +import urllib.request +import zipfile +from io import BytesIO +from pathlib import Path + +# Procedures whose exact pre-3.1 version matters, because MPI.jl supports +# libraries older than the version that introduced them. These predate the +# oldest MPICH we can obtain as a JLL, so they cannot be derived. +OVERRIDES = { + "MPI_Dist_graph_create_adjacent": "2.2", + "MPI_Dist_graph_neighbors_count": "2.2", + "MPI_Dist_graph_neighbors": "2.2", + "MPI_Dist_graph_create": "2.2", + "MPI_Neighbor_allgatherv": "3.0", + "MPI_Neighbor_alltoallv": "3.0", + "MPI_Neighbor_allgather": "3.0", + "MPI_Neighbor_alltoall": "3.0", +} + +PYMPI = "https://pypi.org/pypi/pympistandard/{}/json" +PROTO_RE = re.compile(r"\b(MPI_[A-Za-z0-9_]+)\s*\(") + + +def apis_json(release): + """Fetch one pympistandard release's apis.json.""" + meta = json.load(urllib.request.urlopen(PYMPI.format(release))) + url = next(f["url"] for f in meta["urls"] if f["filename"].endswith(".whl")) + wheel = zipfile.ZipFile(BytesIO(urllib.request.urlopen(url).read())) + return json.loads(wheel.read("pympistandard/data/apis.json")) + + +def vkey(version): + """Sort key for a "major.minor" version string.""" + return tuple(int(part) for part in version.split(".")) + + +def header_names(*paths): + """Every MPI_* identifier that looks like a function declaration. + + At least one of `paths` has to exist and yield names. A missing include directory -- + an MPICH_jll artifact garbage-collected out of the depot, say -- would otherwise + silently contribute nothing, and every procedure in the newer dataset would be + misclassified as new in that version. + """ + names = set() + found = [] + for path in paths: + if path.exists(): + found.append(path) + names |= set(PROTO_RE.findall(path.read_text(errors="replace"))) + if not names: + sys.exit( + f"no MPI declarations found in {[str(p) for p in paths]}" + + ("" if found else " (none of these paths exist)") + ) + return names + + +def main(): + if len(sys.argv) != 3: + sys.exit(f"usage: {sys.argv[0]} ") + mpich31, mpich41 = (Path(a) for a in sys.argv[1:3]) + + std40 = apis_json("0.1.0") + std50 = apis_json("0.1.2") + + # Sanity-check that the two datasets are the versions we think they are. + assert "mpi_abi_get_version" not in std40, "0.1.0 is not the MPI-4.0 dataset" + assert "mpi_abi_get_version" in std50, "0.1.2 is not the MPI-5.0 dataset" + + names40 = {e["name"] for e in std40.values()} + names50 = {e["name"] for e in std50.values()} + + in31 = header_names(mpich31 / "mpi.h", mpich31 / "mpio.h") + in41 = header_names(mpich41 / "mpi.h", mpich41 / "mpi_proto.h", mpich41 / "mpio.h") + + # A POLY* parameter kind marks a procedure that has a large-count variant. + # Callbacks (MPI_User_function, MPI_Datarep_conversion_function) and predefined + # functions (MPI_CONVERSION_FN_NULL) also have POLY parameters, but they are + # typedefs and constants rather than callable entry points, so they must not get a wrapper. + embiggened = sorted( + e["name"] + for e in std50.values() + if any(p["kind"].startswith("POLY") for p in e["parameters"]) + and not e["attributes"]["callback"] + and e["attributes"]["predefined_function"] is None + ) + + introduced = {} + for name in sorted(names50): + if name in OVERRIDES: + introduced[name] = OVERRIDES[name] + elif name in names40: + if name not in in31: + introduced[name] = "4.0" + # else: MPI 3.1 or earlier, left unrecorded + elif name in in41: + introduced[name] = "4.1" + else: + introduced[name] = "5.0" + + # Large-count entry points arrived with MPI 4.0 -- except where the base + # procedure itself is newer, e.g. MPI_Comm_attach_buffer_c is MPI 4.1. + for name in embiggened: + introduced[name + "_c"] = max("4.0", introduced.get(name, "4.0"), key=vkey) + + out = Path(__file__).resolve().parent.parent / "src" / "versions.jl" + with out.open("w") as f: + f.write("# WARNING: auto-generated by MPI.jl/gen/versions/extract_versions.py,\n") + f.write("# please edit that script instead!\n") + f.write("#\n") + f.write("# INTRODUCED maps a procedure to the MPI standard version that added it.\n") + f.write("# Procedures available in MPI 3.1 or earlier are omitted: MPI.jl requires\n") + f.write("# MPI 3.0 or later, so a version would not be useful.\n") + f.write("const INTRODUCED = Dict{Symbol,VersionNumber}(\n") + for name, ver in sorted(introduced.items()): + f.write(f' :{name} => v"{ver}",\n') + f.write(")\n\n") + f.write("# Procedures with a large-count (\"embiggened\") `MPI_*_c` variant, i.e. those\n") + f.write("# having at least one polymorphic parameter in the MPI standard's own\n") + f.write("# machine-readable binding description.\n") + f.write("const EMBIGGENED = Set{Symbol}([\n") + for name in embiggened: + f.write(f" :{name},\n") + f.write("])\n") + + print(f"wrote {out}") + print(f" {len(introduced)} versioned procedures, {len(embiggened)} embiggened") + for ver in ("2.2", "3.0", "4.0", "4.1", "5.0"): + n = sum(1 for v in introduced.values() if v == ver) + print(f" {ver}: {n}") + + +if __name__ == "__main__": + main() diff --git a/src/MPI.jl b/src/MPI.jl index d931d778b..4a9043365 100644 --- a/src/MPI.jl +++ b/src/MPI.jl @@ -19,27 +19,17 @@ end function _doc_external(fname) - # Ideally we'd like to use the "latest" version of the docs, but MPICH v4.0 - # at the moment seems to be the last version with all the docstrings. - mpich = "[MPICH](https://www.mpich.org/static/docs/v4.0/www3/$(fname).html)" - # All the *_c functions are undocumented in OpenMPI website - if !endswith(string(fname), "_c") - openmpi = "[OpenMPI](https://docs.open-mpi.org/en/main/man-openmpi/man3/$(fname).3.html)" - # Few docstrings aren't available for MPICH - if fname in (:MPI_Status_c2f, :MPI_Status_f2c) || startswith(string(fname), "MPI_Type_create_f90_") - return """ - - `$fname` man page: $(openmpi) - """ - else - return """ - - `$fname` man page: $(openmpi), $(mpich) - """ - end - else + mpich = "[MPICH](https://www.mpich.org/static/docs/latest/www3/$(fname).html)" + # All the *_c functions are undocumented on the OpenMPI website + if endswith(string(fname), "_c") return """ - `$fname` man page: $(mpich) """ end + openmpi = "[OpenMPI](https://docs.open-mpi.org/en/main/man-openmpi/man3/$(fname).3.html)" + return """ + - `$fname` man page: $(openmpi), $(mpich) + """ end """ diff --git a/src/api/api.jl b/src/api/api.jl index eade92c6c..579d8d8f7 100644 --- a/src/api/api.jl +++ b/src/api/api.jl @@ -3,7 +3,8 @@ module API export MPI_Aint, MPI_Count, MPI_Offset, MPI_Status, MPI_Comm, MPI_Datatype, MPI_Errhandler, MPI_File, MPI_Group, MPI_Info, MPI_Message, MPI_Op, MPI_Request, MPI_Win, - libmpi, mpiexec, @mpichk, @mpicall, MPIPtr, SentinelPtr, FeatureLevelError + libmpi, mpiexec, @mpichk, @mpicall, MPIPtr, SentinelPtr, FeatureLevelError, + HAS_LARGE_COUNT import MPIPreferences using Libdl @@ -67,6 +68,14 @@ else error("Unknown MPI ABI $(MPIPreferences.abi)") end +# Callback typedefs to which the generated `ccall` signatures refer. Every ABI file +# defines the narrow callback types as `Cvoid`. Only src/api/mpiabi.jl also defines the +# large-count ones. Fill in the rest here (re-`const`ing to the same value elsewhere). +# +# The C signatures differ genuinely. `MPI_User_function` takes `int *len`, while +# `MPI_User_function_c` takes `MPI_Count *len`, and likewise for the datarep conversion +# functions. That is, these aliases are *not* interchangeable, even though we alias them here. +# We only define them all as `Cvoid` here because they arrive at `ccall` as opaque pointers. const MPI_User_function_c = MPI_User_function const MPI_Datarep_conversion_function_c = MPI_Datarep_conversion_function @@ -111,19 +120,71 @@ end FeatureLevelError Error thrown if a feature is not implemented in the current MPI backend. + +`min_version` is the MPI version that introduced the feature, or `nothing` when it +is not known. See `MPI.jl/gen/versions/README.md`. """ struct FeatureLevelError <: Exception function_name::Symbol - min_version::VersionNumber # minimal MPI version required for this feature to be available + min_version::Union{Nothing,VersionNumber} # minimal MPI version required for this feature to be available end function Base.show(io::IO, err::FeatureLevelError) - print(io, "FeatureLevelError($(err.function_name)): Minimum MPI version is $(err.min_version)") + print(io, "FeatureLevelError($(err.function_name)): ") + if isnothing(err.min_version) + print(io, "not provided by the MPI library in use") + else + print(io, "Minimum MPI version is $(err.min_version)") + end end -macro mpichk(expr, min_version=nothing) - if !isnothing(min_version) && expr.args[2].head == :tuple +""" + @mpichk ccall(...) [min_version] [fallback=MPI_Foo] + +Wrap a `ccall` to an MPI procedure: call it via `@mpicall` and turn a nonzero return +code into an `MPIError`. + +If the symbol is absent from the MPI library, the whole body is replaced at +macro-expansion time — that is, when MPI.jl is precompiled — by one of + + * a call to `fallback` with the same arguments, if given. This is how the + large-count `MPI_Foo_c` wrappers fall back to the narrow `MPI_Foo` entry points on a + pre-MPI-4.0 library: the two take the same arguments in the same order, and a + count which is too large for the narrow interface then fails in `ccall`'s conversion to + `Cint`. + + Note the limit of that transparency: This only works for counts passed *by value*, which are converted by + `ccall`. Counts passed through a pointer are not converted. Callers must therefore type + arrays and `Ref`s with [`Count`](@ref MPI.API.Count), [`Displ`](@ref MPI.API.Displ) + or [`TypeDispl`](@ref MPI.API.TypeDispl), which depend on the entry point they use. A + `Ref{MPI_Count}` reaching a fallback that wants a `Ptr{Cint}` is a `MethodError`. + * otherwise, `throw(`[`FeatureLevelError`](@ref)`(name, min_version))`. + +`min_version` comes from the generator's `INTRODUCED` table. +""" +macro mpichk(expr, args...) + min_version = nothing + fallback = nothing + for arg in args + if arg isa Expr && arg.head === :(=) && arg.args[1] === :fallback + fallback = arg.args[2] + else + min_version = arg + end + end + + if expr.args[2].head == :tuple fn = expr.args[2].args[1].value - if isnothing(dlsym(libmpi_handle, fn; throw_error=false)) + if !isnothing(fallback) + # All the large-count entry points fall back together, rather than each one + # on its own availability: `Count` and its companions are a single choice for + # the whole package, so a per-function decision would let a `Ref{MPI_Count}` + # reach an entry point wanting a `Ptr{Cint}`. `HAS_LARGE_COUNT` is true only + # when the library provides every one of them. + if !HAS_LARGE_COUNT + # ccall(target, returntype, argtypes, args...) + return esc(Expr(:call, fallback, expr.args[5:end]...)) + end + elseif isnothing(dlsym(libmpi_handle, fn; throw_error=false)) return quote throw(FeatureLevelError($(QuoteNode(fn)), $min_version)) end @@ -138,6 +199,61 @@ end include("generated_api.jl") +@doc """ + MPI.API.HAS_LARGE_COUNT + +Whether the MPI library provides the MPI 4.0 large-count (`MPI_*_c`) entry points, as +determined when MPI.jl is precompiled. + +It is true only if the library provides *every* one of them, listed in +`MPI.API.LARGE_COUNT_SYMBOLS`. An implementation may ship only some -- Intel MPI 2021.11 +has `MPI_Send_c` but not `MPI_Type_size_c` -- and since [`MPI.API.Count`](@ref) and its +companions are a single choice for the whole package, the entry points have to be used +all together or not at all. + +The `MPI_*_c` wrappers can be called either way: where this is `false` they fall back to +the corresponding narrow entry point, and a count that does not fit in a `Cint` then +raises an `InexactError`. +""" HAS_LARGE_COUNT + +""" + MPI.API.Count + +The integer type the high-level interface uses for element counts: `MPI_Count` if the +library provides the MPI 4.0 large-count entry points, and `Cint` otherwise. See +[`MPI.API.HAS_LARGE_COUNT`](@ref). +""" +const Count = HAS_LARGE_COUNT ? MPI_Count : Cint + +""" + MPI.API.Displ + +The integer type the high-level interface uses for the displacements of the "v" +collectives ([`MPI.VBuffer`](@ref)): `MPI_Aint` if the library provides the MPI 4.0 +large-count entry points, and `Cint` otherwise. + +This is deliberately separate from [`MPI.API.Count`](@ref): `MPI_Alltoallv_c` and friends +widen their counts to `MPI_Count`, but widen their displacements only to `MPI_Aint`, and the two +are not the same type on every ABI. (For example, in 32-bit MPICH, `MPI_Count` is +`Int64` while `MPI_Aint` is `Int32`.) Note that the derived-datatype constructors go the +other way: `MPI_Type_create_struct_c` widens its byte displacements to `MPI_Count`. +""" +const Displ = HAS_LARGE_COUNT ? MPI_Aint : Cint + +""" + MPI.API.TypeDispl + +The integer type which the high-level interface uses for the byte displacements of the +derived-datatype constructors (`MPI.Types.create_struct` and friends): `MPI_Count` if +the library provides the MPI 4.0 large-count entry points, and `MPI_Aint` otherwise. + +A third type is needed because the datatype constructors widen byte displacements from +`MPI_Aint` all the way to `MPI_Count`, where the "v" collectives widen element +displacements only from `int` to `MPI_Aint`, so neither [`MPI.API.Count`](@ref) nor +[`MPI.API.Displ`](@ref) fits both. The three coincide on 64-bit ABIs. +""" +const TypeDispl = HAS_LARGE_COUNT ? MPI_Count : MPI_Aint + for handle in [ :MPI_Comm, :MPI_Datatype, diff --git a/src/api/generated_api.jl b/src/api/generated_api.jl index dad737167..58ac47481 100644 --- a/src/api/generated_api.jl +++ b/src/api/generated_api.jl @@ -1,66 +1,246 @@ -# WARNING: this signature file for MPICH_jll has been auto-generated, please edit MPI.jl/gen/src/MPIgenerator.jl instead ! +# WARNING: this signature file for MPICH_jll has been auto-generated, please edit MPI.jl/gen/src/MPIgenerator.jl instead! + + +const LARGE_COUNT_SYMBOLS = ( + :MPI_Allgather_c, + :MPI_Allgather_init_c, + :MPI_Allgatherv_c, + :MPI_Allgatherv_init_c, + :MPI_Allreduce_c, + :MPI_Allreduce_init_c, + :MPI_Alltoall_c, + :MPI_Alltoall_init_c, + :MPI_Alltoallv_c, + :MPI_Alltoallv_init_c, + :MPI_Alltoallw_c, + :MPI_Alltoallw_init_c, + :MPI_Bcast_c, + :MPI_Bcast_init_c, + :MPI_Exscan_c, + :MPI_Exscan_init_c, + :MPI_Gather_c, + :MPI_Gather_init_c, + :MPI_Gatherv_c, + :MPI_Gatherv_init_c, + :MPI_Iallgather_c, + :MPI_Iallgatherv_c, + :MPI_Iallreduce_c, + :MPI_Ialltoall_c, + :MPI_Ialltoallv_c, + :MPI_Ialltoallw_c, + :MPI_Ibcast_c, + :MPI_Iexscan_c, + :MPI_Igather_c, + :MPI_Igatherv_c, + :MPI_Ineighbor_allgather_c, + :MPI_Ineighbor_allgatherv_c, + :MPI_Ineighbor_alltoall_c, + :MPI_Ineighbor_alltoallv_c, + :MPI_Ineighbor_alltoallw_c, + :MPI_Ireduce_c, + :MPI_Ireduce_scatter_c, + :MPI_Ireduce_scatter_block_c, + :MPI_Iscan_c, + :MPI_Iscatter_c, + :MPI_Iscatterv_c, + :MPI_Neighbor_allgather_c, + :MPI_Neighbor_allgather_init_c, + :MPI_Neighbor_allgatherv_c, + :MPI_Neighbor_allgatherv_init_c, + :MPI_Neighbor_alltoall_c, + :MPI_Neighbor_alltoall_init_c, + :MPI_Neighbor_alltoallv_c, + :MPI_Neighbor_alltoallv_init_c, + :MPI_Neighbor_alltoallw_c, + :MPI_Neighbor_alltoallw_init_c, + :MPI_Reduce_c, + :MPI_Reduce_init_c, + :MPI_Reduce_local_c, + :MPI_Reduce_scatter_c, + :MPI_Reduce_scatter_block_c, + :MPI_Reduce_scatter_block_init_c, + :MPI_Reduce_scatter_init_c, + :MPI_Scan_c, + :MPI_Scan_init_c, + :MPI_Scatter_c, + :MPI_Scatter_init_c, + :MPI_Scatterv_c, + :MPI_Scatterv_init_c, + :MPI_Get_count_c, + :MPI_Get_elements_c, + :MPI_Pack_c, + :MPI_Pack_external_c, + :MPI_Pack_external_size_c, + :MPI_Pack_size_c, + :MPI_Status_set_elements_c, + :MPI_Type_contiguous_c, + :MPI_Type_create_darray_c, + :MPI_Type_create_hindexed_c, + :MPI_Type_create_hindexed_block_c, + :MPI_Type_create_hvector_c, + :MPI_Type_create_indexed_block_c, + :MPI_Type_create_resized_c, + :MPI_Type_create_struct_c, + :MPI_Type_create_subarray_c, + :MPI_Type_get_contents_c, + :MPI_Type_get_envelope_c, + :MPI_Type_get_extent_c, + :MPI_Type_get_true_extent_c, + :MPI_Type_indexed_c, + :MPI_Type_size_c, + :MPI_Type_vector_c, + :MPI_Unpack_c, + :MPI_Unpack_external_c, + :MPI_Bsend_c, + :MPI_Bsend_init_c, + :MPI_Buffer_attach_c, + :MPI_Buffer_detach_c, + :MPI_Comm_attach_buffer_c, + :MPI_Comm_detach_buffer_c, + :MPI_Ibsend_c, + :MPI_Imrecv_c, + :MPI_Irecv_c, + :MPI_Irsend_c, + :MPI_Isend_c, + :MPI_Isendrecv_c, + :MPI_Isendrecv_replace_c, + :MPI_Issend_c, + :MPI_Mrecv_c, + :MPI_Recv_c, + :MPI_Recv_init_c, + :MPI_Rsend_c, + :MPI_Rsend_init_c, + :MPI_Send_c, + :MPI_Send_init_c, + :MPI_Sendrecv_c, + :MPI_Sendrecv_replace_c, + :MPI_Ssend_c, + :MPI_Ssend_init_c, + :MPI_Accumulate_c, + :MPI_Get_c, + :MPI_Get_accumulate_c, + :MPI_Put_c, + :MPI_Raccumulate_c, + :MPI_Rget_c, + :MPI_Rget_accumulate_c, + :MPI_Rput_c, + :MPI_Win_allocate_c, + :MPI_Win_allocate_shared_c, + :MPI_Win_create_c, + :MPI_Win_shared_query_c, + :MPI_File_get_type_extent_c, + :MPI_File_iread_c, + :MPI_File_iread_all_c, + :MPI_File_iread_at_c, + :MPI_File_iread_at_all_c, + :MPI_File_iread_shared_c, + :MPI_File_iwrite_c, + :MPI_File_iwrite_all_c, + :MPI_File_iwrite_at_c, + :MPI_File_iwrite_at_all_c, + :MPI_File_iwrite_shared_c, + :MPI_File_read_c, + :MPI_File_read_all_c, + :MPI_File_read_all_begin_c, + :MPI_File_read_at_c, + :MPI_File_read_at_all_c, + :MPI_File_read_at_all_begin_c, + :MPI_File_read_ordered_c, + :MPI_File_read_ordered_begin_c, + :MPI_File_read_shared_c, + :MPI_File_write_c, + :MPI_File_write_all_c, + :MPI_File_write_all_begin_c, + :MPI_File_write_at_c, + :MPI_File_write_at_all_c, + :MPI_File_write_at_all_begin_c, + :MPI_File_write_ordered_c, + :MPI_File_write_ordered_begin_c, + :MPI_File_write_shared_c, +) + +const HAS_LARGE_COUNT = + all(sym -> !isnothing(dlsym(libmpi_handle, sym; throw_error=false)), LARGE_COUNT_SYMBOLS) + +""" + MPI_Abi_get_fortran_booleans(logical_size, logical_true, logical_false, is_set) + +$(_doc_external(:MPI_Abi_get_fortran_booleans)) +""" +function MPI_Abi_get_fortran_booleans(logical_size, logical_true, logical_false, is_set) + @mpichk ccall((:MPI_Abi_get_fortran_booleans, libmpi), Cint, (Cint, MPIPtr, MPIPtr, Ptr{Cint}), logical_size, logical_true, logical_false, is_set) v"5.0.0" +end + +""" + MPI_Abi_get_fortran_info(info) + +$(_doc_external(:MPI_Abi_get_fortran_info)) +""" +function MPI_Abi_get_fortran_info(info) + @mpichk ccall((:MPI_Abi_get_fortran_info, libmpi), Cint, (Ptr{MPI_Info},), info) v"5.0.0" +end + +""" + MPI_Abi_get_info(info) +$(_doc_external(:MPI_Abi_get_info)) """ - MPI_Wait(request, status) - -$(_doc_external(:MPI_Wait)) -""" -function MPI_Wait(request, status) - @mpichk ccall((:MPI_Wait, libmpi), Cint, (Ptr{MPI_Request}, Ptr{MPI_Status}), request, status) +function MPI_Abi_get_info(info) + @mpichk ccall((:MPI_Abi_get_info, libmpi), Cint, (Ptr{MPI_Info},), info) v"5.0.0" end """ - MPI_Test(request, flag, status) + MPI_Abi_get_version(abi_major, abi_minor) -$(_doc_external(:MPI_Test)) +$(_doc_external(:MPI_Abi_get_version)) """ -function MPI_Test(request, flag, status) - @mpichk ccall((:MPI_Test, libmpi), Cint, (Ptr{MPI_Request}, Ptr{Cint}, Ptr{MPI_Status}), request, flag, status) +function MPI_Abi_get_version(abi_major, abi_minor) + @mpichk ccall((:MPI_Abi_get_version, libmpi), Cint, (Ptr{Cint}, Ptr{Cint}), abi_major, abi_minor) v"5.0.0" end """ - MPI_Status_c2f(c_status, f_status) + MPI_Abi_set_fortran_booleans(logical_size, logical_true, logical_false) -$(_doc_external(:MPI_Status_c2f)) +$(_doc_external(:MPI_Abi_set_fortran_booleans)) """ -function MPI_Status_c2f(c_status, f_status) - @mpichk ccall((:MPI_Status_c2f, libmpi), Cint, (Ptr{MPI_Status}, Ptr{MPI_Fint}), c_status, f_status) +function MPI_Abi_set_fortran_booleans(logical_size, logical_true, logical_false) + @mpichk ccall((:MPI_Abi_set_fortran_booleans, libmpi), Cint, (Cint, MPIPtr, MPIPtr), logical_size, logical_true, logical_false) v"5.0.0" end """ - MPI_Status_f2c(f_status, c_status) + MPI_Abi_set_fortran_info(info) -$(_doc_external(:MPI_Status_f2c)) +$(_doc_external(:MPI_Abi_set_fortran_info)) """ -function MPI_Status_f2c(f_status, c_status) - @mpichk ccall((:MPI_Status_f2c, libmpi), Cint, (Ptr{MPI_Fint}, Ptr{MPI_Status}), f_status, c_status) +function MPI_Abi_set_fortran_info(info) + @mpichk ccall((:MPI_Abi_set_fortran_info, libmpi), Cint, (MPI_Info,), info) v"5.0.0" end """ - MPI_Type_create_f90_integer(r, newtype) + MPI_Comm_create_keyval(comm_copy_attr_fn, comm_delete_attr_fn, comm_keyval, extra_state) -$(_doc_external(:MPI_Type_create_f90_integer)) +$(_doc_external(:MPI_Comm_create_keyval)) """ -function MPI_Type_create_f90_integer(r, newtype) - @mpichk ccall((:MPI_Type_create_f90_integer, libmpi), Cint, (Cint, Ptr{MPI_Datatype}), r, newtype) +function MPI_Comm_create_keyval(comm_copy_attr_fn, comm_delete_attr_fn, comm_keyval, extra_state) + @mpichk ccall((:MPI_Comm_create_keyval, libmpi), Cint, (Ptr{MPI_Comm_copy_attr_function}, Ptr{MPI_Comm_delete_attr_function}, Ptr{Cint}, MPIPtr), comm_copy_attr_fn, comm_delete_attr_fn, comm_keyval, extra_state) end """ - MPI_Type_create_f90_real(p, r, newtype) + MPI_Keyval_create(copy_fn, delete_fn, keyval, extra_state) -$(_doc_external(:MPI_Type_create_f90_real)) +$(_doc_external(:MPI_Keyval_create)) """ -function MPI_Type_create_f90_real(p, r, newtype) - @mpichk ccall((:MPI_Type_create_f90_real, libmpi), Cint, (Cint, Cint, Ptr{MPI_Datatype}), p, r, newtype) +function MPI_Keyval_create(copy_fn, delete_fn, keyval, extra_state) + @mpichk ccall((:MPI_Keyval_create, libmpi), Cint, (Ptr{MPI_Copy_function}, Ptr{MPI_Delete_function}, Ptr{Cint}, MPIPtr), copy_fn, delete_fn, keyval, extra_state) end """ - MPI_Type_create_f90_complex(p, r, newtype) + MPI_Comm_delete_attr(comm, comm_keyval) -$(_doc_external(:MPI_Type_create_f90_complex)) +$(_doc_external(:MPI_Comm_delete_attr)) """ -function MPI_Type_create_f90_complex(p, r, newtype) - @mpichk ccall((:MPI_Type_create_f90_complex, libmpi), Cint, (Cint, Cint, Ptr{MPI_Datatype}), p, r, newtype) +function MPI_Comm_delete_attr(comm, comm_keyval) + @mpichk ccall((:MPI_Comm_delete_attr, libmpi), Cint, (MPI_Comm, Cint), comm, comm_keyval) end """ @@ -73,48 +253,21 @@ function MPI_Attr_delete(comm, keyval) end """ - MPI_Attr_get(comm, keyval, attribute_val, flag) - -$(_doc_external(:MPI_Attr_get)) -""" -function MPI_Attr_get(comm, keyval, attribute_val, flag) - @mpichk ccall((:MPI_Attr_get, libmpi), Cint, (MPI_Comm, Cint, MPIPtr, Ptr{Cint}), comm, keyval, attribute_val, flag) -end - -""" - MPI_Attr_put(comm, keyval, attribute_val) - -$(_doc_external(:MPI_Attr_put)) -""" -function MPI_Attr_put(comm, keyval, attribute_val) - @mpichk ccall((:MPI_Attr_put, libmpi), Cint, (MPI_Comm, Cint, MPIPtr), comm, keyval, attribute_val) -end - -""" - MPI_Comm_create_keyval(comm_copy_attr_fn, comm_delete_attr_fn, comm_keyval, extra_state) - -$(_doc_external(:MPI_Comm_create_keyval)) -""" -function MPI_Comm_create_keyval(comm_copy_attr_fn, comm_delete_attr_fn, comm_keyval, extra_state) - @mpichk ccall((:MPI_Comm_create_keyval, libmpi), Cint, (Ptr{MPI_Comm_copy_attr_function}, Ptr{MPI_Comm_delete_attr_function}, Ptr{Cint}, MPIPtr), comm_copy_attr_fn, comm_delete_attr_fn, comm_keyval, extra_state) -end - -""" - MPI_Comm_delete_attr(comm, comm_keyval) + MPI_Comm_free_keyval(comm_keyval) -$(_doc_external(:MPI_Comm_delete_attr)) +$(_doc_external(:MPI_Comm_free_keyval)) """ -function MPI_Comm_delete_attr(comm, comm_keyval) - @mpichk ccall((:MPI_Comm_delete_attr, libmpi), Cint, (MPI_Comm, Cint), comm, comm_keyval) +function MPI_Comm_free_keyval(comm_keyval) + @mpichk ccall((:MPI_Comm_free_keyval, libmpi), Cint, (Ptr{Cint},), comm_keyval) end """ - MPI_Comm_free_keyval(comm_keyval) + MPI_Keyval_free(keyval) -$(_doc_external(:MPI_Comm_free_keyval)) +$(_doc_external(:MPI_Keyval_free)) """ -function MPI_Comm_free_keyval(comm_keyval) - @mpichk ccall((:MPI_Comm_free_keyval, libmpi), Cint, (Ptr{Cint},), comm_keyval) +function MPI_Keyval_free(keyval) + @mpichk ccall((:MPI_Keyval_free, libmpi), Cint, (Ptr{Cint},), keyval) end """ @@ -127,30 +280,30 @@ function MPI_Comm_get_attr(comm, comm_keyval, attribute_val, flag) end """ - MPI_Comm_set_attr(comm, comm_keyval, attribute_val) + MPI_Attr_get(comm, keyval, attribute_val, flag) -$(_doc_external(:MPI_Comm_set_attr)) +$(_doc_external(:MPI_Attr_get)) """ -function MPI_Comm_set_attr(comm, comm_keyval, attribute_val) - @mpichk ccall((:MPI_Comm_set_attr, libmpi), Cint, (MPI_Comm, Cint, MPIPtr), comm, comm_keyval, attribute_val) +function MPI_Attr_get(comm, keyval, attribute_val, flag) + @mpichk ccall((:MPI_Attr_get, libmpi), Cint, (MPI_Comm, Cint, MPIPtr, Ptr{Cint}), comm, keyval, attribute_val, flag) end """ - MPI_Keyval_create(copy_fn, delete_fn, keyval, extra_state) + MPI_Comm_set_attr(comm, comm_keyval, attribute_val) -$(_doc_external(:MPI_Keyval_create)) +$(_doc_external(:MPI_Comm_set_attr)) """ -function MPI_Keyval_create(copy_fn, delete_fn, keyval, extra_state) - @mpichk ccall((:MPI_Keyval_create, libmpi), Cint, (Ptr{MPI_Copy_function}, Ptr{MPI_Delete_function}, Ptr{Cint}, MPIPtr), copy_fn, delete_fn, keyval, extra_state) +function MPI_Comm_set_attr(comm, comm_keyval, attribute_val) + @mpichk ccall((:MPI_Comm_set_attr, libmpi), Cint, (MPI_Comm, Cint, MPIPtr), comm, comm_keyval, attribute_val) end """ - MPI_Keyval_free(keyval) + MPI_Attr_put(comm, keyval, attribute_val) -$(_doc_external(:MPI_Keyval_free)) +$(_doc_external(:MPI_Attr_put)) """ -function MPI_Keyval_free(keyval) - @mpichk ccall((:MPI_Keyval_free, libmpi), Cint, (Ptr{Cint},), keyval) +function MPI_Attr_put(comm, keyval, attribute_val) + @mpichk ccall((:MPI_Attr_put, libmpi), Cint, (MPI_Comm, Cint, MPIPtr), comm, keyval, attribute_val) end """ @@ -258,7 +411,7 @@ end $(_doc_external(:MPI_Allgather_init)) """ function MPI_Allgather_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request) - @mpichk ccall((:MPI_Allgather_init, libmpi), Cint, (MPIPtr, Cint, MPI_Datatype, MPIPtr, Cint, MPI_Datatype, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request) + @mpichk ccall((:MPI_Allgather_init, libmpi), Cint, (MPIPtr, Cint, MPI_Datatype, MPIPtr, Cint, MPI_Datatype, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request) v"4.0.0" end """ @@ -276,7 +429,7 @@ end $(_doc_external(:MPI_Allgatherv_init)) """ function MPI_Allgatherv_init(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, info, request) - @mpichk ccall((:MPI_Allgatherv_init, libmpi), Cint, (MPIPtr, Cint, MPI_Datatype, MPIPtr, Ptr{Cint}, Ptr{Cint}, MPI_Datatype, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, info, request) + @mpichk ccall((:MPI_Allgatherv_init, libmpi), Cint, (MPIPtr, Cint, MPI_Datatype, MPIPtr, Ptr{Cint}, Ptr{Cint}, MPI_Datatype, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, info, request) v"4.0.0" end """ @@ -294,7 +447,7 @@ end $(_doc_external(:MPI_Allreduce_init)) """ function MPI_Allreduce_init(sendbuf, recvbuf, count, datatype, op, comm, info, request) - @mpichk ccall((:MPI_Allreduce_init, libmpi), Cint, (MPIPtr, MPIPtr, Cint, MPI_Datatype, MPI_Op, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, recvbuf, count, datatype, op, comm, info, request) + @mpichk ccall((:MPI_Allreduce_init, libmpi), Cint, (MPIPtr, MPIPtr, Cint, MPI_Datatype, MPI_Op, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, recvbuf, count, datatype, op, comm, info, request) v"4.0.0" end """ @@ -312,7 +465,7 @@ end $(_doc_external(:MPI_Alltoall_init)) """ function MPI_Alltoall_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request) - @mpichk ccall((:MPI_Alltoall_init, libmpi), Cint, (MPIPtr, Cint, MPI_Datatype, MPIPtr, Cint, MPI_Datatype, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request) + @mpichk ccall((:MPI_Alltoall_init, libmpi), Cint, (MPIPtr, Cint, MPI_Datatype, MPIPtr, Cint, MPI_Datatype, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request) v"4.0.0" end """ @@ -330,7 +483,7 @@ end $(_doc_external(:MPI_Alltoallv_init)) """ function MPI_Alltoallv_init(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, info, request) - @mpichk ccall((:MPI_Alltoallv_init, libmpi), Cint, (MPIPtr, Ptr{Cint}, Ptr{Cint}, MPI_Datatype, MPIPtr, Ptr{Cint}, Ptr{Cint}, MPI_Datatype, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, info, request) + @mpichk ccall((:MPI_Alltoallv_init, libmpi), Cint, (MPIPtr, Ptr{Cint}, Ptr{Cint}, MPI_Datatype, MPIPtr, Ptr{Cint}, Ptr{Cint}, MPI_Datatype, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, info, request) v"4.0.0" end """ @@ -348,7 +501,7 @@ end $(_doc_external(:MPI_Alltoallw_init)) """ function MPI_Alltoallw_init(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, info, request) - @mpichk ccall((:MPI_Alltoallw_init, libmpi), Cint, (MPIPtr, Ptr{Cint}, Ptr{Cint}, Ptr{MPI_Datatype}, MPIPtr, Ptr{Cint}, Ptr{Cint}, Ptr{MPI_Datatype}, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, info, request) + @mpichk ccall((:MPI_Alltoallw_init, libmpi), Cint, (MPIPtr, Ptr{Cint}, Ptr{Cint}, Ptr{MPI_Datatype}, MPIPtr, Ptr{Cint}, Ptr{Cint}, Ptr{MPI_Datatype}, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, info, request) v"4.0.0" end """ @@ -366,7 +519,7 @@ end $(_doc_external(:MPI_Barrier_init)) """ function MPI_Barrier_init(comm, info, request) - @mpichk ccall((:MPI_Barrier_init, libmpi), Cint, (MPI_Comm, MPI_Info, Ptr{MPI_Request}), comm, info, request) + @mpichk ccall((:MPI_Barrier_init, libmpi), Cint, (MPI_Comm, MPI_Info, Ptr{MPI_Request}), comm, info, request) v"4.0.0" end """ @@ -384,7 +537,7 @@ end $(_doc_external(:MPI_Bcast_init)) """ function MPI_Bcast_init(buffer, count, datatype, root, comm, info, request) - @mpichk ccall((:MPI_Bcast_init, libmpi), Cint, (MPIPtr, Cint, MPI_Datatype, Cint, MPI_Comm, MPI_Info, Ptr{MPI_Request}), buffer, count, datatype, root, comm, info, request) + @mpichk ccall((:MPI_Bcast_init, libmpi), Cint, (MPIPtr, Cint, MPI_Datatype, Cint, MPI_Comm, MPI_Info, Ptr{MPI_Request}), buffer, count, datatype, root, comm, info, request) v"4.0.0" end """ @@ -402,7 +555,7 @@ end $(_doc_external(:MPI_Exscan_init)) """ function MPI_Exscan_init(sendbuf, recvbuf, count, datatype, op, comm, info, request) - @mpichk ccall((:MPI_Exscan_init, libmpi), Cint, (MPIPtr, MPIPtr, Cint, MPI_Datatype, MPI_Op, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, recvbuf, count, datatype, op, comm, info, request) + @mpichk ccall((:MPI_Exscan_init, libmpi), Cint, (MPIPtr, MPIPtr, Cint, MPI_Datatype, MPI_Op, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, recvbuf, count, datatype, op, comm, info, request) v"4.0.0" end """ @@ -420,7 +573,7 @@ end $(_doc_external(:MPI_Gather_init)) """ function MPI_Gather_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request) - @mpichk ccall((:MPI_Gather_init, libmpi), Cint, (MPIPtr, Cint, MPI_Datatype, MPIPtr, Cint, MPI_Datatype, Cint, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request) + @mpichk ccall((:MPI_Gather_init, libmpi), Cint, (MPIPtr, Cint, MPI_Datatype, MPIPtr, Cint, MPI_Datatype, Cint, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request) v"4.0.0" end """ @@ -438,7 +591,7 @@ end $(_doc_external(:MPI_Gatherv_init)) """ function MPI_Gatherv_init(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, info, request) - @mpichk ccall((:MPI_Gatherv_init, libmpi), Cint, (MPIPtr, Cint, MPI_Datatype, MPIPtr, Ptr{Cint}, Ptr{Cint}, MPI_Datatype, Cint, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, info, request) + @mpichk ccall((:MPI_Gatherv_init, libmpi), Cint, (MPIPtr, Cint, MPI_Datatype, MPIPtr, Ptr{Cint}, Ptr{Cint}, MPI_Datatype, Cint, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, info, request) v"4.0.0" end """ @@ -654,7 +807,7 @@ end $(_doc_external(:MPI_Neighbor_allgather_init)) """ function MPI_Neighbor_allgather_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request) - @mpichk ccall((:MPI_Neighbor_allgather_init, libmpi), Cint, (MPIPtr, Cint, MPI_Datatype, MPIPtr, Cint, MPI_Datatype, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request) + @mpichk ccall((:MPI_Neighbor_allgather_init, libmpi), Cint, (MPIPtr, Cint, MPI_Datatype, MPIPtr, Cint, MPI_Datatype, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request) v"4.0.0" end """ @@ -672,7 +825,7 @@ end $(_doc_external(:MPI_Neighbor_allgatherv_init)) """ function MPI_Neighbor_allgatherv_init(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, info, request) - @mpichk ccall((:MPI_Neighbor_allgatherv_init, libmpi), Cint, (MPIPtr, Cint, MPI_Datatype, MPIPtr, Ptr{Cint}, Ptr{Cint}, MPI_Datatype, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, info, request) + @mpichk ccall((:MPI_Neighbor_allgatherv_init, libmpi), Cint, (MPIPtr, Cint, MPI_Datatype, MPIPtr, Ptr{Cint}, Ptr{Cint}, MPI_Datatype, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, info, request) v"4.0.0" end """ @@ -690,7 +843,7 @@ end $(_doc_external(:MPI_Neighbor_alltoall_init)) """ function MPI_Neighbor_alltoall_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request) - @mpichk ccall((:MPI_Neighbor_alltoall_init, libmpi), Cint, (MPIPtr, Cint, MPI_Datatype, MPIPtr, Cint, MPI_Datatype, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request) + @mpichk ccall((:MPI_Neighbor_alltoall_init, libmpi), Cint, (MPIPtr, Cint, MPI_Datatype, MPIPtr, Cint, MPI_Datatype, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request) v"4.0.0" end """ @@ -708,7 +861,7 @@ end $(_doc_external(:MPI_Neighbor_alltoallv_init)) """ function MPI_Neighbor_alltoallv_init(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, info, request) - @mpichk ccall((:MPI_Neighbor_alltoallv_init, libmpi), Cint, (MPIPtr, Ptr{Cint}, Ptr{Cint}, MPI_Datatype, MPIPtr, Ptr{Cint}, Ptr{Cint}, MPI_Datatype, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, info, request) + @mpichk ccall((:MPI_Neighbor_alltoallv_init, libmpi), Cint, (MPIPtr, Ptr{Cint}, Ptr{Cint}, MPI_Datatype, MPIPtr, Ptr{Cint}, Ptr{Cint}, MPI_Datatype, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, info, request) v"4.0.0" end """ @@ -726,7 +879,7 @@ end $(_doc_external(:MPI_Neighbor_alltoallw_init)) """ function MPI_Neighbor_alltoallw_init(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, info, request) - @mpichk ccall((:MPI_Neighbor_alltoallw_init, libmpi), Cint, (MPIPtr, Ptr{Cint}, Ptr{MPI_Aint}, Ptr{MPI_Datatype}, MPIPtr, Ptr{Cint}, Ptr{MPI_Aint}, Ptr{MPI_Datatype}, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, info, request) + @mpichk ccall((:MPI_Neighbor_alltoallw_init, libmpi), Cint, (MPIPtr, Ptr{Cint}, Ptr{MPI_Aint}, Ptr{MPI_Datatype}, MPIPtr, Ptr{Cint}, Ptr{MPI_Aint}, Ptr{MPI_Datatype}, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, info, request) v"4.0.0" end """ @@ -744,7 +897,7 @@ end $(_doc_external(:MPI_Reduce_init)) """ function MPI_Reduce_init(sendbuf, recvbuf, count, datatype, op, root, comm, info, request) - @mpichk ccall((:MPI_Reduce_init, libmpi), Cint, (MPIPtr, MPIPtr, Cint, MPI_Datatype, MPI_Op, Cint, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, recvbuf, count, datatype, op, root, comm, info, request) + @mpichk ccall((:MPI_Reduce_init, libmpi), Cint, (MPIPtr, MPIPtr, Cint, MPI_Datatype, MPI_Op, Cint, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, recvbuf, count, datatype, op, root, comm, info, request) v"4.0.0" end """ @@ -780,7 +933,7 @@ end $(_doc_external(:MPI_Reduce_scatter_block_init)) """ function MPI_Reduce_scatter_block_init(sendbuf, recvbuf, recvcount, datatype, op, comm, info, request) - @mpichk ccall((:MPI_Reduce_scatter_block_init, libmpi), Cint, (MPIPtr, MPIPtr, Cint, MPI_Datatype, MPI_Op, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, recvbuf, recvcount, datatype, op, comm, info, request) + @mpichk ccall((:MPI_Reduce_scatter_block_init, libmpi), Cint, (MPIPtr, MPIPtr, Cint, MPI_Datatype, MPI_Op, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, recvbuf, recvcount, datatype, op, comm, info, request) v"4.0.0" end """ @@ -789,7 +942,7 @@ end $(_doc_external(:MPI_Reduce_scatter_init)) """ function MPI_Reduce_scatter_init(sendbuf, recvbuf, recvcounts, datatype, op, comm, info, request) - @mpichk ccall((:MPI_Reduce_scatter_init, libmpi), Cint, (MPIPtr, MPIPtr, Ptr{Cint}, MPI_Datatype, MPI_Op, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, recvbuf, recvcounts, datatype, op, comm, info, request) + @mpichk ccall((:MPI_Reduce_scatter_init, libmpi), Cint, (MPIPtr, MPIPtr, Ptr{Cint}, MPI_Datatype, MPI_Op, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, recvbuf, recvcounts, datatype, op, comm, info, request) v"4.0.0" end """ @@ -807,7 +960,7 @@ end $(_doc_external(:MPI_Scan_init)) """ function MPI_Scan_init(sendbuf, recvbuf, count, datatype, op, comm, info, request) - @mpichk ccall((:MPI_Scan_init, libmpi), Cint, (MPIPtr, MPIPtr, Cint, MPI_Datatype, MPI_Op, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, recvbuf, count, datatype, op, comm, info, request) + @mpichk ccall((:MPI_Scan_init, libmpi), Cint, (MPIPtr, MPIPtr, Cint, MPI_Datatype, MPI_Op, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, recvbuf, count, datatype, op, comm, info, request) v"4.0.0" end """ @@ -825,7 +978,7 @@ end $(_doc_external(:MPI_Scatter_init)) """ function MPI_Scatter_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request) - @mpichk ccall((:MPI_Scatter_init, libmpi), Cint, (MPIPtr, Cint, MPI_Datatype, MPIPtr, Cint, MPI_Datatype, Cint, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request) + @mpichk ccall((:MPI_Scatter_init, libmpi), Cint, (MPIPtr, Cint, MPI_Datatype, MPIPtr, Cint, MPI_Datatype, Cint, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request) v"4.0.0" end """ @@ -843,7 +996,7 @@ end $(_doc_external(:MPI_Scatterv_init)) """ function MPI_Scatterv_init(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request) - @mpichk ccall((:MPI_Scatterv_init, libmpi), Cint, (MPIPtr, Ptr{Cint}, Ptr{Cint}, MPI_Datatype, MPIPtr, Cint, MPI_Datatype, Cint, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request) + @mpichk ccall((:MPI_Scatterv_init, libmpi), Cint, (MPIPtr, Ptr{Cint}, Ptr{Cint}, MPI_Datatype, MPIPtr, Cint, MPI_Datatype, Cint, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request) v"4.0.0" end """ @@ -942,7 +1095,7 @@ end $(_doc_external(:MPI_Comm_idup_with_info)) """ function MPI_Comm_idup_with_info(comm, info, newcomm, request) - @mpichk ccall((:MPI_Comm_idup_with_info, libmpi), Cint, (MPI_Comm, MPI_Info, Ptr{MPI_Comm}, Ptr{MPI_Request}), comm, info, newcomm, request) + @mpichk ccall((:MPI_Comm_idup_with_info, libmpi), Cint, (MPI_Comm, MPI_Info, Ptr{MPI_Comm}, Ptr{MPI_Request}), comm, info, newcomm, request) v"4.0.0" end """ @@ -1041,7 +1194,7 @@ end $(_doc_external(:MPI_Intercomm_create_from_groups)) """ function MPI_Intercomm_create_from_groups(local_group, local_leader, remote_group, remote_leader, stringtag, info, errhandler, newintercomm) - @mpichk ccall((:MPI_Intercomm_create_from_groups, libmpi), Cint, (MPI_Group, Cint, MPI_Group, Cint, Ptr{Cchar}, MPI_Info, MPI_Errhandler, Ptr{MPI_Comm}), local_group, local_leader, remote_group, remote_leader, stringtag, info, errhandler, newintercomm) + @mpichk ccall((:MPI_Intercomm_create_from_groups, libmpi), Cint, (MPI_Group, Cint, MPI_Group, Cint, Ptr{Cchar}, MPI_Info, MPI_Errhandler, Ptr{MPI_Comm}), local_group, local_leader, remote_group, remote_leader, stringtag, info, errhandler, newintercomm) v"4.0.0" end """ @@ -1062,6 +1215,15 @@ function MPI_Get_address(location, address) @mpichk ccall((:MPI_Get_address, libmpi), Cint, (MPIPtr, Ptr{MPI_Aint}), location, address) end +""" + MPI_Address(location, address) + +$(_doc_external(:MPI_Address)) +""" +function MPI_Address(location, address) + @mpichk ccall((:MPI_Address, libmpi), Cint, (MPIPtr, Ptr{MPI_Aint}), location, address) +end + """ MPI_Get_count(status, datatype, count) @@ -1170,6 +1332,33 @@ function MPI_Type_create_darray(size, rank, ndims, array_of_gsizes, array_of_dis @mpichk ccall((:MPI_Type_create_darray, libmpi), Cint, (Cint, Cint, Cint, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}, Cint, MPI_Datatype, Ptr{MPI_Datatype}), size, rank, ndims, array_of_gsizes, array_of_distribs, array_of_dargs, array_of_psizes, order, oldtype, newtype) end +""" + MPI_Type_create_f90_complex(p, r, newtype) + +$(_doc_external(:MPI_Type_create_f90_complex)) +""" +function MPI_Type_create_f90_complex(p, r, newtype) + @mpichk ccall((:MPI_Type_create_f90_complex, libmpi), Cint, (Cint, Cint, Ptr{MPI_Datatype}), p, r, newtype) +end + +""" + MPI_Type_create_f90_integer(r, newtype) + +$(_doc_external(:MPI_Type_create_f90_integer)) +""" +function MPI_Type_create_f90_integer(r, newtype) + @mpichk ccall((:MPI_Type_create_f90_integer, libmpi), Cint, (Cint, Ptr{MPI_Datatype}), r, newtype) +end + +""" + MPI_Type_create_f90_real(p, r, newtype) + +$(_doc_external(:MPI_Type_create_f90_real)) +""" +function MPI_Type_create_f90_real(p, r, newtype) + @mpichk ccall((:MPI_Type_create_f90_real, libmpi), Cint, (Cint, Cint, Ptr{MPI_Datatype}), p, r, newtype) +end + """ MPI_Type_create_hindexed(count, array_of_blocklengths, array_of_displacements, oldtype, newtype) @@ -1179,6 +1368,15 @@ function MPI_Type_create_hindexed(count, array_of_blocklengths, array_of_displac @mpichk ccall((:MPI_Type_create_hindexed, libmpi), Cint, (Cint, Ptr{Cint}, Ptr{MPI_Aint}, MPI_Datatype, Ptr{MPI_Datatype}), count, array_of_blocklengths, array_of_displacements, oldtype, newtype) end +""" + MPI_Type_hindexed(count, array_of_blocklengths, array_of_displacements, oldtype, newtype) + +$(_doc_external(:MPI_Type_hindexed)) +""" +function MPI_Type_hindexed(count, array_of_blocklengths, array_of_displacements, oldtype, newtype) + @mpichk ccall((:MPI_Type_hindexed, libmpi), Cint, (Cint, Ptr{Cint}, Ptr{MPI_Aint}, MPI_Datatype, Ptr{MPI_Datatype}), count, array_of_blocklengths, array_of_displacements, oldtype, newtype) +end + """ MPI_Type_create_hindexed_block(count, blocklength, array_of_displacements, oldtype, newtype) @@ -1197,6 +1395,15 @@ function MPI_Type_create_hvector(count, blocklength, stride, oldtype, newtype) @mpichk ccall((:MPI_Type_create_hvector, libmpi), Cint, (Cint, Cint, MPI_Aint, MPI_Datatype, Ptr{MPI_Datatype}), count, blocklength, stride, oldtype, newtype) end +""" + MPI_Type_hvector(count, blocklength, stride, oldtype, newtype) + +$(_doc_external(:MPI_Type_hvector)) +""" +function MPI_Type_hvector(count, blocklength, stride, oldtype, newtype) + @mpichk ccall((:MPI_Type_hvector, libmpi), Cint, (Cint, Cint, MPI_Aint, MPI_Datatype, Ptr{MPI_Datatype}), count, blocklength, stride, oldtype, newtype) +end + """ MPI_Type_create_indexed_block(count, blocklength, array_of_displacements, oldtype, newtype) @@ -1224,6 +1431,15 @@ function MPI_Type_create_struct(count, array_of_blocklengths, array_of_displacem @mpichk ccall((:MPI_Type_create_struct, libmpi), Cint, (Cint, Ptr{Cint}, Ptr{MPI_Aint}, Ptr{MPI_Datatype}, Ptr{MPI_Datatype}), count, array_of_blocklengths, array_of_displacements, array_of_types, newtype) end +""" + MPI_Type_struct(count, array_of_blocklengths, array_of_displacements, array_of_types, newtype) + +$(_doc_external(:MPI_Type_struct)) +""" +function MPI_Type_struct(count, array_of_blocklengths, array_of_displacements, array_of_types, newtype) + @mpichk ccall((:MPI_Type_struct, libmpi), Cint, (Cint, Ptr{Cint}, Ptr{MPI_Aint}, Ptr{MPI_Datatype}, Ptr{MPI_Datatype}), count, array_of_blocklengths, array_of_displacements, array_of_types, newtype) +end + """ MPI_Type_create_subarray(ndims, array_of_sizes, array_of_subsizes, array_of_starts, order, oldtype, newtype) @@ -1314,6 +1530,15 @@ function MPI_Type_get_true_extent_x(datatype, true_lb, true_extent) @mpichk ccall((:MPI_Type_get_true_extent_x, libmpi), Cint, (MPI_Datatype, Ptr{MPI_Count}, Ptr{MPI_Count}), datatype, true_lb, true_extent) end +""" + MPI_Type_get_value_index(value_type, index_type, pair_type) + +$(_doc_external(:MPI_Type_get_value_index)) +""" +function MPI_Type_get_value_index(value_type, index_type, pair_type) + @mpichk ccall((:MPI_Type_get_value_index, libmpi), Cint, (MPI_Datatype, MPI_Datatype, Ptr{MPI_Datatype}), value_type, index_type, pair_type) v"4.1.0" +end + """ MPI_Type_indexed(count, array_of_blocklengths, array_of_displacements, oldtype, newtype) @@ -1386,15 +1611,6 @@ function MPI_Unpack_external(datarep, inbuf, insize, position, outbuf, outcount, @mpichk ccall((:MPI_Unpack_external, libmpi), Cint, (Ptr{Cchar}, MPIPtr, MPI_Aint, Ptr{MPI_Aint}, MPIPtr, Cint, MPI_Datatype), datarep, inbuf, insize, position, outbuf, outcount, datatype) end -""" - MPI_Address(location, address) - -$(_doc_external(:MPI_Address)) -""" -function MPI_Address(location, address) - @mpichk ccall((:MPI_Address, libmpi), Cint, (MPIPtr, Ptr{MPI_Aint}), location, address) -end - """ MPI_Type_extent(datatype, extent) @@ -1422,33 +1638,6 @@ function MPI_Type_ub(datatype, displacement) @mpichk ccall((:MPI_Type_ub, libmpi), Cint, (MPI_Datatype, Ptr{MPI_Aint}), datatype, displacement) end -""" - MPI_Type_hindexed(count, array_of_blocklengths, array_of_displacements, oldtype, newtype) - -$(_doc_external(:MPI_Type_hindexed)) -""" -function MPI_Type_hindexed(count, array_of_blocklengths, array_of_displacements, oldtype, newtype) - @mpichk ccall((:MPI_Type_hindexed, libmpi), Cint, (Cint, Ptr{Cint}, Ptr{MPI_Aint}, MPI_Datatype, Ptr{MPI_Datatype}), count, array_of_blocklengths, array_of_displacements, oldtype, newtype) -end - -""" - MPI_Type_hvector(count, blocklength, stride, oldtype, newtype) - -$(_doc_external(:MPI_Type_hvector)) -""" -function MPI_Type_hvector(count, blocklength, stride, oldtype, newtype) - @mpichk ccall((:MPI_Type_hvector, libmpi), Cint, (Cint, Cint, MPI_Aint, MPI_Datatype, Ptr{MPI_Datatype}), count, blocklength, stride, oldtype, newtype) -end - -""" - MPI_Type_struct(count, array_of_blocklengths, array_of_displacements, array_of_types, newtype) - -$(_doc_external(:MPI_Type_struct)) -""" -function MPI_Type_struct(count, array_of_blocklengths, array_of_displacements, array_of_types, newtype) - @mpichk ccall((:MPI_Type_struct, libmpi), Cint, (Cint, Ptr{Cint}, Ptr{MPI_Aint}, Ptr{MPI_Datatype}, Ptr{MPI_Datatype}), count, array_of_blocklengths, array_of_displacements, array_of_types, newtype) -end - """ MPI_Add_error_class(errorclass) @@ -1494,6 +1683,15 @@ function MPI_Comm_create_errhandler(comm_errhandler_fn, errhandler) @mpichk ccall((:MPI_Comm_create_errhandler, libmpi), Cint, (Ptr{MPI_Comm_errhandler_function}, Ptr{MPI_Errhandler}), comm_errhandler_fn, errhandler) end +""" + MPI_Errhandler_create(comm_errhandler_fn, errhandler) + +$(_doc_external(:MPI_Errhandler_create)) +""" +function MPI_Errhandler_create(comm_errhandler_fn, errhandler) + @mpichk ccall((:MPI_Errhandler_create, libmpi), Cint, (Ptr{MPI_Comm_errhandler_function}, Ptr{MPI_Errhandler}), comm_errhandler_fn, errhandler) +end + """ MPI_Comm_get_errhandler(comm, errhandler) @@ -1503,6 +1701,15 @@ function MPI_Comm_get_errhandler(comm, errhandler) @mpichk ccall((:MPI_Comm_get_errhandler, libmpi), Cint, (MPI_Comm, Ptr{MPI_Errhandler}), comm, errhandler) end +""" + MPI_Errhandler_get(comm, errhandler) + +$(_doc_external(:MPI_Errhandler_get)) +""" +function MPI_Errhandler_get(comm, errhandler) + @mpichk ccall((:MPI_Errhandler_get, libmpi), Cint, (MPI_Comm, Ptr{MPI_Errhandler}), comm, errhandler) +end + """ MPI_Comm_set_errhandler(comm, errhandler) @@ -1512,6 +1719,15 @@ function MPI_Comm_set_errhandler(comm, errhandler) @mpichk ccall((:MPI_Comm_set_errhandler, libmpi), Cint, (MPI_Comm, MPI_Errhandler), comm, errhandler) end +""" + MPI_Errhandler_set(comm, errhandler) + +$(_doc_external(:MPI_Errhandler_set)) +""" +function MPI_Errhandler_set(comm, errhandler) + @mpichk ccall((:MPI_Errhandler_set, libmpi), Cint, (MPI_Comm, MPI_Errhandler), comm, errhandler) +end + """ MPI_Errhandler_free(errhandler) @@ -1575,6 +1791,33 @@ function MPI_File_set_errhandler(file, errhandler) @mpichk ccall((:MPI_File_set_errhandler, libmpi), Cint, (MPI_File, MPI_Errhandler), file, errhandler) end +""" + MPI_Remove_error_class(errorclass) + +$(_doc_external(:MPI_Remove_error_class)) +""" +function MPI_Remove_error_class(errorclass) + @mpichk ccall((:MPI_Remove_error_class, libmpi), Cint, (Cint,), errorclass) v"4.1.0" +end + +""" + MPI_Remove_error_code(errorcode) + +$(_doc_external(:MPI_Remove_error_code)) +""" +function MPI_Remove_error_code(errorcode) + @mpichk ccall((:MPI_Remove_error_code, libmpi), Cint, (Cint,), errorcode) v"4.1.0" +end + +""" + MPI_Remove_error_string(errorcode) + +$(_doc_external(:MPI_Remove_error_string)) +""" +function MPI_Remove_error_string(errorcode) + @mpichk ccall((:MPI_Remove_error_string, libmpi), Cint, (Cint,), errorcode) v"4.1.0" +end + """ MPI_Win_call_errhandler(win, errorcode) @@ -1612,30 +1855,21 @@ function MPI_Win_set_errhandler(win, errhandler) end """ - MPI_Errhandler_create(comm_errhandler_fn, errhandler) - -$(_doc_external(:MPI_Errhandler_create)) -""" -function MPI_Errhandler_create(comm_errhandler_fn, errhandler) - @mpichk ccall((:MPI_Errhandler_create, libmpi), Cint, (Ptr{MPI_Comm_errhandler_function}, Ptr{MPI_Errhandler}), comm_errhandler_fn, errhandler) -end - -""" - MPI_Errhandler_get(comm, errhandler) + MPI_Status_c2f(c_status, f_status) -$(_doc_external(:MPI_Errhandler_get)) +$(_doc_external(:MPI_Status_c2f)) """ -function MPI_Errhandler_get(comm, errhandler) - @mpichk ccall((:MPI_Errhandler_get, libmpi), Cint, (MPI_Comm, Ptr{MPI_Errhandler}), comm, errhandler) +function MPI_Status_c2f(c_status, f_status) + @mpichk ccall((:MPI_Status_c2f, libmpi), Cint, (Ptr{MPI_Status}, Ptr{MPI_Fint}), c_status, f_status) end """ - MPI_Errhandler_set(comm, errhandler) + MPI_Status_f2c(f_status, c_status) -$(_doc_external(:MPI_Errhandler_set)) +$(_doc_external(:MPI_Status_f2c)) """ -function MPI_Errhandler_set(comm, errhandler) - @mpichk ccall((:MPI_Errhandler_set, libmpi), Cint, (MPI_Comm, MPI_Errhandler), comm, errhandler) +function MPI_Status_f2c(f_status, c_status) + @mpichk ccall((:MPI_Status_f2c, libmpi), Cint, (Ptr{MPI_Fint}, Ptr{MPI_Status}), f_status, c_status) end """ @@ -1761,7 +1995,7 @@ end $(_doc_external(:MPI_Info_create_env)) """ function MPI_Info_create_env(argc, argv, info) - @mpichk ccall((:MPI_Info_create_env, libmpi), Cint, (Cint, Ptr{Ptr{Cchar}}, Ptr{MPI_Info}), argc, argv, info) + @mpichk ccall((:MPI_Info_create_env, libmpi), Cint, (Cint, Ptr{Ptr{Cchar}}, Ptr{MPI_Info}), argc, argv, info) v"4.0.0" end """ @@ -1824,7 +2058,7 @@ end $(_doc_external(:MPI_Info_get_string)) """ function MPI_Info_get_string(info, key, buflen, value, flag) - @mpichk ccall((:MPI_Info_get_string, libmpi), Cint, (MPI_Info, Ptr{Cchar}, Ptr{Cint}, Ptr{Cchar}, Ptr{Cint}), info, key, buflen, value, flag) + @mpichk ccall((:MPI_Info_get_string, libmpi), Cint, (MPI_Info, Ptr{Cchar}, Ptr{Cint}, Ptr{Cchar}, Ptr{Cint}), info, key, buflen, value, flag) v"4.0.0" end """ @@ -1860,7 +2094,7 @@ end $(_doc_external(:MPI_Comm_create_from_group)) """ function MPI_Comm_create_from_group(group, stringtag, info, errhandler, newcomm) - @mpichk ccall((:MPI_Comm_create_from_group, libmpi), Cint, (MPI_Group, Ptr{Cchar}, MPI_Info, MPI_Errhandler, Ptr{MPI_Comm}), group, stringtag, info, errhandler, newcomm) + @mpichk ccall((:MPI_Comm_create_from_group, libmpi), Cint, (MPI_Group, Ptr{Cchar}, MPI_Info, MPI_Errhandler, Ptr{MPI_Comm}), group, stringtag, info, errhandler, newcomm) v"4.0.0" end """ @@ -1932,7 +2166,7 @@ end $(_doc_external(:MPI_Aint_add)) """ function MPI_Aint_add(base, disp) - @mpichk ccall((:MPI_Aint_add, libmpi), MPI_Aint, (MPI_Aint, MPI_Aint), base, disp) + @mpicall ccall((:MPI_Aint_add, libmpi), MPI_Aint, (MPI_Aint, MPI_Aint), base, disp) end """ @@ -1941,7 +2175,7 @@ end $(_doc_external(:MPI_Aint_diff)) """ function MPI_Aint_diff(addr1, addr2) - @mpichk ccall((:MPI_Aint_diff, libmpi), MPI_Aint, (MPI_Aint, MPI_Aint), addr1, addr2) + @mpicall ccall((:MPI_Aint_diff, libmpi), MPI_Aint, (MPI_Aint, MPI_Aint), addr1, addr2) end """ @@ -2004,7 +2238,7 @@ end $(_doc_external(:MPI_Parrived)) """ function MPI_Parrived(request, partition, flag) - @mpichk ccall((:MPI_Parrived, libmpi), Cint, (MPI_Request, Cint, Ptr{Cint}), request, partition, flag) + @mpichk ccall((:MPI_Parrived, libmpi), Cint, (MPI_Request, Cint, Ptr{Cint}), request, partition, flag) v"4.0.0" end """ @@ -2013,7 +2247,7 @@ end $(_doc_external(:MPI_Pready)) """ function MPI_Pready(partition, request) - @mpichk ccall((:MPI_Pready, libmpi), Cint, (Cint, MPI_Request), partition, request) + @mpichk ccall((:MPI_Pready, libmpi), Cint, (Cint, MPI_Request), partition, request) v"4.0.0" end """ @@ -2022,7 +2256,7 @@ end $(_doc_external(:MPI_Pready_list)) """ function MPI_Pready_list(length, array_of_partitions, request) - @mpichk ccall((:MPI_Pready_list, libmpi), Cint, (Cint, Ptr{Cint}, MPI_Request), length, array_of_partitions, request) + @mpichk ccall((:MPI_Pready_list, libmpi), Cint, (Cint, Ptr{Cint}, MPI_Request), length, array_of_partitions, request) v"4.0.0" end """ @@ -2031,7 +2265,7 @@ end $(_doc_external(:MPI_Pready_range)) """ function MPI_Pready_range(partition_low, partition_high, request) - @mpichk ccall((:MPI_Pready_range, libmpi), Cint, (Cint, Cint, MPI_Request), partition_low, partition_high, request) + @mpichk ccall((:MPI_Pready_range, libmpi), Cint, (Cint, Cint, MPI_Request), partition_low, partition_high, request) v"4.0.0" end """ @@ -2040,7 +2274,7 @@ end $(_doc_external(:MPI_Precv_init)) """ function MPI_Precv_init(buf, partitions, count, datatype, dest, tag, comm, info, request) - @mpichk ccall((:MPI_Precv_init, libmpi), Cint, (MPIPtr, Cint, MPI_Count, MPI_Datatype, Cint, Cint, MPI_Comm, MPI_Info, Ptr{MPI_Request}), buf, partitions, count, datatype, dest, tag, comm, info, request) + @mpichk ccall((:MPI_Precv_init, libmpi), Cint, (MPIPtr, Cint, MPI_Count, MPI_Datatype, Cint, Cint, MPI_Comm, MPI_Info, Ptr{MPI_Request}), buf, partitions, count, datatype, dest, tag, comm, info, request) v"4.0.0" end """ @@ -2049,7 +2283,7 @@ end $(_doc_external(:MPI_Psend_init)) """ function MPI_Psend_init(buf, partitions, count, datatype, dest, tag, comm, info, request) - @mpichk ccall((:MPI_Psend_init, libmpi), Cint, (MPIPtr, Cint, MPI_Count, MPI_Datatype, Cint, Cint, MPI_Comm, MPI_Info, Ptr{MPI_Request}), buf, partitions, count, datatype, dest, tag, comm, info, request) + @mpichk ccall((:MPI_Psend_init, libmpi), Cint, (MPIPtr, Cint, MPI_Count, MPI_Datatype, Cint, Cint, MPI_Comm, MPI_Info, Ptr{MPI_Request}), buf, partitions, count, datatype, dest, tag, comm, info, request) v"4.0.0" end """ @@ -2088,6 +2322,60 @@ function MPI_Buffer_detach(buffer_addr, size) @mpichk ccall((:MPI_Buffer_detach, libmpi), Cint, (MPIPtr, Ptr{Cint}), buffer_addr, size) end +""" + MPI_Buffer_flush() + +$(_doc_external(:MPI_Buffer_flush)) +""" +function MPI_Buffer_flush() + @mpichk ccall((:MPI_Buffer_flush, libmpi), Cint, ()) v"4.1.0" +end + +""" + MPI_Buffer_iflush(request) + +$(_doc_external(:MPI_Buffer_iflush)) +""" +function MPI_Buffer_iflush(request) + @mpichk ccall((:MPI_Buffer_iflush, libmpi), Cint, (Ptr{MPI_Request},), request) v"4.1.0" +end + +""" + MPI_Comm_attach_buffer(comm, buffer, size) + +$(_doc_external(:MPI_Comm_attach_buffer)) +""" +function MPI_Comm_attach_buffer(comm, buffer, size) + @mpichk ccall((:MPI_Comm_attach_buffer, libmpi), Cint, (MPI_Comm, MPIPtr, Cint), comm, buffer, size) v"4.1.0" +end + +""" + MPI_Comm_detach_buffer(comm, buffer_addr, size) + +$(_doc_external(:MPI_Comm_detach_buffer)) +""" +function MPI_Comm_detach_buffer(comm, buffer_addr, size) + @mpichk ccall((:MPI_Comm_detach_buffer, libmpi), Cint, (MPI_Comm, MPIPtr, Ptr{Cint}), comm, buffer_addr, size) v"4.1.0" +end + +""" + MPI_Comm_flush_buffer(comm) + +$(_doc_external(:MPI_Comm_flush_buffer)) +""" +function MPI_Comm_flush_buffer(comm) + @mpichk ccall((:MPI_Comm_flush_buffer, libmpi), Cint, (MPI_Comm,), comm) v"4.1.0" +end + +""" + MPI_Comm_iflush_buffer(comm, request) + +$(_doc_external(:MPI_Comm_iflush_buffer)) +""" +function MPI_Comm_iflush_buffer(comm, request) + @mpichk ccall((:MPI_Comm_iflush_buffer, libmpi), Cint, (MPI_Comm, Ptr{MPI_Request}), comm, request) v"4.1.0" +end + """ MPI_Ibsend(buf, count, datatype, dest, tag, comm, request) @@ -2157,7 +2445,7 @@ end $(_doc_external(:MPI_Isendrecv)) """ function MPI_Isendrecv(sendbuf, sendcount, sendtype, dest, sendtag, recvbuf, recvcount, recvtype, source, recvtag, comm, request) - @mpichk ccall((:MPI_Isendrecv, libmpi), Cint, (MPIPtr, Cint, MPI_Datatype, Cint, Cint, MPIPtr, Cint, MPI_Datatype, Cint, Cint, MPI_Comm, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, dest, sendtag, recvbuf, recvcount, recvtype, source, recvtag, comm, request) + @mpichk ccall((:MPI_Isendrecv, libmpi), Cint, (MPIPtr, Cint, MPI_Datatype, Cint, Cint, MPIPtr, Cint, MPI_Datatype, Cint, Cint, MPI_Comm, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, dest, sendtag, recvbuf, recvcount, recvtype, source, recvtag, comm, request) v"4.0.0" end """ @@ -2166,7 +2454,7 @@ end $(_doc_external(:MPI_Isendrecv_replace)) """ function MPI_Isendrecv_replace(buf, count, datatype, dest, sendtag, source, recvtag, comm, request) - @mpichk ccall((:MPI_Isendrecv_replace, libmpi), Cint, (MPIPtr, Cint, MPI_Datatype, Cint, Cint, Cint, Cint, MPI_Comm, Ptr{MPI_Request}), buf, count, datatype, dest, sendtag, source, recvtag, comm, request) + @mpichk ccall((:MPI_Isendrecv_replace, libmpi), Cint, (MPIPtr, Cint, MPI_Datatype, Cint, Cint, Cint, Cint, MPI_Comm, Ptr{MPI_Request}), buf, count, datatype, dest, sendtag, source, recvtag, comm, request) v"4.0.0" end """ @@ -2340,6 +2628,33 @@ function MPI_Request_get_status(request, flag, status) @mpichk ccall((:MPI_Request_get_status, libmpi), Cint, (MPI_Request, Ptr{Cint}, Ptr{MPI_Status}), request, flag, status) end +""" + MPI_Request_get_status_all(count, array_of_requests, flag, array_of_statuses) + +$(_doc_external(:MPI_Request_get_status_all)) +""" +function MPI_Request_get_status_all(count, array_of_requests, flag, array_of_statuses) + @mpichk ccall((:MPI_Request_get_status_all, libmpi), Cint, (Cint, Ptr{MPI_Request}, Ptr{Cint}, Ptr{MPI_Status}), count, array_of_requests, flag, array_of_statuses) v"4.1.0" +end + +""" + MPI_Request_get_status_any(count, array_of_requests, indx, flag, status) + +$(_doc_external(:MPI_Request_get_status_any)) +""" +function MPI_Request_get_status_any(count, array_of_requests, indx, flag, status) + @mpichk ccall((:MPI_Request_get_status_any, libmpi), Cint, (Cint, Ptr{MPI_Request}, Ptr{Cint}, Ptr{Cint}, Ptr{MPI_Status}), count, array_of_requests, indx, flag, status) v"4.1.0" +end + +""" + MPI_Request_get_status_some(incount, array_of_requests, outcount, array_of_indices, array_of_statuses) + +$(_doc_external(:MPI_Request_get_status_some)) +""" +function MPI_Request_get_status_some(incount, array_of_requests, outcount, array_of_indices, array_of_statuses) + @mpichk ccall((:MPI_Request_get_status_some, libmpi), Cint, (Cint, Ptr{MPI_Request}, Ptr{Cint}, Ptr{Cint}, Ptr{MPI_Status}), incount, array_of_requests, outcount, array_of_indices, array_of_statuses) v"4.1.0" +end + """ MPI_Start(request) @@ -2358,6 +2673,60 @@ function MPI_Startall(count, array_of_requests) @mpichk ccall((:MPI_Startall, libmpi), Cint, (Cint, Ptr{MPI_Request}), count, array_of_requests) end +""" + MPI_Status_get_error(status, error) + +$(_doc_external(:MPI_Status_get_error)) +""" +function MPI_Status_get_error(status, error) + @mpichk ccall((:MPI_Status_get_error, libmpi), Cint, (Ptr{MPI_Status}, Ptr{Cint}), status, error) v"4.1.0" +end + +""" + MPI_Status_get_source(status, source) + +$(_doc_external(:MPI_Status_get_source)) +""" +function MPI_Status_get_source(status, source) + @mpichk ccall((:MPI_Status_get_source, libmpi), Cint, (Ptr{MPI_Status}, Ptr{Cint}), status, source) v"4.1.0" +end + +""" + MPI_Status_get_tag(status, tag) + +$(_doc_external(:MPI_Status_get_tag)) +""" +function MPI_Status_get_tag(status, tag) + @mpichk ccall((:MPI_Status_get_tag, libmpi), Cint, (Ptr{MPI_Status}, Ptr{Cint}), status, tag) v"4.1.0" +end + +""" + MPI_Status_set_error(status, error) + +$(_doc_external(:MPI_Status_set_error)) +""" +function MPI_Status_set_error(status, error) + @mpichk ccall((:MPI_Status_set_error, libmpi), Cint, (Ptr{MPI_Status}, Cint), status, error) v"4.1.0" +end + +""" + MPI_Status_set_source(status, source) + +$(_doc_external(:MPI_Status_set_source)) +""" +function MPI_Status_set_source(status, source) + @mpichk ccall((:MPI_Status_set_source, libmpi), Cint, (Ptr{MPI_Status}, Cint), status, source) v"4.1.0" +end + +""" + MPI_Status_set_tag(status, tag) + +$(_doc_external(:MPI_Status_set_tag)) +""" +function MPI_Status_set_tag(status, tag) + @mpichk ccall((:MPI_Status_set_tag, libmpi), Cint, (Ptr{MPI_Status}, Cint), status, tag) v"4.1.0" +end + """ MPI_Status_set_cancelled(status, flag) @@ -2367,6 +2736,15 @@ function MPI_Status_set_cancelled(status, flag) @mpichk ccall((:MPI_Status_set_cancelled, libmpi), Cint, (Ptr{MPI_Status}, Cint), status, flag) end +""" + MPI_Test(request, flag, status) + +$(_doc_external(:MPI_Test)) +""" +function MPI_Test(request, flag, status) + @mpichk ccall((:MPI_Test, libmpi), Cint, (Ptr{MPI_Request}, Ptr{Cint}, Ptr{MPI_Status}), request, flag, status) +end + """ MPI_Test_cancelled(status, flag) @@ -2403,6 +2781,15 @@ function MPI_Testsome(incount, array_of_requests, outcount, array_of_indices, ar @mpichk ccall((:MPI_Testsome, libmpi), Cint, (Cint, Ptr{MPI_Request}, Ptr{Cint}, Ptr{Cint}, Ptr{MPI_Status}), incount, array_of_requests, outcount, array_of_indices, array_of_statuses) end +""" + MPI_Wait(request, status) + +$(_doc_external(:MPI_Wait)) +""" +function MPI_Wait(request, status) + @mpichk ccall((:MPI_Wait, libmpi), Cint, (Ptr{MPI_Request}, Ptr{MPI_Status}), request, status) +end + """ MPI_Waitall(count, array_of_requests, array_of_statuses) @@ -3033,6 +3420,15 @@ function MPI_Dist_graph_neighbors_count(comm, indegree, outdegree, weighted) @mpichk ccall((:MPI_Dist_graph_neighbors_count, libmpi), Cint, (MPI_Comm, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}), comm, indegree, outdegree, weighted) v"2.2.0" end +""" + MPI_Get_hw_resource_info(hw_info) + +$(_doc_external(:MPI_Get_hw_resource_info)) +""" +function MPI_Get_hw_resource_info(hw_info) + @mpichk ccall((:MPI_Get_hw_resource_info, libmpi), Cint, (Ptr{MPI_Info},), hw_info) v"4.1.0" +end + """ MPI_Graph_create(comm_old, nnodes, indx, edges, reorder, comm_graph) @@ -3097,1623 +3493,1749 @@ function MPI_Topo_test(comm, status) end """ - MPI_Allgather_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm) + MPI_File_close(fh) -$(_doc_external(:MPI_Allgather_c)) +$(_doc_external(:MPI_File_close)) """ -function MPI_Allgather_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm) - @mpichk ccall((:MPI_Allgather_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, MPI_Comm), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm) +function MPI_File_close(fh) + @mpichk ccall((:MPI_File_close, libmpi), Cint, (Ptr{MPI_File},), fh) end """ - MPI_Allgather_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request) + MPI_File_delete(filename, info) -$(_doc_external(:MPI_Allgather_init_c)) +$(_doc_external(:MPI_File_delete)) """ -function MPI_Allgather_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request) - @mpichk ccall((:MPI_Allgather_init_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request) +function MPI_File_delete(filename, info) + @mpichk ccall((:MPI_File_delete, libmpi), Cint, (Ptr{Cchar}, MPI_Info), filename, info) end """ - MPI_Allgatherv_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm) + MPI_File_get_amode(fh, amode) -$(_doc_external(:MPI_Allgatherv_c)) +$(_doc_external(:MPI_File_get_amode)) """ -function MPI_Allgatherv_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm) - @mpichk ccall((:MPI_Allgatherv_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPI_Comm), sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm) +function MPI_File_get_amode(fh, amode) + @mpichk ccall((:MPI_File_get_amode, libmpi), Cint, (MPI_File, Ptr{Cint}), fh, amode) end """ - MPI_Allgatherv_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, info, request) + MPI_File_get_atomicity(fh, flag) -$(_doc_external(:MPI_Allgatherv_init_c)) +$(_doc_external(:MPI_File_get_atomicity)) """ -function MPI_Allgatherv_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, info, request) - @mpichk ccall((:MPI_Allgatherv_init_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, info, request) +function MPI_File_get_atomicity(fh, flag) + @mpichk ccall((:MPI_File_get_atomicity, libmpi), Cint, (MPI_File, Ptr{Cint}), fh, flag) end """ - MPI_Allreduce_c(sendbuf, recvbuf, count, datatype, op, comm) + MPI_File_get_byte_offset(fh, offset, disp) -$(_doc_external(:MPI_Allreduce_c)) +$(_doc_external(:MPI_File_get_byte_offset)) """ -function MPI_Allreduce_c(sendbuf, recvbuf, count, datatype, op, comm) - @mpichk ccall((:MPI_Allreduce_c, libmpi), Cint, (MPIPtr, MPIPtr, MPI_Count, MPI_Datatype, MPI_Op, MPI_Comm), sendbuf, recvbuf, count, datatype, op, comm) +function MPI_File_get_byte_offset(fh, offset, disp) + @mpichk ccall((:MPI_File_get_byte_offset, libmpi), Cint, (MPI_File, MPI_Offset, Ptr{MPI_Offset}), fh, offset, disp) end """ - MPI_Allreduce_init_c(sendbuf, recvbuf, count, datatype, op, comm, info, request) + MPI_File_get_group(fh, group) -$(_doc_external(:MPI_Allreduce_init_c)) +$(_doc_external(:MPI_File_get_group)) """ -function MPI_Allreduce_init_c(sendbuf, recvbuf, count, datatype, op, comm, info, request) - @mpichk ccall((:MPI_Allreduce_init_c, libmpi), Cint, (MPIPtr, MPIPtr, MPI_Count, MPI_Datatype, MPI_Op, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, recvbuf, count, datatype, op, comm, info, request) +function MPI_File_get_group(fh, group) + @mpichk ccall((:MPI_File_get_group, libmpi), Cint, (MPI_File, Ptr{MPI_Group}), fh, group) end """ - MPI_Alltoall_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm) + MPI_File_get_info(fh, info_used) -$(_doc_external(:MPI_Alltoall_c)) +$(_doc_external(:MPI_File_get_info)) """ -function MPI_Alltoall_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm) - @mpichk ccall((:MPI_Alltoall_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, MPI_Comm), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm) +function MPI_File_get_info(fh, info_used) + @mpichk ccall((:MPI_File_get_info, libmpi), Cint, (MPI_File, Ptr{MPI_Info}), fh, info_used) end """ - MPI_Alltoall_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request) + MPI_File_get_position(fh, offset) -$(_doc_external(:MPI_Alltoall_init_c)) +$(_doc_external(:MPI_File_get_position)) """ -function MPI_Alltoall_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request) - @mpichk ccall((:MPI_Alltoall_init_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request) +function MPI_File_get_position(fh, offset) + @mpichk ccall((:MPI_File_get_position, libmpi), Cint, (MPI_File, Ptr{MPI_Offset}), fh, offset) end """ - MPI_Alltoallv_c(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm) + MPI_File_get_position_shared(fh, offset) -$(_doc_external(:MPI_Alltoallv_c)) +$(_doc_external(:MPI_File_get_position_shared)) """ -function MPI_Alltoallv_c(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm) - @mpichk ccall((:MPI_Alltoallv_c, libmpi), Cint, (MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPI_Comm), sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm) +function MPI_File_get_position_shared(fh, offset) + @mpichk ccall((:MPI_File_get_position_shared, libmpi), Cint, (MPI_File, Ptr{MPI_Offset}), fh, offset) end """ - MPI_Alltoallv_init_c(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, info, request) + MPI_File_get_size(fh, size) -$(_doc_external(:MPI_Alltoallv_init_c)) +$(_doc_external(:MPI_File_get_size)) """ -function MPI_Alltoallv_init_c(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, info, request) - @mpichk ccall((:MPI_Alltoallv_init_c, libmpi), Cint, (MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, info, request) +function MPI_File_get_size(fh, size) + @mpichk ccall((:MPI_File_get_size, libmpi), Cint, (MPI_File, Ptr{MPI_Offset}), fh, size) end """ - MPI_Alltoallw_c(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm) + MPI_File_get_type_extent(fh, datatype, extent) -$(_doc_external(:MPI_Alltoallw_c)) +$(_doc_external(:MPI_File_get_type_extent)) """ -function MPI_Alltoallw_c(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm) - @mpichk ccall((:MPI_Alltoallw_c, libmpi), Cint, (MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, Ptr{MPI_Datatype}, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, Ptr{MPI_Datatype}, MPI_Comm), sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm) +function MPI_File_get_type_extent(fh, datatype, extent) + @mpichk ccall((:MPI_File_get_type_extent, libmpi), Cint, (MPI_File, MPI_Datatype, Ptr{MPI_Aint}), fh, datatype, extent) end """ - MPI_Alltoallw_init_c(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, info, request) + MPI_File_get_view(fh, disp, etype, filetype, datarep) -$(_doc_external(:MPI_Alltoallw_init_c)) +$(_doc_external(:MPI_File_get_view)) """ -function MPI_Alltoallw_init_c(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, info, request) - @mpichk ccall((:MPI_Alltoallw_init_c, libmpi), Cint, (MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, Ptr{MPI_Datatype}, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, Ptr{MPI_Datatype}, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, info, request) +function MPI_File_get_view(fh, disp, etype, filetype, datarep) + @mpichk ccall((:MPI_File_get_view, libmpi), Cint, (MPI_File, Ptr{MPI_Offset}, Ptr{MPI_Datatype}, Ptr{MPI_Datatype}, Ptr{Cchar}), fh, disp, etype, filetype, datarep) end """ - MPI_Bcast_c(buffer, count, datatype, root, comm) + MPI_File_iread(fh, buf, count, datatype, request) -$(_doc_external(:MPI_Bcast_c)) +$(_doc_external(:MPI_File_iread)) """ -function MPI_Bcast_c(buffer, count, datatype, root, comm) - @mpichk ccall((:MPI_Bcast_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Comm), buffer, count, datatype, root, comm) +function MPI_File_iread(fh, buf, count, datatype, request) + @mpichk ccall((:MPI_File_iread, libmpi), Cint, (MPI_File, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Request}), fh, buf, count, datatype, request) end """ - MPI_Bcast_init_c(buffer, count, datatype, root, comm, info, request) + MPI_File_iread_all(fh, buf, count, datatype, request) -$(_doc_external(:MPI_Bcast_init_c)) +$(_doc_external(:MPI_File_iread_all)) """ -function MPI_Bcast_init_c(buffer, count, datatype, root, comm, info, request) - @mpichk ccall((:MPI_Bcast_init_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Comm, MPI_Info, Ptr{MPI_Request}), buffer, count, datatype, root, comm, info, request) +function MPI_File_iread_all(fh, buf, count, datatype, request) + @mpichk ccall((:MPI_File_iread_all, libmpi), Cint, (MPI_File, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Request}), fh, buf, count, datatype, request) end """ - MPI_Exscan_c(sendbuf, recvbuf, count, datatype, op, comm) + MPI_File_iread_at(fh, offset, buf, count, datatype, request) -$(_doc_external(:MPI_Exscan_c)) +$(_doc_external(:MPI_File_iread_at)) """ -function MPI_Exscan_c(sendbuf, recvbuf, count, datatype, op, comm) - @mpichk ccall((:MPI_Exscan_c, libmpi), Cint, (MPIPtr, MPIPtr, MPI_Count, MPI_Datatype, MPI_Op, MPI_Comm), sendbuf, recvbuf, count, datatype, op, comm) +function MPI_File_iread_at(fh, offset, buf, count, datatype, request) + @mpichk ccall((:MPI_File_iread_at, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Request}), fh, offset, buf, count, datatype, request) end """ - MPI_Exscan_init_c(sendbuf, recvbuf, count, datatype, op, comm, info, request) + MPI_File_iread_at_all(fh, offset, buf, count, datatype, request) -$(_doc_external(:MPI_Exscan_init_c)) +$(_doc_external(:MPI_File_iread_at_all)) """ -function MPI_Exscan_init_c(sendbuf, recvbuf, count, datatype, op, comm, info, request) - @mpichk ccall((:MPI_Exscan_init_c, libmpi), Cint, (MPIPtr, MPIPtr, MPI_Count, MPI_Datatype, MPI_Op, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, recvbuf, count, datatype, op, comm, info, request) +function MPI_File_iread_at_all(fh, offset, buf, count, datatype, request) + @mpichk ccall((:MPI_File_iread_at_all, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Request}), fh, offset, buf, count, datatype, request) end """ - MPI_Gather_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm) + MPI_File_iread_shared(fh, buf, count, datatype, request) -$(_doc_external(:MPI_Gather_c)) +$(_doc_external(:MPI_File_iread_shared)) """ -function MPI_Gather_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm) - @mpichk ccall((:MPI_Gather_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Comm), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm) +function MPI_File_iread_shared(fh, buf, count, datatype, request) + @mpichk ccall((:MPI_File_iread_shared, libmpi), Cint, (MPI_File, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Request}), fh, buf, count, datatype, request) end """ - MPI_Gather_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request) + MPI_File_iwrite(fh, buf, count, datatype, request) -$(_doc_external(:MPI_Gather_init_c)) +$(_doc_external(:MPI_File_iwrite)) """ -function MPI_Gather_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request) - @mpichk ccall((:MPI_Gather_init_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request) +function MPI_File_iwrite(fh, buf, count, datatype, request) + @mpichk ccall((:MPI_File_iwrite, libmpi), Cint, (MPI_File, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Request}), fh, buf, count, datatype, request) end """ - MPI_Gatherv_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm) + MPI_File_iwrite_all(fh, buf, count, datatype, request) -$(_doc_external(:MPI_Gatherv_c)) +$(_doc_external(:MPI_File_iwrite_all)) """ -function MPI_Gatherv_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm) - @mpichk ccall((:MPI_Gatherv_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, Cint, MPI_Comm), sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm) +function MPI_File_iwrite_all(fh, buf, count, datatype, request) + @mpichk ccall((:MPI_File_iwrite_all, libmpi), Cint, (MPI_File, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Request}), fh, buf, count, datatype, request) end """ - MPI_Gatherv_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, info, request) + MPI_File_iwrite_at(fh, offset, buf, count, datatype, request) -$(_doc_external(:MPI_Gatherv_init_c)) +$(_doc_external(:MPI_File_iwrite_at)) """ -function MPI_Gatherv_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, info, request) - @mpichk ccall((:MPI_Gatherv_init_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, Cint, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, info, request) +function MPI_File_iwrite_at(fh, offset, buf, count, datatype, request) + @mpichk ccall((:MPI_File_iwrite_at, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Request}), fh, offset, buf, count, datatype, request) end """ - MPI_Iallgather_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request) + MPI_File_iwrite_at_all(fh, offset, buf, count, datatype, request) -$(_doc_external(:MPI_Iallgather_c)) +$(_doc_external(:MPI_File_iwrite_at_all)) """ -function MPI_Iallgather_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request) - @mpichk ccall((:MPI_Iallgather_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, MPI_Comm, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request) +function MPI_File_iwrite_at_all(fh, offset, buf, count, datatype, request) + @mpichk ccall((:MPI_File_iwrite_at_all, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Request}), fh, offset, buf, count, datatype, request) end """ - MPI_Iallgatherv_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, request) + MPI_File_iwrite_shared(fh, buf, count, datatype, request) -$(_doc_external(:MPI_Iallgatherv_c)) +$(_doc_external(:MPI_File_iwrite_shared)) """ -function MPI_Iallgatherv_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, request) - @mpichk ccall((:MPI_Iallgatherv_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPI_Comm, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, request) +function MPI_File_iwrite_shared(fh, buf, count, datatype, request) + @mpichk ccall((:MPI_File_iwrite_shared, libmpi), Cint, (MPI_File, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Request}), fh, buf, count, datatype, request) end """ - MPI_Iallreduce_c(sendbuf, recvbuf, count, datatype, op, comm, request) + MPI_File_open(comm, filename, amode, info, fh) -$(_doc_external(:MPI_Iallreduce_c)) +$(_doc_external(:MPI_File_open)) """ -function MPI_Iallreduce_c(sendbuf, recvbuf, count, datatype, op, comm, request) - @mpichk ccall((:MPI_Iallreduce_c, libmpi), Cint, (MPIPtr, MPIPtr, MPI_Count, MPI_Datatype, MPI_Op, MPI_Comm, Ptr{MPI_Request}), sendbuf, recvbuf, count, datatype, op, comm, request) +function MPI_File_open(comm, filename, amode, info, fh) + @mpichk ccall((:MPI_File_open, libmpi), Cint, (MPI_Comm, Ptr{Cchar}, Cint, MPI_Info, Ptr{MPI_File}), comm, filename, amode, info, fh) end """ - MPI_Ialltoall_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request) + MPI_File_preallocate(fh, size) -$(_doc_external(:MPI_Ialltoall_c)) +$(_doc_external(:MPI_File_preallocate)) """ -function MPI_Ialltoall_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request) - @mpichk ccall((:MPI_Ialltoall_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, MPI_Comm, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request) +function MPI_File_preallocate(fh, size) + @mpichk ccall((:MPI_File_preallocate, libmpi), Cint, (MPI_File, MPI_Offset), fh, size) end """ - MPI_Ialltoallv_c(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, request) + MPI_File_read(fh, buf, count, datatype, status) -$(_doc_external(:MPI_Ialltoallv_c)) +$(_doc_external(:MPI_File_read)) """ -function MPI_Ialltoallv_c(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, request) - @mpichk ccall((:MPI_Ialltoallv_c, libmpi), Cint, (MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPI_Comm, Ptr{MPI_Request}), sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, request) +function MPI_File_read(fh, buf, count, datatype, status) + @mpichk ccall((:MPI_File_read, libmpi), Cint, (MPI_File, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Status}), fh, buf, count, datatype, status) end """ - MPI_Ialltoallw_c(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, request) + MPI_File_read_all(fh, buf, count, datatype, status) -$(_doc_external(:MPI_Ialltoallw_c)) +$(_doc_external(:MPI_File_read_all)) """ -function MPI_Ialltoallw_c(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, request) - @mpichk ccall((:MPI_Ialltoallw_c, libmpi), Cint, (MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, Ptr{MPI_Datatype}, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, Ptr{MPI_Datatype}, MPI_Comm, Ptr{MPI_Request}), sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, request) +function MPI_File_read_all(fh, buf, count, datatype, status) + @mpichk ccall((:MPI_File_read_all, libmpi), Cint, (MPI_File, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Status}), fh, buf, count, datatype, status) end """ - MPI_Ibcast_c(buffer, count, datatype, root, comm, request) + MPI_File_read_all_begin(fh, buf, count, datatype) -$(_doc_external(:MPI_Ibcast_c)) +$(_doc_external(:MPI_File_read_all_begin)) """ -function MPI_Ibcast_c(buffer, count, datatype, root, comm, request) - @mpichk ccall((:MPI_Ibcast_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Comm, Ptr{MPI_Request}), buffer, count, datatype, root, comm, request) +function MPI_File_read_all_begin(fh, buf, count, datatype) + @mpichk ccall((:MPI_File_read_all_begin, libmpi), Cint, (MPI_File, MPIPtr, Cint, MPI_Datatype), fh, buf, count, datatype) end """ - MPI_Iexscan_c(sendbuf, recvbuf, count, datatype, op, comm, request) + MPI_File_read_all_end(fh, buf, status) -$(_doc_external(:MPI_Iexscan_c)) +$(_doc_external(:MPI_File_read_all_end)) """ -function MPI_Iexscan_c(sendbuf, recvbuf, count, datatype, op, comm, request) - @mpichk ccall((:MPI_Iexscan_c, libmpi), Cint, (MPIPtr, MPIPtr, MPI_Count, MPI_Datatype, MPI_Op, MPI_Comm, Ptr{MPI_Request}), sendbuf, recvbuf, count, datatype, op, comm, request) +function MPI_File_read_all_end(fh, buf, status) + @mpichk ccall((:MPI_File_read_all_end, libmpi), Cint, (MPI_File, MPIPtr, Ptr{MPI_Status}), fh, buf, status) end """ - MPI_Igather_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, request) + MPI_File_read_at(fh, offset, buf, count, datatype, status) -$(_doc_external(:MPI_Igather_c)) +$(_doc_external(:MPI_File_read_at)) """ -function MPI_Igather_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, request) - @mpichk ccall((:MPI_Igather_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Comm, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, request) +function MPI_File_read_at(fh, offset, buf, count, datatype, status) + @mpichk ccall((:MPI_File_read_at, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Status}), fh, offset, buf, count, datatype, status) end """ - MPI_Igatherv_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, request) + MPI_File_read_at_all(fh, offset, buf, count, datatype, status) -$(_doc_external(:MPI_Igatherv_c)) +$(_doc_external(:MPI_File_read_at_all)) """ -function MPI_Igatherv_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, request) - @mpichk ccall((:MPI_Igatherv_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, Cint, MPI_Comm, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, request) +function MPI_File_read_at_all(fh, offset, buf, count, datatype, status) + @mpichk ccall((:MPI_File_read_at_all, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Status}), fh, offset, buf, count, datatype, status) end """ - MPI_Ineighbor_allgather_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request) + MPI_File_read_at_all_begin(fh, offset, buf, count, datatype) -$(_doc_external(:MPI_Ineighbor_allgather_c)) +$(_doc_external(:MPI_File_read_at_all_begin)) """ -function MPI_Ineighbor_allgather_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request) - @mpichk ccall((:MPI_Ineighbor_allgather_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, MPI_Comm, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request) +function MPI_File_read_at_all_begin(fh, offset, buf, count, datatype) + @mpichk ccall((:MPI_File_read_at_all_begin, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, Cint, MPI_Datatype), fh, offset, buf, count, datatype) end """ - MPI_Ineighbor_allgatherv_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, request) + MPI_File_read_at_all_end(fh, buf, status) -$(_doc_external(:MPI_Ineighbor_allgatherv_c)) +$(_doc_external(:MPI_File_read_at_all_end)) """ -function MPI_Ineighbor_allgatherv_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, request) - @mpichk ccall((:MPI_Ineighbor_allgatherv_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPI_Comm, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, request) +function MPI_File_read_at_all_end(fh, buf, status) + @mpichk ccall((:MPI_File_read_at_all_end, libmpi), Cint, (MPI_File, MPIPtr, Ptr{MPI_Status}), fh, buf, status) end """ - MPI_Ineighbor_alltoall_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request) + MPI_File_read_ordered(fh, buf, count, datatype, status) -$(_doc_external(:MPI_Ineighbor_alltoall_c)) +$(_doc_external(:MPI_File_read_ordered)) """ -function MPI_Ineighbor_alltoall_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request) - @mpichk ccall((:MPI_Ineighbor_alltoall_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, MPI_Comm, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request) +function MPI_File_read_ordered(fh, buf, count, datatype, status) + @mpichk ccall((:MPI_File_read_ordered, libmpi), Cint, (MPI_File, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Status}), fh, buf, count, datatype, status) end """ - MPI_Ineighbor_alltoallv_c(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, request) + MPI_File_read_ordered_begin(fh, buf, count, datatype) -$(_doc_external(:MPI_Ineighbor_alltoallv_c)) +$(_doc_external(:MPI_File_read_ordered_begin)) """ -function MPI_Ineighbor_alltoallv_c(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, request) - @mpichk ccall((:MPI_Ineighbor_alltoallv_c, libmpi), Cint, (MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPI_Comm, Ptr{MPI_Request}), sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, request) +function MPI_File_read_ordered_begin(fh, buf, count, datatype) + @mpichk ccall((:MPI_File_read_ordered_begin, libmpi), Cint, (MPI_File, MPIPtr, Cint, MPI_Datatype), fh, buf, count, datatype) end """ - MPI_Ineighbor_alltoallw_c(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, request) + MPI_File_read_ordered_end(fh, buf, status) -$(_doc_external(:MPI_Ineighbor_alltoallw_c)) +$(_doc_external(:MPI_File_read_ordered_end)) """ -function MPI_Ineighbor_alltoallw_c(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, request) - @mpichk ccall((:MPI_Ineighbor_alltoallw_c, libmpi), Cint, (MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, Ptr{MPI_Datatype}, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, Ptr{MPI_Datatype}, MPI_Comm, Ptr{MPI_Request}), sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, request) +function MPI_File_read_ordered_end(fh, buf, status) + @mpichk ccall((:MPI_File_read_ordered_end, libmpi), Cint, (MPI_File, MPIPtr, Ptr{MPI_Status}), fh, buf, status) end """ - MPI_Ireduce_c(sendbuf, recvbuf, count, datatype, op, root, comm, request) + MPI_File_read_shared(fh, buf, count, datatype, status) -$(_doc_external(:MPI_Ireduce_c)) +$(_doc_external(:MPI_File_read_shared)) """ -function MPI_Ireduce_c(sendbuf, recvbuf, count, datatype, op, root, comm, request) - @mpichk ccall((:MPI_Ireduce_c, libmpi), Cint, (MPIPtr, MPIPtr, MPI_Count, MPI_Datatype, MPI_Op, Cint, MPI_Comm, Ptr{MPI_Request}), sendbuf, recvbuf, count, datatype, op, root, comm, request) +function MPI_File_read_shared(fh, buf, count, datatype, status) + @mpichk ccall((:MPI_File_read_shared, libmpi), Cint, (MPI_File, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Status}), fh, buf, count, datatype, status) end """ - MPI_Ireduce_scatter_c(sendbuf, recvbuf, recvcounts, datatype, op, comm, request) + MPI_File_seek(fh, offset, whence) -$(_doc_external(:MPI_Ireduce_scatter_c)) +$(_doc_external(:MPI_File_seek)) """ -function MPI_Ireduce_scatter_c(sendbuf, recvbuf, recvcounts, datatype, op, comm, request) - @mpichk ccall((:MPI_Ireduce_scatter_c, libmpi), Cint, (MPIPtr, MPIPtr, Ptr{MPI_Count}, MPI_Datatype, MPI_Op, MPI_Comm, Ptr{MPI_Request}), sendbuf, recvbuf, recvcounts, datatype, op, comm, request) +function MPI_File_seek(fh, offset, whence) + @mpichk ccall((:MPI_File_seek, libmpi), Cint, (MPI_File, MPI_Offset, Cint), fh, offset, whence) end """ - MPI_Ireduce_scatter_block_c(sendbuf, recvbuf, recvcount, datatype, op, comm, request) + MPI_File_seek_shared(fh, offset, whence) -$(_doc_external(:MPI_Ireduce_scatter_block_c)) +$(_doc_external(:MPI_File_seek_shared)) """ -function MPI_Ireduce_scatter_block_c(sendbuf, recvbuf, recvcount, datatype, op, comm, request) - @mpichk ccall((:MPI_Ireduce_scatter_block_c, libmpi), Cint, (MPIPtr, MPIPtr, MPI_Count, MPI_Datatype, MPI_Op, MPI_Comm, Ptr{MPI_Request}), sendbuf, recvbuf, recvcount, datatype, op, comm, request) +function MPI_File_seek_shared(fh, offset, whence) + @mpichk ccall((:MPI_File_seek_shared, libmpi), Cint, (MPI_File, MPI_Offset, Cint), fh, offset, whence) end """ - MPI_Iscan_c(sendbuf, recvbuf, count, datatype, op, comm, request) + MPI_File_set_atomicity(fh, flag) -$(_doc_external(:MPI_Iscan_c)) +$(_doc_external(:MPI_File_set_atomicity)) """ -function MPI_Iscan_c(sendbuf, recvbuf, count, datatype, op, comm, request) - @mpichk ccall((:MPI_Iscan_c, libmpi), Cint, (MPIPtr, MPIPtr, MPI_Count, MPI_Datatype, MPI_Op, MPI_Comm, Ptr{MPI_Request}), sendbuf, recvbuf, count, datatype, op, comm, request) +function MPI_File_set_atomicity(fh, flag) + @mpichk ccall((:MPI_File_set_atomicity, libmpi), Cint, (MPI_File, Cint), fh, flag) end """ - MPI_Iscatter_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, request) + MPI_File_set_info(fh, info) -$(_doc_external(:MPI_Iscatter_c)) +$(_doc_external(:MPI_File_set_info)) """ -function MPI_Iscatter_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, request) - @mpichk ccall((:MPI_Iscatter_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Comm, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, request) +function MPI_File_set_info(fh, info) + @mpichk ccall((:MPI_File_set_info, libmpi), Cint, (MPI_File, MPI_Info), fh, info) end """ - MPI_Iscatterv_c(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, request) + MPI_File_set_size(fh, size) -$(_doc_external(:MPI_Iscatterv_c)) +$(_doc_external(:MPI_File_set_size)) """ -function MPI_Iscatterv_c(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, request) - @mpichk ccall((:MPI_Iscatterv_c, libmpi), Cint, (MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Comm, Ptr{MPI_Request}), sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, request) +function MPI_File_set_size(fh, size) + @mpichk ccall((:MPI_File_set_size, libmpi), Cint, (MPI_File, MPI_Offset), fh, size) end """ - MPI_Neighbor_allgather_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm) + MPI_File_set_view(fh, disp, etype, filetype, datarep, info) -$(_doc_external(:MPI_Neighbor_allgather_c)) +$(_doc_external(:MPI_File_set_view)) """ -function MPI_Neighbor_allgather_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm) - @mpichk ccall((:MPI_Neighbor_allgather_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, MPI_Comm), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm) +function MPI_File_set_view(fh, disp, etype, filetype, datarep, info) + @mpichk ccall((:MPI_File_set_view, libmpi), Cint, (MPI_File, MPI_Offset, MPI_Datatype, MPI_Datatype, Ptr{Cchar}, MPI_Info), fh, disp, etype, filetype, datarep, info) end """ - MPI_Neighbor_allgather_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request) + MPI_File_sync(fh) -$(_doc_external(:MPI_Neighbor_allgather_init_c)) +$(_doc_external(:MPI_File_sync)) """ -function MPI_Neighbor_allgather_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request) - @mpichk ccall((:MPI_Neighbor_allgather_init_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request) +function MPI_File_sync(fh) + @mpichk ccall((:MPI_File_sync, libmpi), Cint, (MPI_File,), fh) end """ - MPI_Neighbor_allgatherv_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm) + MPI_File_write(fh, buf, count, datatype, status) -$(_doc_external(:MPI_Neighbor_allgatherv_c)) +$(_doc_external(:MPI_File_write)) """ -function MPI_Neighbor_allgatherv_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm) - @mpichk ccall((:MPI_Neighbor_allgatherv_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPI_Comm), sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm) +function MPI_File_write(fh, buf, count, datatype, status) + @mpichk ccall((:MPI_File_write, libmpi), Cint, (MPI_File, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Status}), fh, buf, count, datatype, status) end """ - MPI_Neighbor_allgatherv_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, info, request) + MPI_File_write_all(fh, buf, count, datatype, status) -$(_doc_external(:MPI_Neighbor_allgatherv_init_c)) +$(_doc_external(:MPI_File_write_all)) """ -function MPI_Neighbor_allgatherv_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, info, request) - @mpichk ccall((:MPI_Neighbor_allgatherv_init_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, info, request) +function MPI_File_write_all(fh, buf, count, datatype, status) + @mpichk ccall((:MPI_File_write_all, libmpi), Cint, (MPI_File, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Status}), fh, buf, count, datatype, status) end """ - MPI_Neighbor_alltoall_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm) + MPI_File_write_all_begin(fh, buf, count, datatype) -$(_doc_external(:MPI_Neighbor_alltoall_c)) +$(_doc_external(:MPI_File_write_all_begin)) """ -function MPI_Neighbor_alltoall_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm) - @mpichk ccall((:MPI_Neighbor_alltoall_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, MPI_Comm), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm) +function MPI_File_write_all_begin(fh, buf, count, datatype) + @mpichk ccall((:MPI_File_write_all_begin, libmpi), Cint, (MPI_File, MPIPtr, Cint, MPI_Datatype), fh, buf, count, datatype) end """ - MPI_Neighbor_alltoall_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request) + MPI_File_write_all_end(fh, buf, status) -$(_doc_external(:MPI_Neighbor_alltoall_init_c)) +$(_doc_external(:MPI_File_write_all_end)) """ -function MPI_Neighbor_alltoall_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request) - @mpichk ccall((:MPI_Neighbor_alltoall_init_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request) +function MPI_File_write_all_end(fh, buf, status) + @mpichk ccall((:MPI_File_write_all_end, libmpi), Cint, (MPI_File, MPIPtr, Ptr{MPI_Status}), fh, buf, status) end """ - MPI_Neighbor_alltoallv_c(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm) + MPI_File_write_at(fh, offset, buf, count, datatype, status) -$(_doc_external(:MPI_Neighbor_alltoallv_c)) +$(_doc_external(:MPI_File_write_at)) """ -function MPI_Neighbor_alltoallv_c(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm) - @mpichk ccall((:MPI_Neighbor_alltoallv_c, libmpi), Cint, (MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPI_Comm), sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm) +function MPI_File_write_at(fh, offset, buf, count, datatype, status) + @mpichk ccall((:MPI_File_write_at, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Status}), fh, offset, buf, count, datatype, status) end """ - MPI_Neighbor_alltoallv_init_c(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, info, request) + MPI_File_write_at_all(fh, offset, buf, count, datatype, status) -$(_doc_external(:MPI_Neighbor_alltoallv_init_c)) +$(_doc_external(:MPI_File_write_at_all)) """ -function MPI_Neighbor_alltoallv_init_c(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, info, request) - @mpichk ccall((:MPI_Neighbor_alltoallv_init_c, libmpi), Cint, (MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, info, request) +function MPI_File_write_at_all(fh, offset, buf, count, datatype, status) + @mpichk ccall((:MPI_File_write_at_all, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Status}), fh, offset, buf, count, datatype, status) end """ - MPI_Neighbor_alltoallw_c(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm) + MPI_File_write_at_all_begin(fh, offset, buf, count, datatype) -$(_doc_external(:MPI_Neighbor_alltoallw_c)) +$(_doc_external(:MPI_File_write_at_all_begin)) """ -function MPI_Neighbor_alltoallw_c(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm) - @mpichk ccall((:MPI_Neighbor_alltoallw_c, libmpi), Cint, (MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, Ptr{MPI_Datatype}, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, Ptr{MPI_Datatype}, MPI_Comm), sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm) +function MPI_File_write_at_all_begin(fh, offset, buf, count, datatype) + @mpichk ccall((:MPI_File_write_at_all_begin, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, Cint, MPI_Datatype), fh, offset, buf, count, datatype) end """ - MPI_Neighbor_alltoallw_init_c(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, info, request) + MPI_File_write_at_all_end(fh, buf, status) -$(_doc_external(:MPI_Neighbor_alltoallw_init_c)) +$(_doc_external(:MPI_File_write_at_all_end)) """ -function MPI_Neighbor_alltoallw_init_c(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, info, request) - @mpichk ccall((:MPI_Neighbor_alltoallw_init_c, libmpi), Cint, (MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, Ptr{MPI_Datatype}, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, Ptr{MPI_Datatype}, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, info, request) +function MPI_File_write_at_all_end(fh, buf, status) + @mpichk ccall((:MPI_File_write_at_all_end, libmpi), Cint, (MPI_File, MPIPtr, Ptr{MPI_Status}), fh, buf, status) end """ - MPI_Reduce_c(sendbuf, recvbuf, count, datatype, op, root, comm) + MPI_File_write_ordered(fh, buf, count, datatype, status) -$(_doc_external(:MPI_Reduce_c)) +$(_doc_external(:MPI_File_write_ordered)) """ -function MPI_Reduce_c(sendbuf, recvbuf, count, datatype, op, root, comm) - @mpichk ccall((:MPI_Reduce_c, libmpi), Cint, (MPIPtr, MPIPtr, MPI_Count, MPI_Datatype, MPI_Op, Cint, MPI_Comm), sendbuf, recvbuf, count, datatype, op, root, comm) +function MPI_File_write_ordered(fh, buf, count, datatype, status) + @mpichk ccall((:MPI_File_write_ordered, libmpi), Cint, (MPI_File, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Status}), fh, buf, count, datatype, status) end """ - MPI_Reduce_init_c(sendbuf, recvbuf, count, datatype, op, root, comm, info, request) + MPI_File_write_ordered_begin(fh, buf, count, datatype) -$(_doc_external(:MPI_Reduce_init_c)) +$(_doc_external(:MPI_File_write_ordered_begin)) """ -function MPI_Reduce_init_c(sendbuf, recvbuf, count, datatype, op, root, comm, info, request) - @mpichk ccall((:MPI_Reduce_init_c, libmpi), Cint, (MPIPtr, MPIPtr, MPI_Count, MPI_Datatype, MPI_Op, Cint, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, recvbuf, count, datatype, op, root, comm, info, request) +function MPI_File_write_ordered_begin(fh, buf, count, datatype) + @mpichk ccall((:MPI_File_write_ordered_begin, libmpi), Cint, (MPI_File, MPIPtr, Cint, MPI_Datatype), fh, buf, count, datatype) end """ - MPI_Reduce_local_c(inbuf, inoutbuf, count, datatype, op) + MPI_File_write_ordered_end(fh, buf, status) -$(_doc_external(:MPI_Reduce_local_c)) +$(_doc_external(:MPI_File_write_ordered_end)) """ -function MPI_Reduce_local_c(inbuf, inoutbuf, count, datatype, op) - @mpichk ccall((:MPI_Reduce_local_c, libmpi), Cint, (MPIPtr, MPIPtr, MPI_Count, MPI_Datatype, MPI_Op), inbuf, inoutbuf, count, datatype, op) +function MPI_File_write_ordered_end(fh, buf, status) + @mpichk ccall((:MPI_File_write_ordered_end, libmpi), Cint, (MPI_File, MPIPtr, Ptr{MPI_Status}), fh, buf, status) end """ - MPI_Reduce_scatter_c(sendbuf, recvbuf, recvcounts, datatype, op, comm) + MPI_File_write_shared(fh, buf, count, datatype, status) -$(_doc_external(:MPI_Reduce_scatter_c)) +$(_doc_external(:MPI_File_write_shared)) """ -function MPI_Reduce_scatter_c(sendbuf, recvbuf, recvcounts, datatype, op, comm) - @mpichk ccall((:MPI_Reduce_scatter_c, libmpi), Cint, (MPIPtr, MPIPtr, Ptr{MPI_Count}, MPI_Datatype, MPI_Op, MPI_Comm), sendbuf, recvbuf, recvcounts, datatype, op, comm) +function MPI_File_write_shared(fh, buf, count, datatype, status) + @mpichk ccall((:MPI_File_write_shared, libmpi), Cint, (MPI_File, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Status}), fh, buf, count, datatype, status) end """ - MPI_Reduce_scatter_block_c(sendbuf, recvbuf, recvcount, datatype, op, comm) + MPI_Register_datarep(datarep, read_conversion_fn, write_conversion_fn, dtype_file_extent_fn, extra_state) -$(_doc_external(:MPI_Reduce_scatter_block_c)) +$(_doc_external(:MPI_Register_datarep)) """ -function MPI_Reduce_scatter_block_c(sendbuf, recvbuf, recvcount, datatype, op, comm) - @mpichk ccall((:MPI_Reduce_scatter_block_c, libmpi), Cint, (MPIPtr, MPIPtr, MPI_Count, MPI_Datatype, MPI_Op, MPI_Comm), sendbuf, recvbuf, recvcount, datatype, op, comm) +function MPI_Register_datarep(datarep, read_conversion_fn, write_conversion_fn, dtype_file_extent_fn, extra_state) + @mpichk ccall((:MPI_Register_datarep, libmpi), Cint, (Ptr{Cchar}, Ptr{MPI_Datarep_conversion_function}, Ptr{MPI_Datarep_conversion_function}, Ptr{MPI_Datarep_extent_function}, MPIPtr), datarep, read_conversion_fn, write_conversion_fn, dtype_file_extent_fn, extra_state) end """ - MPI_Reduce_scatter_block_init_c(sendbuf, recvbuf, recvcount, datatype, op, comm, info, request) + MPI_Allgather_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm) -$(_doc_external(:MPI_Reduce_scatter_block_init_c)) +$(_doc_external(:MPI_Allgather_c)) """ -function MPI_Reduce_scatter_block_init_c(sendbuf, recvbuf, recvcount, datatype, op, comm, info, request) - @mpichk ccall((:MPI_Reduce_scatter_block_init_c, libmpi), Cint, (MPIPtr, MPIPtr, MPI_Count, MPI_Datatype, MPI_Op, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, recvbuf, recvcount, datatype, op, comm, info, request) +function MPI_Allgather_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm) + @mpichk ccall((:MPI_Allgather_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, MPI_Comm), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm) v"4.0.0" fallback=MPI_Allgather end """ - MPI_Reduce_scatter_init_c(sendbuf, recvbuf, recvcounts, datatype, op, comm, info, request) + MPI_Allgather_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request) -$(_doc_external(:MPI_Reduce_scatter_init_c)) +$(_doc_external(:MPI_Allgather_init_c)) """ -function MPI_Reduce_scatter_init_c(sendbuf, recvbuf, recvcounts, datatype, op, comm, info, request) - @mpichk ccall((:MPI_Reduce_scatter_init_c, libmpi), Cint, (MPIPtr, MPIPtr, Ptr{MPI_Count}, MPI_Datatype, MPI_Op, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, recvbuf, recvcounts, datatype, op, comm, info, request) +function MPI_Allgather_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request) + @mpichk ccall((:MPI_Allgather_init_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request) v"4.0.0" fallback=MPI_Allgather_init end """ - MPI_Scan_c(sendbuf, recvbuf, count, datatype, op, comm) + MPI_Allgatherv_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm) -$(_doc_external(:MPI_Scan_c)) +$(_doc_external(:MPI_Allgatherv_c)) """ -function MPI_Scan_c(sendbuf, recvbuf, count, datatype, op, comm) - @mpichk ccall((:MPI_Scan_c, libmpi), Cint, (MPIPtr, MPIPtr, MPI_Count, MPI_Datatype, MPI_Op, MPI_Comm), sendbuf, recvbuf, count, datatype, op, comm) +function MPI_Allgatherv_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm) + @mpichk ccall((:MPI_Allgatherv_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPI_Comm), sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm) v"4.0.0" fallback=MPI_Allgatherv end """ - MPI_Scan_init_c(sendbuf, recvbuf, count, datatype, op, comm, info, request) + MPI_Allgatherv_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, info, request) -$(_doc_external(:MPI_Scan_init_c)) +$(_doc_external(:MPI_Allgatherv_init_c)) """ -function MPI_Scan_init_c(sendbuf, recvbuf, count, datatype, op, comm, info, request) - @mpichk ccall((:MPI_Scan_init_c, libmpi), Cint, (MPIPtr, MPIPtr, MPI_Count, MPI_Datatype, MPI_Op, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, recvbuf, count, datatype, op, comm, info, request) +function MPI_Allgatherv_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, info, request) + @mpichk ccall((:MPI_Allgatherv_init_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, info, request) v"4.0.0" fallback=MPI_Allgatherv_init end """ - MPI_Scatter_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm) + MPI_Allreduce_c(sendbuf, recvbuf, count, datatype, op, comm) -$(_doc_external(:MPI_Scatter_c)) +$(_doc_external(:MPI_Allreduce_c)) """ -function MPI_Scatter_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm) - @mpichk ccall((:MPI_Scatter_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Comm), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm) +function MPI_Allreduce_c(sendbuf, recvbuf, count, datatype, op, comm) + @mpichk ccall((:MPI_Allreduce_c, libmpi), Cint, (MPIPtr, MPIPtr, MPI_Count, MPI_Datatype, MPI_Op, MPI_Comm), sendbuf, recvbuf, count, datatype, op, comm) v"4.0.0" fallback=MPI_Allreduce end """ - MPI_Scatter_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request) + MPI_Allreduce_init_c(sendbuf, recvbuf, count, datatype, op, comm, info, request) -$(_doc_external(:MPI_Scatter_init_c)) +$(_doc_external(:MPI_Allreduce_init_c)) """ -function MPI_Scatter_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request) - @mpichk ccall((:MPI_Scatter_init_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request) +function MPI_Allreduce_init_c(sendbuf, recvbuf, count, datatype, op, comm, info, request) + @mpichk ccall((:MPI_Allreduce_init_c, libmpi), Cint, (MPIPtr, MPIPtr, MPI_Count, MPI_Datatype, MPI_Op, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, recvbuf, count, datatype, op, comm, info, request) v"4.0.0" fallback=MPI_Allreduce_init end """ - MPI_Scatterv_c(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm) + MPI_Alltoall_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm) -$(_doc_external(:MPI_Scatterv_c)) +$(_doc_external(:MPI_Alltoall_c)) """ -function MPI_Scatterv_c(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm) - @mpichk ccall((:MPI_Scatterv_c, libmpi), Cint, (MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Comm), sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm) +function MPI_Alltoall_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm) + @mpichk ccall((:MPI_Alltoall_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, MPI_Comm), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm) v"4.0.0" fallback=MPI_Alltoall end """ - MPI_Scatterv_init_c(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request) + MPI_Alltoall_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request) -$(_doc_external(:MPI_Scatterv_init_c)) +$(_doc_external(:MPI_Alltoall_init_c)) """ -function MPI_Scatterv_init_c(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request) - @mpichk ccall((:MPI_Scatterv_init_c, libmpi), Cint, (MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request) +function MPI_Alltoall_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request) + @mpichk ccall((:MPI_Alltoall_init_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request) v"4.0.0" fallback=MPI_Alltoall_init end """ - MPI_Get_count_c(status, datatype, count) + MPI_Alltoallv_c(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm) -$(_doc_external(:MPI_Get_count_c)) +$(_doc_external(:MPI_Alltoallv_c)) """ -function MPI_Get_count_c(status, datatype, count) - @mpichk ccall((:MPI_Get_count_c, libmpi), Cint, (Ptr{MPI_Status}, MPI_Datatype, Ptr{MPI_Count}), status, datatype, count) +function MPI_Alltoallv_c(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm) + @mpichk ccall((:MPI_Alltoallv_c, libmpi), Cint, (MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPI_Comm), sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm) v"4.0.0" fallback=MPI_Alltoallv end """ - MPI_Get_elements_c(status, datatype, count) + MPI_Alltoallv_init_c(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, info, request) -$(_doc_external(:MPI_Get_elements_c)) +$(_doc_external(:MPI_Alltoallv_init_c)) """ -function MPI_Get_elements_c(status, datatype, count) - @mpichk ccall((:MPI_Get_elements_c, libmpi), Cint, (Ptr{MPI_Status}, MPI_Datatype, Ptr{MPI_Count}), status, datatype, count) +function MPI_Alltoallv_init_c(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, info, request) + @mpichk ccall((:MPI_Alltoallv_init_c, libmpi), Cint, (MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, info, request) v"4.0.0" fallback=MPI_Alltoallv_init end """ - MPI_Pack_c(inbuf, incount, datatype, outbuf, outsize, position, comm) + MPI_Alltoallw_c(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm) -$(_doc_external(:MPI_Pack_c)) +$(_doc_external(:MPI_Alltoallw_c)) """ -function MPI_Pack_c(inbuf, incount, datatype, outbuf, outsize, position, comm) - @mpichk ccall((:MPI_Pack_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, Ptr{MPI_Count}, MPI_Comm), inbuf, incount, datatype, outbuf, outsize, position, comm) +function MPI_Alltoallw_c(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm) + @mpichk ccall((:MPI_Alltoallw_c, libmpi), Cint, (MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, Ptr{MPI_Datatype}, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, Ptr{MPI_Datatype}, MPI_Comm), sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm) v"4.0.0" fallback=MPI_Alltoallw end """ - MPI_Pack_external_c(datarep, inbuf, incount, datatype, outbuf, outsize, position) + MPI_Alltoallw_init_c(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, info, request) -$(_doc_external(:MPI_Pack_external_c)) +$(_doc_external(:MPI_Alltoallw_init_c)) """ -function MPI_Pack_external_c(datarep, inbuf, incount, datatype, outbuf, outsize, position) - @mpichk ccall((:MPI_Pack_external_c, libmpi), Cint, (Ptr{Cchar}, MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, Ptr{MPI_Count}), datarep, inbuf, incount, datatype, outbuf, outsize, position) +function MPI_Alltoallw_init_c(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, info, request) + @mpichk ccall((:MPI_Alltoallw_init_c, libmpi), Cint, (MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, Ptr{MPI_Datatype}, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, Ptr{MPI_Datatype}, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, info, request) v"4.0.0" fallback=MPI_Alltoallw_init end """ - MPI_Pack_external_size_c(datarep, incount, datatype, size) + MPI_Bcast_c(buffer, count, datatype, root, comm) -$(_doc_external(:MPI_Pack_external_size_c)) +$(_doc_external(:MPI_Bcast_c)) """ -function MPI_Pack_external_size_c(datarep, incount, datatype, size) - @mpichk ccall((:MPI_Pack_external_size_c, libmpi), Cint, (Ptr{Cchar}, MPI_Count, MPI_Datatype, Ptr{MPI_Count}), datarep, incount, datatype, size) +function MPI_Bcast_c(buffer, count, datatype, root, comm) + @mpichk ccall((:MPI_Bcast_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Comm), buffer, count, datatype, root, comm) v"4.0.0" fallback=MPI_Bcast end """ - MPI_Pack_size_c(incount, datatype, comm, size) + MPI_Bcast_init_c(buffer, count, datatype, root, comm, info, request) -$(_doc_external(:MPI_Pack_size_c)) +$(_doc_external(:MPI_Bcast_init_c)) """ -function MPI_Pack_size_c(incount, datatype, comm, size) - @mpichk ccall((:MPI_Pack_size_c, libmpi), Cint, (MPI_Count, MPI_Datatype, MPI_Comm, Ptr{MPI_Count}), incount, datatype, comm, size) +function MPI_Bcast_init_c(buffer, count, datatype, root, comm, info, request) + @mpichk ccall((:MPI_Bcast_init_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Comm, MPI_Info, Ptr{MPI_Request}), buffer, count, datatype, root, comm, info, request) v"4.0.0" fallback=MPI_Bcast_init end """ - MPI_Type_contiguous_c(count, oldtype, newtype) + MPI_Exscan_c(sendbuf, recvbuf, count, datatype, op, comm) -$(_doc_external(:MPI_Type_contiguous_c)) +$(_doc_external(:MPI_Exscan_c)) """ -function MPI_Type_contiguous_c(count, oldtype, newtype) - @mpichk ccall((:MPI_Type_contiguous_c, libmpi), Cint, (MPI_Count, MPI_Datatype, Ptr{MPI_Datatype}), count, oldtype, newtype) +function MPI_Exscan_c(sendbuf, recvbuf, count, datatype, op, comm) + @mpichk ccall((:MPI_Exscan_c, libmpi), Cint, (MPIPtr, MPIPtr, MPI_Count, MPI_Datatype, MPI_Op, MPI_Comm), sendbuf, recvbuf, count, datatype, op, comm) v"4.0.0" fallback=MPI_Exscan end """ - MPI_Type_create_darray_c(size, rank, ndims, array_of_gsizes, array_of_distribs, array_of_dargs, array_of_psizes, order, oldtype, newtype) + MPI_Exscan_init_c(sendbuf, recvbuf, count, datatype, op, comm, info, request) -$(_doc_external(:MPI_Type_create_darray_c)) +$(_doc_external(:MPI_Exscan_init_c)) """ -function MPI_Type_create_darray_c(size, rank, ndims, array_of_gsizes, array_of_distribs, array_of_dargs, array_of_psizes, order, oldtype, newtype) - @mpichk ccall((:MPI_Type_create_darray_c, libmpi), Cint, (Cint, Cint, Cint, Ptr{MPI_Count}, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}, Cint, MPI_Datatype, Ptr{MPI_Datatype}), size, rank, ndims, array_of_gsizes, array_of_distribs, array_of_dargs, array_of_psizes, order, oldtype, newtype) +function MPI_Exscan_init_c(sendbuf, recvbuf, count, datatype, op, comm, info, request) + @mpichk ccall((:MPI_Exscan_init_c, libmpi), Cint, (MPIPtr, MPIPtr, MPI_Count, MPI_Datatype, MPI_Op, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, recvbuf, count, datatype, op, comm, info, request) v"4.0.0" fallback=MPI_Exscan_init end """ - MPI_Type_create_hindexed_c(count, array_of_blocklengths, array_of_displacements, oldtype, newtype) + MPI_Gather_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm) -$(_doc_external(:MPI_Type_create_hindexed_c)) +$(_doc_external(:MPI_Gather_c)) """ -function MPI_Type_create_hindexed_c(count, array_of_blocklengths, array_of_displacements, oldtype, newtype) - @mpichk ccall((:MPI_Type_create_hindexed_c, libmpi), Cint, (MPI_Count, Ptr{MPI_Count}, Ptr{MPI_Count}, MPI_Datatype, Ptr{MPI_Datatype}), count, array_of_blocklengths, array_of_displacements, oldtype, newtype) +function MPI_Gather_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm) + @mpichk ccall((:MPI_Gather_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Comm), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm) v"4.0.0" fallback=MPI_Gather end """ - MPI_Type_create_hindexed_block_c(count, blocklength, array_of_displacements, oldtype, newtype) + MPI_Gather_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request) -$(_doc_external(:MPI_Type_create_hindexed_block_c)) +$(_doc_external(:MPI_Gather_init_c)) """ -function MPI_Type_create_hindexed_block_c(count, blocklength, array_of_displacements, oldtype, newtype) - @mpichk ccall((:MPI_Type_create_hindexed_block_c, libmpi), Cint, (MPI_Count, MPI_Count, Ptr{MPI_Count}, MPI_Datatype, Ptr{MPI_Datatype}), count, blocklength, array_of_displacements, oldtype, newtype) +function MPI_Gather_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request) + @mpichk ccall((:MPI_Gather_init_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request) v"4.0.0" fallback=MPI_Gather_init end """ - MPI_Type_create_hvector_c(count, blocklength, stride, oldtype, newtype) + MPI_Gatherv_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm) -$(_doc_external(:MPI_Type_create_hvector_c)) +$(_doc_external(:MPI_Gatherv_c)) """ -function MPI_Type_create_hvector_c(count, blocklength, stride, oldtype, newtype) - @mpichk ccall((:MPI_Type_create_hvector_c, libmpi), Cint, (MPI_Count, MPI_Count, MPI_Count, MPI_Datatype, Ptr{MPI_Datatype}), count, blocklength, stride, oldtype, newtype) +function MPI_Gatherv_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm) + @mpichk ccall((:MPI_Gatherv_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, Cint, MPI_Comm), sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm) v"4.0.0" fallback=MPI_Gatherv end """ - MPI_Type_create_indexed_block_c(count, blocklength, array_of_displacements, oldtype, newtype) + MPI_Gatherv_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, info, request) -$(_doc_external(:MPI_Type_create_indexed_block_c)) +$(_doc_external(:MPI_Gatherv_init_c)) """ -function MPI_Type_create_indexed_block_c(count, blocklength, array_of_displacements, oldtype, newtype) - @mpichk ccall((:MPI_Type_create_indexed_block_c, libmpi), Cint, (MPI_Count, MPI_Count, Ptr{MPI_Count}, MPI_Datatype, Ptr{MPI_Datatype}), count, blocklength, array_of_displacements, oldtype, newtype) +function MPI_Gatherv_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, info, request) + @mpichk ccall((:MPI_Gatherv_init_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, Cint, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, info, request) v"4.0.0" fallback=MPI_Gatherv_init end """ - MPI_Type_create_resized_c(oldtype, lb, extent, newtype) + MPI_Iallgather_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request) + +$(_doc_external(:MPI_Iallgather_c)) +""" +function MPI_Iallgather_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request) + @mpichk ccall((:MPI_Iallgather_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, MPI_Comm, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request) v"4.0.0" fallback=MPI_Iallgather +end + +""" + MPI_Iallgatherv_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, request) + +$(_doc_external(:MPI_Iallgatherv_c)) +""" +function MPI_Iallgatherv_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, request) + @mpichk ccall((:MPI_Iallgatherv_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPI_Comm, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, request) v"4.0.0" fallback=MPI_Iallgatherv +end + +""" + MPI_Iallreduce_c(sendbuf, recvbuf, count, datatype, op, comm, request) + +$(_doc_external(:MPI_Iallreduce_c)) +""" +function MPI_Iallreduce_c(sendbuf, recvbuf, count, datatype, op, comm, request) + @mpichk ccall((:MPI_Iallreduce_c, libmpi), Cint, (MPIPtr, MPIPtr, MPI_Count, MPI_Datatype, MPI_Op, MPI_Comm, Ptr{MPI_Request}), sendbuf, recvbuf, count, datatype, op, comm, request) v"4.0.0" fallback=MPI_Iallreduce +end + +""" + MPI_Ialltoall_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request) + +$(_doc_external(:MPI_Ialltoall_c)) +""" +function MPI_Ialltoall_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request) + @mpichk ccall((:MPI_Ialltoall_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, MPI_Comm, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request) v"4.0.0" fallback=MPI_Ialltoall +end + +""" + MPI_Ialltoallv_c(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, request) + +$(_doc_external(:MPI_Ialltoallv_c)) +""" +function MPI_Ialltoallv_c(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, request) + @mpichk ccall((:MPI_Ialltoallv_c, libmpi), Cint, (MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPI_Comm, Ptr{MPI_Request}), sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, request) v"4.0.0" fallback=MPI_Ialltoallv +end + +""" + MPI_Ialltoallw_c(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, request) + +$(_doc_external(:MPI_Ialltoallw_c)) +""" +function MPI_Ialltoallw_c(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, request) + @mpichk ccall((:MPI_Ialltoallw_c, libmpi), Cint, (MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, Ptr{MPI_Datatype}, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, Ptr{MPI_Datatype}, MPI_Comm, Ptr{MPI_Request}), sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, request) v"4.0.0" fallback=MPI_Ialltoallw +end + +""" + MPI_Ibcast_c(buffer, count, datatype, root, comm, request) + +$(_doc_external(:MPI_Ibcast_c)) +""" +function MPI_Ibcast_c(buffer, count, datatype, root, comm, request) + @mpichk ccall((:MPI_Ibcast_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Comm, Ptr{MPI_Request}), buffer, count, datatype, root, comm, request) v"4.0.0" fallback=MPI_Ibcast +end + +""" + MPI_Iexscan_c(sendbuf, recvbuf, count, datatype, op, comm, request) + +$(_doc_external(:MPI_Iexscan_c)) +""" +function MPI_Iexscan_c(sendbuf, recvbuf, count, datatype, op, comm, request) + @mpichk ccall((:MPI_Iexscan_c, libmpi), Cint, (MPIPtr, MPIPtr, MPI_Count, MPI_Datatype, MPI_Op, MPI_Comm, Ptr{MPI_Request}), sendbuf, recvbuf, count, datatype, op, comm, request) v"4.0.0" fallback=MPI_Iexscan +end + +""" + MPI_Igather_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, request) + +$(_doc_external(:MPI_Igather_c)) +""" +function MPI_Igather_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, request) + @mpichk ccall((:MPI_Igather_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Comm, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, request) v"4.0.0" fallback=MPI_Igather +end + +""" + MPI_Igatherv_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, request) + +$(_doc_external(:MPI_Igatherv_c)) +""" +function MPI_Igatherv_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, request) + @mpichk ccall((:MPI_Igatherv_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, Cint, MPI_Comm, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, request) v"4.0.0" fallback=MPI_Igatherv +end + +""" + MPI_Ineighbor_allgather_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request) + +$(_doc_external(:MPI_Ineighbor_allgather_c)) +""" +function MPI_Ineighbor_allgather_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request) + @mpichk ccall((:MPI_Ineighbor_allgather_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, MPI_Comm, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request) v"4.0.0" fallback=MPI_Ineighbor_allgather +end + +""" + MPI_Ineighbor_allgatherv_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, request) + +$(_doc_external(:MPI_Ineighbor_allgatherv_c)) +""" +function MPI_Ineighbor_allgatherv_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, request) + @mpichk ccall((:MPI_Ineighbor_allgatherv_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPI_Comm, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, request) v"4.0.0" fallback=MPI_Ineighbor_allgatherv +end + +""" + MPI_Ineighbor_alltoall_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request) + +$(_doc_external(:MPI_Ineighbor_alltoall_c)) +""" +function MPI_Ineighbor_alltoall_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request) + @mpichk ccall((:MPI_Ineighbor_alltoall_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, MPI_Comm, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request) v"4.0.0" fallback=MPI_Ineighbor_alltoall +end + +""" + MPI_Ineighbor_alltoallv_c(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, request) + +$(_doc_external(:MPI_Ineighbor_alltoallv_c)) +""" +function MPI_Ineighbor_alltoallv_c(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, request) + @mpichk ccall((:MPI_Ineighbor_alltoallv_c, libmpi), Cint, (MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPI_Comm, Ptr{MPI_Request}), sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, request) v"4.0.0" fallback=MPI_Ineighbor_alltoallv +end + +""" + MPI_Ineighbor_alltoallw_c(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, request) -$(_doc_external(:MPI_Type_create_resized_c)) +$(_doc_external(:MPI_Ineighbor_alltoallw_c)) """ -function MPI_Type_create_resized_c(oldtype, lb, extent, newtype) - @mpichk ccall((:MPI_Type_create_resized_c, libmpi), Cint, (MPI_Datatype, MPI_Count, MPI_Count, Ptr{MPI_Datatype}), oldtype, lb, extent, newtype) +function MPI_Ineighbor_alltoallw_c(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, request) + @mpichk ccall((:MPI_Ineighbor_alltoallw_c, libmpi), Cint, (MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, Ptr{MPI_Datatype}, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, Ptr{MPI_Datatype}, MPI_Comm, Ptr{MPI_Request}), sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, request) v"4.0.0" fallback=MPI_Ineighbor_alltoallw end """ - MPI_Type_create_struct_c(count, array_of_blocklengths, array_of_displacements, array_of_types, newtype) + MPI_Ireduce_c(sendbuf, recvbuf, count, datatype, op, root, comm, request) -$(_doc_external(:MPI_Type_create_struct_c)) +$(_doc_external(:MPI_Ireduce_c)) """ -function MPI_Type_create_struct_c(count, array_of_blocklengths, array_of_displacements, array_of_types, newtype) - @mpichk ccall((:MPI_Type_create_struct_c, libmpi), Cint, (MPI_Count, Ptr{MPI_Count}, Ptr{MPI_Count}, Ptr{MPI_Datatype}, Ptr{MPI_Datatype}), count, array_of_blocklengths, array_of_displacements, array_of_types, newtype) +function MPI_Ireduce_c(sendbuf, recvbuf, count, datatype, op, root, comm, request) + @mpichk ccall((:MPI_Ireduce_c, libmpi), Cint, (MPIPtr, MPIPtr, MPI_Count, MPI_Datatype, MPI_Op, Cint, MPI_Comm, Ptr{MPI_Request}), sendbuf, recvbuf, count, datatype, op, root, comm, request) v"4.0.0" fallback=MPI_Ireduce end """ - MPI_Type_create_subarray_c(ndims, array_of_sizes, array_of_subsizes, array_of_starts, order, oldtype, newtype) + MPI_Ireduce_scatter_c(sendbuf, recvbuf, recvcounts, datatype, op, comm, request) -$(_doc_external(:MPI_Type_create_subarray_c)) +$(_doc_external(:MPI_Ireduce_scatter_c)) """ -function MPI_Type_create_subarray_c(ndims, array_of_sizes, array_of_subsizes, array_of_starts, order, oldtype, newtype) - @mpichk ccall((:MPI_Type_create_subarray_c, libmpi), Cint, (Cint, Ptr{MPI_Count}, Ptr{MPI_Count}, Ptr{MPI_Count}, Cint, MPI_Datatype, Ptr{MPI_Datatype}), ndims, array_of_sizes, array_of_subsizes, array_of_starts, order, oldtype, newtype) +function MPI_Ireduce_scatter_c(sendbuf, recvbuf, recvcounts, datatype, op, comm, request) + @mpichk ccall((:MPI_Ireduce_scatter_c, libmpi), Cint, (MPIPtr, MPIPtr, Ptr{MPI_Count}, MPI_Datatype, MPI_Op, MPI_Comm, Ptr{MPI_Request}), sendbuf, recvbuf, recvcounts, datatype, op, comm, request) v"4.0.0" fallback=MPI_Ireduce_scatter end """ - MPI_Type_get_contents_c(datatype, max_integers, max_addresses, max_large_counts, max_datatypes, array_of_integers, array_of_addresses, array_of_large_counts, array_of_datatypes) + MPI_Ireduce_scatter_block_c(sendbuf, recvbuf, recvcount, datatype, op, comm, request) -$(_doc_external(:MPI_Type_get_contents_c)) +$(_doc_external(:MPI_Ireduce_scatter_block_c)) """ -function MPI_Type_get_contents_c(datatype, max_integers, max_addresses, max_large_counts, max_datatypes, array_of_integers, array_of_addresses, array_of_large_counts, array_of_datatypes) - @mpichk ccall((:MPI_Type_get_contents_c, libmpi), Cint, (MPI_Datatype, MPI_Count, MPI_Count, MPI_Count, MPI_Count, Ptr{Cint}, Ptr{MPI_Aint}, Ptr{MPI_Count}, Ptr{MPI_Datatype}), datatype, max_integers, max_addresses, max_large_counts, max_datatypes, array_of_integers, array_of_addresses, array_of_large_counts, array_of_datatypes) +function MPI_Ireduce_scatter_block_c(sendbuf, recvbuf, recvcount, datatype, op, comm, request) + @mpichk ccall((:MPI_Ireduce_scatter_block_c, libmpi), Cint, (MPIPtr, MPIPtr, MPI_Count, MPI_Datatype, MPI_Op, MPI_Comm, Ptr{MPI_Request}), sendbuf, recvbuf, recvcount, datatype, op, comm, request) v"4.0.0" fallback=MPI_Ireduce_scatter_block end """ - MPI_Type_get_envelope_c(datatype, num_integers, num_addresses, num_large_counts, num_datatypes, combiner) + MPI_Iscan_c(sendbuf, recvbuf, count, datatype, op, comm, request) -$(_doc_external(:MPI_Type_get_envelope_c)) +$(_doc_external(:MPI_Iscan_c)) """ -function MPI_Type_get_envelope_c(datatype, num_integers, num_addresses, num_large_counts, num_datatypes, combiner) - @mpichk ccall((:MPI_Type_get_envelope_c, libmpi), Cint, (MPI_Datatype, Ptr{MPI_Count}, Ptr{MPI_Count}, Ptr{MPI_Count}, Ptr{MPI_Count}, Ptr{Cint}), datatype, num_integers, num_addresses, num_large_counts, num_datatypes, combiner) +function MPI_Iscan_c(sendbuf, recvbuf, count, datatype, op, comm, request) + @mpichk ccall((:MPI_Iscan_c, libmpi), Cint, (MPIPtr, MPIPtr, MPI_Count, MPI_Datatype, MPI_Op, MPI_Comm, Ptr{MPI_Request}), sendbuf, recvbuf, count, datatype, op, comm, request) v"4.0.0" fallback=MPI_Iscan end """ - MPI_Type_get_extent_c(datatype, lb, extent) + MPI_Iscatter_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, request) -$(_doc_external(:MPI_Type_get_extent_c)) +$(_doc_external(:MPI_Iscatter_c)) """ -function MPI_Type_get_extent_c(datatype, lb, extent) - @mpichk ccall((:MPI_Type_get_extent_c, libmpi), Cint, (MPI_Datatype, Ptr{MPI_Count}, Ptr{MPI_Count}), datatype, lb, extent) +function MPI_Iscatter_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, request) + @mpichk ccall((:MPI_Iscatter_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Comm, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, request) v"4.0.0" fallback=MPI_Iscatter end """ - MPI_Type_get_true_extent_c(datatype, true_lb, true_extent) + MPI_Iscatterv_c(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, request) -$(_doc_external(:MPI_Type_get_true_extent_c)) +$(_doc_external(:MPI_Iscatterv_c)) """ -function MPI_Type_get_true_extent_c(datatype, true_lb, true_extent) - @mpichk ccall((:MPI_Type_get_true_extent_c, libmpi), Cint, (MPI_Datatype, Ptr{MPI_Count}, Ptr{MPI_Count}), datatype, true_lb, true_extent) +function MPI_Iscatterv_c(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, request) + @mpichk ccall((:MPI_Iscatterv_c, libmpi), Cint, (MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Comm, Ptr{MPI_Request}), sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, request) v"4.0.0" fallback=MPI_Iscatterv end """ - MPI_Type_indexed_c(count, array_of_blocklengths, array_of_displacements, oldtype, newtype) + MPI_Neighbor_allgather_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm) -$(_doc_external(:MPI_Type_indexed_c)) +$(_doc_external(:MPI_Neighbor_allgather_c)) """ -function MPI_Type_indexed_c(count, array_of_blocklengths, array_of_displacements, oldtype, newtype) - @mpichk ccall((:MPI_Type_indexed_c, libmpi), Cint, (MPI_Count, Ptr{MPI_Count}, Ptr{MPI_Count}, MPI_Datatype, Ptr{MPI_Datatype}), count, array_of_blocklengths, array_of_displacements, oldtype, newtype) +function MPI_Neighbor_allgather_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm) + @mpichk ccall((:MPI_Neighbor_allgather_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, MPI_Comm), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm) v"4.0.0" fallback=MPI_Neighbor_allgather end """ - MPI_Type_size_c(datatype, size) + MPI_Neighbor_allgather_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request) -$(_doc_external(:MPI_Type_size_c)) +$(_doc_external(:MPI_Neighbor_allgather_init_c)) """ -function MPI_Type_size_c(datatype, size) - @mpichk ccall((:MPI_Type_size_c, libmpi), Cint, (MPI_Datatype, Ptr{MPI_Count}), datatype, size) +function MPI_Neighbor_allgather_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request) + @mpichk ccall((:MPI_Neighbor_allgather_init_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request) v"4.0.0" fallback=MPI_Neighbor_allgather_init end """ - MPI_Type_vector_c(count, blocklength, stride, oldtype, newtype) + MPI_Neighbor_allgatherv_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm) -$(_doc_external(:MPI_Type_vector_c)) +$(_doc_external(:MPI_Neighbor_allgatherv_c)) """ -function MPI_Type_vector_c(count, blocklength, stride, oldtype, newtype) - @mpichk ccall((:MPI_Type_vector_c, libmpi), Cint, (MPI_Count, MPI_Count, MPI_Count, MPI_Datatype, Ptr{MPI_Datatype}), count, blocklength, stride, oldtype, newtype) +function MPI_Neighbor_allgatherv_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm) + @mpichk ccall((:MPI_Neighbor_allgatherv_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPI_Comm), sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm) v"4.0.0" fallback=MPI_Neighbor_allgatherv end """ - MPI_Unpack_c(inbuf, insize, position, outbuf, outcount, datatype, comm) + MPI_Neighbor_allgatherv_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, info, request) -$(_doc_external(:MPI_Unpack_c)) +$(_doc_external(:MPI_Neighbor_allgatherv_init_c)) """ -function MPI_Unpack_c(inbuf, insize, position, outbuf, outcount, datatype, comm) - @mpichk ccall((:MPI_Unpack_c, libmpi), Cint, (MPIPtr, MPI_Count, Ptr{MPI_Count}, MPIPtr, MPI_Count, MPI_Datatype, MPI_Comm), inbuf, insize, position, outbuf, outcount, datatype, comm) +function MPI_Neighbor_allgatherv_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, info, request) + @mpichk ccall((:MPI_Neighbor_allgatherv_init_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, info, request) v"4.0.0" fallback=MPI_Neighbor_allgatherv_init end """ - MPI_Unpack_external_c(datarep, inbuf, insize, position, outbuf, outcount, datatype) + MPI_Neighbor_alltoall_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm) -$(_doc_external(:MPI_Unpack_external_c)) +$(_doc_external(:MPI_Neighbor_alltoall_c)) """ -function MPI_Unpack_external_c(datarep, inbuf, insize, position, outbuf, outcount, datatype) - @mpichk ccall((:MPI_Unpack_external_c, libmpi), Cint, (Ptr{Cchar}, MPIPtr, MPI_Count, Ptr{MPI_Count}, MPIPtr, MPI_Count, MPI_Datatype), datarep, inbuf, insize, position, outbuf, outcount, datatype) +function MPI_Neighbor_alltoall_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm) + @mpichk ccall((:MPI_Neighbor_alltoall_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, MPI_Comm), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm) v"4.0.0" fallback=MPI_Neighbor_alltoall end """ - MPI_Op_create_c(user_fn, commute, op) + MPI_Neighbor_alltoall_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request) -$(_doc_external(:MPI_Op_create_c)) +$(_doc_external(:MPI_Neighbor_alltoall_init_c)) """ -function MPI_Op_create_c(user_fn, commute, op) - @mpichk ccall((:MPI_Op_create_c, libmpi), Cint, (Ptr{MPI_User_function_c}, Cint, Ptr{MPI_Op}), user_fn, commute, op) +function MPI_Neighbor_alltoall_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request) + @mpichk ccall((:MPI_Neighbor_alltoall_init_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request) v"4.0.0" fallback=MPI_Neighbor_alltoall_init end """ - MPI_Bsend_c(buf, count, datatype, dest, tag, comm) + MPI_Neighbor_alltoallv_c(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm) -$(_doc_external(:MPI_Bsend_c)) +$(_doc_external(:MPI_Neighbor_alltoallv_c)) """ -function MPI_Bsend_c(buf, count, datatype, dest, tag, comm) - @mpichk ccall((:MPI_Bsend_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, MPI_Comm), buf, count, datatype, dest, tag, comm) +function MPI_Neighbor_alltoallv_c(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm) + @mpichk ccall((:MPI_Neighbor_alltoallv_c, libmpi), Cint, (MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPI_Comm), sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm) v"4.0.0" fallback=MPI_Neighbor_alltoallv end """ - MPI_Bsend_init_c(buf, count, datatype, dest, tag, comm, request) + MPI_Neighbor_alltoallv_init_c(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, info, request) -$(_doc_external(:MPI_Bsend_init_c)) +$(_doc_external(:MPI_Neighbor_alltoallv_init_c)) """ -function MPI_Bsend_init_c(buf, count, datatype, dest, tag, comm, request) - @mpichk ccall((:MPI_Bsend_init_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, MPI_Comm, Ptr{MPI_Request}), buf, count, datatype, dest, tag, comm, request) +function MPI_Neighbor_alltoallv_init_c(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, info, request) + @mpichk ccall((:MPI_Neighbor_alltoallv_init_c, libmpi), Cint, (MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, info, request) v"4.0.0" fallback=MPI_Neighbor_alltoallv_init end """ - MPI_Buffer_attach_c(buffer, size) + MPI_Neighbor_alltoallw_c(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm) -$(_doc_external(:MPI_Buffer_attach_c)) +$(_doc_external(:MPI_Neighbor_alltoallw_c)) """ -function MPI_Buffer_attach_c(buffer, size) - @mpichk ccall((:MPI_Buffer_attach_c, libmpi), Cint, (MPIPtr, MPI_Count), buffer, size) +function MPI_Neighbor_alltoallw_c(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm) + @mpichk ccall((:MPI_Neighbor_alltoallw_c, libmpi), Cint, (MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, Ptr{MPI_Datatype}, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, Ptr{MPI_Datatype}, MPI_Comm), sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm) v"4.0.0" fallback=MPI_Neighbor_alltoallw end """ - MPI_Buffer_detach_c(buffer_addr, size) + MPI_Neighbor_alltoallw_init_c(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, info, request) -$(_doc_external(:MPI_Buffer_detach_c)) +$(_doc_external(:MPI_Neighbor_alltoallw_init_c)) """ -function MPI_Buffer_detach_c(buffer_addr, size) - @mpichk ccall((:MPI_Buffer_detach_c, libmpi), Cint, (MPIPtr, Ptr{MPI_Count}), buffer_addr, size) +function MPI_Neighbor_alltoallw_init_c(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, info, request) + @mpichk ccall((:MPI_Neighbor_alltoallw_init_c, libmpi), Cint, (MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, Ptr{MPI_Datatype}, MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, Ptr{MPI_Datatype}, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, info, request) v"4.0.0" fallback=MPI_Neighbor_alltoallw_init end """ - MPI_Ibsend_c(buf, count, datatype, dest, tag, comm, request) + MPI_Reduce_c(sendbuf, recvbuf, count, datatype, op, root, comm) -$(_doc_external(:MPI_Ibsend_c)) +$(_doc_external(:MPI_Reduce_c)) """ -function MPI_Ibsend_c(buf, count, datatype, dest, tag, comm, request) - @mpichk ccall((:MPI_Ibsend_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, MPI_Comm, Ptr{MPI_Request}), buf, count, datatype, dest, tag, comm, request) +function MPI_Reduce_c(sendbuf, recvbuf, count, datatype, op, root, comm) + @mpichk ccall((:MPI_Reduce_c, libmpi), Cint, (MPIPtr, MPIPtr, MPI_Count, MPI_Datatype, MPI_Op, Cint, MPI_Comm), sendbuf, recvbuf, count, datatype, op, root, comm) v"4.0.0" fallback=MPI_Reduce end """ - MPI_Imrecv_c(buf, count, datatype, message, request) + MPI_Reduce_init_c(sendbuf, recvbuf, count, datatype, op, root, comm, info, request) -$(_doc_external(:MPI_Imrecv_c)) +$(_doc_external(:MPI_Reduce_init_c)) """ -function MPI_Imrecv_c(buf, count, datatype, message, request) - @mpichk ccall((:MPI_Imrecv_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Message}, Ptr{MPI_Request}), buf, count, datatype, message, request) +function MPI_Reduce_init_c(sendbuf, recvbuf, count, datatype, op, root, comm, info, request) + @mpichk ccall((:MPI_Reduce_init_c, libmpi), Cint, (MPIPtr, MPIPtr, MPI_Count, MPI_Datatype, MPI_Op, Cint, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, recvbuf, count, datatype, op, root, comm, info, request) v"4.0.0" fallback=MPI_Reduce_init end """ - MPI_Irecv_c(buf, count, datatype, source, tag, comm, request) + MPI_Reduce_local_c(inbuf, inoutbuf, count, datatype, op) -$(_doc_external(:MPI_Irecv_c)) +$(_doc_external(:MPI_Reduce_local_c)) """ -function MPI_Irecv_c(buf, count, datatype, source, tag, comm, request) - @mpichk ccall((:MPI_Irecv_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, MPI_Comm, Ptr{MPI_Request}), buf, count, datatype, source, tag, comm, request) +function MPI_Reduce_local_c(inbuf, inoutbuf, count, datatype, op) + @mpichk ccall((:MPI_Reduce_local_c, libmpi), Cint, (MPIPtr, MPIPtr, MPI_Count, MPI_Datatype, MPI_Op), inbuf, inoutbuf, count, datatype, op) v"4.0.0" fallback=MPI_Reduce_local end """ - MPI_Irsend_c(buf, count, datatype, dest, tag, comm, request) + MPI_Reduce_scatter_c(sendbuf, recvbuf, recvcounts, datatype, op, comm) -$(_doc_external(:MPI_Irsend_c)) +$(_doc_external(:MPI_Reduce_scatter_c)) """ -function MPI_Irsend_c(buf, count, datatype, dest, tag, comm, request) - @mpichk ccall((:MPI_Irsend_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, MPI_Comm, Ptr{MPI_Request}), buf, count, datatype, dest, tag, comm, request) +function MPI_Reduce_scatter_c(sendbuf, recvbuf, recvcounts, datatype, op, comm) + @mpichk ccall((:MPI_Reduce_scatter_c, libmpi), Cint, (MPIPtr, MPIPtr, Ptr{MPI_Count}, MPI_Datatype, MPI_Op, MPI_Comm), sendbuf, recvbuf, recvcounts, datatype, op, comm) v"4.0.0" fallback=MPI_Reduce_scatter end """ - MPI_Isend_c(buf, count, datatype, dest, tag, comm, request) + MPI_Reduce_scatter_block_c(sendbuf, recvbuf, recvcount, datatype, op, comm) -$(_doc_external(:MPI_Isend_c)) +$(_doc_external(:MPI_Reduce_scatter_block_c)) """ -function MPI_Isend_c(buf, count, datatype, dest, tag, comm, request) - @mpichk ccall((:MPI_Isend_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, MPI_Comm, Ptr{MPI_Request}), buf, count, datatype, dest, tag, comm, request) +function MPI_Reduce_scatter_block_c(sendbuf, recvbuf, recvcount, datatype, op, comm) + @mpichk ccall((:MPI_Reduce_scatter_block_c, libmpi), Cint, (MPIPtr, MPIPtr, MPI_Count, MPI_Datatype, MPI_Op, MPI_Comm), sendbuf, recvbuf, recvcount, datatype, op, comm) v"4.0.0" fallback=MPI_Reduce_scatter_block end """ - MPI_Isendrecv_c(sendbuf, sendcount, sendtype, dest, sendtag, recvbuf, recvcount, recvtype, source, recvtag, comm, request) + MPI_Reduce_scatter_block_init_c(sendbuf, recvbuf, recvcount, datatype, op, comm, info, request) -$(_doc_external(:MPI_Isendrecv_c)) +$(_doc_external(:MPI_Reduce_scatter_block_init_c)) """ -function MPI_Isendrecv_c(sendbuf, sendcount, sendtype, dest, sendtag, recvbuf, recvcount, recvtype, source, recvtag, comm, request) - @mpichk ccall((:MPI_Isendrecv_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, MPI_Comm, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, dest, sendtag, recvbuf, recvcount, recvtype, source, recvtag, comm, request) +function MPI_Reduce_scatter_block_init_c(sendbuf, recvbuf, recvcount, datatype, op, comm, info, request) + @mpichk ccall((:MPI_Reduce_scatter_block_init_c, libmpi), Cint, (MPIPtr, MPIPtr, MPI_Count, MPI_Datatype, MPI_Op, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, recvbuf, recvcount, datatype, op, comm, info, request) v"4.0.0" fallback=MPI_Reduce_scatter_block_init end """ - MPI_Isendrecv_replace_c(buf, count, datatype, dest, sendtag, source, recvtag, comm, request) + MPI_Reduce_scatter_init_c(sendbuf, recvbuf, recvcounts, datatype, op, comm, info, request) -$(_doc_external(:MPI_Isendrecv_replace_c)) +$(_doc_external(:MPI_Reduce_scatter_init_c)) """ -function MPI_Isendrecv_replace_c(buf, count, datatype, dest, sendtag, source, recvtag, comm, request) - @mpichk ccall((:MPI_Isendrecv_replace_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, Cint, Cint, MPI_Comm, Ptr{MPI_Request}), buf, count, datatype, dest, sendtag, source, recvtag, comm, request) +function MPI_Reduce_scatter_init_c(sendbuf, recvbuf, recvcounts, datatype, op, comm, info, request) + @mpichk ccall((:MPI_Reduce_scatter_init_c, libmpi), Cint, (MPIPtr, MPIPtr, Ptr{MPI_Count}, MPI_Datatype, MPI_Op, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, recvbuf, recvcounts, datatype, op, comm, info, request) v"4.0.0" fallback=MPI_Reduce_scatter_init end """ - MPI_Issend_c(buf, count, datatype, dest, tag, comm, request) + MPI_Scan_c(sendbuf, recvbuf, count, datatype, op, comm) -$(_doc_external(:MPI_Issend_c)) +$(_doc_external(:MPI_Scan_c)) """ -function MPI_Issend_c(buf, count, datatype, dest, tag, comm, request) - @mpichk ccall((:MPI_Issend_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, MPI_Comm, Ptr{MPI_Request}), buf, count, datatype, dest, tag, comm, request) +function MPI_Scan_c(sendbuf, recvbuf, count, datatype, op, comm) + @mpichk ccall((:MPI_Scan_c, libmpi), Cint, (MPIPtr, MPIPtr, MPI_Count, MPI_Datatype, MPI_Op, MPI_Comm), sendbuf, recvbuf, count, datatype, op, comm) v"4.0.0" fallback=MPI_Scan end """ - MPI_Mrecv_c(buf, count, datatype, message, status) + MPI_Scan_init_c(sendbuf, recvbuf, count, datatype, op, comm, info, request) -$(_doc_external(:MPI_Mrecv_c)) +$(_doc_external(:MPI_Scan_init_c)) """ -function MPI_Mrecv_c(buf, count, datatype, message, status) - @mpichk ccall((:MPI_Mrecv_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Message}, Ptr{MPI_Status}), buf, count, datatype, message, status) +function MPI_Scan_init_c(sendbuf, recvbuf, count, datatype, op, comm, info, request) + @mpichk ccall((:MPI_Scan_init_c, libmpi), Cint, (MPIPtr, MPIPtr, MPI_Count, MPI_Datatype, MPI_Op, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, recvbuf, count, datatype, op, comm, info, request) v"4.0.0" fallback=MPI_Scan_init end """ - MPI_Recv_c(buf, count, datatype, source, tag, comm, status) + MPI_Scatter_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm) -$(_doc_external(:MPI_Recv_c)) +$(_doc_external(:MPI_Scatter_c)) """ -function MPI_Recv_c(buf, count, datatype, source, tag, comm, status) - @mpichk ccall((:MPI_Recv_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, MPI_Comm, Ptr{MPI_Status}), buf, count, datatype, source, tag, comm, status) +function MPI_Scatter_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm) + @mpichk ccall((:MPI_Scatter_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Comm), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm) v"4.0.0" fallback=MPI_Scatter end """ - MPI_Recv_init_c(buf, count, datatype, source, tag, comm, request) + MPI_Scatter_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request) -$(_doc_external(:MPI_Recv_init_c)) +$(_doc_external(:MPI_Scatter_init_c)) """ -function MPI_Recv_init_c(buf, count, datatype, source, tag, comm, request) - @mpichk ccall((:MPI_Recv_init_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, MPI_Comm, Ptr{MPI_Request}), buf, count, datatype, source, tag, comm, request) +function MPI_Scatter_init_c(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request) + @mpichk ccall((:MPI_Scatter_init_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request) v"4.0.0" fallback=MPI_Scatter_init end """ - MPI_Rsend_c(buf, count, datatype, dest, tag, comm) + MPI_Scatterv_c(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm) -$(_doc_external(:MPI_Rsend_c)) +$(_doc_external(:MPI_Scatterv_c)) """ -function MPI_Rsend_c(buf, count, datatype, dest, tag, comm) - @mpichk ccall((:MPI_Rsend_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, MPI_Comm), buf, count, datatype, dest, tag, comm) +function MPI_Scatterv_c(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm) + @mpichk ccall((:MPI_Scatterv_c, libmpi), Cint, (MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Comm), sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm) v"4.0.0" fallback=MPI_Scatterv end """ - MPI_Rsend_init_c(buf, count, datatype, dest, tag, comm, request) + MPI_Scatterv_init_c(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request) -$(_doc_external(:MPI_Rsend_init_c)) +$(_doc_external(:MPI_Scatterv_init_c)) """ -function MPI_Rsend_init_c(buf, count, datatype, dest, tag, comm, request) - @mpichk ccall((:MPI_Rsend_init_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, MPI_Comm, Ptr{MPI_Request}), buf, count, datatype, dest, tag, comm, request) +function MPI_Scatterv_init_c(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request) + @mpichk ccall((:MPI_Scatterv_init_c, libmpi), Cint, (MPIPtr, Ptr{MPI_Count}, Ptr{MPI_Aint}, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Comm, MPI_Info, Ptr{MPI_Request}), sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request) v"4.0.0" fallback=MPI_Scatterv_init end """ - MPI_Send_c(buf, count, datatype, dest, tag, comm) + MPI_Get_count_c(status, datatype, count) -$(_doc_external(:MPI_Send_c)) +$(_doc_external(:MPI_Get_count_c)) """ -function MPI_Send_c(buf, count, datatype, dest, tag, comm) - @mpichk ccall((:MPI_Send_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, MPI_Comm), buf, count, datatype, dest, tag, comm) +function MPI_Get_count_c(status, datatype, count) + @mpichk ccall((:MPI_Get_count_c, libmpi), Cint, (Ptr{MPI_Status}, MPI_Datatype, Ptr{MPI_Count}), status, datatype, count) v"4.0.0" fallback=MPI_Get_count end """ - MPI_Send_init_c(buf, count, datatype, dest, tag, comm, request) + MPI_Get_elements_c(status, datatype, count) -$(_doc_external(:MPI_Send_init_c)) +$(_doc_external(:MPI_Get_elements_c)) """ -function MPI_Send_init_c(buf, count, datatype, dest, tag, comm, request) - @mpichk ccall((:MPI_Send_init_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, MPI_Comm, Ptr{MPI_Request}), buf, count, datatype, dest, tag, comm, request) +function MPI_Get_elements_c(status, datatype, count) + @mpichk ccall((:MPI_Get_elements_c, libmpi), Cint, (Ptr{MPI_Status}, MPI_Datatype, Ptr{MPI_Count}), status, datatype, count) v"4.0.0" fallback=MPI_Get_elements end """ - MPI_Sendrecv_c(sendbuf, sendcount, sendtype, dest, sendtag, recvbuf, recvcount, recvtype, source, recvtag, comm, status) + MPI_Pack_c(inbuf, incount, datatype, outbuf, outsize, position, comm) -$(_doc_external(:MPI_Sendrecv_c)) +$(_doc_external(:MPI_Pack_c)) """ -function MPI_Sendrecv_c(sendbuf, sendcount, sendtype, dest, sendtag, recvbuf, recvcount, recvtype, source, recvtag, comm, status) - @mpichk ccall((:MPI_Sendrecv_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, MPI_Comm, Ptr{MPI_Status}), sendbuf, sendcount, sendtype, dest, sendtag, recvbuf, recvcount, recvtype, source, recvtag, comm, status) +function MPI_Pack_c(inbuf, incount, datatype, outbuf, outsize, position, comm) + @mpichk ccall((:MPI_Pack_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, Ptr{MPI_Count}, MPI_Comm), inbuf, incount, datatype, outbuf, outsize, position, comm) v"4.0.0" fallback=MPI_Pack end """ - MPI_Sendrecv_replace_c(buf, count, datatype, dest, sendtag, source, recvtag, comm, status) + MPI_Pack_external_c(datarep, inbuf, incount, datatype, outbuf, outsize, position) -$(_doc_external(:MPI_Sendrecv_replace_c)) +$(_doc_external(:MPI_Pack_external_c)) """ -function MPI_Sendrecv_replace_c(buf, count, datatype, dest, sendtag, source, recvtag, comm, status) - @mpichk ccall((:MPI_Sendrecv_replace_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, Cint, Cint, MPI_Comm, Ptr{MPI_Status}), buf, count, datatype, dest, sendtag, source, recvtag, comm, status) +function MPI_Pack_external_c(datarep, inbuf, incount, datatype, outbuf, outsize, position) + @mpichk ccall((:MPI_Pack_external_c, libmpi), Cint, (Ptr{Cchar}, MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, Ptr{MPI_Count}), datarep, inbuf, incount, datatype, outbuf, outsize, position) v"4.0.0" fallback=MPI_Pack_external end """ - MPI_Ssend_c(buf, count, datatype, dest, tag, comm) + MPI_Pack_external_size_c(datarep, incount, datatype, size) -$(_doc_external(:MPI_Ssend_c)) +$(_doc_external(:MPI_Pack_external_size_c)) """ -function MPI_Ssend_c(buf, count, datatype, dest, tag, comm) - @mpichk ccall((:MPI_Ssend_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, MPI_Comm), buf, count, datatype, dest, tag, comm) +function MPI_Pack_external_size_c(datarep, incount, datatype, size) + @mpichk ccall((:MPI_Pack_external_size_c, libmpi), Cint, (Ptr{Cchar}, MPI_Count, MPI_Datatype, Ptr{MPI_Count}), datarep, incount, datatype, size) v"4.0.0" fallback=MPI_Pack_external_size end """ - MPI_Ssend_init_c(buf, count, datatype, dest, tag, comm, request) + MPI_Pack_size_c(incount, datatype, comm, size) -$(_doc_external(:MPI_Ssend_init_c)) +$(_doc_external(:MPI_Pack_size_c)) """ -function MPI_Ssend_init_c(buf, count, datatype, dest, tag, comm, request) - @mpichk ccall((:MPI_Ssend_init_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, MPI_Comm, Ptr{MPI_Request}), buf, count, datatype, dest, tag, comm, request) +function MPI_Pack_size_c(incount, datatype, comm, size) + @mpichk ccall((:MPI_Pack_size_c, libmpi), Cint, (MPI_Count, MPI_Datatype, MPI_Comm, Ptr{MPI_Count}), incount, datatype, comm, size) v"4.0.0" fallback=MPI_Pack_size end """ - MPI_Accumulate_c(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, op, win) + MPI_Status_set_elements_c(status, datatype, count) -$(_doc_external(:MPI_Accumulate_c)) +$(_doc_external(:MPI_Status_set_elements_c)) """ -function MPI_Accumulate_c(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, op, win) - @mpichk ccall((:MPI_Accumulate_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Aint, MPI_Count, MPI_Datatype, MPI_Op, MPI_Win), origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, op, win) +function MPI_Status_set_elements_c(status, datatype, count) + @mpichk ccall((:MPI_Status_set_elements_c, libmpi), Cint, (Ptr{MPI_Status}, MPI_Datatype, MPI_Count), status, datatype, count) v"4.0.0" fallback=MPI_Status_set_elements end """ - MPI_Get_c(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win) + MPI_Type_contiguous_c(count, oldtype, newtype) -$(_doc_external(:MPI_Get_c)) +$(_doc_external(:MPI_Type_contiguous_c)) """ -function MPI_Get_c(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win) - @mpichk ccall((:MPI_Get_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Aint, MPI_Count, MPI_Datatype, MPI_Win), origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win) +function MPI_Type_contiguous_c(count, oldtype, newtype) + @mpichk ccall((:MPI_Type_contiguous_c, libmpi), Cint, (MPI_Count, MPI_Datatype, Ptr{MPI_Datatype}), count, oldtype, newtype) v"4.0.0" fallback=MPI_Type_contiguous end """ - 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) + MPI_Type_create_darray_c(size, rank, ndims, array_of_gsizes, array_of_distribs, array_of_dargs, array_of_psizes, order, oldtype, newtype) -$(_doc_external(:MPI_Get_accumulate_c)) +$(_doc_external(:MPI_Type_create_darray_c)) """ -function 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) - @mpichk ccall((:MPI_Get_accumulate_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Aint, MPI_Count, MPI_Datatype, MPI_Op, MPI_Win), origin_addr, origin_count, origin_datatype, result_addr, result_count, result_datatype, target_rank, target_disp, target_count, target_datatype, op, win) +function MPI_Type_create_darray_c(size, rank, ndims, array_of_gsizes, array_of_distribs, array_of_dargs, array_of_psizes, order, oldtype, newtype) + @mpichk ccall((:MPI_Type_create_darray_c, libmpi), Cint, (Cint, Cint, Cint, Ptr{MPI_Count}, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}, Cint, MPI_Datatype, Ptr{MPI_Datatype}), size, rank, ndims, array_of_gsizes, array_of_distribs, array_of_dargs, array_of_psizes, order, oldtype, newtype) v"4.0.0" fallback=MPI_Type_create_darray end """ - MPI_Put_c(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win) + MPI_Type_create_hindexed_c(count, array_of_blocklengths, array_of_displacements, oldtype, newtype) -$(_doc_external(:MPI_Put_c)) +$(_doc_external(:MPI_Type_create_hindexed_c)) """ -function MPI_Put_c(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win) - @mpichk ccall((:MPI_Put_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Aint, MPI_Count, MPI_Datatype, MPI_Win), origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win) +function MPI_Type_create_hindexed_c(count, array_of_blocklengths, array_of_displacements, oldtype, newtype) + @mpichk ccall((:MPI_Type_create_hindexed_c, libmpi), Cint, (MPI_Count, Ptr{MPI_Count}, Ptr{MPI_Count}, MPI_Datatype, Ptr{MPI_Datatype}), count, array_of_blocklengths, array_of_displacements, oldtype, newtype) v"4.0.0" fallback=MPI_Type_create_hindexed end """ - MPI_Raccumulate_c(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, op, win, request) + MPI_Type_create_hindexed_block_c(count, blocklength, array_of_displacements, oldtype, newtype) -$(_doc_external(:MPI_Raccumulate_c)) +$(_doc_external(:MPI_Type_create_hindexed_block_c)) """ -function MPI_Raccumulate_c(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, op, win, request) - @mpichk ccall((:MPI_Raccumulate_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Aint, MPI_Count, MPI_Datatype, MPI_Op, MPI_Win, Ptr{MPI_Request}), origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, op, win, request) +function MPI_Type_create_hindexed_block_c(count, blocklength, array_of_displacements, oldtype, newtype) + @mpichk ccall((:MPI_Type_create_hindexed_block_c, libmpi), Cint, (MPI_Count, MPI_Count, Ptr{MPI_Count}, MPI_Datatype, Ptr{MPI_Datatype}), count, blocklength, array_of_displacements, oldtype, newtype) v"4.0.0" fallback=MPI_Type_create_hindexed_block end """ - MPI_Rget_c(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win, request) + MPI_Type_create_hvector_c(count, blocklength, stride, oldtype, newtype) -$(_doc_external(:MPI_Rget_c)) +$(_doc_external(:MPI_Type_create_hvector_c)) """ -function MPI_Rget_c(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win, request) - @mpichk ccall((:MPI_Rget_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Aint, MPI_Count, MPI_Datatype, MPI_Win, Ptr{MPI_Request}), origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win, request) +function MPI_Type_create_hvector_c(count, blocklength, stride, oldtype, newtype) + @mpichk ccall((:MPI_Type_create_hvector_c, libmpi), Cint, (MPI_Count, MPI_Count, MPI_Count, MPI_Datatype, Ptr{MPI_Datatype}), count, blocklength, stride, oldtype, newtype) v"4.0.0" fallback=MPI_Type_create_hvector end """ - 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) + MPI_Type_create_indexed_block_c(count, blocklength, array_of_displacements, oldtype, newtype) -$(_doc_external(:MPI_Rget_accumulate_c)) +$(_doc_external(:MPI_Type_create_indexed_block_c)) """ -function 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) - @mpichk ccall((:MPI_Rget_accumulate_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Aint, MPI_Count, MPI_Datatype, MPI_Op, MPI_Win, Ptr{MPI_Request}), origin_addr, origin_count, origin_datatype, result_addr, result_count, result_datatype, target_rank, target_disp, target_count, target_datatype, op, win, request) +function MPI_Type_create_indexed_block_c(count, blocklength, array_of_displacements, oldtype, newtype) + @mpichk ccall((:MPI_Type_create_indexed_block_c, libmpi), Cint, (MPI_Count, MPI_Count, Ptr{MPI_Count}, MPI_Datatype, Ptr{MPI_Datatype}), count, blocklength, array_of_displacements, oldtype, newtype) v"4.0.0" fallback=MPI_Type_create_indexed_block end """ - MPI_Rput_c(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win, request) + MPI_Type_create_resized_c(oldtype, lb, extent, newtype) -$(_doc_external(:MPI_Rput_c)) +$(_doc_external(:MPI_Type_create_resized_c)) """ -function MPI_Rput_c(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win, request) - @mpichk ccall((:MPI_Rput_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Aint, MPI_Count, MPI_Datatype, MPI_Win, Ptr{MPI_Request}), origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win, request) +function MPI_Type_create_resized_c(oldtype, lb, extent, newtype) + @mpichk ccall((:MPI_Type_create_resized_c, libmpi), Cint, (MPI_Datatype, MPI_Count, MPI_Count, Ptr{MPI_Datatype}), oldtype, lb, extent, newtype) v"4.0.0" fallback=MPI_Type_create_resized end """ - MPI_Win_allocate_c(size, disp_unit, info, comm, baseptr, win) + MPI_Type_create_struct_c(count, array_of_blocklengths, array_of_displacements, array_of_types, newtype) -$(_doc_external(:MPI_Win_allocate_c)) +$(_doc_external(:MPI_Type_create_struct_c)) """ -function MPI_Win_allocate_c(size, disp_unit, info, comm, baseptr, win) - @mpichk ccall((:MPI_Win_allocate_c, libmpi), Cint, (MPI_Aint, MPI_Aint, MPI_Info, MPI_Comm, MPIPtr, Ptr{MPI_Win}), size, disp_unit, info, comm, baseptr, win) +function MPI_Type_create_struct_c(count, array_of_blocklengths, array_of_displacements, array_of_types, newtype) + @mpichk ccall((:MPI_Type_create_struct_c, libmpi), Cint, (MPI_Count, Ptr{MPI_Count}, Ptr{MPI_Count}, Ptr{MPI_Datatype}, Ptr{MPI_Datatype}), count, array_of_blocklengths, array_of_displacements, array_of_types, newtype) v"4.0.0" fallback=MPI_Type_create_struct end """ - MPI_Win_allocate_shared_c(size, disp_unit, info, comm, baseptr, win) + MPI_Type_create_subarray_c(ndims, array_of_sizes, array_of_subsizes, array_of_starts, order, oldtype, newtype) -$(_doc_external(:MPI_Win_allocate_shared_c)) +$(_doc_external(:MPI_Type_create_subarray_c)) """ -function MPI_Win_allocate_shared_c(size, disp_unit, info, comm, baseptr, win) - @mpichk ccall((:MPI_Win_allocate_shared_c, libmpi), Cint, (MPI_Aint, MPI_Aint, MPI_Info, MPI_Comm, MPIPtr, Ptr{MPI_Win}), size, disp_unit, info, comm, baseptr, win) +function MPI_Type_create_subarray_c(ndims, array_of_sizes, array_of_subsizes, array_of_starts, order, oldtype, newtype) + @mpichk ccall((:MPI_Type_create_subarray_c, libmpi), Cint, (Cint, Ptr{MPI_Count}, Ptr{MPI_Count}, Ptr{MPI_Count}, Cint, MPI_Datatype, Ptr{MPI_Datatype}), ndims, array_of_sizes, array_of_subsizes, array_of_starts, order, oldtype, newtype) v"4.0.0" fallback=MPI_Type_create_subarray end """ - MPI_Win_create_c(base, size, disp_unit, info, comm, win) + MPI_Type_get_contents_c(datatype, max_integers, max_addresses, max_large_counts, max_datatypes, array_of_integers, array_of_addresses, array_of_large_counts, array_of_datatypes) -$(_doc_external(:MPI_Win_create_c)) +$(_doc_external(:MPI_Type_get_contents_c)) """ -function MPI_Win_create_c(base, size, disp_unit, info, comm, win) - @mpichk ccall((:MPI_Win_create_c, libmpi), Cint, (MPIPtr, MPI_Aint, MPI_Aint, MPI_Info, MPI_Comm, Ptr{MPI_Win}), base, size, disp_unit, info, comm, win) +function MPI_Type_get_contents_c(datatype, max_integers, max_addresses, max_large_counts, max_datatypes, array_of_integers, array_of_addresses, array_of_large_counts, array_of_datatypes) + @mpichk ccall((:MPI_Type_get_contents_c, libmpi), Cint, (MPI_Datatype, MPI_Count, MPI_Count, MPI_Count, MPI_Count, Ptr{Cint}, Ptr{MPI_Aint}, Ptr{MPI_Count}, Ptr{MPI_Datatype}), datatype, max_integers, max_addresses, max_large_counts, max_datatypes, array_of_integers, array_of_addresses, array_of_large_counts, array_of_datatypes) v"4.0.0" fallback=MPI_Type_get_contents end """ - MPI_Win_shared_query_c(win, rank, size, disp_unit, baseptr) + MPI_Type_get_envelope_c(datatype, num_integers, num_addresses, num_large_counts, num_datatypes, combiner) -$(_doc_external(:MPI_Win_shared_query_c)) +$(_doc_external(:MPI_Type_get_envelope_c)) """ -function MPI_Win_shared_query_c(win, rank, size, disp_unit, baseptr) - @mpichk ccall((:MPI_Win_shared_query_c, libmpi), Cint, (MPI_Win, Cint, Ptr{MPI_Aint}, Ptr{MPI_Aint}, MPIPtr), win, rank, size, disp_unit, baseptr) +function MPI_Type_get_envelope_c(datatype, num_integers, num_addresses, num_large_counts, num_datatypes, combiner) + @mpichk ccall((:MPI_Type_get_envelope_c, libmpi), Cint, (MPI_Datatype, Ptr{MPI_Count}, Ptr{MPI_Count}, Ptr{MPI_Count}, Ptr{MPI_Count}, Ptr{Cint}), datatype, num_integers, num_addresses, num_large_counts, num_datatypes, combiner) v"4.0.0" fallback=MPI_Type_get_envelope end """ - MPI_File_open(comm, filename, amode, info, fh) + MPI_Type_get_extent_c(datatype, lb, extent) -$(_doc_external(:MPI_File_open)) +$(_doc_external(:MPI_Type_get_extent_c)) """ -function MPI_File_open(comm, filename, amode, info, fh) - @mpichk ccall((:MPI_File_open, libmpi), Cint, (MPI_Comm, Ptr{Cchar}, Cint, MPI_Info, Ptr{MPI_File}), comm, filename, amode, info, fh) +function MPI_Type_get_extent_c(datatype, lb, extent) + @mpichk ccall((:MPI_Type_get_extent_c, libmpi), Cint, (MPI_Datatype, Ptr{MPI_Count}, Ptr{MPI_Count}), datatype, lb, extent) v"4.0.0" fallback=MPI_Type_get_extent end """ - MPI_File_close(fh) + MPI_Type_get_true_extent_c(datatype, true_lb, true_extent) -$(_doc_external(:MPI_File_close)) +$(_doc_external(:MPI_Type_get_true_extent_c)) """ -function MPI_File_close(fh) - @mpichk ccall((:MPI_File_close, libmpi), Cint, (Ptr{MPI_File},), fh) +function MPI_Type_get_true_extent_c(datatype, true_lb, true_extent) + @mpichk ccall((:MPI_Type_get_true_extent_c, libmpi), Cint, (MPI_Datatype, Ptr{MPI_Count}, Ptr{MPI_Count}), datatype, true_lb, true_extent) v"4.0.0" fallback=MPI_Type_get_true_extent end """ - MPI_File_delete(filename, info) + MPI_Type_indexed_c(count, array_of_blocklengths, array_of_displacements, oldtype, newtype) -$(_doc_external(:MPI_File_delete)) +$(_doc_external(:MPI_Type_indexed_c)) """ -function MPI_File_delete(filename, info) - @mpichk ccall((:MPI_File_delete, libmpi), Cint, (Ptr{Cchar}, MPI_Info), filename, info) +function MPI_Type_indexed_c(count, array_of_blocklengths, array_of_displacements, oldtype, newtype) + @mpichk ccall((:MPI_Type_indexed_c, libmpi), Cint, (MPI_Count, Ptr{MPI_Count}, Ptr{MPI_Count}, MPI_Datatype, Ptr{MPI_Datatype}), count, array_of_blocklengths, array_of_displacements, oldtype, newtype) v"4.0.0" fallback=MPI_Type_indexed end """ - MPI_File_set_size(fh, size) + MPI_Type_size_c(datatype, size) -$(_doc_external(:MPI_File_set_size)) +$(_doc_external(:MPI_Type_size_c)) """ -function MPI_File_set_size(fh, size) - @mpichk ccall((:MPI_File_set_size, libmpi), Cint, (MPI_File, MPI_Offset), fh, size) +function MPI_Type_size_c(datatype, size) + @mpichk ccall((:MPI_Type_size_c, libmpi), Cint, (MPI_Datatype, Ptr{MPI_Count}), datatype, size) v"4.0.0" fallback=MPI_Type_size end """ - MPI_File_preallocate(fh, size) + MPI_Type_vector_c(count, blocklength, stride, oldtype, newtype) -$(_doc_external(:MPI_File_preallocate)) +$(_doc_external(:MPI_Type_vector_c)) """ -function MPI_File_preallocate(fh, size) - @mpichk ccall((:MPI_File_preallocate, libmpi), Cint, (MPI_File, MPI_Offset), fh, size) +function MPI_Type_vector_c(count, blocklength, stride, oldtype, newtype) + @mpichk ccall((:MPI_Type_vector_c, libmpi), Cint, (MPI_Count, MPI_Count, MPI_Count, MPI_Datatype, Ptr{MPI_Datatype}), count, blocklength, stride, oldtype, newtype) v"4.0.0" fallback=MPI_Type_vector end """ - MPI_File_get_size(fh, size) + MPI_Unpack_c(inbuf, insize, position, outbuf, outcount, datatype, comm) -$(_doc_external(:MPI_File_get_size)) +$(_doc_external(:MPI_Unpack_c)) """ -function MPI_File_get_size(fh, size) - @mpichk ccall((:MPI_File_get_size, libmpi), Cint, (MPI_File, Ptr{MPI_Offset}), fh, size) +function MPI_Unpack_c(inbuf, insize, position, outbuf, outcount, datatype, comm) + @mpichk ccall((:MPI_Unpack_c, libmpi), Cint, (MPIPtr, MPI_Count, Ptr{MPI_Count}, MPIPtr, MPI_Count, MPI_Datatype, MPI_Comm), inbuf, insize, position, outbuf, outcount, datatype, comm) v"4.0.0" fallback=MPI_Unpack end """ - MPI_File_get_group(fh, group) + MPI_Unpack_external_c(datarep, inbuf, insize, position, outbuf, outcount, datatype) -$(_doc_external(:MPI_File_get_group)) +$(_doc_external(:MPI_Unpack_external_c)) """ -function MPI_File_get_group(fh, group) - @mpichk ccall((:MPI_File_get_group, libmpi), Cint, (MPI_File, Ptr{MPI_Group}), fh, group) +function MPI_Unpack_external_c(datarep, inbuf, insize, position, outbuf, outcount, datatype) + @mpichk ccall((:MPI_Unpack_external_c, libmpi), Cint, (Ptr{Cchar}, MPIPtr, MPI_Count, Ptr{MPI_Count}, MPIPtr, MPI_Count, MPI_Datatype), datarep, inbuf, insize, position, outbuf, outcount, datatype) v"4.0.0" fallback=MPI_Unpack_external end """ - MPI_File_get_amode(fh, amode) + MPI_Op_create_c(user_fn, commute, op) -$(_doc_external(:MPI_File_get_amode)) +$(_doc_external(:MPI_Op_create_c)) """ -function MPI_File_get_amode(fh, amode) - @mpichk ccall((:MPI_File_get_amode, libmpi), Cint, (MPI_File, Ptr{Cint}), fh, amode) +function MPI_Op_create_c(user_fn, commute, op) + @mpichk ccall((:MPI_Op_create_c, libmpi), Cint, (Ptr{MPI_User_function_c}, Cint, Ptr{MPI_Op}), user_fn, commute, op) v"4.0.0" end """ - MPI_File_set_info(fh, info) + MPI_Bsend_c(buf, count, datatype, dest, tag, comm) -$(_doc_external(:MPI_File_set_info)) +$(_doc_external(:MPI_Bsend_c)) """ -function MPI_File_set_info(fh, info) - @mpichk ccall((:MPI_File_set_info, libmpi), Cint, (MPI_File, MPI_Info), fh, info) +function MPI_Bsend_c(buf, count, datatype, dest, tag, comm) + @mpichk ccall((:MPI_Bsend_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, MPI_Comm), buf, count, datatype, dest, tag, comm) v"4.0.0" fallback=MPI_Bsend end """ - MPI_File_get_info(fh, info_used) + MPI_Bsend_init_c(buf, count, datatype, dest, tag, comm, request) -$(_doc_external(:MPI_File_get_info)) +$(_doc_external(:MPI_Bsend_init_c)) """ -function MPI_File_get_info(fh, info_used) - @mpichk ccall((:MPI_File_get_info, libmpi), Cint, (MPI_File, Ptr{MPI_Info}), fh, info_used) +function MPI_Bsend_init_c(buf, count, datatype, dest, tag, comm, request) + @mpichk ccall((:MPI_Bsend_init_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, MPI_Comm, Ptr{MPI_Request}), buf, count, datatype, dest, tag, comm, request) v"4.0.0" fallback=MPI_Bsend_init end """ - MPI_File_set_view(fh, disp, etype, filetype, datarep, info) + MPI_Buffer_attach_c(buffer, size) -$(_doc_external(:MPI_File_set_view)) +$(_doc_external(:MPI_Buffer_attach_c)) """ -function MPI_File_set_view(fh, disp, etype, filetype, datarep, info) - @mpichk ccall((:MPI_File_set_view, libmpi), Cint, (MPI_File, MPI_Offset, MPI_Datatype, MPI_Datatype, Ptr{Cchar}, MPI_Info), fh, disp, etype, filetype, datarep, info) +function MPI_Buffer_attach_c(buffer, size) + @mpichk ccall((:MPI_Buffer_attach_c, libmpi), Cint, (MPIPtr, MPI_Count), buffer, size) v"4.0.0" fallback=MPI_Buffer_attach end """ - MPI_File_get_view(fh, disp, etype, filetype, datarep) + MPI_Buffer_detach_c(buffer_addr, size) -$(_doc_external(:MPI_File_get_view)) +$(_doc_external(:MPI_Buffer_detach_c)) """ -function MPI_File_get_view(fh, disp, etype, filetype, datarep) - @mpichk ccall((:MPI_File_get_view, libmpi), Cint, (MPI_File, Ptr{MPI_Offset}, Ptr{MPI_Datatype}, Ptr{MPI_Datatype}, Ptr{Cchar}), fh, disp, etype, filetype, datarep) +function MPI_Buffer_detach_c(buffer_addr, size) + @mpichk ccall((:MPI_Buffer_detach_c, libmpi), Cint, (MPIPtr, Ptr{MPI_Count}), buffer_addr, size) v"4.0.0" fallback=MPI_Buffer_detach end """ - MPI_File_read_at(fh, offset, buf, count, datatype, status) + MPI_Comm_attach_buffer_c(comm, buffer, size) -$(_doc_external(:MPI_File_read_at)) +$(_doc_external(:MPI_Comm_attach_buffer_c)) """ -function MPI_File_read_at(fh, offset, buf, count, datatype, status) - @mpichk ccall((:MPI_File_read_at, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Status}), fh, offset, buf, count, datatype, status) +function MPI_Comm_attach_buffer_c(comm, buffer, size) + @mpichk ccall((:MPI_Comm_attach_buffer_c, libmpi), Cint, (MPI_Comm, MPIPtr, MPI_Count), comm, buffer, size) v"4.1.0" fallback=MPI_Comm_attach_buffer end """ - MPI_File_read_at_all(fh, offset, buf, count, datatype, status) + MPI_Comm_detach_buffer_c(comm, buffer_addr, size) -$(_doc_external(:MPI_File_read_at_all)) +$(_doc_external(:MPI_Comm_detach_buffer_c)) """ -function MPI_File_read_at_all(fh, offset, buf, count, datatype, status) - @mpichk ccall((:MPI_File_read_at_all, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Status}), fh, offset, buf, count, datatype, status) +function MPI_Comm_detach_buffer_c(comm, buffer_addr, size) + @mpichk ccall((:MPI_Comm_detach_buffer_c, libmpi), Cint, (MPI_Comm, MPIPtr, Ptr{MPI_Count}), comm, buffer_addr, size) v"4.1.0" fallback=MPI_Comm_detach_buffer end """ - MPI_File_write_at(fh, offset, buf, count, datatype, status) + MPI_Ibsend_c(buf, count, datatype, dest, tag, comm, request) -$(_doc_external(:MPI_File_write_at)) +$(_doc_external(:MPI_Ibsend_c)) """ -function MPI_File_write_at(fh, offset, buf, count, datatype, status) - @mpichk ccall((:MPI_File_write_at, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Status}), fh, offset, buf, count, datatype, status) +function MPI_Ibsend_c(buf, count, datatype, dest, tag, comm, request) + @mpichk ccall((:MPI_Ibsend_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, MPI_Comm, Ptr{MPI_Request}), buf, count, datatype, dest, tag, comm, request) v"4.0.0" fallback=MPI_Ibsend end """ - MPI_File_write_at_all(fh, offset, buf, count, datatype, status) + MPI_Imrecv_c(buf, count, datatype, message, request) -$(_doc_external(:MPI_File_write_at_all)) +$(_doc_external(:MPI_Imrecv_c)) """ -function MPI_File_write_at_all(fh, offset, buf, count, datatype, status) - @mpichk ccall((:MPI_File_write_at_all, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Status}), fh, offset, buf, count, datatype, status) +function MPI_Imrecv_c(buf, count, datatype, message, request) + @mpichk ccall((:MPI_Imrecv_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Message}, Ptr{MPI_Request}), buf, count, datatype, message, request) v"4.0.0" fallback=MPI_Imrecv end """ - MPI_File_iread_at(fh, offset, buf, count, datatype, request) + MPI_Irecv_c(buf, count, datatype, source, tag, comm, request) -$(_doc_external(:MPI_File_iread_at)) +$(_doc_external(:MPI_Irecv_c)) """ -function MPI_File_iread_at(fh, offset, buf, count, datatype, request) - @mpichk ccall((:MPI_File_iread_at, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Request}), fh, offset, buf, count, datatype, request) +function MPI_Irecv_c(buf, count, datatype, source, tag, comm, request) + @mpichk ccall((:MPI_Irecv_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, MPI_Comm, Ptr{MPI_Request}), buf, count, datatype, source, tag, comm, request) v"4.0.0" fallback=MPI_Irecv end """ - MPI_File_iwrite_at(fh, offset, buf, count, datatype, request) + MPI_Irsend_c(buf, count, datatype, dest, tag, comm, request) -$(_doc_external(:MPI_File_iwrite_at)) +$(_doc_external(:MPI_Irsend_c)) """ -function MPI_File_iwrite_at(fh, offset, buf, count, datatype, request) - @mpichk ccall((:MPI_File_iwrite_at, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Request}), fh, offset, buf, count, datatype, request) +function MPI_Irsend_c(buf, count, datatype, dest, tag, comm, request) + @mpichk ccall((:MPI_Irsend_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, MPI_Comm, Ptr{MPI_Request}), buf, count, datatype, dest, tag, comm, request) v"4.0.0" fallback=MPI_Irsend end """ - MPI_File_read(fh, buf, count, datatype, status) + MPI_Isend_c(buf, count, datatype, dest, tag, comm, request) -$(_doc_external(:MPI_File_read)) +$(_doc_external(:MPI_Isend_c)) """ -function MPI_File_read(fh, buf, count, datatype, status) - @mpichk ccall((:MPI_File_read, libmpi), Cint, (MPI_File, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Status}), fh, buf, count, datatype, status) +function MPI_Isend_c(buf, count, datatype, dest, tag, comm, request) + @mpichk ccall((:MPI_Isend_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, MPI_Comm, Ptr{MPI_Request}), buf, count, datatype, dest, tag, comm, request) v"4.0.0" fallback=MPI_Isend end """ - MPI_File_read_all(fh, buf, count, datatype, status) + MPI_Isendrecv_c(sendbuf, sendcount, sendtype, dest, sendtag, recvbuf, recvcount, recvtype, source, recvtag, comm, request) -$(_doc_external(:MPI_File_read_all)) +$(_doc_external(:MPI_Isendrecv_c)) """ -function MPI_File_read_all(fh, buf, count, datatype, status) - @mpichk ccall((:MPI_File_read_all, libmpi), Cint, (MPI_File, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Status}), fh, buf, count, datatype, status) +function MPI_Isendrecv_c(sendbuf, sendcount, sendtype, dest, sendtag, recvbuf, recvcount, recvtype, source, recvtag, comm, request) + @mpichk ccall((:MPI_Isendrecv_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, MPI_Comm, Ptr{MPI_Request}), sendbuf, sendcount, sendtype, dest, sendtag, recvbuf, recvcount, recvtype, source, recvtag, comm, request) v"4.0.0" fallback=MPI_Isendrecv end """ - MPI_File_write(fh, buf, count, datatype, status) + MPI_Isendrecv_replace_c(buf, count, datatype, dest, sendtag, source, recvtag, comm, request) -$(_doc_external(:MPI_File_write)) +$(_doc_external(:MPI_Isendrecv_replace_c)) """ -function MPI_File_write(fh, buf, count, datatype, status) - @mpichk ccall((:MPI_File_write, libmpi), Cint, (MPI_File, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Status}), fh, buf, count, datatype, status) +function MPI_Isendrecv_replace_c(buf, count, datatype, dest, sendtag, source, recvtag, comm, request) + @mpichk ccall((:MPI_Isendrecv_replace_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, Cint, Cint, MPI_Comm, Ptr{MPI_Request}), buf, count, datatype, dest, sendtag, source, recvtag, comm, request) v"4.0.0" fallback=MPI_Isendrecv_replace end """ - MPI_File_write_all(fh, buf, count, datatype, status) + MPI_Issend_c(buf, count, datatype, dest, tag, comm, request) -$(_doc_external(:MPI_File_write_all)) +$(_doc_external(:MPI_Issend_c)) """ -function MPI_File_write_all(fh, buf, count, datatype, status) - @mpichk ccall((:MPI_File_write_all, libmpi), Cint, (MPI_File, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Status}), fh, buf, count, datatype, status) +function MPI_Issend_c(buf, count, datatype, dest, tag, comm, request) + @mpichk ccall((:MPI_Issend_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, MPI_Comm, Ptr{MPI_Request}), buf, count, datatype, dest, tag, comm, request) v"4.0.0" fallback=MPI_Issend end """ - MPI_File_iread(fh, buf, count, datatype, request) + MPI_Mrecv_c(buf, count, datatype, message, status) -$(_doc_external(:MPI_File_iread)) +$(_doc_external(:MPI_Mrecv_c)) """ -function MPI_File_iread(fh, buf, count, datatype, request) - @mpichk ccall((:MPI_File_iread, libmpi), Cint, (MPI_File, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Request}), fh, buf, count, datatype, request) +function MPI_Mrecv_c(buf, count, datatype, message, status) + @mpichk ccall((:MPI_Mrecv_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Message}, Ptr{MPI_Status}), buf, count, datatype, message, status) v"4.0.0" fallback=MPI_Mrecv end """ - MPI_File_iwrite(fh, buf, count, datatype, request) + MPI_Recv_c(buf, count, datatype, source, tag, comm, status) -$(_doc_external(:MPI_File_iwrite)) +$(_doc_external(:MPI_Recv_c)) """ -function MPI_File_iwrite(fh, buf, count, datatype, request) - @mpichk ccall((:MPI_File_iwrite, libmpi), Cint, (MPI_File, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Request}), fh, buf, count, datatype, request) +function MPI_Recv_c(buf, count, datatype, source, tag, comm, status) + @mpichk ccall((:MPI_Recv_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, MPI_Comm, Ptr{MPI_Status}), buf, count, datatype, source, tag, comm, status) v"4.0.0" fallback=MPI_Recv end """ - MPI_File_seek(fh, offset, whence) + MPI_Recv_init_c(buf, count, datatype, source, tag, comm, request) -$(_doc_external(:MPI_File_seek)) +$(_doc_external(:MPI_Recv_init_c)) """ -function MPI_File_seek(fh, offset, whence) - @mpichk ccall((:MPI_File_seek, libmpi), Cint, (MPI_File, MPI_Offset, Cint), fh, offset, whence) +function MPI_Recv_init_c(buf, count, datatype, source, tag, comm, request) + @mpichk ccall((:MPI_Recv_init_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, MPI_Comm, Ptr{MPI_Request}), buf, count, datatype, source, tag, comm, request) v"4.0.0" fallback=MPI_Recv_init end """ - MPI_File_get_position(fh, offset) + MPI_Rsend_c(buf, count, datatype, dest, tag, comm) -$(_doc_external(:MPI_File_get_position)) +$(_doc_external(:MPI_Rsend_c)) """ -function MPI_File_get_position(fh, offset) - @mpichk ccall((:MPI_File_get_position, libmpi), Cint, (MPI_File, Ptr{MPI_Offset}), fh, offset) +function MPI_Rsend_c(buf, count, datatype, dest, tag, comm) + @mpichk ccall((:MPI_Rsend_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, MPI_Comm), buf, count, datatype, dest, tag, comm) v"4.0.0" fallback=MPI_Rsend end """ - MPI_File_get_byte_offset(fh, offset, disp) + MPI_Rsend_init_c(buf, count, datatype, dest, tag, comm, request) -$(_doc_external(:MPI_File_get_byte_offset)) +$(_doc_external(:MPI_Rsend_init_c)) """ -function MPI_File_get_byte_offset(fh, offset, disp) - @mpichk ccall((:MPI_File_get_byte_offset, libmpi), Cint, (MPI_File, MPI_Offset, Ptr{MPI_Offset}), fh, offset, disp) +function MPI_Rsend_init_c(buf, count, datatype, dest, tag, comm, request) + @mpichk ccall((:MPI_Rsend_init_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, MPI_Comm, Ptr{MPI_Request}), buf, count, datatype, dest, tag, comm, request) v"4.0.0" fallback=MPI_Rsend_init end """ - MPI_File_read_shared(fh, buf, count, datatype, status) + MPI_Send_c(buf, count, datatype, dest, tag, comm) -$(_doc_external(:MPI_File_read_shared)) +$(_doc_external(:MPI_Send_c)) """ -function MPI_File_read_shared(fh, buf, count, datatype, status) - @mpichk ccall((:MPI_File_read_shared, libmpi), Cint, (MPI_File, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Status}), fh, buf, count, datatype, status) +function MPI_Send_c(buf, count, datatype, dest, tag, comm) + @mpichk ccall((:MPI_Send_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, MPI_Comm), buf, count, datatype, dest, tag, comm) v"4.0.0" fallback=MPI_Send end """ - MPI_File_write_shared(fh, buf, count, datatype, status) + MPI_Send_init_c(buf, count, datatype, dest, tag, comm, request) -$(_doc_external(:MPI_File_write_shared)) +$(_doc_external(:MPI_Send_init_c)) """ -function MPI_File_write_shared(fh, buf, count, datatype, status) - @mpichk ccall((:MPI_File_write_shared, libmpi), Cint, (MPI_File, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Status}), fh, buf, count, datatype, status) +function MPI_Send_init_c(buf, count, datatype, dest, tag, comm, request) + @mpichk ccall((:MPI_Send_init_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, MPI_Comm, Ptr{MPI_Request}), buf, count, datatype, dest, tag, comm, request) v"4.0.0" fallback=MPI_Send_init end """ - MPI_File_iread_shared(fh, buf, count, datatype, request) + MPI_Sendrecv_c(sendbuf, sendcount, sendtype, dest, sendtag, recvbuf, recvcount, recvtype, source, recvtag, comm, status) -$(_doc_external(:MPI_File_iread_shared)) +$(_doc_external(:MPI_Sendrecv_c)) """ -function MPI_File_iread_shared(fh, buf, count, datatype, request) - @mpichk ccall((:MPI_File_iread_shared, libmpi), Cint, (MPI_File, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Request}), fh, buf, count, datatype, request) +function MPI_Sendrecv_c(sendbuf, sendcount, sendtype, dest, sendtag, recvbuf, recvcount, recvtype, source, recvtag, comm, status) + @mpichk ccall((:MPI_Sendrecv_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, MPI_Comm, Ptr{MPI_Status}), sendbuf, sendcount, sendtype, dest, sendtag, recvbuf, recvcount, recvtype, source, recvtag, comm, status) v"4.0.0" fallback=MPI_Sendrecv end """ - MPI_File_iwrite_shared(fh, buf, count, datatype, request) + MPI_Sendrecv_replace_c(buf, count, datatype, dest, sendtag, source, recvtag, comm, status) -$(_doc_external(:MPI_File_iwrite_shared)) +$(_doc_external(:MPI_Sendrecv_replace_c)) """ -function MPI_File_iwrite_shared(fh, buf, count, datatype, request) - @mpichk ccall((:MPI_File_iwrite_shared, libmpi), Cint, (MPI_File, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Request}), fh, buf, count, datatype, request) +function MPI_Sendrecv_replace_c(buf, count, datatype, dest, sendtag, source, recvtag, comm, status) + @mpichk ccall((:MPI_Sendrecv_replace_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, Cint, Cint, MPI_Comm, Ptr{MPI_Status}), buf, count, datatype, dest, sendtag, source, recvtag, comm, status) v"4.0.0" fallback=MPI_Sendrecv_replace end """ - MPI_File_read_ordered(fh, buf, count, datatype, status) + MPI_Ssend_c(buf, count, datatype, dest, tag, comm) -$(_doc_external(:MPI_File_read_ordered)) +$(_doc_external(:MPI_Ssend_c)) """ -function MPI_File_read_ordered(fh, buf, count, datatype, status) - @mpichk ccall((:MPI_File_read_ordered, libmpi), Cint, (MPI_File, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Status}), fh, buf, count, datatype, status) +function MPI_Ssend_c(buf, count, datatype, dest, tag, comm) + @mpichk ccall((:MPI_Ssend_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, MPI_Comm), buf, count, datatype, dest, tag, comm) v"4.0.0" fallback=MPI_Ssend end """ - MPI_File_write_ordered(fh, buf, count, datatype, status) + MPI_Ssend_init_c(buf, count, datatype, dest, tag, comm, request) -$(_doc_external(:MPI_File_write_ordered)) +$(_doc_external(:MPI_Ssend_init_c)) """ -function MPI_File_write_ordered(fh, buf, count, datatype, status) - @mpichk ccall((:MPI_File_write_ordered, libmpi), Cint, (MPI_File, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Status}), fh, buf, count, datatype, status) +function MPI_Ssend_init_c(buf, count, datatype, dest, tag, comm, request) + @mpichk ccall((:MPI_Ssend_init_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, Cint, MPI_Comm, Ptr{MPI_Request}), buf, count, datatype, dest, tag, comm, request) v"4.0.0" fallback=MPI_Ssend_init end """ - MPI_File_seek_shared(fh, offset, whence) + MPI_Accumulate_c(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, op, win) -$(_doc_external(:MPI_File_seek_shared)) +$(_doc_external(:MPI_Accumulate_c)) """ -function MPI_File_seek_shared(fh, offset, whence) - @mpichk ccall((:MPI_File_seek_shared, libmpi), Cint, (MPI_File, MPI_Offset, Cint), fh, offset, whence) +function MPI_Accumulate_c(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, op, win) + @mpichk ccall((:MPI_Accumulate_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Aint, MPI_Count, MPI_Datatype, MPI_Op, MPI_Win), origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, op, win) v"4.0.0" fallback=MPI_Accumulate end """ - MPI_File_get_position_shared(fh, offset) + MPI_Get_c(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win) -$(_doc_external(:MPI_File_get_position_shared)) +$(_doc_external(:MPI_Get_c)) """ -function MPI_File_get_position_shared(fh, offset) - @mpichk ccall((:MPI_File_get_position_shared, libmpi), Cint, (MPI_File, Ptr{MPI_Offset}), fh, offset) +function MPI_Get_c(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win) + @mpichk ccall((:MPI_Get_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Aint, MPI_Count, MPI_Datatype, MPI_Win), origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win) v"4.0.0" fallback=MPI_Get end """ - MPI_File_read_at_all_begin(fh, offset, buf, count, datatype) + 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) -$(_doc_external(:MPI_File_read_at_all_begin)) +$(_doc_external(:MPI_Get_accumulate_c)) """ -function MPI_File_read_at_all_begin(fh, offset, buf, count, datatype) - @mpichk ccall((:MPI_File_read_at_all_begin, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, Cint, MPI_Datatype), fh, offset, buf, count, datatype) +function 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) + @mpichk ccall((:MPI_Get_accumulate_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Aint, MPI_Count, MPI_Datatype, MPI_Op, MPI_Win), origin_addr, origin_count, origin_datatype, result_addr, result_count, result_datatype, target_rank, target_disp, target_count, target_datatype, op, win) v"4.0.0" fallback=MPI_Get_accumulate end """ - MPI_File_read_at_all_end(fh, buf, status) + MPI_Put_c(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win) -$(_doc_external(:MPI_File_read_at_all_end)) +$(_doc_external(:MPI_Put_c)) """ -function MPI_File_read_at_all_end(fh, buf, status) - @mpichk ccall((:MPI_File_read_at_all_end, libmpi), Cint, (MPI_File, MPIPtr, Ptr{MPI_Status}), fh, buf, status) +function MPI_Put_c(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win) + @mpichk ccall((:MPI_Put_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Aint, MPI_Count, MPI_Datatype, MPI_Win), origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win) v"4.0.0" fallback=MPI_Put end """ - MPI_File_write_at_all_begin(fh, offset, buf, count, datatype) + MPI_Raccumulate_c(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, op, win, request) -$(_doc_external(:MPI_File_write_at_all_begin)) +$(_doc_external(:MPI_Raccumulate_c)) """ -function MPI_File_write_at_all_begin(fh, offset, buf, count, datatype) - @mpichk ccall((:MPI_File_write_at_all_begin, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, Cint, MPI_Datatype), fh, offset, buf, count, datatype) +function MPI_Raccumulate_c(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, op, win, request) + @mpichk ccall((:MPI_Raccumulate_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Aint, MPI_Count, MPI_Datatype, MPI_Op, MPI_Win, Ptr{MPI_Request}), origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, op, win, request) v"4.0.0" fallback=MPI_Raccumulate end """ - MPI_File_write_at_all_end(fh, buf, status) + MPI_Rget_c(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win, request) -$(_doc_external(:MPI_File_write_at_all_end)) +$(_doc_external(:MPI_Rget_c)) """ -function MPI_File_write_at_all_end(fh, buf, status) - @mpichk ccall((:MPI_File_write_at_all_end, libmpi), Cint, (MPI_File, MPIPtr, Ptr{MPI_Status}), fh, buf, status) +function MPI_Rget_c(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win, request) + @mpichk ccall((:MPI_Rget_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Aint, MPI_Count, MPI_Datatype, MPI_Win, Ptr{MPI_Request}), origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win, request) v"4.0.0" fallback=MPI_Rget end """ - MPI_File_read_all_begin(fh, buf, count, datatype) + 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) -$(_doc_external(:MPI_File_read_all_begin)) +$(_doc_external(:MPI_Rget_accumulate_c)) """ -function MPI_File_read_all_begin(fh, buf, count, datatype) - @mpichk ccall((:MPI_File_read_all_begin, libmpi), Cint, (MPI_File, MPIPtr, Cint, MPI_Datatype), fh, buf, count, datatype) +function 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) + @mpichk ccall((:MPI_Rget_accumulate_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Aint, MPI_Count, MPI_Datatype, MPI_Op, MPI_Win, Ptr{MPI_Request}), origin_addr, origin_count, origin_datatype, result_addr, result_count, result_datatype, target_rank, target_disp, target_count, target_datatype, op, win, request) v"4.0.0" fallback=MPI_Rget_accumulate end """ - MPI_File_read_all_end(fh, buf, status) + MPI_Rput_c(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win, request) -$(_doc_external(:MPI_File_read_all_end)) +$(_doc_external(:MPI_Rput_c)) """ -function MPI_File_read_all_end(fh, buf, status) - @mpichk ccall((:MPI_File_read_all_end, libmpi), Cint, (MPI_File, MPIPtr, Ptr{MPI_Status}), fh, buf, status) +function MPI_Rput_c(origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win, request) + @mpichk ccall((:MPI_Rput_c, libmpi), Cint, (MPIPtr, MPI_Count, MPI_Datatype, Cint, MPI_Aint, MPI_Count, MPI_Datatype, MPI_Win, Ptr{MPI_Request}), origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win, request) v"4.0.0" fallback=MPI_Rput end """ - MPI_File_write_all_begin(fh, buf, count, datatype) + MPI_Win_allocate_c(size, disp_unit, info, comm, baseptr, win) -$(_doc_external(:MPI_File_write_all_begin)) +$(_doc_external(:MPI_Win_allocate_c)) """ -function MPI_File_write_all_begin(fh, buf, count, datatype) - @mpichk ccall((:MPI_File_write_all_begin, libmpi), Cint, (MPI_File, MPIPtr, Cint, MPI_Datatype), fh, buf, count, datatype) +function MPI_Win_allocate_c(size, disp_unit, info, comm, baseptr, win) + @mpichk ccall((:MPI_Win_allocate_c, libmpi), Cint, (MPI_Aint, MPI_Aint, MPI_Info, MPI_Comm, MPIPtr, Ptr{MPI_Win}), size, disp_unit, info, comm, baseptr, win) v"4.0.0" fallback=MPI_Win_allocate end """ - MPI_File_write_all_end(fh, buf, status) + MPI_Win_allocate_shared_c(size, disp_unit, info, comm, baseptr, win) -$(_doc_external(:MPI_File_write_all_end)) +$(_doc_external(:MPI_Win_allocate_shared_c)) """ -function MPI_File_write_all_end(fh, buf, status) - @mpichk ccall((:MPI_File_write_all_end, libmpi), Cint, (MPI_File, MPIPtr, Ptr{MPI_Status}), fh, buf, status) +function MPI_Win_allocate_shared_c(size, disp_unit, info, comm, baseptr, win) + @mpichk ccall((:MPI_Win_allocate_shared_c, libmpi), Cint, (MPI_Aint, MPI_Aint, MPI_Info, MPI_Comm, MPIPtr, Ptr{MPI_Win}), size, disp_unit, info, comm, baseptr, win) v"4.0.0" fallback=MPI_Win_allocate_shared end """ - MPI_File_read_ordered_begin(fh, buf, count, datatype) + MPI_Win_create_c(base, size, disp_unit, info, comm, win) -$(_doc_external(:MPI_File_read_ordered_begin)) +$(_doc_external(:MPI_Win_create_c)) """ -function MPI_File_read_ordered_begin(fh, buf, count, datatype) - @mpichk ccall((:MPI_File_read_ordered_begin, libmpi), Cint, (MPI_File, MPIPtr, Cint, MPI_Datatype), fh, buf, count, datatype) +function MPI_Win_create_c(base, size, disp_unit, info, comm, win) + @mpichk ccall((:MPI_Win_create_c, libmpi), Cint, (MPIPtr, MPI_Aint, MPI_Aint, MPI_Info, MPI_Comm, Ptr{MPI_Win}), base, size, disp_unit, info, comm, win) v"4.0.0" fallback=MPI_Win_create end """ - MPI_File_read_ordered_end(fh, buf, status) + MPI_Win_shared_query_c(win, rank, size, disp_unit, baseptr) -$(_doc_external(:MPI_File_read_ordered_end)) +$(_doc_external(:MPI_Win_shared_query_c)) """ -function MPI_File_read_ordered_end(fh, buf, status) - @mpichk ccall((:MPI_File_read_ordered_end, libmpi), Cint, (MPI_File, MPIPtr, Ptr{MPI_Status}), fh, buf, status) +function MPI_Win_shared_query_c(win, rank, size, disp_unit, baseptr) + @mpichk ccall((:MPI_Win_shared_query_c, libmpi), Cint, (MPI_Win, Cint, Ptr{MPI_Aint}, Ptr{MPI_Aint}, MPIPtr), win, rank, size, disp_unit, baseptr) v"4.0.0" fallback=MPI_Win_shared_query end """ - MPI_File_write_ordered_begin(fh, buf, count, datatype) + MPI_File_get_type_extent_c(fh, datatype, extent) -$(_doc_external(:MPI_File_write_ordered_begin)) +$(_doc_external(:MPI_File_get_type_extent_c)) """ -function MPI_File_write_ordered_begin(fh, buf, count, datatype) - @mpichk ccall((:MPI_File_write_ordered_begin, libmpi), Cint, (MPI_File, MPIPtr, Cint, MPI_Datatype), fh, buf, count, datatype) +function MPI_File_get_type_extent_c(fh, datatype, extent) + @mpichk ccall((:MPI_File_get_type_extent_c, libmpi), Cint, (MPI_File, MPI_Datatype, Ptr{MPI_Count}), fh, datatype, extent) v"4.0.0" fallback=MPI_File_get_type_extent end """ - MPI_File_write_ordered_end(fh, buf, status) + MPI_File_iread_c(fh, buf, count, datatype, request) -$(_doc_external(:MPI_File_write_ordered_end)) +$(_doc_external(:MPI_File_iread_c)) """ -function MPI_File_write_ordered_end(fh, buf, status) - @mpichk ccall((:MPI_File_write_ordered_end, libmpi), Cint, (MPI_File, MPIPtr, Ptr{MPI_Status}), fh, buf, status) +function MPI_File_iread_c(fh, buf, count, datatype, request) + @mpichk ccall((:MPI_File_iread_c, libmpi), Cint, (MPI_File, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Request}), fh, buf, count, datatype, request) v"4.0.0" fallback=MPI_File_iread end """ - MPI_File_get_type_extent(fh, datatype, extent) + MPI_File_iread_all_c(fh, buf, count, datatype, request) -$(_doc_external(:MPI_File_get_type_extent)) +$(_doc_external(:MPI_File_iread_all_c)) """ -function MPI_File_get_type_extent(fh, datatype, extent) - @mpichk ccall((:MPI_File_get_type_extent, libmpi), Cint, (MPI_File, MPI_Datatype, Ptr{MPI_Aint}), fh, datatype, extent) +function MPI_File_iread_all_c(fh, buf, count, datatype, request) + @mpichk ccall((:MPI_File_iread_all_c, libmpi), Cint, (MPI_File, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Request}), fh, buf, count, datatype, request) v"4.0.0" fallback=MPI_File_iread_all end """ - MPI_Register_datarep(datarep, read_conversion_fn, write_conversion_fn, dtype_file_extent_fn, extra_state) + MPI_File_iread_at_c(fh, offset, buf, count, datatype, request) -$(_doc_external(:MPI_Register_datarep)) +$(_doc_external(:MPI_File_iread_at_c)) """ -function MPI_Register_datarep(datarep, read_conversion_fn, write_conversion_fn, dtype_file_extent_fn, extra_state) - @mpichk ccall((:MPI_Register_datarep, libmpi), Cint, (Ptr{Cchar}, Ptr{MPI_Datarep_conversion_function}, Ptr{MPI_Datarep_conversion_function}, Ptr{MPI_Datarep_extent_function}, MPIPtr), datarep, read_conversion_fn, write_conversion_fn, dtype_file_extent_fn, extra_state) +function MPI_File_iread_at_c(fh, offset, buf, count, datatype, request) + @mpichk ccall((:MPI_File_iread_at_c, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Request}), fh, offset, buf, count, datatype, request) v"4.0.0" fallback=MPI_File_iread_at end """ - MPI_File_set_atomicity(fh, flag) + MPI_File_iread_at_all_c(fh, offset, buf, count, datatype, request) -$(_doc_external(:MPI_File_set_atomicity)) +$(_doc_external(:MPI_File_iread_at_all_c)) """ -function MPI_File_set_atomicity(fh, flag) - @mpichk ccall((:MPI_File_set_atomicity, libmpi), Cint, (MPI_File, Cint), fh, flag) +function MPI_File_iread_at_all_c(fh, offset, buf, count, datatype, request) + @mpichk ccall((:MPI_File_iread_at_all_c, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Request}), fh, offset, buf, count, datatype, request) v"4.0.0" fallback=MPI_File_iread_at_all end """ - MPI_File_get_atomicity(fh, flag) + MPI_File_iread_shared_c(fh, buf, count, datatype, request) -$(_doc_external(:MPI_File_get_atomicity)) +$(_doc_external(:MPI_File_iread_shared_c)) """ -function MPI_File_get_atomicity(fh, flag) - @mpichk ccall((:MPI_File_get_atomicity, libmpi), Cint, (MPI_File, Ptr{Cint}), fh, flag) +function MPI_File_iread_shared_c(fh, buf, count, datatype, request) + @mpichk ccall((:MPI_File_iread_shared_c, libmpi), Cint, (MPI_File, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Request}), fh, buf, count, datatype, request) v"4.0.0" fallback=MPI_File_iread_shared end """ - MPI_File_sync(fh) + MPI_File_iwrite_c(fh, buf, count, datatype, request) -$(_doc_external(:MPI_File_sync)) +$(_doc_external(:MPI_File_iwrite_c)) """ -function MPI_File_sync(fh) - @mpichk ccall((:MPI_File_sync, libmpi), Cint, (MPI_File,), fh) +function MPI_File_iwrite_c(fh, buf, count, datatype, request) + @mpichk ccall((:MPI_File_iwrite_c, libmpi), Cint, (MPI_File, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Request}), fh, buf, count, datatype, request) v"4.0.0" fallback=MPI_File_iwrite end """ - MPI_File_iread_at_all(fh, offset, buf, count, datatype, request) + MPI_File_iwrite_all_c(fh, buf, count, datatype, request) -$(_doc_external(:MPI_File_iread_at_all)) +$(_doc_external(:MPI_File_iwrite_all_c)) """ -function MPI_File_iread_at_all(fh, offset, buf, count, datatype, request) - @mpichk ccall((:MPI_File_iread_at_all, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Request}), fh, offset, buf, count, datatype, request) +function MPI_File_iwrite_all_c(fh, buf, count, datatype, request) + @mpichk ccall((:MPI_File_iwrite_all_c, libmpi), Cint, (MPI_File, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Request}), fh, buf, count, datatype, request) v"4.0.0" fallback=MPI_File_iwrite_all end """ - MPI_File_iwrite_at_all(fh, offset, buf, count, datatype, request) + MPI_File_iwrite_at_c(fh, offset, buf, count, datatype, request) -$(_doc_external(:MPI_File_iwrite_at_all)) +$(_doc_external(:MPI_File_iwrite_at_c)) """ -function MPI_File_iwrite_at_all(fh, offset, buf, count, datatype, request) - @mpichk ccall((:MPI_File_iwrite_at_all, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Request}), fh, offset, buf, count, datatype, request) +function MPI_File_iwrite_at_c(fh, offset, buf, count, datatype, request) + @mpichk ccall((:MPI_File_iwrite_at_c, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Request}), fh, offset, buf, count, datatype, request) v"4.0.0" fallback=MPI_File_iwrite_at end """ - MPI_File_iread_all(fh, buf, count, datatype, request) + MPI_File_iwrite_at_all_c(fh, offset, buf, count, datatype, request) -$(_doc_external(:MPI_File_iread_all)) +$(_doc_external(:MPI_File_iwrite_at_all_c)) """ -function MPI_File_iread_all(fh, buf, count, datatype, request) - @mpichk ccall((:MPI_File_iread_all, libmpi), Cint, (MPI_File, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Request}), fh, buf, count, datatype, request) +function MPI_File_iwrite_at_all_c(fh, offset, buf, count, datatype, request) + @mpichk ccall((:MPI_File_iwrite_at_all_c, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Request}), fh, offset, buf, count, datatype, request) v"4.0.0" fallback=MPI_File_iwrite_at_all end """ - MPI_File_iwrite_all(fh, buf, count, datatype, request) + MPI_File_iwrite_shared_c(fh, buf, count, datatype, request) -$(_doc_external(:MPI_File_iwrite_all)) +$(_doc_external(:MPI_File_iwrite_shared_c)) """ -function MPI_File_iwrite_all(fh, buf, count, datatype, request) - @mpichk ccall((:MPI_File_iwrite_all, libmpi), Cint, (MPI_File, MPIPtr, Cint, MPI_Datatype, Ptr{MPI_Request}), fh, buf, count, datatype, request) +function MPI_File_iwrite_shared_c(fh, buf, count, datatype, request) + @mpichk ccall((:MPI_File_iwrite_shared_c, libmpi), Cint, (MPI_File, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Request}), fh, buf, count, datatype, request) v"4.0.0" fallback=MPI_File_iwrite_shared end """ @@ -4722,7 +5244,7 @@ end $(_doc_external(:MPI_File_read_c)) """ function MPI_File_read_c(fh, buf, count, datatype, status) - @mpichk ccall((:MPI_File_read_c, libmpi), Cint, (MPI_File, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Status}), fh, buf, count, datatype, status) + @mpichk ccall((:MPI_File_read_c, libmpi), Cint, (MPI_File, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Status}), fh, buf, count, datatype, status) v"4.0.0" fallback=MPI_File_read end """ @@ -4731,7 +5253,7 @@ end $(_doc_external(:MPI_File_read_all_c)) """ function MPI_File_read_all_c(fh, buf, count, datatype, status) - @mpichk ccall((:MPI_File_read_all_c, libmpi), Cint, (MPI_File, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Status}), fh, buf, count, datatype, status) + @mpichk ccall((:MPI_File_read_all_c, libmpi), Cint, (MPI_File, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Status}), fh, buf, count, datatype, status) v"4.0.0" fallback=MPI_File_read_all end """ @@ -4740,7 +5262,7 @@ end $(_doc_external(:MPI_File_read_all_begin_c)) """ function MPI_File_read_all_begin_c(fh, buf, count, datatype) - @mpichk ccall((:MPI_File_read_all_begin_c, libmpi), Cint, (MPI_File, MPIPtr, MPI_Count, MPI_Datatype), fh, buf, count, datatype) + @mpichk ccall((:MPI_File_read_all_begin_c, libmpi), Cint, (MPI_File, MPIPtr, MPI_Count, MPI_Datatype), fh, buf, count, datatype) v"4.0.0" fallback=MPI_File_read_all_begin end """ @@ -4749,7 +5271,7 @@ end $(_doc_external(:MPI_File_read_at_c)) """ function MPI_File_read_at_c(fh, offset, buf, count, datatype, status) - @mpichk ccall((:MPI_File_read_at_c, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Status}), fh, offset, buf, count, datatype, status) + @mpichk ccall((:MPI_File_read_at_c, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Status}), fh, offset, buf, count, datatype, status) v"4.0.0" fallback=MPI_File_read_at end """ @@ -4758,7 +5280,7 @@ end $(_doc_external(:MPI_File_read_at_all_c)) """ function MPI_File_read_at_all_c(fh, offset, buf, count, datatype, status) - @mpichk ccall((:MPI_File_read_at_all_c, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Status}), fh, offset, buf, count, datatype, status) + @mpichk ccall((:MPI_File_read_at_all_c, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Status}), fh, offset, buf, count, datatype, status) v"4.0.0" fallback=MPI_File_read_at_all end """ @@ -4767,7 +5289,7 @@ end $(_doc_external(:MPI_File_read_at_all_begin_c)) """ function MPI_File_read_at_all_begin_c(fh, offset, buf, count, datatype) - @mpichk ccall((:MPI_File_read_at_all_begin_c, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, MPI_Count, MPI_Datatype), fh, offset, buf, count, datatype) + @mpichk ccall((:MPI_File_read_at_all_begin_c, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, MPI_Count, MPI_Datatype), fh, offset, buf, count, datatype) v"4.0.0" fallback=MPI_File_read_at_all_begin end """ @@ -4776,7 +5298,7 @@ end $(_doc_external(:MPI_File_read_ordered_c)) """ function MPI_File_read_ordered_c(fh, buf, count, datatype, status) - @mpichk ccall((:MPI_File_read_ordered_c, libmpi), Cint, (MPI_File, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Status}), fh, buf, count, datatype, status) + @mpichk ccall((:MPI_File_read_ordered_c, libmpi), Cint, (MPI_File, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Status}), fh, buf, count, datatype, status) v"4.0.0" fallback=MPI_File_read_ordered end """ @@ -4785,7 +5307,7 @@ end $(_doc_external(:MPI_File_read_ordered_begin_c)) """ function MPI_File_read_ordered_begin_c(fh, buf, count, datatype) - @mpichk ccall((:MPI_File_read_ordered_begin_c, libmpi), Cint, (MPI_File, MPIPtr, MPI_Count, MPI_Datatype), fh, buf, count, datatype) + @mpichk ccall((:MPI_File_read_ordered_begin_c, libmpi), Cint, (MPI_File, MPIPtr, MPI_Count, MPI_Datatype), fh, buf, count, datatype) v"4.0.0" fallback=MPI_File_read_ordered_begin end """ @@ -4794,7 +5316,7 @@ end $(_doc_external(:MPI_File_read_shared_c)) """ function MPI_File_read_shared_c(fh, buf, count, datatype, status) - @mpichk ccall((:MPI_File_read_shared_c, libmpi), Cint, (MPI_File, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Status}), fh, buf, count, datatype, status) + @mpichk ccall((:MPI_File_read_shared_c, libmpi), Cint, (MPI_File, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Status}), fh, buf, count, datatype, status) v"4.0.0" fallback=MPI_File_read_shared end """ @@ -4803,7 +5325,7 @@ end $(_doc_external(:MPI_File_write_c)) """ function MPI_File_write_c(fh, buf, count, datatype, status) - @mpichk ccall((:MPI_File_write_c, libmpi), Cint, (MPI_File, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Status}), fh, buf, count, datatype, status) + @mpichk ccall((:MPI_File_write_c, libmpi), Cint, (MPI_File, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Status}), fh, buf, count, datatype, status) v"4.0.0" fallback=MPI_File_write end """ @@ -4812,7 +5334,7 @@ end $(_doc_external(:MPI_File_write_all_c)) """ function MPI_File_write_all_c(fh, buf, count, datatype, status) - @mpichk ccall((:MPI_File_write_all_c, libmpi), Cint, (MPI_File, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Status}), fh, buf, count, datatype, status) + @mpichk ccall((:MPI_File_write_all_c, libmpi), Cint, (MPI_File, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Status}), fh, buf, count, datatype, status) v"4.0.0" fallback=MPI_File_write_all end """ @@ -4821,7 +5343,7 @@ end $(_doc_external(:MPI_File_write_all_begin_c)) """ function MPI_File_write_all_begin_c(fh, buf, count, datatype) - @mpichk ccall((:MPI_File_write_all_begin_c, libmpi), Cint, (MPI_File, MPIPtr, MPI_Count, MPI_Datatype), fh, buf, count, datatype) + @mpichk ccall((:MPI_File_write_all_begin_c, libmpi), Cint, (MPI_File, MPIPtr, MPI_Count, MPI_Datatype), fh, buf, count, datatype) v"4.0.0" fallback=MPI_File_write_all_begin end """ @@ -4830,7 +5352,7 @@ end $(_doc_external(:MPI_File_write_at_c)) """ function MPI_File_write_at_c(fh, offset, buf, count, datatype, status) - @mpichk ccall((:MPI_File_write_at_c, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Status}), fh, offset, buf, count, datatype, status) + @mpichk ccall((:MPI_File_write_at_c, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Status}), fh, offset, buf, count, datatype, status) v"4.0.0" fallback=MPI_File_write_at end """ @@ -4839,7 +5361,7 @@ end $(_doc_external(:MPI_File_write_at_all_c)) """ function MPI_File_write_at_all_c(fh, offset, buf, count, datatype, status) - @mpichk ccall((:MPI_File_write_at_all_c, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Status}), fh, offset, buf, count, datatype, status) + @mpichk ccall((:MPI_File_write_at_all_c, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Status}), fh, offset, buf, count, datatype, status) v"4.0.0" fallback=MPI_File_write_at_all end """ @@ -4848,7 +5370,7 @@ end $(_doc_external(:MPI_File_write_at_all_begin_c)) """ function MPI_File_write_at_all_begin_c(fh, offset, buf, count, datatype) - @mpichk ccall((:MPI_File_write_at_all_begin_c, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, MPI_Count, MPI_Datatype), fh, offset, buf, count, datatype) + @mpichk ccall((:MPI_File_write_at_all_begin_c, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, MPI_Count, MPI_Datatype), fh, offset, buf, count, datatype) v"4.0.0" fallback=MPI_File_write_at_all_begin end """ @@ -4857,7 +5379,7 @@ end $(_doc_external(:MPI_File_write_ordered_c)) """ function MPI_File_write_ordered_c(fh, buf, count, datatype, status) - @mpichk ccall((:MPI_File_write_ordered_c, libmpi), Cint, (MPI_File, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Status}), fh, buf, count, datatype, status) + @mpichk ccall((:MPI_File_write_ordered_c, libmpi), Cint, (MPI_File, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Status}), fh, buf, count, datatype, status) v"4.0.0" fallback=MPI_File_write_ordered end """ @@ -4866,7 +5388,7 @@ end $(_doc_external(:MPI_File_write_ordered_begin_c)) """ function MPI_File_write_ordered_begin_c(fh, buf, count, datatype) - @mpichk ccall((:MPI_File_write_ordered_begin_c, libmpi), Cint, (MPI_File, MPIPtr, MPI_Count, MPI_Datatype), fh, buf, count, datatype) + @mpichk ccall((:MPI_File_write_ordered_begin_c, libmpi), Cint, (MPI_File, MPIPtr, MPI_Count, MPI_Datatype), fh, buf, count, datatype) v"4.0.0" fallback=MPI_File_write_ordered_begin end """ @@ -4875,106 +5397,7 @@ end $(_doc_external(:MPI_File_write_shared_c)) """ function MPI_File_write_shared_c(fh, buf, count, datatype, status) - @mpichk ccall((:MPI_File_write_shared_c, libmpi), Cint, (MPI_File, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Status}), fh, buf, count, datatype, status) -end - -""" - MPI_File_iread_c(fh, buf, count, datatype, request) - -$(_doc_external(:MPI_File_iread_c)) -""" -function MPI_File_iread_c(fh, buf, count, datatype, request) - @mpichk ccall((:MPI_File_iread_c, libmpi), Cint, (MPI_File, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Request}), fh, buf, count, datatype, request) -end - -""" - MPI_File_iread_all_c(fh, buf, count, datatype, request) - -$(_doc_external(:MPI_File_iread_all_c)) -""" -function MPI_File_iread_all_c(fh, buf, count, datatype, request) - @mpichk ccall((:MPI_File_iread_all_c, libmpi), Cint, (MPI_File, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Request}), fh, buf, count, datatype, request) -end - -""" - MPI_File_iread_at_c(fh, offset, buf, count, datatype, request) - -$(_doc_external(:MPI_File_iread_at_c)) -""" -function MPI_File_iread_at_c(fh, offset, buf, count, datatype, request) - @mpichk ccall((:MPI_File_iread_at_c, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Request}), fh, offset, buf, count, datatype, request) -end - -""" - MPI_File_iread_at_all_c(fh, offset, buf, count, datatype, request) - -$(_doc_external(:MPI_File_iread_at_all_c)) -""" -function MPI_File_iread_at_all_c(fh, offset, buf, count, datatype, request) - @mpichk ccall((:MPI_File_iread_at_all_c, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Request}), fh, offset, buf, count, datatype, request) -end - -""" - MPI_File_iread_shared_c(fh, buf, count, datatype, request) - -$(_doc_external(:MPI_File_iread_shared_c)) -""" -function MPI_File_iread_shared_c(fh, buf, count, datatype, request) - @mpichk ccall((:MPI_File_iread_shared_c, libmpi), Cint, (MPI_File, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Request}), fh, buf, count, datatype, request) -end - -""" - MPI_File_iwrite_c(fh, buf, count, datatype, request) - -$(_doc_external(:MPI_File_iwrite_c)) -""" -function MPI_File_iwrite_c(fh, buf, count, datatype, request) - @mpichk ccall((:MPI_File_iwrite_c, libmpi), Cint, (MPI_File, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Request}), fh, buf, count, datatype, request) -end - -""" - MPI_File_iwrite_all_c(fh, buf, count, datatype, request) - -$(_doc_external(:MPI_File_iwrite_all_c)) -""" -function MPI_File_iwrite_all_c(fh, buf, count, datatype, request) - @mpichk ccall((:MPI_File_iwrite_all_c, libmpi), Cint, (MPI_File, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Request}), fh, buf, count, datatype, request) -end - -""" - MPI_File_iwrite_at_c(fh, offset, buf, count, datatype, request) - -$(_doc_external(:MPI_File_iwrite_at_c)) -""" -function MPI_File_iwrite_at_c(fh, offset, buf, count, datatype, request) - @mpichk ccall((:MPI_File_iwrite_at_c, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Request}), fh, offset, buf, count, datatype, request) -end - -""" - MPI_File_iwrite_at_all_c(fh, offset, buf, count, datatype, request) - -$(_doc_external(:MPI_File_iwrite_at_all_c)) -""" -function MPI_File_iwrite_at_all_c(fh, offset, buf, count, datatype, request) - @mpichk ccall((:MPI_File_iwrite_at_all_c, libmpi), Cint, (MPI_File, MPI_Offset, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Request}), fh, offset, buf, count, datatype, request) -end - -""" - MPI_File_iwrite_shared_c(fh, buf, count, datatype, request) - -$(_doc_external(:MPI_File_iwrite_shared_c)) -""" -function MPI_File_iwrite_shared_c(fh, buf, count, datatype, request) - @mpichk ccall((:MPI_File_iwrite_shared_c, libmpi), Cint, (MPI_File, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Request}), fh, buf, count, datatype, request) -end - -""" - MPI_File_get_type_extent_c(fh, datatype, extent) - -$(_doc_external(:MPI_File_get_type_extent_c)) -""" -function MPI_File_get_type_extent_c(fh, datatype, extent) - @mpichk ccall((:MPI_File_get_type_extent_c, libmpi), Cint, (MPI_File, MPI_Datatype, Ptr{MPI_Count}), fh, datatype, extent) + @mpichk ccall((:MPI_File_write_shared_c, libmpi), Cint, (MPI_File, MPIPtr, MPI_Count, MPI_Datatype, Ptr{MPI_Status}), fh, buf, count, datatype, status) v"4.0.0" fallback=MPI_File_write_shared end """ @@ -4983,23 +5406,5 @@ end $(_doc_external(:MPI_Register_datarep_c)) """ function MPI_Register_datarep_c(datarep, read_conversion_fn, write_conversion_fn, dtype_file_extent_fn, extra_state) - @mpichk ccall((:MPI_Register_datarep_c, libmpi), Cint, (Ptr{Cchar}, Ptr{MPI_Datarep_conversion_function_c}, Ptr{MPI_Datarep_conversion_function_c}, Ptr{MPI_Datarep_extent_function}, MPIPtr), datarep, read_conversion_fn, write_conversion_fn, dtype_file_extent_fn, extra_state) -end - -""" - MPI_File_f2c(file) - -$(_doc_external(:MPI_File_f2c)) -""" -function MPI_File_f2c(file) - @mpichk ccall((:MPI_File_f2c, libmpi), MPI_File, (MPI_Fint,), file) -end - -""" - MPI_File_c2f(file) - -$(_doc_external(:MPI_File_c2f)) -""" -function MPI_File_c2f(file) - @mpichk ccall((:MPI_File_c2f, libmpi), MPI_Fint, (MPI_File,), file) + @mpichk ccall((:MPI_Register_datarep_c, libmpi), Cint, (Ptr{Cchar}, Ptr{MPI_Datarep_conversion_function_c}, Ptr{MPI_Datarep_conversion_function_c}, Ptr{MPI_Datarep_extent_function}, MPIPtr), datarep, read_conversion_fn, write_conversion_fn, dtype_file_extent_fn, extra_state) v"4.0.0" end diff --git a/src/buffers.jl b/src/buffers.jl index 85c7329fe..f6e4f3c8f 100644 --- a/src/buffers.jl +++ b/src/buffers.jl @@ -176,30 +176,30 @@ struct Buffer{A} """the number of elements of `datatype` in the buffer. Note that this may not correspond to the number of elements in the array if derived types are used.""" - count::Cint + count::API.Count """the [`MPI.Datatype`](@ref) stored in the buffer.""" datatype::Datatype end Buffer(buf::Buffer) = buf -Buffer(data, count::Integer, datatype::Datatype) = Buffer(data, Cint(count), datatype) +Buffer(data, count::Integer, datatype::Datatype) = Buffer(data, API.Count(count), datatype) function Buffer(arr::Array) - Buffer(arr, Cint(length(arr)), Datatype(eltype(arr))) + Buffer(arr, API.Count(length(arr)), Datatype(eltype(arr))) end function Buffer(ref::Ref) - Buffer(ref, Cint(1), Datatype(eltype(ref))) + Buffer(ref, API.Count(1), Datatype(eltype(ref))) end # SubArray function Buffer(sub::Base.FastContiguousSubArray) - Buffer(sub, Cint(length(sub)), Datatype(eltype(sub))) + Buffer(sub, API.Count(length(sub)), Datatype(eltype(sub))) end function Buffer(sub::Base.FastSubArray) datatype = Types.create_vector(length(sub), 1, sub.stride1, Datatype(eltype(sub))) Types.commit!(datatype) - Buffer(sub, Cint(1), datatype) + Buffer(sub, API.Count(1), datatype) end function Buffer(sub::SubArray{T,N,P,I,false}) where {T,N,P,I<:Tuple{Vararg{Union{Base.ScalarIndex, Base.Slice, AbstractUnitRange}}}} datatype = Types.create_subarray(size(parent(sub)), @@ -207,12 +207,12 @@ function Buffer(sub::SubArray{T,N,P,I,false}) where {T,N,P,I<:Tuple{Vararg{Union map(i -> first(i)-1, sub.indices), Datatype(eltype(sub))) Types.commit!(datatype) - Buffer(parent(sub), Cint(1), datatype) + Buffer(parent(sub), API.Count(1), datatype) end # NTuple: avoid creating a new datatype if possible function Buffer(data::Ref{NTuple{N,T}}) where {N,T} - Buffer(data, Cint(N), Datatype(T)) + Buffer(data, API.Count(N), Datatype(T)) end @@ -260,17 +260,18 @@ struct UBuffer{A} data::A """The number of elements of `datatype` in each chunk.""" - count::Cint + count::API.Count """The maximum number of chunks stored in the buffer. This is used only for - validation, and can be set to `nothing` to disable checks.""" - nchunks::Union{Nothing,Cint} + validation, and can be set to `nothing` to disable checks. It is never passed to MPI, + so it is a plain `Int` rather than an MPI count type.""" + nchunks::Union{Nothing,Int} """The [`MPI.Datatype`](@ref) stored in the buffer.""" datatype::Datatype end UBuffer(data, count::Integer, nchunks::Union{Integer, Nothing}, datatype::Datatype) = - UBuffer(data, Cint(count), nchunks isa Integer ? Cint(nchunks) : nothing, datatype) + UBuffer(data, API.Count(count), nchunks isa Integer ? Int(nchunks) : nothing, datatype) function UBuffer(arr::AbstractArray, count::Integer) @assert stride(arr, 1) == 1 @@ -312,25 +313,26 @@ struct VBuffer{A} data::A """An array containing the length of each chunk.""" - counts::Vector{Cint} + counts::Vector{API.Count} - """An array containing the (0-based) displacements of each chunk.""" - displs::Vector{Cint} + """An array containing the (0-based) displacements of each chunk. Note the element + type: MPI widens counts and displacements differently, see [`MPI.API.Displ`](@ref).""" + displs::Vector{API.Displ} """The [`MPI.Datatype`](@ref) stored in the buffer.""" datatype::Datatype end VBuffer(data, counts, displs, datatype::Datatype) = - VBuffer(data, convert(Vector{Cint}, counts), - convert(Vector{Cint}, displs), datatype) + VBuffer(data, convert(Vector{API.Count}, counts), + convert(Vector{API.Displ}, displs), datatype) VBuffer(data, counts, displs) = VBuffer(data, counts, displs, Datatype(eltype(data))) function VBuffer(arr::AbstractArray, counts) @assert stride(arr,1) == 1 - counts = convert(Vector{Cint}, counts) - displs = similar(counts) - d = zero(Cint) + counts = convert(Vector{API.Count}, counts) + displs = Vector{API.Displ}(undef, length(counts)) + d = zero(API.Displ) for i in eachindex(displs) displs[i] = d d += counts[i] @@ -339,8 +341,8 @@ function VBuffer(arr::AbstractArray, counts) VBuffer(arr, counts, displs, Datatype(eltype(arr))) end -VBuffer(::Nothing) = VBuffer(nothing, Cint[], Cint[], DATATYPE_NULL) -VBuffer(::InPlace) = VBuffer(IN_PLACE, Cint[], Cint[], DATATYPE_NULL) +VBuffer(::Nothing) = VBuffer(nothing, API.Count[], API.Displ[], DATATYPE_NULL) +VBuffer(::InPlace) = VBuffer(IN_PLACE, API.Count[], API.Displ[], DATATYPE_NULL) """ @@ -376,14 +378,14 @@ struct RBuffer{S,R} """the number of elements of `datatype` in the buffer. Note that this may not correspond to the number of elements in the array if derived types are used.""" - count::Cint + count::API.Count """the [`MPI.Datatype`](@ref) stored in the buffer.""" datatype::Datatype end RBuffer(senddata, recvdata, count::Integer, datatype::Datatype) = - RBuffer(senddata, recvdata, Cint(count), datatype) + RBuffer(senddata, recvdata, API.Count(count), datatype) function RBuffer(senddata::AbstractArray{T}, recvdata::AbstractArray{T}) where {T} count = length(senddata) diff --git a/src/collective.jl b/src/collective.jl index 98d84ba13..9236ae1b0 100644 --- a/src/collective.jl +++ b/src/collective.jl @@ -53,7 +53,7 @@ Bcast!(buf, comm::Comm; root::Integer=Cint(0)) = function Bcast!(buf::Buffer, root::Integer, comm::Comm) # int MPI_Bcast(void* buffer, int count, MPI_Datatype datatype, int root, # MPI_Comm comm) - API.MPI_Bcast(buf.data, buf.count, buf.datatype, root, comm) + API.MPI_Bcast_c(buf.data, buf.count, buf.datatype, root, comm) return buf.data end function Bcast!(data, root::Integer, comm::Comm) @@ -87,7 +87,11 @@ bcast(obj, comm::Comm; root::Integer=Cint(0)) = bcast(obj, root, comm) function bcast(obj, root::Integer, comm::Comm) isroot = Comm_rank(comm) == root - count = Ref{Cint}() + # The length is itself broadcast as MPI payload, so its width is part of the wire + # format: `Int64` rather than an MPI count type, so that it does not depend on + # whether the library provides the large-count entry points. It was `Cint`, which + # capped a serialized object at 2 GiB. + count = Ref{Int64}() if isroot buf = MPI.serialize(obj) count[] = length(buf) @@ -140,8 +144,8 @@ function Scatter!(sendbuf::UBuffer, recvbuf::Buffer, root::Integer, comm::Comm) # int MPI_Scatter(const void* sendbuf, int sendcount, MPI_Datatype sendtype, # void* recvbuf, int recvcount, MPI_Datatype recvtype, int root, # MPI_Comm comm) - API.MPI_Scatter(sendbuf.data, sendbuf.count, sendbuf.datatype, - recvbuf.data, recvbuf.count, recvbuf.datatype, root, comm) + API.MPI_Scatter_c(sendbuf.data, sendbuf.count, sendbuf.datatype, + recvbuf.data, recvbuf.count, recvbuf.datatype, root, comm) return recvbuf.data end Scatter!(sendbuf::UBuffer, recvbuf, root::Integer, comm::Comm) = @@ -252,9 +256,9 @@ function Scatterv!(sendbuf::VBuffer, recvbuf::Buffer, root::Integer, comm::Comm) # 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) - API.MPI_Scatterv(sendbuf.data, sendbuf.counts, sendbuf.displs, sendbuf.datatype, - recvbuf.data, recvbuf.count, recvbuf.datatype, - root, comm) + API.MPI_Scatterv_c(sendbuf.data, sendbuf.counts, sendbuf.displs, sendbuf.datatype, + recvbuf.data, recvbuf.count, recvbuf.datatype, + root, comm) return recvbuf.data end Scatterv!(sendbuf::VBuffer, recvbuf, root::Integer, comm::Comm) = @@ -305,8 +309,8 @@ function Gather!(sendbuf::Buffer, recvbuf::UBuffer, root::Integer, comm::Comm) # int MPI_Gather(const void* sendbuf, int sendcount, MPI_Datatype sendtype, # void* recvbuf, int recvcount, MPI_Datatype recvtype, int root, # MPI_Comm comm) - API.MPI_Gather(sendbuf.data, sendbuf.count, sendbuf.datatype, - recvbuf.data, recvbuf.count, recvbuf.datatype, root, comm) + API.MPI_Gather_c(sendbuf.data, sendbuf.count, sendbuf.datatype, + recvbuf.data, recvbuf.count, recvbuf.datatype, root, comm) return recvbuf.data end Gather!(sendbuf, recvbuf::UBuffer, root::Integer, comm::Comm) = @@ -417,8 +421,8 @@ function Gatherv!(sendbuf::Buffer, recvbuf::VBuffer, root::Integer, comm::Comm) # 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) - API.MPI_Gatherv(sendbuf.data, sendbuf.count, sendbuf.datatype, - recvbuf.data, recvbuf.counts, recvbuf.displs, recvbuf.datatype, root, comm) + API.MPI_Gatherv_c(sendbuf.data, sendbuf.count, sendbuf.datatype, + recvbuf.data, recvbuf.counts, recvbuf.displs, recvbuf.datatype, root, comm) return recvbuf.data end Gatherv!(sendbuf, recvbuf::VBuffer, root::Integer, comm::Comm) = @@ -460,8 +464,8 @@ function Allgather!(sendbuf::Buffer, recvbuf::UBuffer, comm::Comm) # int MPI_Allgather(const void* sendbuf, int sendcount, # MPI_Datatype sendtype, void* recvbuf, int recvcount, # MPI_Datatype recvtype, MPI_Comm comm) - API.MPI_Allgather(sendbuf.data, sendbuf.count, sendbuf.datatype, - recvbuf.data, recvbuf.count, recvbuf.datatype, comm) + API.MPI_Allgather_c(sendbuf.data, sendbuf.count, sendbuf.datatype, + recvbuf.data, recvbuf.count, recvbuf.datatype, comm) return recvbuf.data end Allgather!(sendbuf, recvbuf::UBuffer, comm::Comm) = @@ -522,9 +526,9 @@ function Allgatherv!(sendbuf::Buffer, recvbuf::VBuffer, comm::Comm) # 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) - API.MPI_Allgatherv(sendbuf.data, sendbuf.count, sendbuf.datatype, - recvbuf.data, recvbuf.counts, recvbuf.displs, recvbuf.datatype, - comm) + API.MPI_Allgatherv_c(sendbuf.data, sendbuf.count, sendbuf.datatype, + recvbuf.data, recvbuf.counts, recvbuf.displs, recvbuf.datatype, + comm) return recvbuf.data end Allgatherv!(sendbuf, recvbuf::VBuffer, comm::Comm) = @@ -569,9 +573,9 @@ function Alltoall!(sendbuf::UBuffer, recvbuf::UBuffer, comm::Comm) # int MPI_Alltoall(const void* sendbuf, int sendcount, MPI_Datatype sendtype, # void* recvbuf, int recvcount, MPI_Datatype recvtype, # MPI_Comm comm) - API.MPI_Alltoall(sendbuf.data, sendbuf.count, sendbuf.datatype, - recvbuf.data, recvbuf.count, recvbuf.datatype, - comm) + API.MPI_Alltoall_c(sendbuf.data, sendbuf.count, sendbuf.datatype, + recvbuf.data, recvbuf.count, recvbuf.datatype, + comm) return recvbuf.data end Alltoall!(sendbuf::InPlace, recvbuf::UBuffer, comm::Comm) = @@ -628,9 +632,9 @@ function Alltoallv!(sendbuf::VBuffer, recvbuf::VBuffer, comm::Comm) # const int sdispls[], MPI_Datatype sendtype, void* recvbuf, # const int recvcounts[], const int rdispls[], # MPI_Datatype recvtype, MPI_Comm comm) - API.MPI_Alltoallv(sendbuf.data, sendbuf.counts, sendbuf.displs, sendbuf.datatype, - recvbuf.data, recvbuf.counts, recvbuf.displs, recvbuf.datatype, - comm) + API.MPI_Alltoallv_c(sendbuf.data, sendbuf.counts, sendbuf.displs, sendbuf.datatype, + recvbuf.data, recvbuf.counts, recvbuf.displs, recvbuf.datatype, + comm) return recvbuf.data end @@ -672,7 +676,7 @@ Reduce!(sendbuf, recvbuf, op, comm::Comm; root::Integer=Cint(0)) = function Reduce!(rbuf::RBuffer, op::Union{Op,MPI_Op}, root::Integer, comm::Comm) # int MPI_Reduce(const void* sendbuf, void* recvbuf, int count, # MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm) - API.MPI_Reduce(rbuf.senddata, rbuf.recvdata, rbuf.count, rbuf.datatype, op, root, comm) + API.MPI_Reduce_c(rbuf.senddata, rbuf.recvdata, rbuf.count, rbuf.datatype, op, root, comm) return rbuf.recvdata end @@ -753,7 +757,7 @@ $(_doc_external("MPI_Allreduce")) function Allreduce!(rbuf::RBuffer, op::Union{Op,MPI_Op}, comm::Comm) # int MPI_Allreduce(const void* sendbuf, void* recvbuf, int count, # MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) - API.MPI_Allreduce(rbuf.senddata, rbuf.recvdata, rbuf.count, rbuf.datatype, op, comm) + API.MPI_Allreduce_c(rbuf.senddata, rbuf.recvdata, rbuf.count, rbuf.datatype, op, comm) rbuf.recvdata end Allreduce!(rbuf::RBuffer, op, comm::Comm) = @@ -810,7 +814,7 @@ $(_doc_external("MPI_Scan")) function Scan!(rbuf::RBuffer, op::Union{Op,MPI_Op}, comm::Comm) # int MPI_Scan(const void* sendbuf, void* recvbuf, int count, # MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) - API.MPI_Scan(rbuf.senddata, rbuf.recvdata, rbuf.count, rbuf.datatype, op, comm) + API.MPI_Scan_c(rbuf.senddata, rbuf.recvdata, rbuf.count, rbuf.datatype, op, comm) rbuf.recvdata end Scan!(rbuf::RBuffer, op, comm::Comm) = Scan!(rbuf, Op(op, eltype(rbuf)), comm) @@ -867,7 +871,7 @@ $(_doc_external("MPI_Exscan")) function Exscan!(rbuf::RBuffer, op::Union{Op,MPI_Op}, comm::Comm) # int MPI_Exscan(const void* sendbuf, void* recvbuf, int count, # MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) - API.MPI_Exscan(rbuf.senddata, rbuf.recvdata, rbuf.count, rbuf.datatype, op, comm) + API.MPI_Exscan_c(rbuf.senddata, rbuf.recvdata, rbuf.count, rbuf.datatype, op, comm) rbuf.recvdata end Exscan!(rbuf::RBuffer, op, comm::Comm) = Exscan!(rbuf, Op(op, eltype(rbuf)), comm) @@ -910,9 +914,9 @@ $(_doc_external("MPI_Neighbor_alltoall")) function Neighbor_alltoall!(sendbuf::UBuffer, recvbuf::UBuffer, graph_comm::Comm) # int MPI_Neighbor_alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, # int recvcount, MPI_Datatype recvtype, MPI_Comm graph_comm) - API.MPI_Neighbor_alltoall(sendbuf.data, sendbuf.count, sendbuf.datatype, - recvbuf.data, recvbuf.count, recvbuf.datatype, - graph_comm) + API.MPI_Neighbor_alltoall_c(sendbuf.data, sendbuf.count, sendbuf.datatype, + recvbuf.data, recvbuf.count, recvbuf.datatype, + graph_comm) return recvbuf.data end @@ -941,9 +945,9 @@ function Neighbor_alltoallv!(sendbuf::VBuffer, recvbuf::VBuffer, graph_comm::Com # const int sdispls[], MPI_Datatype sendtype, void* recvbuf, # const int recvcounts[], const int rdispls[], # MPI_Datatype recvtype, MPI_Comm comm) - API.MPI_Neighbor_alltoallv(sendbuf.data, sendbuf.counts, sendbuf.displs, sendbuf.datatype, - recvbuf.data, recvbuf.counts, recvbuf.displs, recvbuf.datatype, - graph_comm) + API.MPI_Neighbor_alltoallv_c(sendbuf.data, sendbuf.counts, sendbuf.displs, sendbuf.datatype, + recvbuf.data, recvbuf.counts, recvbuf.displs, recvbuf.datatype, + graph_comm) return recvbuf.data end @@ -961,8 +965,8 @@ function Neighbor_allgather!(sendbuf::Buffer, recvbuf::UBuffer, graph_comm::Comm # int MPI_Neighbor_allgather(const void* sendbuf, int sendcount, # MPI_Datatype sendtype, void* recvbuf, int recvcount, # MPI_Datatype recvtype, MPI_Comm comm) - API.MPI_Neighbor_allgather(sendbuf.data, sendbuf.count, sendbuf.datatype, - recvbuf.data, recvbuf.count, recvbuf.datatype, graph_comm) + API.MPI_Neighbor_allgather_c(sendbuf.data, sendbuf.count, sendbuf.datatype, + recvbuf.data, recvbuf.count, recvbuf.datatype, graph_comm) return recvbuf.data end Neighbor_allgather!(sendbuf, recvbuf::UBuffer, graph_comm::Comm) = @@ -994,8 +998,8 @@ function Neighbor_allgatherv!(sendbuf::Buffer, recvbuf::VBuffer, graph_comm::Com # 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) - API.MPI_Neighbor_allgatherv(sendbuf.data, sendbuf.count, sendbuf.datatype, - recvbuf.data, recvbuf.counts, recvbuf.displs, recvbuf.datatype, graph_comm) + API.MPI_Neighbor_allgatherv_c(sendbuf.data, sendbuf.count, sendbuf.datatype, + recvbuf.data, recvbuf.counts, recvbuf.displs, recvbuf.datatype, graph_comm) return recvbuf.data end Neighbor_allgatherv!(sendbuf, recvbuf::VBuffer, graph_comm::Comm) = diff --git a/src/datatypes.jl b/src/datatypes.jl index 6540dafb5..2deed1258 100644 --- a/src/datatypes.jl +++ b/src/datatypes.jl @@ -213,8 +213,8 @@ import MPI import MPI: API, _doc_external, Datatype, MPI_Datatype, MPI_Aint, free function size(dt::Datatype) - dtsize = Ref{Cint}() - API.MPI_Type_size(dt, dtsize) + dtsize = Ref{API.Count}() + API.MPI_Type_size_c(dt, dtsize) return Int(dtsize[]) end @@ -227,12 +227,14 @@ Gets the lowerbound `lb` and the extent `extent` in bytes. $(_doc_external("MPI_Type_get_extent")) """ function extent(dt::Datatype) - lb = Ref{MPI_Aint}() - extent = Ref{MPI_Aint}() - # int MPI_Type_get_extent(MPI_Datatype datatype, MPI_Aint *lb, - # MPI_Aint *extent) - API.MPI_Type_get_extent(dt, lb, extent) - return lb[], extent[] + lb = Ref{API.TypeDispl}() + extent = Ref{API.TypeDispl}() + # int MPI_Type_get_extent_c(MPI_Datatype datatype, MPI_Count *lb, + # MPI_Count *extent) + API.MPI_Type_get_extent_c(dt, lb, extent) + # `Int` rather than the raw type, so that the return type does not depend on which + # entry point was used + return Int(lb[]), Int(extent[]) end """ @@ -251,7 +253,7 @@ function create_contiguous(count::Integer, oldtype::Datatype) end function create_contiguous!(newtype::Datatype, count::Integer, oldtype::Datatype) - API.MPI_Type_contiguous(count, oldtype, newtype) + API.MPI_Type_contiguous_c(count, oldtype, newtype) return newtype end @@ -295,7 +297,7 @@ end function create_vector!(newtype::Datatype, count::Integer, blocklength::Integer, stride::Integer, oldtype::Datatype) # int MPI_Type_vector(int count, int blocklength, int stride, # MPI_Datatype oldtype, MPI_Datatype *newtype) - API.MPI_Type_vector(count, blocklength, stride, oldtype, newtype) + API.MPI_Type_vector_c(count, blocklength, stride, oldtype, newtype) return newtype end @@ -322,9 +324,12 @@ function create_hvector(count::Integer, blocklength::Integer, stride::Integer, o finalizer(free, create_hvector!(Datatype(), count, blocklength, stride, oldtype)) end function create_hvector!(newtype::Datatype, count::Integer, blocklength::Integer, stride::Integer, oldtype::Datatype) - # int MPI_Type_create_hvector(int count, int blocklength, MPI_Aint stride, - # MPI_Datatype oldtype, MPI_Datatype *newtype) - API.MPI_Type_create_hvector(count, blocklength, MPI_Aint(stride), oldtype, newtype) + # int MPI_Type_create_hvector_c(MPI_Count count, MPI_Count blocklength, + # MPI_Count stride, MPI_Datatype oldtype, + # MPI_Datatype *newtype) + # `stride` is left unconverted so that `ccall` widens it to whichever of `MPI_Count` + # and `MPI_Aint` the entry point in use expects. + API.MPI_Type_create_hvector_c(count, blocklength, stride, oldtype, newtype) return newtype end @@ -352,9 +357,9 @@ end function create_subarray!(newtype::Datatype, sizes, subsizes, offset, oldtype::Datatype; rowmajor=false) @assert (N = length(sizes)) == length(subsizes) == length(offset) - sizes = sizes isa Vector{Cint} ? sizes : Cint[s for s in sizes] - subsizes = subsizes isa Vector{Cint} ? subsizes : Cint[s for s in subsizes] - offset = offset isa Vector{Cint} ? offset : Cint[s for s in offset] + sizes = sizes isa Vector{API.Count} ? sizes : API.Count[s for s in sizes] + subsizes = subsizes isa Vector{API.Count} ? subsizes : API.Count[s for s in subsizes] + offset = offset isa Vector{API.Count} ? offset : API.Count[s for s in offset] # int MPI_Type_create_subarray(int ndims, # const int array_of_sizes[], # const int array_of_subsizes[], @@ -362,9 +367,9 @@ function create_subarray!(newtype::Datatype, sizes, subsizes, offset, oldtype::D # int order, # MPI_Datatype oldtype, # MPI_Datatype *newtype) - API.MPI_Type_create_subarray(N, sizes, subsizes, offset, - rowmajor ? MPI.API.MPI_ORDER_C[] : MPI.API.MPI_ORDER_FORTRAN[], - oldtype, newtype) + API.MPI_Type_create_subarray_c(N, sizes, subsizes, offset, + rowmajor ? MPI.API.MPI_ORDER_C[] : MPI.API.MPI_ORDER_FORTRAN[], + oldtype, newtype) return newtype end @@ -384,8 +389,10 @@ function create_struct(blocklengths, displacements, types) end function create_struct!(newtype::Datatype, blocklengths, displacements, types) @assert (N = length(blocklengths)) == length(displacements) == length(types) - blocklengths = blocklengths isa Vector{Cint} ? blocklengths : Cint[s for s in blocklengths] - displacements = displacements isa Vector{MPI_Aint} ? displacements : MPI_Aint[s for s in displacements] + blocklengths = blocklengths isa Vector{API.Count} ? blocklengths : API.Count[s for s in blocklengths] + # note the type: MPI_Type_create_struct_c widens byte displacements to MPI_Count, + # unlike the "v" collectives which widen theirs only to MPI_Aint + displacements = displacements isa Vector{API.TypeDispl} ? displacements : API.TypeDispl[s for s in displacements] # int MPI_Type_create_struct(int count, # const int array_of_blocklengths[], # const MPI_Aint array_of_displacements[], @@ -393,7 +400,7 @@ function create_struct!(newtype::Datatype, blocklengths, displacements, types) # MPI_Datatype *newtype) GC.@preserve types begin mpi_types = [t.val for t in types] - API.MPI_Type_create_struct(N, blocklengths, displacements, mpi_types, newtype) + API.MPI_Type_create_struct_c(N, blocklengths, displacements, mpi_types, newtype) end return newtype end @@ -422,7 +429,7 @@ end function create_resized!(newtype::Datatype, oldtype::Datatype, lb::Integer, extent::Integer) # int MPI_Type_create_resized(MPI_Datatype oldtype, MPI_Aint lb, # MPI_Aint extent, MPI_Datatype *newtype) - API.MPI_Type_create_resized(oldtype, lb, extent, newtype) + API.MPI_Type_create_resized_c(oldtype, lb, extent, newtype) return newtype end @@ -458,8 +465,8 @@ end function create!(newtype::Datatype, ::Type{T}) where {T} isbitstype(T) || throw(ArgumentError("Type must be isbitstype")) - blocklengths = Cint[] - displacements = MPI_Aint[] + blocklengths = API.Count[] + displacements = API.TypeDispl[] types = Datatype[] if isprimitivetype(T) diff --git a/src/implementations.jl b/src/implementations.jl index 625fdbe84..07d4b39b3 100644 --- a/src/implementations.jl +++ b/src/implementations.jl @@ -114,6 +114,7 @@ function versioninfo(io::IO=stdout) println(io, " libmpi: ", API.libmpi) println(io, " libmpi dlpath: ", Libdl.dlpath(API.libmpi)) println(io, " MPI version: ", Get_version()) + println(io, " Large counts: ", API.HAS_LARGE_COUNT ? "yes (MPI_Count = $(API.Count))" : "no (counts are $(API.Count))") println(io, " Library version: ") for line in split(Get_library_version(), '\n') println(io, " ", line) diff --git a/src/io.jl b/src/io.jl index 826fd626e..03cf86528 100644 --- a/src/io.jl +++ b/src/io.jl @@ -164,7 +164,7 @@ function read!(file::FileHandle, buf::Buffer) stat_ref = Ref(MPI.STATUS_ZERO) # int MPI_File_read(MPI_File fh, void *buf, # int count, MPI_Datatype datatype, MPI_Status *status) - API.MPI_File_read(file, buf.data, buf.count, buf.datatype, stat_ref) + API.MPI_File_read_c(file, buf.data, buf.count, buf.datatype, stat_ref) return stat_ref[] end read!(file::FileHandle, data) = read!(file, Buffer(data)) @@ -187,7 +187,7 @@ function read_all!(file::FileHandle, buf::Buffer) stat_ref = Ref(MPI.STATUS_ZERO) # int MPI_File_read_all(MPI_File fh, void *buf, # int count, MPI_Datatype datatype, MPI_Status *status) - API.MPI_File_read_all(file, buf.data, buf.count, buf.datatype, stat_ref) + API.MPI_File_read_all_c(file, buf.data, buf.count, buf.datatype, stat_ref) return stat_ref[] end read_all!(file::FileHandle, data) = read_all!(file, Buffer(data)) @@ -209,7 +209,7 @@ function write(file::FileHandle, buf::Buffer) stat_ref = Ref(MPI.STATUS_ZERO) # int MPI_File_write(MPI_File fh, const void *buf, # int count, MPI_Datatype datatype, MPI_Status *status) - API.MPI_File_write(file, buf.data, buf.count, buf.datatype, stat_ref) + API.MPI_File_write_c(file, buf.data, buf.count, buf.datatype, stat_ref) return stat_ref[] end write(file::FileHandle, data) = write(file, Buffer_send(data)) @@ -232,7 +232,7 @@ function write_all(file::FileHandle, buf::Buffer) stat_ref = Ref(MPI.STATUS_ZERO) # int MPI_File_write_all(MPI_File fh, const void *buf, # int count, MPI_Datatype datatype, MPI_Status *status) - API.MPI_File_write_all(file, buf.data, buf.count, buf.datatype, stat_ref) + API.MPI_File_write_all_c(file, buf.data, buf.count, buf.datatype, stat_ref) return stat_ref[] end write_all(file::FileHandle, data) = write_all(file, Buffer_send(data)) @@ -255,7 +255,7 @@ function read_at!(file::FileHandle, offset::Integer, buf::Buffer) stat_ref = Ref(MPI.STATUS_ZERO) # int MPI_File_read_at(MPI_File fh, MPI_Offset offset, void *buf, int count, # MPI_Datatype datatype, MPI_Status *status) - API.MPI_File_read_at(file, offset, buf.data, buf.count, buf.datatype, stat_ref) + API.MPI_File_read_at_c(file, offset, buf.data, buf.count, buf.datatype, stat_ref) return stat_ref[] end read_at!(file::FileHandle, offset::Integer, data) = read_at!(file, offset, Buffer(data)) @@ -278,7 +278,7 @@ function read_at_all!(file::FileHandle, offset::Integer, buf::Buffer) # int MPI_File_read_at_all(MPI_File fh, MPI_Offset offset, void *buf, # int count, MPI_Datatype datatype, MPI_Status *status) - API.MPI_File_read_at_all(file, offset, buf.data, buf.count, buf.datatype, stat_ref) + API.MPI_File_read_at_all_c(file, offset, buf.data, buf.count, buf.datatype, stat_ref) return stat_ref[] end read_at_all!(file::FileHandle, offset::Integer, data) = read_at_all!(file, offset, Buffer(data)) @@ -299,7 +299,7 @@ function write_at(file::FileHandle, offset::Integer, buf::Buffer) stat_ref = Ref(MPI.STATUS_ZERO) # int MPI_File_write_at(MPI_File fh, MPI_Offset offset, const void *buf, # int count, MPI_Datatype datatype, MPI_Status *status) - API.MPI_File_write_at(file, offset, buf.data, buf.count, buf.datatype, stat_ref) + API.MPI_File_write_at_c(file, offset, buf.data, buf.count, buf.datatype, stat_ref) return stat_ref[] end write_at(file::FileHandle, offset::Integer, data) = write_at(file, offset, Buffer_send(data)) @@ -321,7 +321,7 @@ function write_at_all(file::FileHandle, offset::Integer, buf::Buffer) stat_ref = Ref(MPI.STATUS_ZERO) # int MPI_File_write_at_all(MPI_File fh, MPI_Offset offset, const void *buf, # int count, MPI_Datatype datatype, MPI_Status *status) - API.MPI_File_write_at_all(file, offset, buf.data, buf.count, buf.datatype, stat_ref) + API.MPI_File_write_at_all_c(file, offset, buf.data, buf.count, buf.datatype, stat_ref) return stat_ref[] end write_at_all(file::FileHandle, offset::Integer, data) = write_at_all(file, offset, Buffer_send(data)) @@ -344,7 +344,7 @@ function read_shared!(file::FileHandle, buf::Buffer) stat_ref = Ref(MPI.STATUS_ZERO) # int MPI_File_read_shared(MPI_File fh, void *buf, int count, # MPI_Datatype datatype, MPI_Status *status) - API.MPI_File_read_shared(file, buf.data, buf.count, buf.datatype, stat_ref) + API.MPI_File_read_shared_c(file, buf.data, buf.count, buf.datatype, stat_ref) return stat_ref[] end read_shared!(file::FileHandle, data) = read_shared!(file, Buffer(data)) @@ -365,7 +365,7 @@ function write_shared(file::FileHandle, buf::Buffer) stat_ref = Ref(MPI.STATUS_ZERO) # int MPI_File_write_shared(MPI_File fh, const void *buf, int count, # MPI_Datatype datatype, MPI_Status *status) - API.MPI_File_write_shared(file, buf.data, buf.count, buf.datatype, stat_ref) + API.MPI_File_write_shared_c(file, buf.data, buf.count, buf.datatype, stat_ref) return stat_ref[] end write_shared(file::FileHandle, buf) = write_shared(file, Buffer_send(buf)) @@ -389,7 +389,7 @@ function read_ordered!(file::FileHandle, buf::Buffer) stat_ref = Ref(MPI.STATUS_ZERO) # int MPI_File_read_ordered(MPI_File fh, void *buf, int count, # MPI_Datatype datatype, MPI_Status *status) - API.MPI_File_read_ordered(file, buf.data, buf.count, buf.datatype, stat_ref) + API.MPI_File_read_ordered_c(file, buf.data, buf.count, buf.datatype, stat_ref) return stat_ref[] end read_ordered!(file::FileHandle, data) = read_ordered!(file, Buffer(data)) @@ -412,7 +412,7 @@ function write_ordered(file::FileHandle, buf::Buffer) stat_ref = Ref(MPI.STATUS_ZERO) # int MPI_File_write_ordered(MPI_File fh, const void *buf, int count, # MPI_Datatype datatype, MPI_Status *status) - API.MPI_File_write_ordered(file, buf.data, buf.count, buf.datatype, stat_ref) + API.MPI_File_write_ordered_c(file, buf.data, buf.count, buf.datatype, stat_ref) return stat_ref[] end write_ordered(file::FileHandle, buf) = write_ordered(file, Buffer_send(buf)) diff --git a/src/nonblocking.jl b/src/nonblocking.jl index 64bddd422..d3ca8b9ae 100644 --- a/src/nonblocking.jl +++ b/src/nonblocking.jl @@ -423,8 +423,8 @@ parameter, or the number of bytes received is not a whole multiple of the size o $(_doc_external("MPI_Get_count")) """ function Get_count(stat::Status, datatype::Datatype) - count = Ref{Cint}() - API.MPI_Get_count(Ref(stat), datatype, count) + count = Ref{API.Count}() + API.MPI_Get_count_c(Ref(stat), datatype, count) # `MPI_UNDEFINED` is not a count; return `nothing` rather than let the # sentinel escape as an ordinary integer (as `Waitany` and friends do). count[] == API.MPI_UNDEFINED[] && return nothing diff --git a/src/onesided.jl b/src/onesided.jl index 74337e4fb..47df2321a 100644 --- a/src/onesided.jl +++ b/src/onesided.jl @@ -56,7 +56,7 @@ function Win_create(base, size::Integer, disp_unit::Integer, comm::Comm; infokws win = Win() # int MPI_Win_create(void *base, MPI_Aint size, int disp_unit, MPI_Info info, # MPI_Comm comm, MPI_Win *win) - API.MPI_Win_create(base, size, disp_unit, Info(infokws...), comm, win) + API.MPI_Win_create_c(base, size, disp_unit, Info(infokws...), comm, win) win.object = base finalizer(free, win) return win @@ -92,7 +92,7 @@ function Win_allocate_shared(::Type{Ptr{T}}, len::Integer, comm::Comm; kwargs... out_baseptr = Ref{Ptr{T}}() # int MPI_Win_allocate_shared(MPI_Aint size, int disp_unit, MPI_Info info, # MPI_Comm comm, void *baseptr, MPI_Win *win) - API.MPI_Win_allocate_shared(len*sizeof(T), sizeof(T), Info(kwargs...), comm, out_baseptr, win) + API.MPI_Win_allocate_shared_c(len*sizeof(T), sizeof(T), Info(kwargs...), comm, out_baseptr, win) finalizer(free, win) return win, out_baseptr[] end @@ -118,13 +118,17 @@ Win_shared_query(::Type{Array{T}}, dims, win::Win; rank) where {T} = Win_shared_query(Array{T}, dims, win, rank) function Win_shared_query(::Type{Ptr{T}}, win::Win, owner_rank::Integer) where T - out_len = Ref{Cptrdiff_t}() - out_sizeT = Ref{Cint}() + out_len = Ref{MPI_Aint}() + # `disp_unit` is an `int` in MPI_Win_shared_query but an `MPI_Aint` in the large-count + # MPI_Win_shared_query_c -- the same widening as the "v" collectives' displacements, + # hence `API.Displ`. It has to match the entry point actually in use: a `Ref` of the + # wrong width would have MPI fill only part of it. + out_sizeT = Ref{API.Displ}() out_baseptr = Ref{Ptr{T}}() - # int MPI_Win_shared_query(MPI_Win win, int rank, MPI_Aint *size, - # int *disp_unit, void *baseptr) - API.MPI_Win_shared_query(win, owner_rank, out_len, out_sizeT, out_baseptr) - out_len[], out_sizeT[], out_baseptr[] + # int MPI_Win_shared_query_c(MPI_Win win, int rank, MPI_Aint *size, + # MPI_Aint *disp_unit, void *baseptr) + API.MPI_Win_shared_query_c(win, owner_rank, out_len, out_sizeT, out_baseptr) + Int(out_len[]), Int(out_sizeT[]), out_baseptr[] end function Win_shared_query(::Type{Array{T}}, win::Win, owner_rank::Integer) where T len, sizeT, ptr = Win_shared_query(Ptr{T}, win, owner_rank) @@ -259,8 +263,8 @@ function Get!(origin_buf::Buffer, target_rank::Integer, target_disp::Integer, wi # MPI_Datatype origin_datatype, int target_rank, # MPI_Aint target_disp, int target_count, # MPI_Datatype target_datatype, MPI_Win win) - API.MPI_Get(origin_buf.data, origin_buf.count, origin_buf.datatype, - target_rank, Cptrdiff_t(target_disp), origin_buf.count, origin_buf.datatype, win) + API.MPI_Get_c(origin_buf.data, origin_buf.count, origin_buf.datatype, + target_rank, Cptrdiff_t(target_disp), origin_buf.count, origin_buf.datatype, win) end Get!(origin, target_rank::Integer, target_disp::Integer, win::Win) = Get!(Buffer(origin), target_rank, target_disp, win) @@ -285,8 +289,8 @@ function Put!(origin_buf::Buffer, target_rank::Integer, target_disp::Integer, wi # MPI_Datatype origin_datatype, int target_rank, # MPI_Aint target_disp, int target_count, # MPI_Datatype target_datatype, MPI_Win win) - API.MPI_Put(origin_buf.data, origin_buf.count, origin_buf.datatype, - target_rank, Cptrdiff_t(target_disp), origin_buf.count, origin_buf.datatype, win) + API.MPI_Put_c(origin_buf.data, origin_buf.count, origin_buf.datatype, + target_rank, Cptrdiff_t(target_disp), origin_buf.count, origin_buf.datatype, win) end Put!(origin, target_rank::Integer, target_disp::Integer, win::Win) = Put!(Buffer_send(origin), target_rank, target_disp, win) @@ -323,8 +327,8 @@ function Accumulate!(origin_buf::Buffer, target_rank::Integer, target_disp::Inte # MPI_Datatype origin_datatype, int target_rank, # MPI_Aint target_disp, int target_count, # MPI_Datatype target_datatype, MPI_Op op, MPI_Win win) - API.MPI_Accumulate(origin_buf.data, origin_buf.count, origin_buf.datatype, - target_rank, Cptrdiff_t(target_disp), origin_buf.count, origin_buf.datatype, op, win) + API.MPI_Accumulate_c(origin_buf.data, origin_buf.count, origin_buf.datatype, + target_rank, Cptrdiff_t(target_disp), origin_buf.count, origin_buf.datatype, op, win) end Accumulate!(origin, target_rank::Integer, target_disp::Integer, op::Op, win::Win) = Accumulate!(Buffer_send(origin), target_rank, target_disp, op, win) @@ -351,9 +355,9 @@ function Get_accumulate!(origin_buf::Buffer, result_buf::Buffer, target_rank::In # 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) - API.MPI_Get_accumulate(origin_buf.data, origin_buf.count, origin_buf.datatype, - result_buf.data, result_buf.count, result_buf.datatype, - target_rank, Cptrdiff_t(target_disp), origin_buf.count, origin_buf.datatype, op, win) + API.MPI_Get_accumulate_c(origin_buf.data, origin_buf.count, origin_buf.datatype, + result_buf.data, result_buf.count, result_buf.datatype, + target_rank, Cptrdiff_t(target_disp), origin_buf.count, origin_buf.datatype, op, win) end Get_accumulate!(origin, result, target_rank::Integer, target_disp::Integer, op::Op, win::Win) = Get_accumulate!(Buffer_send(origin), Buffer(result), target_rank, target_disp, op, win) diff --git a/src/pointtopoint.jl b/src/pointtopoint.jl index 110ac5f9f..a8b8ad29a 100644 --- a/src/pointtopoint.jl +++ b/src/pointtopoint.jl @@ -20,7 +20,7 @@ Send(data, comm::Comm; dest::Integer, tag::Integer=Cint(0)) = function Send(buf::Buffer, dest::Integer, tag::Integer, comm::Comm) # int MPI_Send(const void* buf, int count, MPI_Datatype datatype, int dest, # int tag, MPI_Comm comm) - API.MPI_Send(buf.data, buf.count, buf.datatype, dest, tag, comm) + API.MPI_Send_c(buf.data, buf.count, buf.datatype, dest, tag, comm) return nothing end Send(arr::Union{Ref,AbstractArray}, dest::Integer, tag::Integer, comm::Comm) = @@ -63,7 +63,7 @@ function Isend(buf::Buffer, dest::Integer, tag::Integer, comm::Comm, req::Abstra @assert isnull(req) # int MPI_Isend(const void* buf, int count, MPI_Datatype datatype, int dest, # int tag, MPI_Comm comm, MPI_Request *request) - API.MPI_Isend(buf.data, buf.count, buf.datatype, dest, tag, comm, req) + API.MPI_Isend_c(buf.data, buf.count, buf.datatype, dest, tag, comm, req) setbuffer!(req, buf) return req end @@ -111,7 +111,7 @@ Recv!(recvbuf, comm::Comm, status=nothing; source=API.MPI_ANY_SOURCE[], tag=API. function Recv!(recvbuf::Buffer, source::Integer, tag::Integer, comm::Comm, status::Union{Ref{Status},Nothing}) # int MPI_Recv(void* buf, int count, MPI_Datatype datatype, int source, # int tag, MPI_Comm comm, MPI_Status *status) - API.MPI_Recv(recvbuf.data, recvbuf.count, recvbuf.datatype, source, tag, comm, something(status, API.MPI_STATUS_IGNORE[])) + API.MPI_Recv_c(recvbuf.data, recvbuf.count, recvbuf.datatype, source, tag, comm, something(status, API.MPI_STATUS_IGNORE[])) return recvbuf.data end Recv!(recvbuf, source::Integer, tag::Integer, comm::Comm, status::Union{Ref{Status},Nothing}) = @@ -207,7 +207,7 @@ function Irecv!(buf::Buffer, source::Integer, tag::Integer, comm::Comm, req::Abs @assert isnull(req) # int MPI_Irecv(void* buf, int count, MPI_Datatype datatype, int source, # int tag, MPI_Comm comm, MPI_Request *request) - API.MPI_Irecv(buf.data, buf.count, buf.datatype, source, tag, comm, req) + API.MPI_Irecv_c(buf.data, buf.count, buf.datatype, source, tag, comm, req) setbuffer!(req, buf) return req end @@ -237,9 +237,9 @@ function Sendrecv!(sendbuf::Buffer, dest::Integer, sendtag::Integer, # 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) - API.MPI_Sendrecv(sendbuf.data, sendbuf.count, sendbuf.datatype, dest, sendtag, - recvbuf.data, recvbuf.count, recvbuf.datatype, source, recvtag, - comm, something(status, API.MPI_STATUS_IGNORE[])) + API.MPI_Sendrecv_c(sendbuf.data, sendbuf.count, sendbuf.datatype, dest, sendtag, + recvbuf.data, recvbuf.count, recvbuf.datatype, source, recvtag, + comm, something(status, API.MPI_STATUS_IGNORE[])) return recvbuf.data end Sendrecv!(sendbuf, dest::Integer, sendtag::Integer, recvbuf, source::Integer, recvtag::Integer, comm::Comm, status::Union{Ref{Status}, Nothing}) = @@ -267,7 +267,7 @@ Send_init(buf, comm::Comm, req::AbstractRequest=Request(); dest::Integer, tag::I Send_init(buf, dest, tag, comm, req) function Send_init(buf::Buffer, dest::Integer, tag::Integer, comm::Comm, req::AbstractRequest=Request()) @assert isnull(req) - API.MPI_Send_init(buf.data, buf.count, buf.datatype, dest, tag, comm, req) + API.MPI_Send_init_c(buf.data, buf.count, buf.datatype, dest, tag, comm, req) setbuffer!(req, buf) return req end @@ -289,7 +289,7 @@ Recv_init(buf, comm::Comm, req::AbstractRequest=Request(); source=API.MPI_ANY_SO Recv_init(buf, source, tag, comm, req) function Recv_init(buf::Buffer, source::Integer, tag::Integer, comm::Comm, req::AbstractRequest=Request()) @assert isnull(req) - API.MPI_Recv_init(buf.data, buf.count, buf.datatype, source, tag, comm, req) + API.MPI_Recv_init_c(buf.data, buf.count, buf.datatype, source, tag, comm, req) setbuffer!(req, buf) return req end @@ -424,7 +424,7 @@ Optionally returns the [`Status`](@ref) object of the receive. $(_doc_external("MPI_Mrecv")) """ function Mrecv!(recvbuf::Buffer, msg::Message, status::Union{Ref{Status},Nothing}=nothing) - API.MPI_Mrecv(recvbuf.data, recvbuf.count, recvbuf.datatype, msg, something(status, API.MPI_STATUS_IGNORE[])) + API.MPI_Mrecv_c(recvbuf.data, recvbuf.count, recvbuf.datatype, msg, something(status, API.MPI_STATUS_IGNORE[])) return recvbuf.data end Mrecv!(recvbuf, msg::Message, status::Union{Ref{Status},Nothing}=nothing) = @@ -450,7 +450,7 @@ $(_doc_external("MPI_Imrecv")) """ function Imrecv!(buf::Buffer, msg::Message, req::AbstractRequest=Request()) @assert isnull(req) - API.MPI_Imrecv(buf.data, buf.count, buf.datatype, msg, req) + API.MPI_Imrecv_c(buf.data, buf.count, buf.datatype, msg, req) setbuffer!(req, buf) return req end diff --git a/test/Project.toml b/test/Project.toml index b8fc09c79..5cb51585a 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -1,4 +1,5 @@ [deps] +Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" MPIPreferences = "3da0fdf6-3ccc-4f1b-acd9-58baa6c99267" Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" diff --git a/test/test_featurelevel.jl b/test/test_featurelevel.jl new file mode 100644 index 000000000..aefb67fd2 --- /dev/null +++ b/test/test_featurelevel.jl @@ -0,0 +1,105 @@ +include("common.jl") +using Libdl + +MPI.Init() + +comm = MPI.COMM_WORLD +rank = MPI.Comm_rank(comm) +nprocs = MPI.Comm_size(comm) + +has_symbol(fname) = + !isnothing(Libdl.dlsym(MPI.API.libmpi_handle, fname; throw_error=false)) + +# A procedure which the MPI library does not provide must raise `FeatureLevelError` from +# `@mpichk`, rather than failing to resolve a symbol at run time. Each entry is a thunk +# that calls the procedure with arguments valid enough to reach the `ccall`. Whether the +# call itself would succeed is not what is tested. +absent_must_throw = [ + (:MPI_Isendrecv, () -> begin + send = [rank] + recv = [0] + req = MPI.Request() + MPI.API.MPI_Isendrecv(send, 1, MPI.Datatype(Int), rank, 0, + recv, 1, MPI.Datatype(Int), rank, 0, comm, req) + end), + (:MPI_Type_get_value_index, () -> MPI.API.MPI_Type_get_value_index( + MPI.Datatype(Int), MPI.Datatype(Int), Ref(MPI.DATATYPE_NULL.val))), + (:MPI_Abi_get_version, () -> MPI.API.MPI_Abi_get_version(Ref{Cint}(), Ref{Cint}())), +] + +for (fname, thunk) in absent_must_throw + isdefined(MPI.API, fname) || continue # not in this generated_api.jl at all + has_symbol(fname) && continue # provided by the library: nothing to assert + err = try + thunk() + nothing + catch e + e + end + @test err isa MPI.FeatureLevelError + if err isa MPI.FeatureLevelError + @test err.function_name === fname + # Not asserted: that `err.min_version > MPI.MPI_VERSION`. A library is free to + # advertise a standard version whose procedures it does not all export, and that + # is its business, not something this test should fail over. + @test occursin(string(fname), sprint(show, err)) + end +end + +# The large-count entry points must work on every library: natively where the library has +# them, and otherwise through the narrow fallback that `@mpichk`'s `fallback=` installs. +# The counts here are small, so both paths must give the same answer. +# +# `MPI.API.Count` and not `MPI.API.MPI_Count`: the fallback is transparent for a count +# passed *by value*, which `ccall` converts, but not for one passed through a pointer. +# A `Ref{MPI_Count}` handed to a wrapper that fell back to a `Ptr{Cint}` argument is a +# `MethodError`, so a caller of the `_c` entry points has to use the alias that follows +# the entry point actually in use. +const Count = MPI.API.Count +const CountDatatype = MPI.Datatype(Count) + +let src = 0, dst = nprocs - 1, tag = 42 + send = Count[1, 2, 3, 4] + if rank == src && rank != dst + MPI.API.MPI_Send_c(send, length(send), CountDatatype, dst, tag, comm) + end + if rank == dst && rank != src + recv = zeros(Count, length(send)) + stat = Ref{MPI.Status}() + MPI.API.MPI_Recv_c(recv, length(recv), CountDatatype, src, tag, comm, stat) + @test recv == send + count = Ref{Count}() + MPI.API.MPI_Get_count_c(stat, CountDatatype, count) + @test count[] == length(send) + end +end +MPI.Barrier(comm) + +let root = 0 + buf = rank == root ? Count[10, 20, 30, 40] : zeros(Count, 4) + MPI.API.MPI_Bcast_c(buf, length(buf), CountDatatype, root, comm) + @test buf == Count[10, 20, 30, 40] +end +MPI.Barrier(comm) + +let + sendbuf = Count[rank + 1] + recvbuf = zeros(Count, 1) + MPI.API.MPI_Allreduce_c(sendbuf, recvbuf, 1, CountDatatype, MPI.SUM, comm) + @test recvbuf[1] == div(nprocs * (nprocs + 1), 2) +end +MPI.Barrier(comm) + +# `MPI_Op_create_c` deliberately gets no fallback: its callback takes `MPI_Count *len` +# while `MPI_Op_create`'s takes `int *len`, so swapping the creators would make +# the callback read the wrong width. On a library without `MPI_Op_create_c`, +# it must throw an exception. +if isdefined(MPI.API, :MPI_Op_create_c) && !has_symbol(:MPI_Op_create_c) + @test_throws MPI.FeatureLevelError MPI.API.MPI_Op_create_c( + C_NULL, Cint(1), Ref(MPI.OP_NULL.val)) +end + +MPI.Barrier(comm) +GC.gc() +MPI.Finalize() +@test MPI.Finalized() diff --git a/test/test_largecount.jl b/test/test_largecount.jl new file mode 100644 index 000000000..90554a808 --- /dev/null +++ b/test/test_largecount.jl @@ -0,0 +1,153 @@ +include("common.jl") +using Libdl + +MPI.Init() + +comm = MPI.COMM_WORLD +rank = MPI.Comm_rank(comm) +nprocs = MPI.Comm_size(comm) + +const BIG = Int64(typemax(Cint)) + 1 # one past what the narrow interface can express + +# A large count is only *usable* where addresses are wide enough to describe the data. +# `MPI_Aint` is pointer-sized, so on a 32-bit platform neither a 2 GiB datatype extent nor +# a 2 GiB displacement can exist, whatever `MPI_Count` says -- MPICH rejects such a +# datatype outright with "The input argument count is too big to fit for internal +# routines". So `HAS_LARGE_COUNT` alone is not enough to reach for a count this size. +const BIG_ADDRESSABLE = MPI.API.HAS_LARGE_COUNT && BIG <= typemax(MPI.API.MPI_Aint) + +# Our CI declares whether large counts are supported in the tested MPI library. +# This allows us to test whether our auto-detection is working. +if haskey(ENV, "JULIA_MPI_TEST_LARGE_COUNT") + @test MPI.API.HAS_LARGE_COUNT == (ENV["JULIA_MPI_TEST_LARGE_COUNT"] == "true") +end + +# Large-count support has to be all-or-nothing. Intel MPI 2021.11 provides `MPI_Send_c` +# but not `MPI_Type_size_c`, and since the count types are one choice for the whole +# package, deciding per function let a `Ref{MPI_Count}` reach a `Ptr{Cint}`. +@testset "large-count support is all-or-nothing" begin + absent = filter(collect(MPI.API.LARGE_COUNT_SYMBOLS)) do sym + isnothing(Libdl.dlsym(MPI.API.libmpi_handle, sym; throw_error=false)) + end + @test MPI.API.HAS_LARGE_COUNT == isempty(absent) +end + +@testset "count types" begin + @test MPI.API.Count <: Integer + @test MPI.API.Displ <: Integer + @test MPI.API.TypeDispl <: Integer + if MPI.API.HAS_LARGE_COUNT + @test typemax(MPI.API.Count) > typemax(Cint) + # `Displ` and `TypeDispl` need to hold byte offsets, so at least a pointer's worth + @test sizeof(MPI.API.Displ) >= sizeof(Ptr{Cvoid}) + @test sizeof(MPI.API.TypeDispl) >= sizeof(Ptr{Cvoid}) + else + @test MPI.API.Count === Cint + end + # the buffer types must follow + @test fieldtype(MPI.Buffer{Vector{Int}}, :count) === MPI.API.Count + @test fieldtype(MPI.RBuffer{Vector{Int},Vector{Int}}, :count) === MPI.API.Count + @test fieldtype(MPI.VBuffer{Vector{Int}}, :counts) === Vector{MPI.API.Count} + @test fieldtype(MPI.VBuffer{Vector{Int}}, :displs) === Vector{MPI.API.Displ} +end + +# Derived datatypes let us exercise a count larger than `typemax(Cint)` without allocating +# anything: only the type's description is large, not a buffer. +@testset "large-count datatypes" begin + if BIG_ADDRESSABLE + dt = MPI.Types.create_contiguous(BIG, MPI.BYTE) + MPI.Types.commit!(dt) + @test MPI.Types.size(dt) == BIG + @test MPI.Types.extent(dt) == (0, BIG) + MPI.free(dt) + elseif MPI.API.HAS_LARGE_COUNT + @test_throws MPI.MPIError MPI.Types.create_contiguous(BIG, MPI.BYTE) + else + # The narrow entry point cannot express this, and must throw an exception. + @test_throws InexactError MPI.Types.create_contiguous(BIG, MPI.BYTE) + end +end + +@testset "large counts in Buffer" begin + if MPI.API.HAS_LARGE_COUNT + buf = MPI.Buffer(Ptr{UInt8}(0), BIG, MPI.BYTE) + @test buf.count == BIG + if BIG_ADDRESSABLE + vbuf = MPI.VBuffer(Ptr{UInt8}(0), [BIG, BIG], [0, BIG], MPI.BYTE) + @test vbuf.counts == [BIG, BIG] + @test vbuf.displs == [0, BIG] + else + # The displacements are `MPI_Aint`, which cannot hold this on a 32-bit build + @test_throws InexactError MPI.VBuffer(Ptr{UInt8}(0), [BIG, BIG], [0, BIG], MPI.BYTE) + end + else + @test_throws InexactError MPI.Buffer(Ptr{UInt8}(0), BIG, MPI.BYTE) + end +end + +# Counts and displacements are allowed to be different widths (they are, under 32-bit +# MPICH), so make sure a VBuffer built the usual way still lines up. +@testset "VBuffer count/displ widths" begin + counts = [1, 2, 3] + vbuf = MPI.VBuffer(zeros(Int, sum(counts)), counts) + @test eltype(vbuf.counts) === MPI.API.Count + @test eltype(vbuf.displs) === MPI.API.Displ + @test vbuf.displs == [0, 1, 3] + # a Vector{Cint} argument must still be accepted + vbuf = MPI.VBuffer(zeros(Int, 6), Cint[1, 2, 3], Cint[0, 1, 3]) + @test vbuf.counts == [1, 2, 3] +end + +# Actually running a test that handles more than 2 GiB is opt-in: +# This needs a couple of GiB of RAM per rank, which is more than a shared CI runner can handle. +if get(ENV, "JULIA_MPI_TEST_LARGECOUNT", "") == "1" + if !BIG_ADDRESSABLE + @info "JULIA_MPI_TEST_LARGECOUNT set but this build cannot address a 2 GiB buffer; skipping" + else + @testset "2 GiB point-to-point" begin + n = BIG + 1 + if rank == 0 + data = fill(Int8(7), n) + MPI.Send(data, 1, 0, comm) + data = nothing + elseif rank == 1 + data = zeros(Int8, n) + stat = MPI.Recv!(data, 0, 0, comm) + @test MPI.Get_count(stat, Int8) == n + @test all(==(Int8(7)), data) + data = nothing + end + GC.gc() + end + MPI.Barrier(comm) + + @testset "2 GiB Bcast!" begin + n = BIG + 1 + data = rank == 0 ? fill(Int8(3), n) : zeros(Int8, n) + MPI.Bcast!(data, 0, comm) + @test all(==(Int8(3)), data) + data = nothing + GC.gc() + end + MPI.Barrier(comm) + + # A user-defined `Op` is created with the narrow `MPI_Op_create`, whose callback + # takes `int *len`. This checks the assumption that an MPI library chunks a + # large-count reduction into calls which the narrow callback can express, rather than + # handing it a length it cannot represent. + @testset "2 GiB Allreduce! with a custom Op" begin + n = BIG + 1 + data = fill(Int8(1), n) + MPI.Allreduce!(data, (a, b) -> max(a, b), comm) + @test all(==(Int8(1)), data) + data = nothing + GC.gc() + end + MPI.Barrier(comm) + end +end + +MPI.Barrier(comm) +GC.gc() +MPI.Finalize() +@test MPI.Finalized()