-
Notifications
You must be signed in to change notification settings - Fork 0
Visualising outputs
Chombo outputs checkpoint and plot files in hdf5 format. There are several options for viewing and processing such files, but we generally use VisIt, ParaView or yt.
As an example, we will handle the hdf5 output by using VisIt to Visualise It. For ParaView and yt users, please see the guide given here.
Download Visit to your local machine from:
https://wci.llnl.gov/simulation/computer-codes/visit/executables
For Mac and Windows there are installers, for Linux you should download the tar file, plus the "Visit Install Script" (in the bullets above the executable) and follow the instructions in "Visit Install Notes". The tar file for Ubuntu 14.04 seems to work on Ubuntu 16.04 too.
Assuming your hdf5 data is on a remote cluster, you have three options:
-
Download the hdf5 files to a local machine (or more likely onto an external hard drive connected to it, since the files are large) and run them directly there. (The command for copying files is
scp
or betterrsync
which allows you to restart if interrupted). -
Install (or module load) VisIt and run it in command line mode either directly on the login nodes or by submitting a batch job. Some example scripts and the appropriate run command for this can be found here.
This is usually the best option for systems with a firewall preventing outgoing connections (e.g. Marenostrum, SupermucNG). One can generate png files or videos which can then be transferred to one's local machine using scp
or by mounting the remote server using the sshfs
command.
- Run Visit remotely by downloading the same version (ie, 1.12.3 etc) of Visit on the cluster and setting up a remote profile in Visit on your local machine (see below). This has the advantage that you can keep the data on the cluster, and use its (probably more powerful) compute power, although some clusters don't like you to run Visit on the login nodes as it can clog up the system for other users, and may have dedicated nodes for visualisation. You should check this with your local cluster administrator. (Note: The remote version should be the one with Mesa support for rendering without a display, otherwise you will have problems saving images and movies.)
Assuming you choose option 3, the following information will help you get started:
To set up a remote host, launch VisIt on your local machine, then go to "Options->Host profiles". Click on "New Host" and configure it by setting:
- The Host nickname e.g. cosmos
- The remote hostname, e.g. cosmos.damtp.cam.ac.uk
- If you can run in parallel on the cluster nodes, set the max number of nodes and processors to use
- Path to visit installation (where you put it on the cluster), e.g. ~/visit
- Username (your username on the remote host), e.g. kclough
- Select "Tunnel data connections through ssh" and set the ssh command to "ssh -C"
VisIt can sometimes be "difficult" when it comes to getting it to remember the configuration. After you've configured the host, click "Apply", then click on the "i" button on the bottom-right of the main Visit window. Return to the host configuration dialog and hit "Export host" you should then see a confirmation that VisIt has saved it for you.
A useful tutorial on running VisIt in parallel in client server mode, where one needs to submit a batch job to reserve the compute nodes, can be found here. (Note that for this you need to download a version which includes parallel VisIt - ie redhat not ubuntu).
VisIt has a GUI interface, so it is (sort of) intuitive. Opening a file should allow you to view the series of hdf5 outputs as a time series, without having to select any special options.
The most useful plots for our data are Pseudocolour plots, using the Operators->Slice operators to view a slice (adjust the intercept to the centre of the grid) and Operators->Elevate to make the plot 3D, but the things you can do with VisIt are pretty limitless.
For example, here is a Pseudocolour plot, sliced through the middle of the y-axis of the trace of the extrinsic curvature (K) from the InitialDataFinal.3d.hdf5
file for the ScalarFieldBH example in GRTresna:
There are VisIt tutorials which will help to discover all the functionality, see for example the ATPESC 2016 workshop which also has a YouTube video here.
See our tips for making good visualisations in Visualisation tips. Feel free to add to them!
Copyright GRTL Collaboration 2024