Performance of Jexpresso on CPU

Jexpresso was coded to minimize memory access and speed. With the goal of making Jexpresso a community solver of PDEs, it was mandatory to make it at least as fast as a compiled-language code. Jexpresso was benchmarked against a legacy code for atmospheric modeling written in Fortran 90/95/modern Fortran. The two software packages were compared on the same CPU core.

The code speed was measured for the solution of the compressible Naver-Stokes equations with gravity

\[{\bf q}=\begin{bmatrix} \rho \\ \rho u\\ \rho v\\ \rho \theta \end{bmatrix}\quad {\bf F}1=\begin{bmatrix} \rho u\\ \rho u^2 + p\\ \rho u v\\ \rho u \theta \end{bmatrix}\quad {\bf F}2=\begin{bmatrix} \rho v\\ \rho v u\\ \rho v^2 + p\\ \rho v \theta \end{bmatrix}\quad {\bf S}=\begin{bmatrix} 0\\ 0\\ -\rho g\\ 0 \end{bmatrix}\quad \mu\nabla^2{\bf q}=\mu\begin{bmatrix} 0\\ u_{xx} + u_{zz}\\ v_{xx} + v_{zz}\\ \theta_{xx} + \theta_{zz} \end{bmatrix}.\]

Speed

Table: Wall clock time of Jexpresso vs a legacy F90/Modern Fortran code for numerical weather prediction. Simulated 100 seconds of a rising-thermal-bubble test. The name of the time integrators may be different for the two codes so that the notation jexpresso/numa is used to indicate both. The wall clock times are to be taken with a $\pm 0.2$ due to a small variability from one simulation to the next one.

Timing was measured using Julia 1.9.3 on a Macbook Air M1 2020, with macOS Big Sur Version 11.6.

Time integratormax $\Delta t$ (s)Effective resolution (m)Order${\color{red}{Jexpresso}}$ (s)${\color{blue}{F90}}$ (s)
SSPRK530.3""9.0010.53
SSPRK330.2$125\times 125$49.759.2028
SSPRK540.4""10.47NA
DP5 (Dormand-Prince RK54)0.6""19.80NA
SSPRK730.4""12.95NA
SSPRK1040.6""12.50NA
CarpenterKennedy2N540.4""10.57NA
Tsit52.0 (adaptive)""19.08NA

Mass conservation

Table: Mass conservation of the advective vs flux forms of the equations and sensitivity to the time integrators of DifferentialEquations.jl for the RTB at t = 1000 s viscous. Results are for inexact integration.

Time integratorAdvection formFlux from
MSRK57.818062181220379e-163.9090310906101895e-16
SSPRK537.622610626689869e-151.9545155453050947e-16
SSPRK335.081740417793246e-151.1727093271830568e-15