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

refactor: splitting up of NonlinearSolve #483

Merged
merged 43 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
992d265
refactor: minor stylistic fixes
avik-pal Oct 23, 2024
94db887
refactor: move LinearSolve wrapper into NonlinearSolveBase
avik-pal Oct 26, 2024
b0cbbd1
refactor: move JacobianCache into NonlinearSolveBase
avik-pal Oct 26, 2024
5307483
fix: missing `u`
avik-pal Oct 26, 2024
dfdb7d8
chore: remove unused imports
avik-pal Oct 26, 2024
01208dc
refactor: move Descent Directions to `NonlinearSolveBase`
avik-pal Oct 26, 2024
336071c
chore: run formatter
avik-pal Oct 26, 2024
cb3f8aa
refactor: make `nothing` the default preconditioner
avik-pal Oct 26, 2024
9369eee
fix: move the `BandedArrays` extension
avik-pal Oct 26, 2024
95710ce
chore: setup subprojects
avik-pal Oct 27, 2024
f0e2a87
refactor: move tracing functionality to NonlinearSolveBase
avik-pal Oct 27, 2024
effeea0
refactor: move DFSane into NonlinearSolveSpectralMethods
avik-pal Oct 27, 2024
4159e9a
refactor: create Quasi Newton Algorithm subpackage
avik-pal Oct 28, 2024
c05816f
feat: nicer generalized printing of structs/results
avik-pal Oct 28, 2024
8a22202
refactor: implement internal caches function
avik-pal Oct 28, 2024
3075a08
refactor: delete more code
avik-pal Oct 28, 2024
c986381
chore: run formatter
avik-pal Oct 28, 2024
cfcdce6
refactor: move algorithms to First Order sub-package
avik-pal Oct 28, 2024
5af6010
refactor: move LM to First Order
avik-pal Oct 28, 2024
4e1098f
refactor: minor cleanup
avik-pal Oct 28, 2024
ba8f893
refactor: move stuff around a bit
avik-pal Oct 29, 2024
99d3216
feat(BracketingNonlinearSolve): subtype AbstractNonlinearSolveAlgorithm
avik-pal Oct 29, 2024
feae171
refactor(SimpleNonlinearSolve): reuse more code from NLB
avik-pal Oct 29, 2024
98508a5
ci(github-actions): nonlinearsolvebase and bracketingnonlinearsolve
avik-pal Oct 29, 2024
264a7e8
ci(github-actions): simplenonlinearsolve
avik-pal Oct 29, 2024
2a5800f
test(NonlinearSolveSpectralMethods): add tests and ci scripts
avik-pal Oct 29, 2024
c73690e
fix: parallel precompile
avik-pal Oct 29, 2024
52a2387
test: move tests for QuasiNewton solvers
avik-pal Oct 29, 2024
d0389b7
test: first order tests
avik-pal Oct 30, 2024
2d4a35d
chore: run formatter
avik-pal Oct 30, 2024
d44b6b6
test: fix more of NonlinearSolve tests
avik-pal Oct 30, 2024
4f74479
chore: run formatter
avik-pal Oct 30, 2024
693949b
refactor: cleanup all wrappers
avik-pal Oct 31, 2024
cdde6e1
fix: forwarddiff support
avik-pal Oct 31, 2024
d548ada
fix: alg call for LSO
avik-pal Oct 31, 2024
6ef8905
ci: add downgrade testing to all the packages
avik-pal Oct 31, 2024
bec897f
chore: fix compat entries
avik-pal Oct 31, 2024
a7a5f1e
ci: fix invalidations CI
avik-pal Oct 31, 2024
4354511
test: centralize the 23 test problem testing
avik-pal Oct 31, 2024
eb67c22
test: remove segfault warning
avik-pal Oct 31, 2024
4de8491
docs: update all documentation
avik-pal Oct 31, 2024
75be6e4
fix: jacobian caching
avik-pal Oct 31, 2024
c6cf395
chore: run formatter
avik-pal Oct 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ steps:
Pkg.Registry.update();
# Install packages present in subdirectories
dev_pks = Pkg.PackageSpec[];
for path in ("lib/SciMLJacobianOperators", "lib/BracketingNonlinearSolve", "lib/NonlinearSolveBase", "lib/SimpleNonlinearSolve")
for path in ("lib/SciMLJacobianOperators", "lib/BracketingNonlinearSolve", "lib/NonlinearSolveBase", "lib/SimpleNonlinearSolve", "lib/NonlinearSolveFirstOrder", "lib/NonlinearSolveSpectralMethods", "lib/NonlinearSolveQuasiNewton")
push!(dev_pks, Pkg.PackageSpec(; path));
end
Pkg.develop(dev_pks);
Pkg.instantiate();
Pkg.test(; coverage=true)'
Pkg.test(; coverage="user")'
agents:
queue: "juliagpu"
cuda: "*"
Expand All @@ -42,12 +42,12 @@ steps:
Pkg.Registry.update();
# Install packages present in subdirectories
dev_pks = Pkg.PackageSpec[];
for path in ("lib/NonlinearSolveBase", "lib/BracketingNonlinearSolve")
for path in ("lib/NonlinearSolveBase", "lib/BracketingNonlinearSolve", "lib/SciMLJacobianOperators")
push!(dev_pks, Pkg.PackageSpec(; path))
end
Pkg.develop(dev_pks);
Pkg.instantiate();
Pkg.test(; coverage=true)'
Pkg.test(; coverage="user")'
agents:
queue: "juliagpu"
cuda: "*"
Expand Down
49 changes: 44 additions & 5 deletions .github/workflows/CI_BracketingNonlinearSolve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ on:
- master
paths:
- "lib/BracketingNonlinearSolve/**"
- "lib/NonlinearSolveBase/**"
- ".github/workflows/CI_BracketingNonlinearSolve.yml"
- "lib/NonlinearSolveBase/**"
- "lib/SciMLJacobianOperators/**"
push:
branches:
- master
Expand All @@ -25,7 +26,7 @@ jobs:
fail-fast: false
matrix:
version:
- "min"
- "1.10"
- "1"
os:
- ubuntu-latest
Expand All @@ -52,16 +53,54 @@ jobs:
Pkg.Registry.update()
# Install packages present in subdirectories
dev_pks = Pkg.PackageSpec[]
for path in ("lib/NonlinearSolveBase",)
for path in ("lib/NonlinearSolveBase", "lib/SciMLJacobianOperators")
push!(dev_pks, Pkg.PackageSpec(; path))
end
Pkg.develop(dev_pks)
Pkg.instantiate()
Pkg.test(; coverage="user")
shell: julia --color=yes --code-coverage=user --depwarn=yes --project=lib/BracketingNonlinearSolve {0}
- uses: julia-actions/julia-processcoverage@v1
with:
directories: lib/BracketingNonlinearSolve/src,lib/BracketingNonlinearSolve/ext,lib/NonlinearSolveBase/src,lib/NonlinearSolveBase/ext,lib/SciMLJacobianOperators/src
- uses: codecov/codecov-action@v4
with:
file: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
fail_ci_if_error: true

