# Savevtk() after load "PETSc"

**URL:** https://community.freefem.org/t/savevtk-after-load-petsc/2249
**Category:** General Discussion
**Created:** [January 27, 2023, 3:29pm UTC](https://community.freefem.org/t/savevtk-after-load-petsc/2249 "2023-01-27T15:29:59Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![cmd](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/cmd/32/67_2.png) [@cmd](https://community.freefem.org/u/cmd)
#### Post date: [January 27, 2023, 3:29pm UTC](https://community.freefem.org/t/savevtk-after-load-petsc/2249/1 "2023-01-27T15:29:59Z")

</div>

Hello FreeFEM community,

After adding `load "PETSc"` to a script, the functionality of `savevtk` is overloaded to support parallel I/O (.pvd/.pvtu files).

If I have assembled the global mesh/solution on one process, is it possible to force `savevtk` to output a normal, global .vtu file?

Chris

---

<div class="post-metadata">

### Author: ![aszaboa](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/aszaboa/32/2918_2.png) [@aszaboa](https://community.freefem.org/u/aszaboa)
#### Post date: [January 27, 2023, 3:50pm UTC](https://community.freefem.org/t/savevtk-after-load-petsc/2249/2 "2023-01-27T15:50:09Z")

</div>

I use the following for the global solution: ` savevtk(...,communicator = mpiCommSelf);`  
This also produced .pvd and .pvtu files, but only a single .vtu file.

---

<div class="post-metadata">

### Author: ![cmd](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/cmd/32/67_2.png) [@cmd](https://community.freefem.org/u/cmd)
#### Post date: [January 27, 2023, 4:04pm UTC](https://community.freefem.org/t/savevtk-after-load-petsc/2249/3 "2023-01-27T16:04:28Z")

</div>

Thanks, @aszaboa, that works. It would be nice if was another way to avoid the extra output (and generate a .vtu file with the actual name I give in the argument to `savevtk`), but I guess it’s easy to hack around that 😉

---

<div class="post-metadata">

### Author: ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)
#### Post date: [January 27, 2023, 4:35pm UTC](https://community.freefem.org/t/savevtk-after-load-petsc/2249/4 "2023-01-27T16:35:28Z")

</div>

Just `load "iovtk"` before `load "PETSc"`.
