# Code running on local Julia, but failing on CI tests with Ububtu\_latest and Windows\_latest

**URL:** <https://discourse.julialang.org/t/code-running-on-local-julia-but-failing-on-ci-tests-with-ububtu-latest-and-windows-latest/80638>\
**Category:** General Usage\
**Tags:** question, ci, approxfun\
**Created:** [May 6, 2022, 9:15pm UTC](https://discourse.julialang.org/t/code-running-on-local-julia-but-failing-on-ci-tests-with-ububtu-latest-and-windows-latest/80638 "2022-05-06T21:15:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![andreasvarga](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/andreasvarga/32/11634_2.png) [@andreasvarga](https://discourse.julialang.org/u/andreasvarga)\
**Post date:** [May 6, 2022, 9:15pm UTC](https://discourse.julialang.org/t/code-running-on-local-julia-but-failing-on-ci-tests-with-ububtu-latest-and-windows-latest/80638/1 "2022-05-06T21:15:10Z")

</div>

The following code is running correctly on my machine

```julia
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

```julia

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](https://github.com/andreasvarga/PeriodicSystems.jl/runs/6328790435?check_suite_focus=true))

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

Additional information:

```julia
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 =

```

```julia
(@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

```

---

<div class="post-metadata">

**Author:** ![ImreSamu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/imresamu/32/20677_2.png) [@ImreSamu](https://discourse.julialang.org/u/ImreSamu)\
**Post date:** [May 7, 2022, 5:40am UTC](https://discourse.julialang.org/t/code-running-on-local-julia-but-failing-on-ci-tests-with-ububtu-latest-and-windows-latest/80638/2 "2022-05-07T05:40:04Z")

</div>

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

```julia
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

```

---

<div class="post-metadata">

**Author:** ![andreasvarga](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/andreasvarga/32/11634_2.png) [@andreasvarga](https://discourse.julialang.org/u/andreasvarga)\
**Post date:** [May 7, 2022, 1:33pm UTC](https://discourse.julialang.org/t/code-running-on-local-julia-but-failing-on-ci-tests-with-ububtu-latest-and-windows-latest/80638/3 "2022-05-07T13:33:44Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Ralph\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ralph_smith/32/10344_2.png) [@Ralph\_Smith](https://discourse.julialang.org/u/Ralph_Smith)\
**Post date:** [May 7, 2022, 4:41pm UTC](https://discourse.julialang.org/t/code-running-on-local-julia-but-failing-on-ci-tests-with-ububtu-latest-and-windows-latest/80638/4 "2022-05-07T16:41:06Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![andreasvarga](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/andreasvarga/32/11634_2.png) [@andreasvarga](https://discourse.julialang.org/u/andreasvarga)\
**Post date:** [May 7, 2022, 5:06pm UTC](https://discourse.julialang.org/t/code-running-on-local-julia-but-failing-on-ci-tests-with-ububtu-latest-and-windows-latest/80638/5 "2022-05-07T17:06:23Z")

</div>

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

I opened an issue at [211](https://github.com/JuliaArrays/BlockArrays.jl/issues/211).

---

<div class="post-metadata">

**Author:** ![dlfivefifty](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dlfivefifty/32/1959_2.png) [@dlfivefifty](https://discourse.julialang.org/u/dlfivefifty)\
**Post date:** [May 8, 2022, 1:15pm UTC](https://discourse.julialang.org/t/code-running-on-local-julia-but-failing-on-ci-tests-with-ububtu-latest-and-windows-latest/80638/6 "2022-05-08T13:15:33Z")

</div>

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](https://github.com/JuliaApproximation/ApproxFunBase.jl/pull/95)
