Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Failing datatype tests on x86 Linux #853

Closed
giordano opened this issue Aug 6, 2024 · 3 comments · Fixed by #877
Closed

[CI] Failing datatype tests on x86 Linux #853

giordano opened this issue Aug 6, 2024 · 3 comments · Fixed by #877
Labels

Comments

@giordano
Copy link
Member

giordano commented Aug 6, 2024

test-default (ubuntu-latest, nightly, x86)

Julia Version 1.12.0-DEV.994
Commit 1b32fa68257 (2024-08-06 02:39 UTC)

[...]

PrimitiveType = Primitive80: PrimitiveType = Primitive80PrimitiveType = Primitive80: PrimitiveType = Primitive80: : Test Failed at Test FailedTest FailedTest Failed at  at  at /home/runner/work/MPI.jl/MPI.jl/test/test_datatype.jl:94
  Expression: MPI.Types.extent(MPI.Datatype(PrimitiveType)) == (0, cld(sz, al) * al)
   Evaluated: (0, 12) == (0, 16)
/home/runner/work/MPI.jl/MPI.jl/test/test_datatype.jl:94
  Expression: MPI.Types.extent(MPI.Datatype(PrimitiveType)) == (0, cld(sz, al) * al)
   Evaluated: (0, 12) == (0, 16)
/home/runner/work/MPI.jl/MPI.jl/test/test_datatype.jl:94
  Expression: MPI.Types.extent(MPI.Datatype(PrimitiveType)) == (0, cld(sz, al) * al)
   Evaluated: (0, 12) == (0, 16)
/home/runner/work/MPI.jl/MPI.jl/test/test_datatype.jl:94
  Expression: MPI.Types.extent(MPI.Datatype(PrimitiveType)) == (0, cld(sz, al) * al)
   Evaluated: (0, 12) == (0, 16)

[...]

PrimitiveType = Primitive80: Test Failed at /home/runner/work/MPI.jl/MPI.jl/test/test_datatype.jl:109
  Expression: arr_recv == [Core.Intrinsics.trunc_int(PrimitiveType, UInt128(src + i)) for i = 1:4]
   Evaluated: Primitive80[Primitive80(0x00000000000000000002), Primitive80(0x0000e3a1000000000003), Primitive80(0x000000000000e3a10004), Primitive80(0x0330e3a201b0e3a20030)] == Primitive80[Primitive80(0x00000000000000000002), Primitive80(0x00000000000000000003), Primitive80(0x00000000000000000004), Primitive80(0x00000000000000000005)]
PrimitiveType = Primitive80: Test Failed at /home/runner/work/MPI.jl/MPI.jl/test/test_datatype.jl:109
  Expression: arr_recv == [Core.Intrinsics.trunc_int(PrimitiveType, UInt128(src + i)) for i = 1:4]
   Evaluated: Primitive80[Primitive80(0x00000000000000000003), Primitive80(0x0000df43000000000004), Primitive80(0x000000000000df430005), Primitive80(0xc230df43c0b0df43bf30)] == Primitive80[Primitive80(0x00000000000000000003), Primitive80(0x00000000000000000004), Primitive80(0x00000000000000000005), Primitive80(0x00000000000000000006)]

[...]

PrimitiveType = Primitive80: Test Failed at /home/runner/work/MPI.jl/MPI.jl/test/test_datatype.jl:109
  Expression: arr_recv == [Core.Intrinsics.trunc_int(PrimitiveType, UInt128(src + i)) for i = 1:4]
   Evaluated: Primitive80[Primitive80(0x00000000000000000004), Primitive80(0x0000e8c3000000000005), Primitive80(0x000000000000e8c30006), Primitive80(0xc230e8c3c0b0e8c3bf30)] == Primitive80[Primitive80(0x00000000000000000004), Primitive80(0x00000000000000000005), Primitive80(0x00000000000000000006), Primitive80(0x00000000000000000007)]
PrimitiveType = Primitive80: Test Failed at /home/runner/work/MPI.jl/MPI.jl/test/test_datatype.jl:109
  Expression: arr_recv == [Core.Intrinsics.trunc_int(PrimitiveType, UInt128(src + i)) for i = 1:4]
   Evaluated: Primitive80[Primitive80(0x00000000000000000001), Primitive80(0x0000ea61000000000002), Primitive80(0x000000000000ea610003), Primitive80(0x0330ea6201b0ea620030)] == Primitive80[Primitive80(0x00000000000000000001), Primitive80(0x00000000000000000002), Primitive80(0x00000000000000000003), Primitive80(0x00000000000000000004)]

test-openmpi-jll (ubuntu-latest, nightly, x86)

Julia Version 1.12.0-DEV.994
Commit 1b32fa68257 (2024-08-06 02:39 UTC)
[...]
PrimitiveType = Primitive80: PrimitiveType = Primitive80: PrimitiveType = Primitive80: PrimitiveType = Primitive80: Test FailedTest Failed at  at Test Failed at Test Failed at /home/runner/work/MPI.jl/MPI.jl/test/test_datatype.jl:94
  Expression: MPI.Types.extent(MPI.Datatype(PrimitiveType)) == (0, cld(sz, al) * al)
   Evaluated: (0, 12) == (0, 16)
