Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/UnitTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,65 @@ jobs:
env:
COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }}

test-mpiabi-jll:
timeout-minutes: 20
strategy:
matrix:
os:
- "macos-26"
- "ubuntu-24.04-arm"
- "macOS-15-intel"
- "ubuntu-24.04"
julia_arch:
- "default"
julia_version:
- "1"
include:
# MPICH with MPI ABI is broken on i686: <https://github.com/pmodels/mpich/issues/7770>.
# - julia_arch: "x86"
# os: "ubuntu-24.04"
# julia_version: "1"
- julia_arch: "default"
os: "ubuntu-24.04"
julia_version: "min"
- julia_arch: "default"
os: "ubuntu-24.04"
julia_version: "nightly"

fail-fast: false
env:
JULIA_MPI_TEST_BINARY: MPIABI_jll
JULIA_MPI_TEST_ABI: MPIABI

runs-on: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@v6

- uses: julia-actions/setup-julia@v2
with:
arch: ${{ matrix.julia_arch }}
version: ${{ matrix.julia_version }}
- uses: julia-actions/cache@v3

- name: add MPIPreferences
shell: julia --color=yes --project=. {0}
run: |
using Pkg
Pkg.develop(path="lib/MPIPreferences")

- name: use MPIABI_jll
shell: julia --color=yes --project=test {0}
run: |
using Pkg
Pkg.develop(path="lib/MPIPreferences")
using MPIPreferences
MPIPreferences.use_jll_binary("MPIABI_jll", export_prefs=true)
rm("test/Manifest.toml")

- uses: julia-actions/julia-runtest@v1

test-openmpi-jll:
timeout-minutes: 20
strategy:
Expand Down
11 changes: 3 additions & 8 deletions src/datatypes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,10 @@ function Datatype(::Type{T}) where {T}
global created_datatypes
datatype = get!(created_datatypes, T) do
datatype = Datatype()
# lazily initialize so that it can be safely precompiled
function init()
Types.create!(datatype, T)
Types.commit!(datatype)
set_attr!(datatype, JULIA_TYPE_PTR_ATTR[], pointer_from_objref(T))
end
# Initialized() ? init() : add_init_hook!(init)
@assert Initialized()
init()
Types.create!(datatype, T)
Types.commit!(datatype)
set_attr!(datatype, JULIA_TYPE_PTR_ATTR[], pointer_from_objref(T))
datatype
end

Expand Down
2 changes: 1 addition & 1 deletion src/implementations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function versioninfo(io::IO=stdout)
println(io, " MPI.jl: ", PkgVersion.@Version)
println(io, " MPIPreferences.jl: ", PkgVersion.Version(MPIPreferences))
if MPIPreferences.binary == "MPIABI_jll"
println(io, " MPIABI_jll: ", PkgVersion.Version(API.MPICH_jll))
println(io, " MPIABI_jll: ", PkgVersion.Version(API.MPIABI_jll))
elseif MPIPreferences.binary == "MPICH_jll"
println(io, " MPICH_jll: ", PkgVersion.Version(API.MPICH_jll))
elseif MPIPreferences.binary == "MPItrampoline_jll"
Expand Down
Loading