Hello,
I am pretty new to Julia. I started using it because of its computational speed, which seems close to Fortran, the language we use in our atmospheric models.
I translated a relatively simple workflow that processes model and satellite data, creates a 3-panel figure using surface, and saves it as a PNG. This worked well on my laptop with GLMakie: saving the figure takes about 3 seconds.
However, when I moved the workflow to our HPC system, GLMakie was not usable because it requires an actual window/OpenGL renderer. I therefore switched to CairoMakie. The script runs fine until it reaches the line where the figure is saved. At that point, it becomes extremely slow and eventually gets killed due to an out-of-memory error unless I request a very large amount of memory.
The difference is substantial: GLMakie saves the PNG in about 3 seconds, while CairoMakie takes more than 7 minutes and only succeeds when I request around 80 GB of memory. This is after adding rasterization options to the surface plots. The 2D grids are not especially large, and the final figure is only about 1600 × 1300 pixels.
This surprised me because equivalent Python and MATLAB versions of this workflow can save the same type of figure much faster. We are interested in using Julia in a real-time workflow that processes data from several models and satellites and generates many surface-based plots. Switching to image is not ideal for our use case.
Are there recommended alternatives to CairoMakie for saving figures on HPC systems? Or is there a practical way to use GLMakie in a headless HPC environment when the required system modules are not available?
Any advice would be appreciated.
Thanks.