downgrade:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version:
- "1.10"
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
- uses: julia-actions/julia-downgrade-compat@v1
with:
skip: NonlinearSolveBase, SciMLJacobianOperators
- name: "Install Dependencies and Run Tests"
run: |
import Pkg
Pkg.Registry.update()
# Install packages present in subdirectories
dev_pks = Pkg.PackageSpec[]
for path in ("lib/NonlinearSolveBase", "lib/SciMLJacobianOperators")
push!(dev_pks, Pkg.PackageSpec(; path))
end
Pkg.develop(dev_pks)
Pkg.instantiate()
Pkg.test(; coverage=true)
Pkg.test(; coverage="user")
shell: julia --color=yes --code-coverage=user --depwarn=yes --project=lib/BracketingNonlinearSolve {0}
- uses: julia-actions/julia-processcoverage@v1
with:
directories: lib/BracketingNonlinearSolve/src,lib/BracketingNonlinearSolve/ext
directories: lib/BracketingNonlinearSolve/src,lib/BracketingNonlinearSolve/ext,lib/NonlinearSolveBase/src,lib/NonlinearSolveBase/ext,lib/SciMLJacobianOperators/src
- uses: codecov/codecov-action@v4
with:
file: lcov.info
Expand Down
62 changes: 54 additions & 8 deletions .github/workflows/CI_NonlinearSolve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ on:
- "lib/BracketingNonlinearSolve/**"
- "lib/NonlinearSolveBase/**"
- "lib/SimpleNonlinearSolve/**"
- "lib/NonlinearSolveFirstOrder/**"
- "lib/NonlinearSolveSpectralMethods/**"
- "lib/NonlinearSolveQuasiNewton/**"
push:
branches:
- master
Expand All @@ -31,12 +34,11 @@ jobs:
fail-fast: false
matrix:
group:
- Core
- Downstream
- Misc
- Wrappers
- core
- downstream
- wrappers
version:
- "min"
- "1.10"
- "1"
os:
- ubuntu-latest
Expand All @@ -63,18 +65,62 @@ jobs:
Pkg.Registry.update()
# Install packages present in subdirectories
dev_pks = Pkg.PackageSpec[]
for path in ("lib/SciMLJacobianOperators", "lib/BracketingNonlinearSolve", "lib/NonlinearSolveBase", "lib/SimpleNonlinearSolve")
for path in ("lib/SciMLJacobianOperators", "lib/BracketingNonlinearSolve", "lib/NonlinearSolveBase", "lib/SimpleNonlinearSolve", "lib/NonlinearSolveFirstOrder", "lib/NonlinearSolveSpectralMethods", "lib/NonlinearSolveQuasiNewton")
push!(dev_pks, Pkg.PackageSpec(; path))
end
Pkg.develop(dev_pks)
Pkg.instantiate()
Pkg.test(; coverage=true)
Pkg.test(; coverage="user")
shell: julia --color=yes --code-coverage=user --depwarn=yes --project=. {0}
env:
GROUP: ${{ matrix.group }}
- uses: julia-actions/julia-processcoverage@v1
with:
directories: src,ext,lib/SciMLJacobianOperators/src
directories: src,ext,lib/SciMLJacobianOperators/src,lib/BracketingNonlinearSolve/src,lib/NonlinearSolveBase/src,lib/NonlinearSolveBase/ext,lib/SimpleNonlinearSolve/src,lib/NonlinearSolveFirstOrder/src,lib/NonlinearSolveSpectralMethods/src,lib/NonlinearSolveQuasiNewton/src
- uses: codecov/codecov-action@v4
with:
file: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
fail_ci_if_error: true

