Catalyst V2 ... first steps

I compiled paraview 5.9 from source

I played with Catalyst V1 examples … I compiled the examples and played with them to see how they works. The one I tried all produce output or can visualize live in Paraview.

I am now approaching Catalyst V2 examples that look much simpler and clean. Unfortunately I am having an hard time to make them working. While I can compile them without problems.

mkdir build
cd build
cmake …/.
make

When I try to make them running in the folder bin … for example

CxxMultiChannelInputExampleV2 …/…/catalyst_pipeline.py (same if I give the full path)

The program run for the time steps it has to run, but nothing is printed from the catalyst_pipeline.py. shouldn’t it print every time steps ? The same happen for all the other examples. I checked the that the example was looping putting a cout in the loop, I checked that the script was set correctly in the adaptor with a cout. All look good but no output … or nothing interesting happen. One thing I notice in compilation is that the examples are linked with /usr/local/lib64/libcatalyst.so.2

that has been installed from source from here:
https://gitlab.kitware.com/paraview/catalyst

Could it be a problem ? if not what is the procedure to make these examples working ?

The following only applies to Catalyst V2.

The https://gitlab.kitware.com/paraview/catalyst project does 2 things:

  1. defines the CatalystV2 API
  2. provides a stub implementation which is simply does nothing.

The reasoning behind providing this stub implementation is that simulation developer can compile their simulation codes linked with Catalyst without requiring a ParaView SDK build. The stub, however, as the name suggests does nothing right now (we are working making it generate binary data dumps for ease of debugging currently, so it’ll start doing that soon).

If the stub does nothing, how does one do any data analysis? The idea is that we will have different implementations of the Catalyst API that are binary compatible with the stub. A ParaView 5.9+ build, for example, provides a Catalyst API implementation, which we now refer to as ParaView-Catalyst. So look in your ParaView install directory. There will be a libcatalyst.so.2 there too. To make the example use this, simply set the environment variable LD_LIBRARY_PATH to this directory in the ParaView install and the example will load ParaView-Catalyst library instead. Now you should see the printouts as follows:

(   2.099s) [pvbatch         ]        v2_internals.py:152   WARN| Module 'catalyst_pipeline' missing Catalyst 'options', will use a default options object
-----------------------------------        
executing (cycle=0, time=0.0)              
grid:                       
  bounds: (0.0, 69.0, 0.0, 64.9, 0.0, 55.9)
  velocity-range: (0.0, 0.0)               
  pressure-range: (1.0, 1.0)       
particles:                   
  bounds: (1.0, 66.0, 1.0, 61.0, 4.0, 53.0)
-----------------------------------        
executing (cycle=1, time=0.1) 
grid:                       
  bounds: (0.0, 69.0, 0.0, 64.9, 0.0, 55.9)
  velocity-range: (0.0, 6.490000000000001) 
  pressure-range: (1.0, 1.0)       
particles:                                  
  bounds: (0.0, 61.0, 5.0, 59.0, 2.0, 54.0)
-----------------------------------        
...

Another tip: to debug, try setting another environment variable PARAVIEW_LOG_CATALYST_VERBOSITY=INFO and then run the example. Now you’ll see more verbose output logging internal decisions which can be handy when debugging.

