PFlotran reader endian bug
From a customer:
<start forwarded thread>
A colleague in Spain is using Paraview and runs into the following problem (her words):
When trying to read data generated on supercomputer (big-endian), the ParaView PFlotran-reader fails. This is because the data generated on the supercomputer is big-endian whereas my machine (Intel machine) uses little-endian.
The workaround to fix this is to go to following directory:
Utilities/VisItBridge/databases/PFLOTRAN
and to the following file : avtPFLOTRANFileFormat.C
In the functions avtPFLOTRANFileFormat::GetVar(...) and avtPFLOTRANFileFormat::GetVectorVar(...)
there are the following if-statement TWO TIMES IN BOTH FUNCTIONS, so 4 modifications are needed:
if (H5Tequal(intype, H5T_NATIVE_FLOAT) ||
H5Tequal(intype, H5T_NATIVE_DOUBLE) ||
H5Tequal(intype, H5T_NATIVE_LDOUBLE) )
Replace ALL 4 above OCCURRENCES by
if (H5Tequal(intype, H5T_NATIVE_FLOAT) ||
H5Tequal(intype, H5T_NATIVE_DOUBLE) ||
H5Tequal(intype, H5T_NATIVE_LDOUBLE) ||
H5Tequal(intype, H5T_IEEE_F32BE) ||
H5Tequal(intype, H5T_IEEE_F64BE) )
The problem is I have to compile paraview from source for each update or on every machine. I was wondering whether this capability to read data from big-endian machine could be included.
Is it possible for the code change she suggests to be made, so that she can use the kitware executable instead of compiling herself each time?
``
Edited by W. Alan Scott