downgrade:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version:
- "1.10"
group:
- core
- downstream
- wrappers
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
- uses: julia-actions/julia-downgrade-compat@v1
with:
skip: SciMLJacobianOperators, BracketingNonlinearSolve, NonlinearSolveBase, SimpleNonlinearSolve, NonlinearSolveFirstOrder, NonlinearSolveSpectralMethods, NonlinearSolveQuasiNewton
- name: "Install Dependencies and Run Tests"
run: |
import Pkg
Pkg.Registry.update()
# Install packages present in subdirectories
dev_pks = Pkg.PackageSpec[]
for path in ("lib/SciMLJacobianOperators", "lib/BracketingNonlinearSolve", "lib/NonlinearSolveBase", "lib/SimpleNonlinearSolve", "lib/NonlinearSolveFirstOrder", "lib/NonlinearSolveSpectralMethods", "lib/NonlinearSolveQuasiNewton")
push!(dev_pks, Pkg.PackageSpec(; path))
end
Pkg.develop(dev_pks)
Pkg.instantiate()
Pkg.test(; coverage="user")
shell: julia --color=yes --code-coverage=user --depwarn=yes --project=. {0}
env:
GROUP: ${{ matrix.group }}
- uses: julia-actions/julia-processcoverage@v1
with:
directories: src,ext,lib/SciMLJacobianOperators/src,lib/BracketingNonlinearSolve/src,lib/NonlinearSolveBase/src,lib/NonlinearSolveBase/ext,lib/SimpleNonlinearSolve/src,lib/NonlinearSolveFirstOrder/src,lib/NonlinearSolveSpectralMethods/src,lib/NonlinearSolveQuasiNewton/src
- uses: codecov/codecov-action@v4
with:
file: lcov.info
Expand Down
51 changes: 48 additions & 3 deletions .github/workflows/CI_NonlinearSolveBase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
paths:
- "lib/NonlinearSolveBase/**"
- ".github/workflows/CI_NonlinearSolveBase.yml"
- "lib/SciMLJacobianOperators/**"
push:
branches:
- master
Expand All @@ -24,7 +25,7 @@ jobs:
fail-fast: false
matrix:
version:
- "min"
- "1.10"
- "1"
os:
- ubuntu-latest
Expand All @@ -49,12 +50,56 @@ jobs:
run: |
import Pkg
Pkg.Registry.update()
# Install packages present in subdirectories
dev_pks = Pkg.PackageSpec[]
for path in ("lib/SciMLJacobianOperators",)
push!(dev_pks, Pkg.PackageSpec(; path))
end
Pkg.develop(dev_pks)
Pkg.instantiate()
Pkg.test(; coverage=true)
Pkg.test(; coverage="user")
shell: julia --color=yes --code-coverage=user --depwarn=yes --project=lib/NonlinearSolveBase {0}
- uses: julia-actions/julia-processcoverage@v1
with:
directories: lib/NonlinearSolveBase/src,lib/NonlinearSolveBase/ext
directories: lib/NonlinearSolveBase/src,lib/NonlinearSolveBase/ext,lib/SciMLJacobianOperators/src
- uses: codecov/codecov-action@v4
with:
file: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
fail_ci_if_error: true

