Visualization: Difference between revisions

From Fluids Wiki
Jump to navigation Jump to search
m (→‎VisIt: Adding a note about VisIt not being parallel (and therefore effectively useless))
Line 37: Line 37:
* you must use VisIt 2.13
* you must use VisIt 2.13
* it is unclear how to take advantage of GPU accelerations
* it is unclear how to take advantage of GPU accelerations
* requesting more than one processor results in excessively long wait times
* VisIt was not compiled with parallel capabilities on Graham. This means that you can only request one processor for remote sessions. Unfortunately, unless you are visualizing very small data files, this likely means that VisIt is effectively unusable on Graham.


More information can be gathered at [[VisIt]].
More information can be gathered at [[VisIt]].

Revision as of 15:24, 14 May 2018

Visualization on Onyx

See Lab visualization tutorial for a basic tutorial on running ParaView on Onyx.

Accessing Networked Drives

As of April 2018, only the NAS is accessible from Onyx. It is generally available as the Z drive, but may need to be mounted the first time. There is a sticky-note on the computer giving instructions on how to do this. This will only need to be done once.

Paraview

To start a parallel session of ParaView, open Command Prompt and run the command:

mpiexec -np N "C:\Program Files\ParaView 5.5.0-RC3-Qt5-MPI-Windows-64bit\bin\pvserver"

where N is the number of cores to use. Onyx has 6 cores (12 with hyper-threading) available to be run, so don't ask for more than 12. Remember that the resources are shared so check how many processors are available before running.


VisIt

To run a parallel session of VisIt, find VisIt in the Start Menu (for non-Windows people, the thing in the bottom left corner) and find VisIt 2.13.1 and choose VisIt Parallel.

Visualization on Graham

All of what you need to know about running Paraview or VisIt on Graham is presented in Graham Visualization.

The general idea is that you run / interact with VisIt/Paraview on your local machine, while have the computing done on Graham. This provides the advantages of:

  • not needing to transfer many and/or large data files to your local machine
  • running VisIt/ParaView on many processors with a large amount of available memory.

The link above provides a fairly thorough guide to getting up-and-running, just remember to replace cedar with graham where appropriate.

Keep in mind that the requested processors go through a slurm allocation (salloc), and so the more processors that you request, the longer that you will have to wait before receiving the allocation.

VisIt

Note: as of Jan 2018:

  • you must use VisIt 2.13
  • it is unclear how to take advantage of GPU accelerations
  • VisIt was not compiled with parallel capabilities on Graham. This means that you can only request one processor for remote sessions. Unfortunately, unless you are visualizing very small data files, this likely means that VisIt is effectively unusable on Graham.

More information can be gathered at VisIt.

Host Profile Notes

Increasing available memory

When setting up the host profile to remotely connect to Graham, you will want to add a few additional flags that are not mentioned on the Sharncet webpage. In particular, under Launch Profiles -> Parallel -> Advanced, there is a box for Launcher Arguments, in which you will add your --account=def-accountName, you will also want to include --mem-per-cpu=4G. Without the memory flag, it will default to only requesting 256M, and will likely crash whenever you try to plot anything with moderate resolution.

Paraview

Note: as of Jan 2018:

  • you must use ParaView 5.3.0 when using CPU-based computation on Graham
  • you must use ParaView 5.4.0 when using GPU-based computation on Graham

See the Compute Canada Visualization page for further updates and details.

More information can be gathered at ParaView.

Mapped netcdf SPINS file

Netcdf files need their data be represented on a rectilinear grid. Mapped (curvilinear) coordinates are accomplished by writing additional fields to which a visualization software can later designate as the correct grid. In the case of mapped SPINS files converted into a netcdf file (through spins2netcdf) this additional field is called zc (for the z-coordinate or curvilinear z). Below are the steps required to plot a field with the correct mapping.

ParaView

  • Read in netcdf file (choose "NetCDF files generic and CF conventions")
  • Unselect the checkbox for Spherical Coordinates (this seems to only sometimes be necessary)
  • Select the Output Type: Structured
  • Click Apply
  • In the Pipeline, select the file just opened and apply the calculator filter to it (either select the calculator icon, or under Tools->Common in menu bar)
  • In the Calculator Properties page:
    • Select Coordinate Result checkbox
    • Change Result Array Name to something useful (such as "grid". This is unnecessary, but helpful if multiple operations are done)
    • In the text box directly below this, input either
      • for 2D: iHat*coordsX+jHat*zc
      • for 3D: iHat*coordsX+jHat*coordsY+kHat*zc
    • Click Apply

VisIt

  • Read in netcdf file and add a plot
  • Add the displace operator to the plot (Operators->Transforms->Displace)
  • Click the arrow to the left of the plot in the Plot List to show the subitems
  • Double click the Displace subitem
    • Select Create new expression in the Displacement variable drop down menu
      • Give expression the name "grid" and Type "Vector Mesh Variable"
      • Input the definition as
        • for 2D: "{0*zc,zc - coord(meshN1xN2)[1]}" where meshN1xN2 must be replace with the mesh variable found under Insert Variable->Meshes
        • for 3D: "{0*zc,0*zc,zc - coord(meshN1xN2xN3)[2]}" where meshN1xN2xN3 must be replace with the mesh variable found under Insert Variable->Meshes
      • Click Apply in the Expressions window
    • Select grid in the Displacement variable drop down menu (under Vectors)
    • Click Apply in the Displace operator attributes window
  • Click Draw in the main menu