Replies: 1 comment 1 reply
-
These are precisely the reasons why I created GSD. There is also no natural way to change array sizes (i.e. changing number of particles) from one frame to the next in HDF5. The OpenDIS project is welcome to use the GSD format if you find it useful. If the Unfortunately, GSD currently works only with the native machine endian values. The vast majority of systems are little endian so this this has not been a problem so far. GSD could be updated to support reading and writing little endian files on big endian architectures. Would you be willing to put the effort in? gsd is 2.5k lines of C code. We would need to add byte swaps on writing and reading in many places in the code.
The index entries would be the most involved part of the work. GSD uses memory mapped file IO to allow efficient random reads of the index. The The main optimization that mmap provides is O(1) file open time which is important if you are then going to read only 1 frame out of the file. Do you need this functionality on your big endian systems? There is a The write buffer for the index entries will need to be kept native until the last moment before it is written to the file: Lines 2020 to 2022 in 9c68687 |
Beta Was this translation helpful? Give feedback.
-
I have a question about the GSD base format: Can the format handle endianness of different processor architectures? I have not found any hints on this topic in the documentation or in the source code and therefore assume that GSD files are not directly portable between big and little endianness. Is that correct?
We are considering using GSD as the basis for a new standardized file format for the OpenDIS project and defining a new schema for that application. Our hope is that with GSD we could avoid the performance problems of a text-based format like JSON and the dependency problems of a heavy format like HDF5. But the simulation code runs on machines with different endianness. That is why the question of portability is important.
Beta Was this translation helpful? Give feedback.
All reactions