Skip to content

Commit 9ba7d98

Browse files
eschnettgiordano
andauthored
CI: Enable tests with MPIABI (#946)
* CI: Enable tests with MPIABI * CI: Correct syntax error * CI: Specify MPIABI test architectures explicitly * Correct MPIABI implementation API * CI: Debug x86 failure * CI: Debug x86 failure * CI: Debug x86 failure * CI: Debug x86 failure * CI: Debug x86 failure * CI: Debug x86 failure * CI: Debug x86 failure * CI: Debug x86 failure * CI: Debug x86 failure * CI: Debug x86 failure * CI: Debug x86 failure * CI: Debug x86 failure * CI: Debug x86 failure * CI: Debug x86 failure * CI: Debug x86 failure * CI: Debug x86 failure * CI: Debug x86 failure * CI: Finish debugging * MPIABI: Describe error for x86 failures * Simplify matrix --------- Co-authored-by: Mosè Giordano <mose@gnu.org>
1 parent e9dfd5b commit 9ba7d98

3 files changed

Lines changed: 63 additions & 9 deletions

File tree

.github/workflows/UnitTests.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,65 @@ jobs:
7878
env:
7979
COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
8080

81+
test-mpiabi-jll:
82+
timeout-minutes: 20
83+
strategy:
84+
matrix:
85+
os:
86+
- "macos-26"
87+
- "ubuntu-24.04-arm"
88+
- "macOS-15-intel"
89+
- "ubuntu-24.04"
90+
julia_arch:
91+
- "default"
92+
julia_version:
93+
- "1"
94+
include:
95+
# MPICH with MPI ABI is broken on i686: <https://github.com/pmodels/mpich/issues/7770>.
96+
# - julia_arch: "x86"
97+
# os: "ubuntu-24.04"
98+
# julia_version: "1"
99+
- julia_arch: "default"
100+
os: "ubuntu-24.04"
101+
julia_version: "min"
102+
- julia_arch: "default"
103+
os: "ubuntu-24.04"
104+
julia_version: "nightly"
105+
106+
fail-fast: false
107+
env:
108+
JULIA_MPI_TEST_BINARY: MPIABI_jll
109+
JULIA_MPI_TEST_ABI: MPIABI
110+
111+
runs-on: ${{ matrix.os }}
112+
113+
steps:
114+
- name: Checkout
115+
uses: actions/checkout@v6
116+
117+
- uses: julia-actions/setup-julia@v2
118+
with:
119+
arch: ${{ matrix.julia_arch }}
120+
version: ${{ matrix.julia_version }}
121+
- uses: julia-actions/cache@v3
122+
123+
- name: add MPIPreferences
124+
shell: julia --color=yes --project=. {0}
125+
run: |
126+
using Pkg
127+
Pkg.develop(path="lib/MPIPreferences")
128+
129+
- name: use MPIABI_jll
130+
shell: julia --color=yes --project=test {0}
131+
run: |
132+
using Pkg
133+
Pkg.develop(path="lib/MPIPreferences")
134+
using MPIPreferences
135+
MPIPreferences.use_jll_binary("MPIABI_jll", export_prefs=true)
136+
rm("test/Manifest.toml")
137+
138+
- uses: julia-actions/julia-runtest@v1
139+
81140
test-openmpi-jll:
82141
timeout-minutes: 20
83142
strategy:

src/datatypes.jl

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,10 @@ function Datatype(::Type{T}) where {T}
151151
global created_datatypes
152152
datatype = get!(created_datatypes, T) do
153153
datatype = Datatype()
154-
# lazily initialize so that it can be safely precompiled
155-
function init()
156-
Types.create!(datatype, T)
157-
Types.commit!(datatype)
158-
set_attr!(datatype, JULIA_TYPE_PTR_ATTR[], pointer_from_objref(T))
159-
end
160-
# Initialized() ? init() : add_init_hook!(init)
161154
@assert Initialized()
162-
init()
155+
Types.create!(datatype, T)
156+
Types.commit!(datatype)
157+
set_attr!(datatype, JULIA_TYPE_PTR_ATTR[], pointer_from_objref(T))
163158
datatype
164159
end
165160

src/implementations.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ function versioninfo(io::IO=stdout)
9999
println(io, " MPI.jl: ", PkgVersion.@Version)
100100
println(io, " MPIPreferences.jl: ", PkgVersion.Version(MPIPreferences))
101101
if MPIPreferences.binary == "MPIABI_jll"
102-
println(io, " MPIABI_jll: ", PkgVersion.Version(API.MPICH_jll))
102+
println(io, " MPIABI_jll: ", PkgVersion.Version(API.MPIABI_jll))
103103
elseif MPIPreferences.binary == "MPICH_jll"
104104
println(io, " MPICH_jll: ", PkgVersion.Version(API.MPICH_jll))
105105
elseif MPIPreferences.binary == "MPItrampoline_jll"

0 commit comments

Comments
 (0)