downgrade:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version:
- "1.10"
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
- uses: julia-actions/julia-downgrade-compat@v1
with:
skip: SciMLJacobianOperators
- name: "Install Dependencies and Run Tests"
run: |
import Pkg
Pkg.Registry.update()
# Install packages present in subdirectories
dev_pks = Pkg.PackageSpec[]
for path in ("lib/SciMLJacobianOperators",)
push!(dev_pks, Pkg.PackageSpec(; path))
end
Pkg.develop(dev_pks)
Pkg.instantiate()
Pkg.test(; coverage="user")
shell: julia --color=yes --code-coverage=user --depwarn=yes --project=lib/NonlinearSolveBase {0}
- uses: julia-actions/julia-processcoverage@v1
with:
directories: lib/NonlinearSolveBase/src,lib/NonlinearSolveBase/ext,lib/SciMLJacobianOperators/src
- uses: codecov/codecov-action@v4
with:
file: lcov.info
Expand Down
109 changes: 109 additions & 0 deletions .github/workflows/CI_NonlinearSolveFirstOrder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: CI (NonlinearSolveFirstOrder)

on:
pull_request:
branches:
- master
paths:
- "lib/NonlinearSolveFirstOrder/**"
- ".github/workflows/CI_NonlinearSolveFirstOrder.yml"
- "lib/NonlinearSolveBase/**"
- "lib/SciMLJacobianOperators/**"
push:
branches:
- master

concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- "1.10"
- "1"
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
- uses: actions/cache@v4
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- name: "Install Dependencies and Run Tests"
run: |
import Pkg
Pkg.Registry.update()
# Install packages present in subdirectories
dev_pks = Pkg.PackageSpec[]
for path in ("lib/SciMLJacobianOperators", "lib/NonlinearSolveBase")
push!(dev_pks, Pkg.PackageSpec(; path))
end
Pkg.develop(dev_pks)
Pkg.instantiate()
Pkg.test(; coverage="user")
shell: julia --color=yes --code-coverage=user --depwarn=yes --project=lib/NonlinearSolveFirstOrder {0}
- uses: julia-actions/julia-processcoverage@v1
with:
directories: lib/NonlinearSolveFirstOrder/src,lib/NonlinearSolveBase/src,lib/NonlinearSolveBase/ext,lib/SciMLJacobianOperators/src
- uses: codecov/codecov-action@v4
with:
file: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
fail_ci_if_error: true

downgrade:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version:
- "1.10"
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
- uses: julia-actions/julia-downgrade-compat@v1
with:
skip: NonlinearSolveBase, SciMLJacobianOperators
- name: "Install Dependencies and Run Tests"
run: |
import Pkg
Pkg.Registry.update()
# Install packages present in subdirectories
dev_pks = Pkg.PackageSpec[]
for path in ("lib/SciMLJacobianOperators", "lib/NonlinearSolveBase")
push!(dev_pks, Pkg.PackageSpec(; path))
end
Pkg.develop(dev_pks)
Pkg.instantiate()
Pkg.test(; coverage="user")
shell: julia --color=yes --code-coverage=user --depwarn=yes --project=lib/NonlinearSolveFirstOrder {0}
- uses: julia-actions/julia-processcoverage@v1
with:
directories: lib/NonlinearSolveFirstOrder/src,lib/NonlinearSolveBase/src,lib/NonlinearSolveBase/ext,lib/SciMLJacobianOperators/src
- uses: codecov/codecov-action@v4
with:
file: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
fail_ci_if_error: true
Loading
Loading