Heterogeneous Map-Reduce: Scientific Visualisation (Part 3/3)

This article is the final part of the series about the heterogeneous map-reduce approach:
Part 1 – Heterogeneous Map-Reduce: Meet the Task System (Part 1/3)
Part 2 – Heterogeneous Map-Reduce: Seismic Imaging Application (Part 2/3)
Part 3 – [You are here] – Heterogeneous Map-Reduce: Scientific Visualisation (Part 3/3)

In the previous posts we have introduced the heterogeneous map-reduce framework and applied it on a seismic imaging problem. Here, we will use the heterogeneous map-reduce framework for scientific visualisation.

What is scientific visualisation?

Scientific visualisation is a way to showcase the numerical modelling or physical simulations with computer graphics. Why is it important? Because using scientific visualisation we can observe a three-dimensional structures and processes in (close to) real time and zoom in or our as we wish. Also, it is a possibility to produce cool movies like this using a rendering software (ray-tracer):

Rendering is an automatic process of generating images (also called frames) from 2D- or 3D-models that build a scene. Basically, the scene is what is viewed by the camera and it includes objects, lightening, shading, viewpoint, etc.

To make a simulation movie, we need to import the simulation results or objects into the scene. Afterwards, we need to render the scenes and produce frames/images. Finally, the images are collected into a movie.

Why not use Paraview?

Paraview makes it possible to visualise scientific data, but it renders the images with OpenGL. This means that the image can be rendered very quickly, but at the cost of quality. On the other hand, a ray-tracer will be slower but will produce better quality images (even photo realistic quality).

Levels of parallelism

Level 1: Since a movie consists of frames (separate images that compose a moving picture), the highest level of parallelism is over the frames.

Level 2: The second level of parallelism is either the internal multi-threading or multi-GPU implementation of the rendering software. In our case, we can use either the CPUs or GPUs to render the image, so 2 instances of the ray-tracer can run on one machine.

Task system (map-reduce)

The idea is to render each individual image or frame in parallel which makes it easy to assign one task to one frame. By using multiple threads for rendering, an image can be processed in parallel within a task.

It sounds pretty easy: one task for one frame. The complexity comes with the monitoring the tasks in real time. Ideally we would like to know what is each compute node doing at each moment in time and will be able to add/remove compute nodes after the computations have started.

For this we have developed a web server for the task system. The web server allows monitoring, as well as interacting with the server. Through the web-interface, we can check progress, and other indicators such as memory usage or CPU load.

In the figures below you will see snapshots of the web server while doing the scientific visualisation: list of frames to be rendered in the available queue, list of running tasks, statistics, settings and system information such as CPU load and memory usage in real-time.

Frames to be rendered
Frames to be rendered
Frames rendered
Frames rendered
Statistics
Statistics
Settings
Settings
System information
System information

Why use the task system for rendering?

Firstly, to make a movie we need to import the objects computed from a numerical simulation to the scene. In the previous example of the heterogeneous map-reduce (Part 2/3) we described the seismic migration. There, the objects are images of seismic migration. For each frame, a Python script would read and import the objects of interest in the ray-tracer and create the scene.

Secondly, the scene has to be rendered.

We observed that most of the time was being spent in the importing the objects. The total time per frame was too high and had to be done in a parallel, or distributed way. So that, we could use the task system for importing the objects as well as for rendering of the scenes.

Real life example

Here is the example of using the task system for the scientific visualisation from Hans. During the final stage of his PhD work at TU Delft, he implemented several seismic migration algorithms in parallel (on CPUs and GPUs). He thought it would be nice to show how migration images from each shot are forming final migration image in a movie (see more details here).

The Little Green Machine (which is the Dutch smallest supercomputer build from several CPUs connected to two GPUs) was perfect for that as he could use the power of GPUs for rendering. Many thanks to his supervisors Prof. Kees Vuik and Prof. Kees Oosterlee for giving access to the Little Green Machine.

Summary

In this series we introduced the heterogeneous map-reduce approach as a universal parallel framework. A very important tool within this framework is the task system that allows to split the work amongst compute nodes and monitor the execution.

We have shown in the previous post how to use the task system in the seismic imaging application to do seismic migration in parallel distributed way. Also, in this post we have shown how to use the task system in the scientific visualisation for importing and rendering the images.

What tools do you use for scientific visualisation?


Get EZNumeric’s future articles in your inbox:

1 comment on “Heterogeneous Map-Reduce: Scientific Visualisation (Part 3/3)Add yours →

Leave a Reply

Your email address will not be published. Required fields are marked *