Scripting Paraview
This tutorial will generate script to be run on NERSC to generate files in Paraview.
Generate Batch Script
Option 1 –Script Recording
- Open local Paraview, go to
Tools–Start Trace - After finished rendering, go to
Tools–Stop Trace - It will pop up a python script with the recorded command lines.
- Save this
test.pyfile.
Option 2 – Save statefile as .py
- Complete the normal operations in Paraview
- When ready, go to
File–Save State..., in theFiles of type, select the dropdown withtest.pyformat - Open the generated
test.pyfile, and modify it as you like.
Run script on NERSC
See this documentation on running Paraview in Batch mode
- Upload the local
test.pyfile to NERSC - Use the following command to submit jobs
cori$ module load ParaView
cori$ start_pvbatch.sh 4 4 haswell 00:30:00 default debug `pwd`/test.py
- You can change the file output directory in the
test.py. - create a bash function to automate the process
pvbatch () {
start_pvbatch.sh 4 4 haswell 00:30:00 default debug `pwd`/$1
}
Enjoy Reading This Article?
Here are some more articles you might like to read next: