Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to native ParaView MPI parallelization with pvserver #4

Open
unkaktus opened this issue Sep 13, 2022 · 3 comments
Open

Switch to native ParaView MPI parallelization with pvserver #4

unkaktus opened this issue Sep 13, 2022 · 3 comments

Comments

@unkaktus
Copy link

Currently, we spawn multiple subprocesses of pvpython which process their block of frames. It requires the management code (multiprocessing pool + subprocess), and it is not super scalable.
I am convinced that the parallelization implemented in pvserver is faster, but at least one would not have to maintain separate code for job management.

In this case, the architecture would look like this:

  • Starting pvserver with mpirun (e.g. on HPC cluster)
  • Connecting from gwpv to pvserver via TCP using Connect() method
  • Rendering frames sequentially, and pvserver takes care (mostly) of parallelizing the rendering

It would require having a parallel-aware data source, which I believe is not hard to implement. ParaView says in the documentation, that with the D3 filter even non-parallel-aware data sources can benefit from using pvserver.

Here is the documentation page: https://docs.paraview.org/en/latest/ReferenceManual/parallelDataVisualization.html#paraview-architecture

@nilsvu
Copy link
Owner

nilsvu commented Sep 14, 2022

Do I understand correctly that this means rendering one frame at a time, and parallelizing that? Or does pvserver also support rendering multiple frames in parallel?

@unkaktus
Copy link
Author

I don't know for sure, but I believe that pvserver can also handle multiple clients concurrently. That would mean that we can render multiple frames in parallel while utilizing parallelization of the render inside the frame. And leaving the subprocess code as-is, but rendering the frames using pvserver.

Is that often useful to render frames concurrently?

@nilsvu
Copy link
Owner

nilsvu commented Sep 14, 2022

Yes it is quite important to render multiple frames in parallel, since that's what is often called "embarrassingly parallel" -- the frames don't depend on each other, so if the computational resources are unconstrained they parallelize perfectly. On the other hand, parallelization within each frame is limited by how well it is implemented. Doing both forms of parallelization is only useful when you have more cores available than you have frames to render, or when you're constrained by other resources like RAM or GPU memory. (This may very well be the case depending on the system.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants