Skip to content

Commit ca1284b

Browse files
committed
Temporarily implement MPI_Abi_get_version
1 parent ece05b9 commit ca1284b

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

src/api/api.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,13 @@ end
140140

141141
include("generated_api.jl")
142142

143+
# We define this function here temporarily. This call will fail for
144+
# MPI <5. Once we regenerate the API for MPI 5.0, this should go away
145+
# again.
146+
function MPI_Abi_get_version(major, minor)
147+
@mpicall ccall((:MPI_Abi_get_version, libmpi), Cint, (Ptr{Cint}, Ptr{Cint}), major, minor)
148+
end
149+
143150
for handle in [
144151
:MPI_Comm,
145152
:MPI_Datatype,

src/implementations.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,13 @@ function Get_version()
7070
VersionNumber(major[], minor[])
7171
end
7272

73+
function Abi_get_version()
74+
major = Ref{Cint}()
75+
minor = Ref{Cint}()
76+
API.MPI_Abi_get_version(major, minor)
77+
VersionNumber(major[], minor[])
78+
end
79+
7380
"""
7481
MPI_VERSION :: VersionNumber
7582

0 commit comments

Comments
 (0)