Skip to content

Instantly share code, notes, and snippets.

@kanav99
Last active August 24, 2019 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kanav99/d56a4ad1675512afbb45abbef4bb6c03 to your computer and use it in GitHub Desktop.
Save kanav99/d56a4ad1675512afbb45abbef4bb6c03 to your computer and use it in GitHub Desktop.

Final Blog

This blog marks end of a really wonderful experience with amazing people! Special shoutout to Chris Rackauckas, Yingbo Ma and David Widmann who immensely helped me in getting my work done and helping me throughout this whole summer. I would always be greatful to them for accepting me as a student.

Regarding my work, my project dealt with more of general fixes for many of the JuliaDiffEq repositories. My work was focussed the most on Callbacks, Non Linear solvers and other Derivative utilities. It involved a lot of moving code back and forth from one repository to another as we were making the common tools in all the repositories shifted to DiffEqBase. Also I made a small benchmarking service called DiffEqBot for the organization which also got featured on JuliaLang Blog! Below is the list of my contribution grouped by the type of work -

Derivative Utilities and Non linear solvers

We used to have seperate copies of the NLSolver methods in each of the repositories. All of them were basically same, but with small changes. We made that common for all of them and shifted it to DiffEqBase. We are further refactoring it right now to an even more extendible interface.

Repository PR Title
DiffEqBase #209 Shift NLSolve code to DiffEqBase
OrdinaryDiffEq #721 Moves NLSolve code to DiffEqBase
StochasticDiffEq #141 Jacobian Reuse in StochasticDiffEq
DiffEqBase #250 Split NLSolve macros
OrdinaryDiffEq #790 Changes for Split of nlsolve macros
DiffEqDiffTools #63 Adds resize! for JacobianCache
DiffEqBase #265 Resizing nlsolver things
StochasticDiffEq #194 Changes for NLSolver change
OrdinaryDiffEq #830 [WIP] Remove redundant NLSolve fields from alg cache
DiffEqBase #297 Resize changes for new nlsolve
StochasticDiffEq #205 Remove redundant NLSolve Fields
DiffEqDocs #255 NLSolver Documentation

DiffEqBot and Benchmarking

I developed a basic bot which is very similar to Nanosoldier, we call it on GitHub, it runs benchmarking scripts on a PC and posts the results comparing the PR with master. All of the work and documentaion is contained in the repository DiffEqBenchmarkServer.jl

Repository PR Title
OrdinaryDiffEq #743 Adds Benchmark Suite
OrdinaryDiffEq #772,#773,#774,#775 Benchmark Time Adjustments
DiffEqBenchmarkServer #1 Complete the documentation and instructions
DiffEqBenchmarkServer #2 Remove benchmarked package after job

Callbacks

Our packages have a feature called Callbacks, which helps users plug their own code when a certain event happes - like a particular variable reaches a certain value. My work was to implement VectorContinuousCallback, which is basically equivalent to CallbackSet, but it's very lightweight for the case of large number of callbacks.

Repository PR Title
OrdinaryDiffEq #754 Changes for VectorContinuousCallback
DiffEqBase #229 Adds CallbackCache
DiffEqBase #231 Fixes type broken inference
StochasticDiffEq #157 Changes for VectorContinuousCallback
DiffEqDocs #226 Adds VectorContinuousCallback documentation
DiffEqBase #235 Fix callback tests failures
DiffEqBase #238 Fix OrdinaryDiffEq failure
Sundials #214 Changes for VectorContinuousCallback
ODEInterfaceDiffEq #27 Changes for VectorContinuousCallback
DiffEqDocs #227 Adds VectorContinuousCallback example
DiffEqBase #253 CallbackSet fix
DiffEqBase #257 Better epsilon handling in callbacks
DiffEqBase #271 Fix missed callback

Making Parallel Safe Routines

Originally, the toolkit developed was not ready for parallel algorithms, especially the derivative utilities and nlsolver. I made the required changes and implemented first Parallel DIRK (PDIRK44). Now that one algorithm is implemented, it opens new ways for future algorithms to be developed using the same toolkit we have.

Repository PR Title
OrdinaryDiffEq #815 [WIP] Parallel 4th order DIRK
DiffEqBase #288 [WIP] Make nlsolve thread safe

DAE Problem Support

We are almost there when we have OrdinaryDiffEq natively support Fully Implicit ODEs including DAEs. I aim to implement two algorithms - DImplicitEuler and DBDF. DImplicitEuler is ready, but we need changes in NLSolver, so for now, we are using NLsolver.jl package

Repository PR Title
OrdinaryDiffEq #863 DAEProblem Support

General Fixes

On the way down, I also fixed some small fixes -

Repository PR Title
OrdinaryDiffEq #751 Qsteady Handling in JVODE, QNDF and Standard Controller
DiffEqBase #255 Fix Typo and Tests
OrdinaryDiffEq #757 Fix DifferentialEquations warning
StochasticDiffEq #152 Fix DifferentialEquations warning
DelayDiffEq #105 Fixes unwrap_cache error
DelayDiffEq #108 Test Failure Fixes
OrdinaryDiffEq #796 Fix analytic functions in tests
OrdinaryDiffEq #812 [WIP] Resize remaining fields
DiffEqDocs #251 SKenCarp warning
DiffEqProblemLibrary #50 fix Brusselator Problem
StochasticDiffEq #223 [WIP] SKenCarp convergence fix
OrdinaryDiffEq #881 Fix ImplicitEulerExtrapolation

Future Plans

I have decided that I will stay with JuliaDiffEq and get involved in the community more. People here are amazing and I have never seen a community that works towards efficiency in code more than this. GSoC was a great way of getting involved in JuliaDiffEq and Julia organizations. I want to complete DAE Support and then move on to ModelingToolkit.jl, a toolkit for modeling DSLs. Much more things I need to explore, so much more to learn.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment