Fortran/C MPI interface for online picture savings

Hello,

I’ve been using Paraview for a little while and I love it. So much that I would love to embark it in my code :slight_smile:

I’m running very computationaly expensive simulations of 3d hydrodynamics using Fortran. I use Paraview to check some timesteps and generate pictures but when it comes to make an animation, I’m quickly stuck to the max size of my hard drive. For exemple, when I run a 10^9 nodes simulations over 40,000 timesteps, I can’t save enough timesteps (say one field for 10,000ts) to generate a good animation. So the question is simple:

Would it be possible to create a fortran/c library to directly use Paraview in a MPI-based code ? You would then have something like

if (t.eq.t_takepicture) then
   call MPI_PARAVIEW(comm3D,x,y,z,field,'script_picture_property.py')
endif

where comm3D comes from mpi_cart_create, (x,y,z,field) would be 3d arrays of coordinates and the wanted field, and ‘script_picture_property.py’ would be the path to a python script (generated for instance with 'Paraview/Tools/Start Trace) which defines the visu properties you want.

Cheers,
Romain

You can always make a system call that will rely on pvpython or pvbatch

Paraview to check some timesteps and generate pictures but when it comes to make an animation, I’m quickly stuck to the max size of my hard drive. For exemple, when I run a 10^9 nodes simulations over 40,000 timesteps, I can’t save enough timesteps (say one field for 10,000ts) to generate a good animation.

This sounds like a typical in-situ usecase. Why not trying to use Catalyst here instead ?

https://www.paraview.org/in-situ/

A system call won’t be possible on supercomputers (or only on one proc which would not solve the issue) but Catalyst is exactly like what I need. You saved my day, thanks a lot !