Zero-Cost Abstractions in Julia: Indexing Vectors by Name with LabelledArrays


November 12 2018 in Uncategorized | Tags: | Author: Christopher Rackauckas

The ability to build robust array type abstractions without overhead is one of the most fantastic features of Julia. It can be surprising how much one can do with the idea of an array to end up with better code. In this blog post I want to show how you can utilize Julia’s interface tools and @generated functions to build these kinds of zero-cost abstractions.

What is a zero-cost abstraction?

First let’s define a zero-cost abstraction. A zero-abstraction is a coding tool that has a zero run time cost associated with using it. Essentially what it does is it transforms into the fastest possible code during compilation so that its use has no effect on the run time of your code.

Example: Diagonal Matrices

A quick example is simple type wrappers in Julia. An example of this from the standard library is the Diagonal … READ MORE

The Nonlinear Effect of Code Speed on Productivity


October 29 2018 in Uncategorized | Tags: | Author: Christopher Rackauckas

I obsess over code performance, probably a little bit too much. But there’s a big reason for wanting a code to run in less than an hour instead of slightly more than two hours. The reason is because a code’s speed interacts with how we go about our day, and this speed can have a nonlinear effect on our productivity.

Here’s a concrete example. When I was a PhD student, I had a project which was solving ensembles of stochastic partial differential equations which were a model of the zebrafish hindbrain. Each run of this ensemble took about two hours and ten minutes to perform. For a good chunk of time, I needed to keep running these ensembles in order to manually check the output to tweak the model until it started to look realistic. Tweaking the model took only a … READ MORE

Solving Partial Differential Equations with Julia


Here is a talk from JuliaCon 2018 where I describe how to use the tooling across the Julia ecosystem to solve partial differential equations (PDEs), and how the different areas of the ecosystem are evolving to give top-notch PDE solver support.

Intro to solving differential equations in Julia


March 5 2018 in Uncategorized | Tags: | Author: Christopher Rackauckas

I did a livestream tutorial for solving differential equations in Julia and thought I should archive this in my blog. I hope this is interesting.

DifferentialEquations.jl 2.0: State of the Ecosystem


In this blog post I want to summarize what we have accomplished with DifferentialEquations’ 2.0 release and detail where we are going next. I want to put the design changes and development work into a larger context so that way everyone can better understand what has been achieved, and better understand how we are planning to tackle our next challenges.

If you find this project interesting and would like to support our work, please star our Github repository. Thanks!

Now let’s get started.

DifferentialEquations.jl 1.0: The Core

Before we start talking about 2.0, let’s understand first what 1.0 was all about. DifferentialEquations.jl 1.0 was about answering a single question: how can we put the wide array of differential equations into one simple and efficient interface. The result of this was the common interface explained in the first blog post. Essentially, we created … READ MORE

Some Fun With Julia Types: Symbolic Expressions in the ODE Solver


In Julia, you can naturally write generic algorithms which work on any type which has specific “actions”. For example, an “AbstractArray” is a type which has a specific set of functions implemented. This means that in any generically-written algorithm that wants an array, you can give it an AbstractArray and it will “just work”. This kind of abstraction makes it easy to write a simple algorithm and then use that same exact code for other purposes. For example, distributed computing can be done by just passing in a DistributedArray, and the algorithm can be accomplished on the GPU by using a GPUArrays. Because Julia’s functions will auto-specialize on the types you give it, Julia automatically makes efficient versions specifically for the types you pass in which, at compile-time, strips away the costs of the abstraction.

This means … READ MORE

6 Months of DifferentialEquations.jl: Where We Are and Where We Are Going


So around 6 months ago, DifferentialEquations.jl was first registered. It was at first made to be a library which can solve “some” types of differential equations, and that “some” didn’t even include ordinary differential equations. The focus was mostly fast algorithms for stochastic differential equations and partial differential equations.

Needless to say, Julia makes you too productive. Ambitions grew. By the first release announcement, much had already changed. Not only were there ordinary differential equation solvers, there were many. But the key difference was a change in focus. Instead of just looking to give a production-quality library of fast methods, a major goal of DifferentialEquations.jl became to unify the various existing packages of Julia to give one user-friendly interface.

Since that release announcement, we have made enormous progress. At this point, I believe we have both the most expansive and flexible … READ MORE

Holding off on Julia for a little bit… you should blog!


March 28 2016 in Uncategorized | Tags: | Author: Christopher Rackauckas

I think I am going to stop posting on Julia for a little bit. I looked at JuliaBloggers.com and realized my blog is hogging it to much. Since I have gone through a pretty good arc, starting at writing FEM code to multiple GPU / Xeon Phi computing, I think that means I will focus on a few other topics for a little bit. However, I will be doing a blog post on native Xeon Phi usage via Julia’s ParallelAccelerator.jl sometime soon, so be prepared for that.

In the meantime, stay tuned for topics like stochastic numerics, theoretical biology, Mathematica, and HPCs in the near future.

If you have the time, start up your own Julia blog and start contributing to JuliaBloggers!

Blog Upgraded: A Good Experience With Bluehost


February 23 2016 in Uncategorized | Tags: | Author: Christopher Rackauckas

My blog is back up and now it’s on a more powerful server to deal with the increase in traffic I have been getting. I really want to give a shout out to Bluehost’s customer support, I went onto their live chat and talked with someone who really knew the different options. I am going to explain what I learned from Devin and what choice I finally made.

A Rundown of Bluehost’s Hosting Options

Bluehost’s hosting options can be summarized as follows:

  1. Dedicated hosting. If you need this you know what it is.
  2. VPS. A Virtual Private Server. If you get this kind of server, the server management is up to you. This is the “second most powerful” option (only less than Dedicated), but I did not want to take on the overhead of managing the resource, especially since it would be more than … READ MORE

The New Project


January 19 2016 in Uncategorized | Tags: | Author: Christopher Rackauckas

Hello everyone! I have just finished setting up a WordPress theme which matches my personal website. Now I am ready to start blogging. This will soon be updated with all sorts of fun insights into stochastic dynamical systems, their numerical approximations, and what they illuminate about biological organisms. Yes, I will be making liberal use of $$\LaTeX$$ and code. Sounds like fun to me.

Why am I doing this? There are many reasons. Honestly, for the most part it’s personal. Terance Tao among many others repeatedly writes/says that the only way to learn math/science is to simply do it. I have quickly learned that “reading” isn’t “doing”. It’s easy to procrastinate by simply reading a whole bunch of lovely math and science papers, but you really aren’t doing much until you’re digging deep into it, whether you’re explaining what you read or … READ MORE