Difference between revisions of "Paraview Trace"

From PHASTA Wiki
Jump to: navigation, search
(Creation)
(Creation)
Line 10: Line 10:
 
This will bring up a dialog with different options for which things to record. Of note is "Skip Rendering Components" (useful if your trace doesn't involve any visual capturing). You can also select "Show Incremental Trace" so to verify what command are being recorded as you do them.
 
This will bring up a dialog with different options for which things to record. Of note is "Skip Rendering Components" (useful if your trace doesn't involve any visual capturing). You can also select "Show Incremental Trace" so to verify what command are being recorded as you do them.
  
 +
'''2. Do something'''
  
'''2. Do something'''
 
 
Do whatever you were wanting to have recorded in Paraview.
 
Do whatever you were wanting to have recorded in Paraview.
  

Revision as of 08:19, 17 June 2023

Paraview traces are ways to create a python script of a set of actions that can be later applied to different datasets or over a loop of datasets automatically. The following will brefly explain the creation, cleaning, and running of a python trace in Paraview (which will often be shortened to pvTrace or something similar).

Creation

General steps are to start a trace, do whatever you're wanting to record, then stop the trace.

1. Start Trace

Tools > Start Trace

This will bring up a dialog with different options for which things to record. Of note is "Skip Rendering Components" (useful if your trace doesn't involve any visual capturing). You can also select "Show Incremental Trace" so to verify what command are being recorded as you do them.

2. Do something

Do whatever you were wanting to have recorded in Paraview.

3. Stop Trace

Tools > Stop Trace

This will then bring up the resulting Python script, which you can then save to a file, edit, and rerun.

Basic Changes to the Python Script

Running a Trace

Running a pvTrace, whether on the same or a different dataset requires only a few key steps. For now, it will be assumed that the trace is being run on Cooley at ALCF, though many of the steps should be shared for other machines.

If you are running the trace on a dataset that is not the same as the one for which you created the trace, it is good practice to always check your script and inputs. Make sure you have all of the restart and geombc files that you will need, and that you are pointing to the correct locations in the python script (it is recommended that you use absolute paths to reduce the chances for error). Also check your output file name and location.

Once your python script is ready, you need to get an interactive allocation on Cooley and load the same version of paraview with which the trace was created:

soft add +paraview-5.5.2

This loads pvpython which is what is used to run the python trace script. To run this scrip is simply a modification of a standard python run command.

pvpython Trace_Script.py