[petsc-users] binary writing to tecplot

Benjamin Sanderse B.Sanderse at cwi.nl
Tue Nov 22 04:40:50 CST 2011


Hello all,

I am trying to output parallel data in binary format that can be read by Tecplot. For this I use the TecIO library from Tecplot, which provide a set of Fortran/C subroutines. With these subroutines it is easy to write binary files that can be read by Tecplot, but, as far as I can see, they can not be directly used with parallel Petsc vectors. On a single processor everything works fine, but on more processors it fails.
I am thinking now of different workarounds:

1. Create a sequential vector from the parallel vector, and call the TecIO subroutines with this sequential vector. For large problems this will probably be too slow, and actually I don't know how to copy the content of a parallel vector into a sequential one.
2. Write a tecplot file from each processor, with the data from that processor. The problem is that this requires combining the files afterwards, and this is probably not easy (certainly not in binary format?).
3. Change the tecplot subroutines or write own binary output with VecView(). It might not be easy to get the output right so that Tecplot understands it.

Do you have suggestions? Are there other possibilities?

Thanks,

Benjamin




More information about the petsc-users mailing list