From 6dfc1b0ed9ff10a0c23cdb65b9f5f5ef19c74a8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Tue, 27 Jun 2023 10:07:15 +0200 Subject: [PATCH 1/6] Add 32-bit in ci --- .github/workflows/ci.yml | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 627797d..64c6531 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,18 +8,20 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - version: - - '1.6' - - '1' - - 'nightly' - os: - - ubuntu-latest - - macOS-latest - - windows-latest - arch: - - x64 - allow_failures: - - julia: nightly + include: + - version: '1.6' + os: ubuntu-latest + arch: x64 + - version: '1' + os: ubuntu-latest + arch: x64 + - version: '1' + os: ubuntu-latest + arch: x86 + - version: 'nightly' + os: ubuntu-latest + arch: x64 + allow_failures: true fail-fast: false steps: - uses: actions/checkout@v2 From a8d07171e996d0b5e8b0aa8fa29610414ef9a4eb Mon Sep 17 00:00:00 2001 From: Marek Kaluba Date: Tue, 27 Jun 2023 10:57:18 +0200 Subject: [PATCH 2/6] fix hash(::GF, ...) on 32-bit --- src/Characters/gf.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Characters/gf.jl b/src/Characters/gf.jl index 05c2476..6d0cba2 100644 --- a/src/Characters/gf.jl +++ b/src/Characters/gf.jl @@ -27,7 +27,7 @@ characteristic(::GF{q}) where {q} = q Base.:(==)(n::GF{q}, m::GF{q}) where {q} = Int(n) == Int(m) # hash(GF) == 0x04fd9e474909f8bf function Base.hash(n::GF{q}, h::UInt) where {q} - return xor(0x04fd9e474909f8bf, hash(q, hash(Int(n), h))) + return xor(0x04fd9e474909f8bf % UInt, hash(q, hash(Int(n), h))) end Base.:+(n::GF{q}, m::GF{q}) where {q} = GF{q}(Int(n) + Int(m), false) From ba9af482fa35baab53bab5f3da5bc5416a98da5a Mon Sep 17 00:00:00 2001 From: Marek Kaluba Date: Tue, 27 Jun 2023 10:58:13 +0200 Subject: [PATCH 3/6] use Int32 instead UInt32 as index type in (sparse) projections --- src/matrix_projections.jl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/matrix_projections.jl b/src/matrix_projections.jl index d2c112e..27c117c 100644 --- a/src/matrix_projections.jl +++ b/src/matrix_projections.jl @@ -174,8 +174,8 @@ function matrix_projection_irr_acc!( weight, ) iszero(weight) && return result - I = UInt32[] - J = UInt32[] + I = Int32[] + J = Int32[] V = eltype(result)[] for (val, cc) in zip(vals, ccls) iszero(val) && continue @@ -232,8 +232,8 @@ function matrix_projection_irr_acc!( weight, ) iszero(weight) && return result - I = UInt32[] - J = UInt32[] + I = Int32[] + J = Int32[] V = eltype(result)[] for (val, ccl) in zip(class_values, conjugacy_cls) iszero(val) && continue @@ -304,8 +304,8 @@ function matrix_representation_acc!( }, ) b = basis(parent(α)) - I = UInt32[] - J = UInt32[] + I = Int32[] + J = Int32[] V = eltype(result)[] for (idx, val) in StarAlgebras._nzpairs(StarAlgebras.coeffs(α)) g = b[idx] @@ -326,8 +326,8 @@ function matrix_representation_acc!( α::AlgebraElement, ) b = basis(parent(α)) - I = UInt32[] - J = UInt32[] + I = Int32[] + J = Int32[] V = eltype(result)[] for (idx, val) in StarAlgebras._nzpairs(StarAlgebras.coeffs(α)) iszero(val) && continue From 2acb405771b4a724dae0e7422ab54ca6938c6c82 Mon Sep 17 00:00:00 2001 From: Marek Kaluba Date: Thu, 29 Jun 2023 02:33:44 +0200 Subject: [PATCH 4/6] test for Characters: interpolate Int in sprint --- test/characters.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/characters.jl b/test/characters.jl index ddb1a3c..12e6790 100644 --- a/test/characters.jl +++ b/test/characters.jl @@ -54,5 +54,5 @@ end @test sprint(show, -2chars[1] + 3chars[2]) == "-2·χ₁ +3·χ₂" @test sprint(show, MIME"text/plain"(), chars[1]) == - "Character over Cyclotomic{Rational{Int64}, SparseVector{Rational{Int64}, Int64}}\nχ₁" + "Character over Cyclotomic{Rational{$Int}, SparseVector{Rational{$Int}, $Int}}\nχ₁" end From 8436d76efba06f22a0c70e0a2b3fa3cc6b74e2c2 Mon Sep 17 00:00:00 2001 From: Marek Kaluba Date: Thu, 20 Jul 2023 17:52:31 +0200 Subject: [PATCH 5/6] Revert "use Int32 instead UInt32 as index type in (sparse) projections" Indeed, it seems that we are actually hitting the typemax(Int32) boundary in some cases and UInt32 is necessary here This reverts commit ba9af482fa35baab53bab5f3da5bc5416a98da5a. --- src/matrix_projections.jl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/matrix_projections.jl b/src/matrix_projections.jl index 27c117c..d2c112e 100644 --- a/src/matrix_projections.jl +++ b/src/matrix_projections.jl @@ -174,8 +174,8 @@ function matrix_projection_irr_acc!( weight, ) iszero(weight) && return result - I = Int32[] - J = Int32[] + I = UInt32[] + J = UInt32[] V = eltype(result)[] for (val, cc) in zip(vals, ccls) iszero(val) && continue @@ -232,8 +232,8 @@ function matrix_projection_irr_acc!( weight, ) iszero(weight) && return result - I = Int32[] - J = Int32[] + I = UInt32[] + J = UInt32[] V = eltype(result)[] for (val, ccl) in zip(class_values, conjugacy_cls) iszero(val) && continue @@ -304,8 +304,8 @@ function matrix_representation_acc!( }, ) b = basis(parent(α)) - I = Int32[] - J = Int32[] + I = UInt32[] + J = UInt32[] V = eltype(result)[] for (idx, val) in StarAlgebras._nzpairs(StarAlgebras.coeffs(α)) g = b[idx] @@ -326,8 +326,8 @@ function matrix_representation_acc!( α::AlgebraElement, ) b = basis(parent(α)) - I = Int32[] - J = Int32[] + I = UInt32[] + J = UInt32[] V = eltype(result)[] for (idx, val) in StarAlgebras._nzpairs(StarAlgebras.coeffs(α)) iszero(val) && continue From ce15824651b488f71590a2d4f5708811ca24fde2 Mon Sep 17 00:00:00 2001 From: Marek Kaluba Date: Tue, 25 Jul 2023 17:23:10 +0200 Subject: [PATCH 6/6] Revert "Add 32-bit in ci" This reverts commit 6dfc1b0ed9ff10a0c23cdb65b9f5f5ef19c74a8d. --- .github/workflows/ci.yml | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 64c6531..627797d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,20 +8,18 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - include: - - version: '1.6' - os: ubuntu-latest - arch: x64 - - version: '1' - os: ubuntu-latest - arch: x64 - - version: '1' - os: ubuntu-latest - arch: x86 - - version: 'nightly' - os: ubuntu-latest - arch: x64 - allow_failures: true + version: + - '1.6' + - '1' + - 'nightly' + os: + - ubuntu-latest + - macOS-latest + - windows-latest + arch: + - x64 + allow_failures: + - julia: nightly fail-fast: false steps: - uses: actions/checkout@v2