/home/runner/work/MPI.jl/MPI.jl/test/test_datatype.jl:94
  Expression: MPI.Types.extent(MPI.Datatype(PrimitiveType)) == (0, cld(sz, al) * al)
   Evaluated: (0, 12) == (0, 16)
/home/runner/work/MPI.jl/MPI.jl/test/test_datatype.jl:94
  Expression: MPI.Types.extent(MPI.Datatype(PrimitiveType)) == (0, cld(sz, al) * al)
   Evaluated: (0, 12) == (0, 16)
/home/runner/work/MPI.jl/MPI.jl/test/test_datatype.jl:94
  Expression: MPI.Types.extent(MPI.Datatype(PrimitiveType)) == (0, cld(sz, al) * al)
   Evaluated: (0, 12) == (0, 16)
[...]
PrimitiveType = Primitive80: PrimitiveType = Primitive80: Test Failed at Test Failed/home/runner/work/MPI.jl/MPI.jl/test/test_datatype.jl:109
  Expression: arr_recv == [Core.Intrinsics.trunc_int(PrimitiveType, UInt128(src + i)) for i = 1:4]
   Evaluated: Primitive80[Primitive80(0x00000000000000000002), Primitive80(0x00000000000000000003), Primitive80(0x00000000000000000004), Primitive80(0x002e0000006800000066)] == Primitive80[Primitive80(0x00000000000000000002), Primitive80(0x00000000000000000003), Primitive80(0x00000000000000000004), Primitive80(0x00000000000000000005)]
 at /home/runner/work/MPI.jl/MPI.jl/test/test_datatype.jl:109
  Expression: arr_recv == [Core.Intrinsics.trunc_int(PrimitiveType, UInt128(src + i)) for i = 1:4]
   Evaluated: Primitive80[Primitive80(0x00000000000000000003), Primitive80(0x00000000000000000004), Primitive80(0x00000000000000000005), Primitive80(0x00f1000000f3000000f2)] == Primitive80[Primitive80(0x00000000000000000003), Primitive80(0x00000000000000000004), Primitive80(0x00000000000000000005), Primitive80(0x00000000000000000006)]
PrimitiveType = Primitive80PrimitiveType = Primitive80: Test Failed at : Test Failed/home/runner/work/MPI.jl/MPI.jl/test/test_datatype.jl:109
 at   Expression: arr_recv == [Core.Intrinsics.trunc_int(PrimitiveType, UInt128(src + i)) for i = 1:4]
   Evaluated: Primitive80[Primitive80(0x00000000000000000004), Primitive80(0x00000000000000000005), Primitive80(0x00000000000000000006), Primitive80(0x000e0000000d0000000b)] == Primitive80[Primitive80(0x00000000000000000004), Primitive80(0x00000000000000000005), Primitive80(0x00000000000000000006), Primitive80(0x00000000000000000007)]/home/runner/work/MPI.jl/MPI.jl/test/test_datatype.jl:109
  Expression: arr_recv == [Core.Intrinsics.trunc_int(PrimitiveType, UInt128(src + i)) for i = 1:4]

   Evaluated: Primitive80[Primitive80(0x00000000000000000001), Primitive80(0x00000000000000000002), Primitive80(0x00000000000000000003), Primitive80(0x002e0000006800000066)] == Primitive80[Primitive80(0x00000000000000000001), Primitive80(0x00000000000000000002), Primitive80(0x00000000000000000003), Primitive80(0x00000000000000000004)]
@giordano
Copy link
Member Author

giordano commented Sep 8, 2024

@vchuravy can this have to with some change of alignment in LLVM? For example, on i686 Base.datatype_alignment(Primitive80) changed from 4 to 16, I haven't studied the test very well, but I'm wondering if this change screwed up some of the logic inside the tests.

@giordano
Copy link
Member Author

giordano commented Sep 8, 2024

Yeah, with an i686 Julia I get on Julia v1.10:

julia> using MPI

julia> MPI.Init()
MPI.ThreadLevel(2)

julia> primitive type Primitive80 80 end

julia> MPI.Types.extent(MPI.Datatype(Primitive80))
(0, 12)

julia> Base.datatype_alignment(Primitive80)
4

but on nightly

julia> using MPI

julia> MPI.Init()
MPI.ThreadLevel(2)

julia> primitive type Primitive80 80 end

julia> MPI.Types.extent(MPI.Datatype(Primitive80))
(0, 12)

julia> Base.datatype_alignment(Primitive80)
16

The different result for Base.datatype_alignment breaks the whole logic of the test.

@giordano
Copy link
Member Author

But given the fact the test checking that the data sent around is correct is failing when the test

sz = sizeof(PrimitiveType)
al = Base.datatype_alignment(PrimitiveType)
@test MPI.Types.extent(MPI.Datatype(PrimitiveType)) == (0, cld(sz,al)*al)

is also failing, I wonder if we should enforce this invariant in the MPI.DataType constructor, not to let people construct inconsistent datatypes, and maybe just skip the Primitive80 tests on 32-bit systems in julia v1.12+?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant