JuliaLinearAlgebra / AlgebraicMultigrid.jl

Algebraic Multigrid in Julia
Other
116 stars 23 forks source link

LinearSolve.jl coarse solve integration #103

Closed termi-official closed 11 months ago

termi-official commented 11 months ago

Resolves https://github.com/JuliaLinearAlgebra/AlgebraicMultigrid.jl/issues/94 . Might invalidate https://github.com/SciML/LinearSolve.jl/issues/373 .

termi-official commented 11 months ago

Not sure why the invalidation CI regresses here. Seems to be unrelated to the changeset.

 using SnoopCompileCore
  invalidations = @snoopr begin using AlgebraicMultigrid end

  using SnoopCompile
  inv_owned = length(filtermod(AlgebraicMultigrid, invalidation_trees(invalidations)))
  inv_total = length(uinvalidated(invalidations))
  inv_deps = inv_total - inv_owned

  @show inv_total, inv_deps

  # Report invalidations summary:
  using PrettyTables  # needed for `report_invalidations` to be defined
  SnoopCompile.report_invalidations(;
       invalidations,
       process_filename = x -> last(split(x, ".julia/packages/")),
       n_rows = 0,  # no-limit (show all invalidations)
  )

  # Set outputs
  open(ENV["GITHUB_OUTPUT"], "a") do io
    println(io, "total=$(inv_total)")
    println(io, "deps=$(inv_deps)")
  end
  shell: /opt/hostedtoolcache/julia/1.9.3/x64/bin/julia --color=yes --project=. {0}
  env:
    JULIA_PKG_SERVER_REGISTRY_PREFERENCE: eager
(inv_total, inv_deps) = (626, 626)
[ Info: 626 methods invalidated for 25 functions
┌──────────────────────────────────────────────────────────────────────┬──────────────────┬───────────────┬─────────────────┐
│ <file name>:<line number>                                            │  Function Name   │ Invalidations │ Invalidations % │
│                                                                      │                  │               │     (xᵢ/∑x)     │
├──────────────────────────────────────────────────────────────────────┼──────────────────┼───────────────┼─────────────────┤
│ FillArrays/FwMoZ/src/fillalgebra.jl:357                              │   reduce_first   │      220      │       43        │
│ RuntimeGeneratedFunctions/Yo8zx/src/RuntimeGeneratedFunctions.jl:336 │    serialize     │      107      │       21        │
│ LoopVectorization/xHfLl/src/reconstruct_loopset.jl:30                │     convert      │      34       │        7        │
│ FillArrays/FwMoZ/src/fillbroadcast.jl:78                             │   broadcasted    │      21       │        4        │
│ LoopVectorization/xHfLl/src/reconstruct_loopset.jl:21                │   promote_rule   │      18       │        4        │
│ VectorizationBase/0dXyA/src/base_defs.jl:199                         │     convert      │      18       │        4        │
│ OffsetArrays/0MOrf/src/OffsetArrays.jl:320                           │     similar      │      15       │        3        │
│ OrderedCollections/SInLM/src/ordered_dict.jl:100                     │     convert      │      12       │        2        │
│ FillArrays/FwMoZ/src/FillArrays.jl:693                               │ print_matrix_row │       9       │        2        │
│ Static/dLrtk/src/Static.jl:391                                       │       zero       │       9       │        2        │
│ Static/dLrtk/src/Static.jl:86                                        │     to_index     │       8       │        2        │
│ PolyesterWeave/nokDP/src/unsignediterator.jl:6                       │  IteratorEltype  │       6       │        1        │
│ VectorizationBase/0dXyA/src/promotion.jl:64                          │   promote_rule   │       6       │        1        │
│ Static/dLrtk/src/ranges.jl:169                                       │       step       │       6       │        1        │
│ Static/dLrtk/src/Static.jl:414                                       │     convert      │       6       │        1        │
│ PolyesterWeave/nokDP/src/unsignediterator.jl:5                       │   IteratorSize   │       3       │        1        │
│ Static/dLrtk/src/ranges.jl:147                                       │      oneto       │       3       │        1        │
│ VectorizationBase/0dXyA/src/base_defs.jl:300                         │      ifelse      │       2       │        0        │
│ Static/dLrtk/src/Static.jl:80                                        │   promote_rule   │       2       │        0        │
│ FillArrays/FwMoZ/src/FillArrays.jl:531                               │     convert      │       1       │        0        │
│ LoopVectorization/xHfLl/src/reconstruct_loopset.jl:35                │     convert      │       1       │        0        │
│ CloseOpenIntervals/ao8uo/src/CloseOpenIntervals.jl:70                │       step       │       1       │        0        │
│ Static/dLrtk/src/ranges.jl:331                                       │   getproperty    │       1       │        0        │
│ Static/dLrtk/src/Static.jl:394                                       │       one        │       1       │        0        │
│ Static/dLrtk/src/Static.jl:96                                        │      ifelse      │       0       │        0        │
└──────────────────────────────────────────────────────────────────────┴──────────────────┴───────────────┴─────────────────┘
ranjanan commented 11 months ago

Yeah, if you look at the invalidations logs, it says there are zero invalidations. I am going to merge this based on that.