Code running on local Julia, but failing on CI tests with Ububtu_latest and Windows_latest

The following code is running correctly on my machine

using LinearAlgebra
using ApproxFun
Af = Fun(t -> [0 1; -10*cos(t) -24-10*sin(t)],Fourier(0..2π));
D = Derivative(domain(Af));
ND = [D 0I; 0I D];
Aop = Af - ND;
NA = 322
RW = Aop[1:NA,1:NA]

resulting in a matrix as below


322×322 ApproxFunBase.RaggedMatrix{Float64}:
  0.0           0.0            1.0    0.0   0.0   0.0  0.0  0.0  …   0.0  0.0    0.0   0.0            0.0            0.0    0.0   0.0   0.0
  0.0           0.0            0.0    1.0   1.0   0.0  0.0  0.0      0.0  0.0    0.0   0.0            0.0            0.0    0.0   0.0   0.0
  5.76141e-16  -6.6615e-16   -24.0   -5.0  -5.0   0.0  0.0  0.0      0.0  0.0    0.0   0.0            0.0            0.0    0.0   0.0   0.0
 -1.3323e-15    5.76141e-16  -10.0  -24.0   0.0  -5.0  1.0  0.0      0.0  0.0    0.0   0.0            0.0            0.0    0.0   0.0   0.0
  0.0          -1.0            0.0    0.0   0.0   0.0  1.0  0.0      0.0  0.0    0.0   0.0            0.0            0.0    0.0   0.0   0.0
  ⋮                                               ⋮              ⋱               ⋮                                                ⋮    
  0.0           0.0            0.0    0.0   0.0   0.0  0.0  0.0      0.0  0.0  -79.0   5.76141e-16   -6.6615e-16   -24.0   -5.0  -5.0   0.0
  0.0           0.0            0.0    0.0   0.0   0.0  0.0  0.0     -5.0  0.0    0.0  -6.6615e-16     5.76141e-16   -5.0  -24.0   0.0  -5.0
  0.0           0.0            0.0    0.0   0.0   0.0  0.0  0.0  …   0.0  0.0    0.0   0.0          -80.0            0.0    0.0   0.0   0.0
  0.0           0.0            0.0    0.0   0.0   0.0  0.0  0.0      0.0  0.0    0.0   0.0            0.0            0.0    0.0   0.0   0.0

However, the same sequence fails on the Ubuntu_latest and Windows_latest CI test environments with both Julia 1.7.2 and Julia 1.8.0 with the following error message

ERROR: LoadError: MethodError: no method matching blocks(::ApproxFunBase.InterlaceOperator{Float64, 2, ApproxFunBase.ArraySpace{ApproxFunBase.SumSpace{Tuple{ApproxFunFourier.CosSpace{ApproxFunFourier.PeriodicSegment{Float64}, Float64}, ApproxFunFourier.SinSpace{ApproxFunFourier.PeriodicSegment{Float64}, Float64}}, ApproxFunFourier.PeriodicSegment{Float64}, Float64}, 1, ApproxFunFourier.PeriodicSegment{Float64}, Float64}, ApproxFunBase.ArraySpace{ApproxFunBase.SumSpace{Tuple{ApproxFunFourier.CosSpace{ApproxFunFourier.PeriodicSegment{Float64}, Float64}, ApproxFunFourier.SinSpace{ApproxFunFourier.PeriodicSegment{Float64}, Float64}}, ApproxFunFourier.PeriodicSegment{Float64}, Float64}, 1, ApproxFunFourier.PeriodicSegment{Float64}, Float64}, ApproxFunBase.CachedIterator{Tuple{Int64, Int64}, ApproxFunBase.BlockInterlacer{Tuple{FillArrays.Fill{Int64, 1, Tuple{InfiniteArrays.OneToInf{Int64}}}, FillArrays.Fill{Int64, 1, Tuple{InfiniteArrays.OneToInf{Int64}}}}}}, ApproxFunBase.CachedIterator{Tuple{Int64, Int64}, ApproxFunBase.BlockInterlacer{Tuple{FillArrays.Fill{Int64, 1, Tuple{InfiniteArrays.OneToInf{Int64}}}, FillArrays.Fill{Int64, 1, Tuple{InfiniteArrays.OneToInf{Int64}}}}}}, Tuple{Infinities.RealInfinity, Infinities.InfiniteCardinal{0}}})
(see run information here)

I would appreciate any hint how to manage to run the tests without this error.

Additional information:

julia> versioninfo()
Julia Version 1.7.2
Commit bf53498635 (2022-02-06 15:21 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, skylake)
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS =
(@v1.7) pkg> status ApproxFun
      Status `C:\Users\Andreas\.julia\environments\v1.7\Project.toml`
  [28f2ccd6] ApproxFun v0.13.1

(@v1.7) pkg> status ApproxFunBase
      Status `C:\Users\Andreas\.julia\environments\v1.7\Project.toml`
  [fbd15aa5] ApproxFunBase v0.5.5

quick test on my environment:
ubuntu 20.04 + Julia Version 1.7.1 - the testcode is working. :white_check_mark:

julia> versioninfo()
Julia Version 1.7.1
Commit ac5cc99908 (2021-12-22 19:35 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, skylake)

(@v1.7) pkg> status ApproxFun
      Status `~/.julia/environments/v1.7/Project.toml`
  [28f2ccd6] ApproxFun v0.12.6

(@v1.7) pkg> status ApproxFunBase
  No Matches in `~/.julia/environments/v1.7/Project.toml`

(@v1.7) pkg> status LinearAlgebra
      Status `~/.julia/environments/v1.7/Project.toml`
  [37e2e46d] LinearAlgebra
1 Like

I observed that while the CI tests employ the last versions of the underlying packages
(e.g., BandedMatrices v0.17.0, BlockArrays v0.16.16, BlockBandedMatrices v0.11.6), my local test runs with
(BandedMatrices v0.16.13, BlockArrays v0.16.11, BlockBandedMatrices v0.11.1). I wonder if this could be the cause of the systematic failures. Just an idea!

I’ve encountered similar problems with recent versions of BlockArrays etc., avoided by asking Pkg for BlockArrays@v0.16.11. Let’s ask @dlfivefifty if a better fix is in the works.

1 Like

I tested enforcing v0.16.11 to v0.16.15 and all work. Thanks for the hint.

I opened an issue at 211.

This was caused by something that was technically a bug fix but broke downstream packages. This PR will fix it when merged: Use Block{1} in blockcol/rowsupport by dlfivefifty · Pull Request #95 · JuliaApproximation/ApproxFunBase.jl · GitHub

1 Like