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

feat: NonlinearSolveBase + BracketingNonlinearSolve + SimpleNonlinearSolve #458

Merged
merged 92 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
71065e7
refactor: migrate to LineSearch.jl
avik-pal Sep 24, 2024
543f086
fix: forward reinit_cache to SciMLBase.reinit
avik-pal Sep 26, 2024
656053b
refactor: migrate to LineSearch.jl
avik-pal Sep 24, 2024
bca5579
feat: setup NonlinearSolveBase
avik-pal Aug 23, 2024
90ca159
chore: run formatter
avik-pal Aug 23, 2024
14442d4
feat: add ImmutableNonlinearProblem
avik-pal Aug 23, 2024
ac7bbae
fix: finish broken termination conditions
avik-pal Aug 23, 2024
102c302
feat: start a SimpleBracketingNonlinearSolve sublibrary
avik-pal Aug 23, 2024
4ed8f11
feat: implement all bracketing algorithms
avik-pal Aug 23, 2024
97781f3
chore: missing license
avik-pal Aug 23, 2024
a7fb517
chore: qa fixes
avik-pal Aug 23, 2024
d6e868a
test: add tests for the bracketing methods
avik-pal Sep 16, 2024
1c16330
feat: ForwardDiff support in NonlinearSolveBase
avik-pal Sep 17, 2024
b4d5e1d
fix: extension for forward AD support
avik-pal Sep 17, 2024
ce2cb88
ci(github-actions): add workflows for subpackages
avik-pal Sep 17, 2024
5b1dc0f
ci(github-actions): trigger dependent packages on file changes
avik-pal Sep 17, 2024
3ad8c5b
feat: add bracketing default algorithm
avik-pal Sep 17, 2024
faf5e7e
refactor: setup SimpleNonlinearSolve.jl
avik-pal Sep 17, 2024
406607b
ci(github-actions): fix package dev workflow
avik-pal Sep 17, 2024
cbbf8a7
feat: add simplenonlinearsolve AD specific dispatches
avik-pal Sep 17, 2024
d73a1f9
feat: add the AD workflows
avik-pal Sep 17, 2024
815ade5
chore: run formatter
avik-pal Sep 17, 2024
d8250ea
feat: share the termination condition code in NonlinearSolve and Simp…
avik-pal Sep 17, 2024
1d03fa2
feat: add partial SimpleKlement Implementation
avik-pal Sep 17, 2024
00e3ce5
chore: fix typo in error message
avik-pal Sep 17, 2024
317c141
fix: missing import
avik-pal Sep 17, 2024
0d56e22
feat: functional Klement
avik-pal Sep 18, 2024
5d28535
chore: apply formatting suggestion
avik-pal Sep 18, 2024
0ee0627
chore: run formatter
avik-pal Sep 25, 2024
cd798b9
ci: make the scripts uniform
avik-pal Sep 25, 2024
c0ce052
feat: bring in changes from https://github.com/SciML/SimpleNonlinearS…
avik-pal Sep 25, 2024
a17568e
chore: unnecessary comment
avik-pal Sep 25, 2024
2d0768a
feat: automatic backend selection for autodiff
avik-pal Sep 25, 2024
5f2d608
feat: check for branching for ReverseDiff(compile=true)
avik-pal Sep 26, 2024
9efebed
feat: SimpleNewtonRaphson
avik-pal Oct 4, 2024
b094fa6
fix: typos
avik-pal Oct 4, 2024
a48a759
chore: all files
avik-pal Oct 4, 2024
3edc368
fix: ordering in jacobian call
avik-pal Oct 4, 2024
8d1d2b4
chore: run formatter
avik-pal Oct 4, 2024
3bdf737
feat: SimpleTrustRegion implementation
avik-pal Oct 4, 2024
6b95501
docs: trust region docstring
avik-pal Oct 4, 2024
1ea8262
feat: SimpleBroyden implementation
avik-pal Oct 4, 2024
d944b7b
feat: add SimpleHalley method
avik-pal Oct 4, 2024
ff961b1
feat: add SimpleDFSane
avik-pal Oct 4, 2024
4febefe
fix: only precompile selected workloads for faster loading
avik-pal Oct 4, 2024
6ba6018
chore: run formatter
avik-pal Oct 4, 2024
facdb42
feat: SimpleLimitedMemoryBroyden impl
avik-pal Oct 4, 2024
5749f2c
fix: simplenonlinearsolve in cuda kernels
avik-pal Oct 7, 2024
73d960c
fix: exotic types
avik-pal Oct 7, 2024
51b24f9
chore: run formatter
avik-pal Oct 7, 2024
54a678a
fix: typos
avik-pal Oct 7, 2024
c5884d3
test: bring over more tests
avik-pal Oct 7, 2024
e7cb5c2
test: adjoints
avik-pal Oct 7, 2024
dcf62eb
fix: minor fixes to support adjoints
avik-pal Oct 7, 2024
a51f8e7
test: 23 test problems
avik-pal Oct 7, 2024
5059e0d
fix: simple klement implementation
avik-pal Oct 7, 2024
59a87ed
chore: run the formatter
avik-pal Oct 7, 2024
052050c
feat: bump major version of SimpleNonlinearSolve
avik-pal Oct 7, 2024
58e6c00
test: comprehensive testing of root finding
avik-pal Oct 7, 2024
a48b0c2
feat: support NLLS forward AD
avik-pal Oct 7, 2024
186dc86
ci: other internal deps for NonlinearSolve
avik-pal Oct 7, 2024
f66818e
test: NLLS forwarddiff rules testing
avik-pal Oct 7, 2024
e96cb9a
test: NonlinearProblem forward diff testing
avik-pal Oct 7, 2024
36227c9
test: lazy install packages
avik-pal Oct 7, 2024
15c342e
fix: auto-set autodiff for ForwardDiff if trying to propagate Duals
avik-pal Oct 8, 2024
6a1737d
fix: QA for NonlinearSolveBase
avik-pal Oct 8, 2024
9a4a275
test: wrap in a global testset
avik-pal Oct 8, 2024
b71192f
fix: write out the AD as dispatches
avik-pal Oct 8, 2024
4842fc6
test: install AllocCheck if needed
avik-pal Oct 8, 2024
06e9c03
fix: missing extras
avik-pal Oct 8, 2024
6c11fb6
test(BracketingNonlinearSolve): qq using Aqua and ExplicitImports
avik-pal Oct 20, 2024
5b63767
fix(SimpleNonlinearSolve): incorrect argument ordering
avik-pal Oct 20, 2024
3620e6c
feat: remove LineSearches.jl dependency
avik-pal Oct 21, 2024
3b47dbf
chore: remove deprecated functionalities
avik-pal Oct 21, 2024
6fdbe65
chore: remove more deprecations
avik-pal Oct 21, 2024
16ecd16
chore: run formatter
avik-pal Oct 21, 2024
91c5636
test: try fixing circular deps
avik-pal Oct 21, 2024
c6a517e
chore: remove unnecessary deps
avik-pal Oct 21, 2024
88140cb
fix: `misc` test group
avik-pal Oct 21, 2024
ca9c835
fix: forwarddiff support
avik-pal Oct 21, 2024
f6041af
fix: remove deprecated APIs
avik-pal Oct 21, 2024
0b91de7
refactor: use functionality from `NonlinearSolveBase` instead of `Dif…
avik-pal Oct 22, 2024
89d76b0
chore: fix QA testing
avik-pal Oct 22, 2024
f5a06cb
fix: dispatch forwarddiff on `__init` and `__solve`
avik-pal Oct 22, 2024
3ded2fa
feat: forwarddiff support for sundials
avik-pal Oct 22, 2024
621c1b4
refactor: use reexports
avik-pal Oct 22, 2024
8f00979
refactor: centralize autodiff selection
avik-pal Oct 22, 2024
2f36ade
fix: `:misc` testing
avik-pal Oct 22, 2024
5073358
fix: `:wrappers` testing
avik-pal Oct 22, 2024
f3b317d
fix: mode warning printing
avik-pal Oct 22, 2024
1b77877
fix: minor cleanups
avik-pal Oct 22, 2024
8f5ecf3
docs: update documentation
avik-pal Oct 22, 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
32 changes: 30 additions & 2 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,36 @@ steps:
Pkg.Registry.update();
# Install packages present in subdirectories
dev_pks = Pkg.PackageSpec[];
for path in ("lib/SciMLJacobianOperators",)
push!(dev_pks, Pkg.PackageSpec(; path));
for path in ("lib/SciMLJacobianOperators", "lib/BracketingNonlinearSolve", "lib/NonlinearSolveBase", "lib/SimpleNonlinearSolve")
push!(dev_pks, Pkg.PackageSpec(; path));
end
Pkg.develop(dev_pks);
Pkg.instantiate();
Pkg.test(; coverage=true)'
agents:
queue: "juliagpu"
cuda: "*"
timeout_in_minutes: 60
# Don't run Buildkite if the commit message includes the text [skip tests]
if: build.message !~ /\[skip tests\]/

- label: "Julia 1 (SimpleNonlinearSolve)"
plugins:
- JuliaCI/julia#v1:
version: "1"
- JuliaCI/julia-coverage#v1:
codecov: true
dirs:
- src
- ext
command: |
julia --color=yes --code-coverage=user --depwarn=yes --project=lib/SimpleNonlinearSolve -e '
import Pkg;
Pkg.Registry.update();
# Install packages present in subdirectories
dev_pks = Pkg.PackageSpec[];
for path in ("lib/NonlinearSolveBase", "lib/BracketingNonlinearSolve")
push!(dev_pks, Pkg.PackageSpec(; path))
end
Pkg.develop(dev_pks);
Pkg.instantiate();
Expand Down
70 changes: 70 additions & 0 deletions .github/workflows/CI_BracketingNonlinearSolve.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: CI (BracketingNonlinearSolve)

on:
pull_request:
branches:
- master
paths:
- "lib/BracketingNonlinearSolve/**"
- "lib/NonlinearSolveBase/**"
- ".github/workflows/CI_BracketingNonlinearSolve.yml"
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:
- "min"
- "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/NonlinearSolveBase",)
push!(dev_pks, Pkg.PackageSpec(; path))
end
Pkg.develop(dev_pks)
Pkg.instantiate()
Pkg.test(; coverage=true)
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
- uses: codecov/codecov-action@v4
with:
file: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
fail_ci_if_error: true
5 changes: 4 additions & 1 deletion .github/workflows/CI_NonlinearSolve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
- "Project.toml"
- ".github/workflows/CI_NonlinearSolve.yml"
- "lib/SciMLNonlinearOperators/**"
- "lib/BracketingNonlinearSolve/**"
- "lib/NonlinearSolveBase/**"
- "lib/SimpleNonlinearSolve/**"
push:
branches:
- master
Expand Down Expand Up @@ -60,7 +63,7 @@ jobs:
Pkg.Registry.update()
# Install packages present in subdirectories
dev_pks = Pkg.PackageSpec[]
for path in ("lib/SciMLJacobianOperators",)
for path in ("lib/SciMLJacobianOperators", "lib/BracketingNonlinearSolve", "lib/NonlinearSolveBase", "lib/SimpleNonlinearSolve")
push!(dev_pks, Pkg.PackageSpec(; path))
end
Pkg.develop(dev_pks)
Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/CI_NonlinearSolveBase.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: CI (NonlinearSolveBase)

on:
pull_request:
branches:
- master
paths:
- "lib/NonlinearSolveBase/**"
- ".github/workflows/CI_NonlinearSolveBase.yml"
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:
- "min"
- "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()
Pkg.instantiate()
Pkg.test(; coverage=true)
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
- uses: codecov/codecov-action@v4
with:
file: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
fail_ci_if_error: true
77 changes: 77 additions & 0 deletions .github/workflows/CI_SimpleNonlinearSolve.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: CI (SimpleNonlinearSolve)

on:
pull_request:
branches:
- master
paths:
- "lib/SimpleNonlinearSolve/**"
- "lib/BracketingNonlinearSolve/**"
- "lib/NonlinearSolveBase/**"
- ".github/workflows/CI_SimpleNonlinearSolve.yml"
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:
- "min"
- "1"
os:
- ubuntu-latest
- macos-latest
- windows-latest
group:
- core
- adjoint
- alloc_check
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/NonlinearSolveBase", "lib/BracketingNonlinearSolve")
push!(dev_pks, Pkg.PackageSpec(; path))
end
Pkg.develop(dev_pks)
Pkg.instantiate()
Pkg.test(; coverage=true)
shell: julia --color=yes --code-coverage=user --depwarn=yes --project=lib/SimpleNonlinearSolve {0}
env:
GROUP: ${{ matrix.group }}
- uses: julia-actions/julia-processcoverage@v1
with:
directories: lib/SimpleNonlinearSolve/src,lib/SimpleNonlinearSolve/ext
- uses: codecov/codecov-action@v4
with:
file: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
fail_ci_if_error: true
8 changes: 7 additions & 1 deletion .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,10 @@ jobs:
- name: CompatHelper.main()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: julia -e 'using CompatHelper; CompatHelper.main(;subdirs=["", "docs"])'
run: |
import CompatHelper
subdirs = ["", "docs"]
append!(subdirs, joinpath.(("lib",), filter(p -> isdir(joinpath("lib", p)), readdir("lib"))))
CompatHelper.main(; subdirs)
shell: julia --color=yes {0}
working-directory: "./"
4 changes: 2 additions & 2 deletions .github/workflows/Documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ jobs:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@latest
with:
version: '1'
version: '1.10'
- name: Install dependencies
run: |
import Pkg
Pkg.Registry.update()
# Install packages present in subdirectories
dev_pks = Pkg.PackageSpec[]
for path in ("lib/SciMLJacobianOperators", ".")
for path in ("lib/SciMLJacobianOperators", ".", "lib/SimpleNonlinearSolve", "lib/NonlinearSolveBase", "lib/BracketingNonlinearSolve")
push!(dev_pks, Pkg.PackageSpec(; path))
end
Pkg.develop(dev_pks)
Expand Down
35 changes: 31 additions & 4 deletions .github/workflows/Downgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,42 @@ jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version: ["1.10"]
version:
- "1.10"
group:
- Core
- Downstream
- Misc
- Wrappers
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
- uses: julia-actions/julia-downgrade-compat@v1
- 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")
push!(dev_pks, Pkg.PackageSpec(; path))
end
Pkg.develop(dev_pks)
Pkg.instantiate()
Pkg.test(; coverage=true)
shell: julia --color=yes --code-coverage=user --depwarn=yes --project=. {0}
env:
GROUP: ${{ matrix.group }}
- uses: julia-actions/julia-processcoverage@v1
with:
skip: Pkg,TOML
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
directories: src,ext,lib/SciMLJacobianOperators/src
- uses: codecov/codecov-action@v4
with:
file: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
fail_ci_if_error: true
3 changes: 2 additions & 1 deletion .typos.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[default.extend-words]
SER = "SER"
SER = "SER"
fo = "fo"
Loading
Loading