Matthew Knepley via petsc-users <[email protected]> writes:

> On Tue, Dec 4, 2018 at 11:11 AM Lisandro Dalcin via petsc-users <
> [email protected]> wrote:
>
>> PetscByteSwap ? But be careful, you should (1) vec get array, byteswap,
>> vec restore array, (2) view, (3) vec get array, byteswap, vec restore
>> array. Of course, if you do not care about the final Vec contents, you can
>> just omit step (3) and let it be, let it be...
>>
>> PS: Eventually, PETSc binary viewers should gain an API like
>> PetscViewerBinarySetByteOrder(viewer, PETSC_LITTLE_ENDIAN) ...
>>
>
> Note that this enables exactly what we wanted to avoid, namely binary files
> that an incompatible with some installations.

PETSc files should contain this metadata (int sizes, endianness,
precision, and scalar type), but that would break backward
compatibility, thus be a new format (or better, adopt an existing
format, perhaps in the Apache Arrow ecosystem).

Reply via email to