env PARAVIEW_LOG_CATALYST_VERBOSITY=INFO ./bin/CxxMultiChannelInputExampleV2 ~/.../cat
alyst_pipeline.py                                                                                                                                                                                                  
(   0.499s) [main thread     ]   ParaViewCatalyst.cxx:91    INFO| { catalyst_initialize           
(   0.500s) [main thread     ]vtkCatalystBlueprint.cx:195   INFO| .   { catalyst: verify                                                                                                                           
(   0.500s) [main thread     ]vtkCatalystBlueprint.cx:61    INFO| .   .   { catalyst::scripts: verify                                                                                                              
(   0.500s) [main thread     ]vtkCatalystBlueprint.cx:80    INFO| .   .   .   script: '.../catalyst_pipeline.py'
(   0.500s) [main thread     ]vtkCatalystBlueprint.cx:61    INFO| .   .   } 0.000 s: catalyst::scripts: verify 
(   0.500s) [main thread     ]vtkCatalystBlueprint.cx:195   INFO| .   } 0.000 s: catalyst: verify
(   0.500s) [main thread     ]vtkInSituInitialization:78    INFO| .   { Initializing MPI communicator using 'comm' (0)
(   0.500s) [main thread     ]vtkInSituInitialization:78    INFO| .   } 0.001 s: Initializing MPI communicator using 'comm' (0)         
(   0.500s) [main thread     ]vtkInSituInitialization:106   INFO| .   Initializing Catalyst                                                                                                                        
(   0.738s) [pvbatch         ]   ParaViewCatalyst.cxx:132   INFO| .   Analysis script: '.../catalyst_pipeline.py'
(   0.738s) [pvbatch         ]   ParaViewCatalyst.cxx:91    INFO| } 0.239 s: catalyst_initialize                                                                                                                   (   0.766s) [pvbatch         ]   ParaViewCatalyst.cxx:175   INFO| { catalyst_execute
(   0.766s) [pvbatch         ]vtkCatalystBlueprint.cx:378   INFO| .   { catalyst: verify                                                                                                                           
(   0.767s) [pvbatch         ]vtkCatalystBlueprint.cx:243   INFO| .   .   catalyst::state: verify
(   0.767s) [pvbatch         ]vtkCatalystBlueprint.cx:262   INFO| .   .   'timestep' set to 0
(   0.767s) [pvbatch         ]vtkCatalystBlueprint.cx:287   INFO| .   .   'time' set to 0.000000
(   0.767s) [pvbatch         ]vtkCatalystBlueprint.cx:353   INFO| .   .   { catalyst::channels: verify
(   0.767s) [pvbatch         ]vtkCatalystBlueprint.cx:297   INFO| .   .   .   { catalyst::channels::channel['grid']: verify
(   0.767s) [pvbatch         ]vtkCatalystBlueprint.cx:332   INFO| .   .   .   .   { Conduit Mesh blueprint verified.
(   0.767s) [pvbatch         ]vtkCatalystBlueprint.cx:332   INFO| .   .   .   .   } 0.000 s: Conduit Mesh blueprint verified.
(   0.767s) [pvbatch         ]vtkCatalystBlueprint.cx:297   INFO| .   .   .   } 0.001 s: catalyst::channels::channel['grid']: verify
(   0.767s) [pvbatch         ]vtkCatalystBlueprint.cx:297   INFO| .   .   .   { catalyst::channels::channel['particles']: verify
(   0.767s) [pvbatch         ]vtkCatalystBlueprint.cx:332   INFO| .   .   .   .   { Conduit Mesh blueprint verified.
(   0.767s) [pvbatch         ]vtkCatalystBlueprint.cx:332   INFO| .   .   .   .   } 0.000 s: Conduit Mesh blueprint verified.
(   0.767s) [pvbatch         ]vtkCatalystBlueprint.cx:297   INFO| .   .   .   } 0.000 s: catalyst::channels::channel['particles']: verify
(   0.767s) [pvbatch         ]vtkCatalystBlueprint.cx:353   INFO| .   .   } 0.001 s: catalyst::channels: verify
(   0.767s) [pvbatch         ]vtkCatalystBlueprint.cx:378   INFO| .   } 0.001 s: catalyst: verify
(   0.767s) [pvbatch         ]   ParaViewCatalyst.cxx:198   INFO| .   { co-processing for timestep=0, time=0.000000
(   0.768s) [pvbatch         ]   ParaViewCatalyst.cxx:219   INFO| .   .   Conduit Mesh blueprint validation succeeded for channel (grid)
(   0.771s) [pvbatch         ]   ParaViewCatalyst.cxx:219   INFO| .   .   Conduit Mesh blueprint validation succeeded for channel (particles)
(   2.060s) [pvbatch         ]              detail.py:80    INFO| .   .   creating producer for simulation input named '%s'
(   2.064s) [pvbatch         ]              detail.py:80    INFO| .   .   creating producer for simulation input named '%s'
(   2.066s) [pvbatch         ]        v2_internals.py:152   WARN| .   .   Module 'catalyst_pipeline' missing Catalyst 'options', will use a default options object
(   2.070s) [pvbatch         ]        v2_internals.py:98    INFO| .   .   called do_catalyst_initialize <module 'catalyst_pipeline' from '/catalyst_pipeline.py'>
(   2.070s) [pvbatch         ]vtkCPPythonScriptV2Help:592   INFO| .   .   treating as activated due to presence of custom callbacks
(   2.070s) [pvbatch         ]        v2_internals.py:114   INFO| .   .   called do_catalyst_execute <module 'catalyst_pipeline' from '.../catalyst_pipeline.py'>
(   2.071s) [pvbatch         ]        v2_internals.py:118   INFO| .   .   calling 'catalyst_pipeline.catalyst_execute'
-----------------------------------
executing (cycle=0, time=0.0)
grid:
  bounds: (0.0, 69.0, 0.0, 64.9, 0.0, 55.9)
  velocity-range: (0.0, 0.0)
  pressure-range: (1.0, 1.0)
particles:
  bounds: (1.0, 66.0, 1.0, 61.0, 4.0, 53.0)


1 Like

Thanks it worked