# Fortran/C MPI interface for online picture savings

**URL:** https://discourse.paraview.org/t/fortran-c-mpi-interface-for-online-picture-savings/6972
**Category:** Development
**Created:** [April 16, 2021, 8:29am UTC](https://discourse.paraview.org/t/fortran-c-mpi-interface-for-online-picture-savings/6972 "2021-04-16T08:29:13Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![rw31415](https://discourse.paraview.org/user_avatar/discourse.paraview.org/rw31415/32/6431_2.png) [@rw31415](https://discourse.paraview.org/u/rw31415)
#### Post date: [April 16, 2021, 8:29am UTC](https://discourse.paraview.org/t/fortran-c-mpi-interface-for-online-picture-savings/6972/1 "2021-04-16T08:29:13Z")

</div>

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 🙂

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

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [April 19, 2021, 4:08pm UTC](https://discourse.paraview.org/t/fortran-c-mpi-interface-for-online-picture-savings/6972/2 "2021-04-19T16:08:49Z")

</div>

> [@rw31415](#):
>
> Would it be possible to create a fortran/c library to directly use Paraview in a MPI-based code ?

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/](https://www.paraview.org/in-situ/)

---

<div class="post-metadata">

### Author: ![rw31415](https://discourse.paraview.org/user_avatar/discourse.paraview.org/rw31415/32/6431_2.png) [@rw31415](https://discourse.paraview.org/u/rw31415)
#### Post date: [April 20, 2021, 7:17am UTC](https://discourse.paraview.org/t/fortran-c-mpi-interface-for-online-picture-savings/6972/3 "2021-04-20T07:17:06Z")

</div>

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 !
