RES: [Paraview] Writing unformatted Fortran data

Renato N. Elias rnelias at nacad.ufrj.br
Fri Feb 10 11:43:26 EST 2006


Hi Stéphane,

You're in a bad luck. Actually, most of the Fortran compilers has support to
write "binary" files (I'm sure about: Compaq, Intel & PGF90). 

I've already got this problem too, but it only happens with PV because
Ensight can handle both types of binary data. I also got problem when tried
to read, in PV, binary (form='binary') Ensight "GOLD" files written by
Fortran routines. 

I have not found a solution yet but I started to implement a C routine,
only, to write Ensight's files from my Fortran code (I'm sending in attach).
As you can see, the routines are very simple (I'm not a C/C++ programmer)
and, I guess, you can easily modify them to fit in your problem. I know it's
not the ideal solution but, up to now, it was the easiest solution for me.

>>> please Berk and PV team, help us, poor Fortran programmers, giving
support for both type of binaries in PV ;-) <<< I'm joking...

NOTE: I'm still looking for a good way to pass a Fortran character to a C
routine as a C string (null terminated). I've been doing the following:

!----------------------------------------------------

character :: arch*80, null*1
external WriteEnsightGeometryBin

null = char(0)
arch= "MyFile.geo"//null
call WriteEnsightGeometryBin ( arch, irank+1, nnos, nel, 3, 4, 
.                              ien(1,1), xyz(1,1) )

!----------------------------------------------------

And I should advise your that not always it works fine ;-)

Regards

Renato N. Elias
===============================================
PhD student - http://www.nacad.ufrj.br/~rnelias
High Performance Computing Center
Federal University of Rio de Janeiro
Rio de Janeiro, Brazil
+55(21) 2562-8080 

-----Mensagem original-----
De: Stéphane Montésino [mailto:Stephane.Montesino at hmg.inpg.fr] 
Enviada em: sexta-feira, 10 de fevereiro de 2006 13:05
Para: Renato N. Elias
Assunto: [Paraview] Writing unformatted Fortran data

Hi Renato,
Openning file in Binary form is only possible with Microsoft Develloppers
Studio.
When I wanted to run my routine on IBM SP4, I had to change the form to
UNFORMATTED because the key word BINARY is not accepted..
But now I can't read my data with paraview.

Does anyone has a solution to write UNFORMATTED fortran data that can be
read with Paraview ????


-- 
Stéphane MONTESINO

PhD Student                     tel:+33 4 76 82 52 91
LEGI                            fax:+33 4 76 82 70 22
BP 53
38041 Grenoble Cedex            email: stephane.montesino at hmg.inpg.fr
France                          http://www.legi.hmg.inpg.fr 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: EnsightWritersBIN.zip
Type: application/octet-stream
Size: 1127 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/paraview/attachments/20060210/6fd2ccc4/EnsightWritersBIN.obj


More information about the ParaView mailing list