Scripting Paraview

less than 1 minute read


Use script to batch process files in Paraview

This tutorial will generate script to be run on NERSC to generate files in Paraview.

Generate Batch Script

Option 1 –Script Recording

  1. Open local Paraview, go to ToolsStart Trace
  2. After finished rendering, go to ToolsStop Trace
  3. It will pop up a python script with the recorded command lines.
  4. Save this file.

Option 2 – Save statefile as .py

  1. Complete the normal operations in Paraview
  2. When ready, go to FileSave State..., in the Files of type, select the dropdown with format
  3. Open the generated file, and modify it as you like.

Run script on NERSC

See this documentation on running Paraview in Batch mode

  1. Upload the local file to NERSC
  2. Use the following command to submit jobs
cori$ module load ParaView
cori$ 4 4 haswell 00:30:00 default debug `pwd`/
  1. You can change the file output directory in the
  2. create a bash function to automate the process
pvbatch () { 4 4 haswell 00:30:00 default debug `pwd`/$1