open auxiliary text file in client-server mode on the server?

Hi, I’m working with XDMF datasets with Paraview 5.11 often in client-server model. The visualization pipeline is scripted using the Python API including a Programmable Filter that evaluates several output variables based on calculations involving scalar values stored in simulation_constants.txt along side the .xdmf file.

Things work well when in the client-only mode where datasets are on my local workstation.
In client server-mode, the filename provided to simple.XDMFReader loads a file from the server-side filesystem, while filenames provided to Python’s open(".../simulation_constants.txt") are referencing the client-side filesystem.

I understand the distinction and the behavior is basically consistent with how sys.path and Python import commands are referencing the local client filesystem too.

How can I load a remote text file and do simple readline() type operations?

Hi @Noerr ,

This is expected. The programmable filter code will always be executed server side, where the data is supposed to be.

while filenames provided to Python’s open(".../simulation_constants.txt") are referencing the client-side filesystem.

Where do you write this code ? In the programmable filter, it will be server side too.

How can I load a remote text file and do simple readline() type operations?

In a prog filter.

Oh thanks for that idea. It sounds encouraging as a solution.

This approach didn’t come intuitively for a couple of reasons. It seems odd to add IO type code on the Programmable Filter. I’ll also have to duplicate my Python post processing modules on both client and server side. There are a couple dozen scalar parameters i’m trying to bring in. I suppose the import parameters calls will have to be repeated anywhere I reuse them.

I can also anticipate I’ll want to eventually do things like scale colorbar ranges or camera controls based on the same parameters. These scalar parameters would need to be known on client-side too. :-/

That is the ParaView way

I’ll also have to duplicate my Python post processing modules on both client and server side.

In ParaView world, data processing is always server side.

I can also anticipate I’ll want to eventually do things like scale colorbar ranges or camera controls based on the same parameters. These scalar parameters would need to be known on client-side too. :-/

You can control that from client side without issue, but you do not need the whole data to find the right parameters.