Klaus,

I've tracked this issue down. It was indeed due to byte ordering. The
version number was being read incorrectly.  Attached is a patch for
the fix. It have been committed to git master. I'll ensure that it
gets into the 3.8.1 release as well.

Utkarsh

On Fri, Jul 30, 2010 at 10:22 AM, Utkarsh Ayachit
<utkarsh.ayac...@kitware.com> wrote:
> Klaus,
>
> Can you send us the data again please? Dave is away and not sure when
> I'd be able to get in touch with him.
>
> Utkarsh
>
> On Thu, Jul 29, 2010 at 5:06 PM, Klaus Weide <kl...@flash.uchicago.edu> wrote:
>> Hi,
>>
>> I have just installed ParaView 3.8.0 on a PowerBook G4 (Mac OS X 10.4.11).
>>
>> On opening a FLASH file, I get the output message:
>>
>> Generic Warning: In
>> /Users/partyd/Dashboards/MyTests/ParaView-3-8-0/ParaView/Servers/Filters/vtkFlashReader.cxx,
>> line 764
>> Inconsistency in the number of blocks.
>>
>> After that, the Object Inspector shows no useful information about the
>> file (other than Filename and Path).
>>
>> I gave Dave DeMarle a copy of the same file, he was able to successfully
>> open it on his laptop.  He thinks the problem is caused by the different
>> byte ordering on PowerPC.  This should be easy to fix since the underlying
>> file format of the FLASH format is HDF5.
>>
>> Klaus
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at 
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the ParaView Wiki at: 
>> http://paraview.org/Wiki/ParaView
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.paraview.org/mailman/listinfo/paraview
>>
>
commit f09b2d82b3c70d9a830d244b1be7210e3ec33f49
Author: Utkarsh Ayachit <utkarsh.ayac...@kitware.com>
Date:   Mon Aug 2 15:33:28 2010 -0400

    Fixed FlashReader issues on BigEndian machines.
    
    FlashReader was reading the version number information incorrectly on BE
    machines. Fixed that.

diff --git a/Servers/Filters/vtkFlashReader.cxx b/Servers/Filters/vtkFlashReader.cxx
index f11228c..5ef9d75 100644
--- a/Servers/Filters/vtkFlashReader.cxx
+++ b/Servers/Filters/vtkFlashReader.cxx
@@ -30,6 +30,7 @@
 
 #include "vtkFlashReader.h"
 
+#include "vtkByteSwap.h"
 #include "vtkPoints.h"
 #include "vtkDataSet.h"
 #include "vtkPolyData.h"
@@ -672,6 +673,10 @@ void vtkFlashReaderInternal::ReadVersionInformation( hid_t fileIndx )
       H5Tclose( si_type );
       H5Dclose( h5_SI );
 
+      // FileFormatVersion is readin as little-endian. On BE machines, we need to
+      // ensure that it's swapped back to right order.
+      // The following will have no effect on LE machines.
+      vtkByteSwap::SwapLE(&this->SimulationInformation.FileFormatVersion);
       this->FileFormatVersion = this->SimulationInformation.FileFormatVersion;
       }
       
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to