# Video Blog: Developing and Editing Julia Packages

#### May 16 2017 in Julia, Programming | Tags: git, Gitkraken, julia, packages | Author: Christopher Rackauckas

Google Summer of Code is starting up, so I thought it would be a good time to share my workflow for developing my own Julia packages, as well as my workflow for contributing to other Julia packages. This does not assume familiarity with commandline Git, and instead shows you how to use a GUI (GitKraken) to make branches and PRs, as well as reviewing and merging code. You can think of it as an update to my old blog post on package development in Julia. However, this is not only updated but also improved since I am now able to walk through the "non-code" parts of package developing (such as setting up AppVeyor and code coverage).

Enjoy! (I quite like this video blog format: it was a lot less work)

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

#### December 15 2016 in Differential Equations, Julia, Mathematics, Programming, Stochastics, Uncategorized | Tags: DifferentialEquations.jl, julia | Author: Christopher Rackauckas

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

# Introducing DifferentialEquations.jl

#### August 1 2016 in Differential Equations, FEM, Julia, Programming, Stochastics | Tags: DifferentialEquations.jl, julia | Author: Christopher Rackauckas

Edit: This post is very old. See this post for more up-to-date information.

Differential equations are ubiquitous throughout mathematics and the sciences. In fact, I myself have studied various forms of differential equations stemming from fields including biology, chemistry, economics, and climatology. What was interesting is that, although many different people are using differential equations for many different things, pretty much everyone wants the same thing: to quickly solve differential equations in their various forms, and make some pretty plots to describe what happened.

The goal of DifferentialEquations.jl is to do exactly that: to make it easy solve differential equations with the latest and greatest algorithms, and put out a pretty plot. The core idea behind DifferentialEquations.jl is that, while it is easy to describe a differential equation, they have such diverse behavior that experts have spent over a century compiling ... READ MORE

# Using Julia's Type System For Hidden Performance Gains

#### June 7 2016 in Julia, Programming | Tags: DifferentialEquations.jl, julia, performance | Author: Christopher Rackauckas

What I want to share today is how you can use Julia's type system to hide performance gains in your code. What I mean is this: in many cases you may find out that the optimal way to do some calculation is not a "clean" solution. What do you do? What I want to do is show how you can define special arrays which are wrappers such that these special "speedups" are performed in the background, while having not having to keep all of that muck in your main algorithms. This is easiest to show by example.

The examples I will be building towards are useful for solving ODEs and SDEs. Indeed, these tricks have all been implemented as part of DifferentialEquations.jl and so these examples come from a real use case! They really highlight a main feature of Julia: ... READ MORE

# Finalizing Your Julia Package: Documentation, Testing, Coverage, and Publishing

#### May 16 2016 in Julia | Tags: AppVoyer, coverage, documentation, Documenter.jl, julia, testing, Travis.CI | Author: Christopher Rackauckas

In this tutorial we will go through the steps to finalizing a Julia package. At this point you have some functionality you wish to share with the world... what do you do? You want to have documentation, code testing each time you commit (on all the major OSs), a nice badge which shows how much of the code is tested, and put it into metadata so that people could install your package just by typing Pkg.add("Pkgname"). How do you do all of this?

Note: At anytime feel free to checkout my package repository DifferentialEquations.jl which should be a working example.

## Generate the Package and Get it on Github

First you will want to generate your package and get it on Github repository. Make sure you have a Github account, and then setup the environment variables in the git shell:

# Optimal Number of Workers for Parallel Julia

#### April 16 2016 in HPC, Julia, Programming, Stochastics | Tags: BLAS, hyperthreading, julia, parallel computing, workers | Author: Christopher Rackauckas

How many workers do you choose when running a parallel job in Julia? The answer is easy right? The number of physical cores. We always default to that number. For my Core i7 4770K, that means it's 4, not 8 since that would include the hyperthreads. On my FX8350, there are 8 cores, but only 4 floating-point units (FPUs) which do the math, so in mathematical projects, I should use 4, right? I want to demonstrate that it's not that simple.

## Where the Intuition Comes From

Most of the time when doing scientific computing you are doing parallel programming without even knowing it. This is because a lot of vectorized operations are "implicitly paralleled", meaning that they are multi-threaded behind the scenes to make everything faster. In other languages like Python, MATLAB, and R, this is also the case. Fire up MATLAB ... READ MORE

# Benchmarks of Multidimensional Stack Implementations in Julia

#### March 20 2016 in Julia, Programming | Tags: benchmark, data structures, julia, stack | Author: Christopher Rackauckas

Datastructures.jl claims it's fast. How does it do? I wrote some quick codes to check it out. What I wanted to do is find out which algorithm does best for implementing a stack where each element is three integers. I tried filling a pre-allocated array, pushing into three separate vectors, and different implementations of the stack from the DataStructures.jl package.

function baseline()

stack = Array{Int64,2}(1000000,3)

for i=1:1000000,j=1:3

stack[i,j]=i

end

end

function baseline2()

stack = Array{Int64,2}(1000000,3)

for j=1:3,i=1:1000000

stack[i,j]=i

end

end

function f0()

stack = Array{Int64}(1000000,3)

for i = 1:1000000

stack[i,:] = [i,i,i]

end

end

function f02()

stack = Array{Int64}(3,1000000)

for i = 1:1000000

stack[:,i] = [i;i;i]

end

end

function f1()

stack1 = Vector{Int64}(1)

stack2 ... READ MORE

# Interfacing with a Xeon Phi via Julia

#### March 4 2016 in C, HPC, Julia, Programming, Stochastics, Xeon Phi | Tags: C, julia, MIC, OpenMP, parallel, Xeon Phi | Author: Christopher Rackauckas

(Disclaimer: This is not a full-Julia solution for using the Phi, and instead is a tutorial on how to link OpenMP/C code for the Xeon Phi to Julia. There may be a future update where some of these functions are specified in Julia, and Intel's compilertools.jl looks like a viable solution, but for now it's not possible.)

Intel's Xeon Phi has a lot of appeal. It's an instant cluster in your computer, right? It turns out it's not quite that easy. For one, the installation process itself is quite tricky, and the device has stringent requirements for motherboard choices. Also, making out at over a taraflop is good, but not quite as high as NVIDIA's GPU acceleration cards.

However, there are a few big reasons why I think our interest in the Xeon Phi should be renewed. For one, Intel ... READ MORE

# Multiple-GPU Parallelism on the HPC with Julia

#### February 28 2016 in CUDA, HPC, Julia, Programming | Tags: CUDA, gpu, HPC, julia | Author: Christopher Rackauckas

This is the exciting Part 3 to using Julia on an HPC. First I got you started with using Julia on multiple nodes. Second, I showed you how to get the code running on the GPU. That gets you pretty far. However, if you got a trial allocation on Cometand started running jobs, you may have noticed when looking at the architecture that you're not getting to use the full GPU. In the job script I showed you, I asked for 2 GPUs. Why? Well, that's because the flagship NVIDIA GPU, the Tesla K80, is actually a duel GPU and you have to control the two parts separately. You may have been following along on your own computer and have been wondering how you use the multiple GPUs in your setup as well. This tutorial will ... READ MORE

# Tutorial for Julia on the HPC with GPUs

#### February 23 2016 in CUDA, HPC, Julia, Programming | Tags: CUDA, gpu, HPC, julia | Author: Christopher Rackauckas

This is a continuous of my previous post on using Julia on the XSEDE Comet HPC. Check that out first for an explanation of the problem. In that problem, we wished to solve for the area of a region where a polynomial was less than 1, which was calculated by code like: READ MORE