Skip to content

MPI.REQUEST_NULL only pretends to be a constant #921

@vchuravy

Description

@vchuravy
using MPI
MPI.Init()

reqs = Vector{MPI.Request}(undef, 2)
fill!(reqs, MPI.REQUEST_NULL) 

# first foot-gun `reqs[1]` and `reqs[2]` are now aliases

MPI.Irecv!(Ref(1.0), MPI.COMM_WORLD, reqs[1])
julia> reqs
2-element Vector{MPI.Request}:
 incomplete request
 incomplete request

But worse...

julia> MPI.REQUEST_NULL
MPI.Request: incomplete request

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions