[Serialization] [Portable Binary]
Dear, In the documentation of boost::serialization, I read that there is still work needed to have a portable (32 and 64 bits) binary serialization implementation. The date of the TODO is 2008. Is still this a current TODO? is there a library implementing this? currently, It is not a matter of dead or live, but I would like to know. I have been trying to run a code in different (bits) systems, and I got the error "Incompatible native format - size of int" Best regards / Cordialmente, -- William Oquendo Phd Candidate Simulation Of Physical Systems Group Universidad Nacional de Colombia Linux User # 321481 ********************* Este correo puede carecer de tildes o eñes ya que el teclado no contiene estos caracteres. Presento excusas por eso. *********************
William Oquendo wrote:
Dear,
In the documentation of boost::serialization, I read that there is still work needed to have a portable (32 and 64 bits) binary serialization implementation. The date of the TODO is 2008. Is still this a current TODO? is there a library implementing this? currently, It is not a matter of dead or live, but I would like to know. I have been trying to run a code in different (bits) systems, and I got the error "Incompatible native format - size of int"
This should only occur when trying to load data which cannot be represented in the loading system. For example suppose one has a value >32 bits on a 64 bit machine. No problem. Then it is saved to a portable binary archive. Still no problem. Then it is loaded by a mache with 32 bit integers. Uh-oh - the information can't be represented and an exception is thrown. I believe that the only think pending is a more general representation of floating point values. Apparently that hasn't been an issue for people that use it. Robert Ramey
Best regards / Cordialmente,
Hi, thanks for the reply.
In the final version of the program, I needed to manipulate also float
values. I was testing on Snow Leopard + gcc 4.5 , then, when running the
same code with the same binary data, the program did not run both on Lunix
Slackware64 13.1 + gcc 4.4.4, and Linux Slackware 23.0 + gcc 4.4.4 (and
gcc 4.3). SO, temporarily, I had to rewrote everything to handle only text
files, and now everything is working.
I will try to isolate the issue in a smaller code to check if this is a
compiler issue, a platform issue, or a boost::binary issue.
Best regards / Cordialmente,
--
William Oquendo
Phd Candidate
Simulation Of Physical Systems Group
Universidad Nacional de Colombia
Linux User # 321481
*********************
Este correo puede carecer de tildes o eñes ya que el teclado no contiene
estos caracteres. Presento excusas por eso.
*********************
On Sat, Sep 11, 2010 at 12:21 AM, Robert Ramey
William Oquendo wrote:
Dear,
In the documentation of boost::serialization, I read that there is still work needed to have a portable (32 and 64 bits) binary serialization implementation. The date of the TODO is 2008. Is still this a current TODO? is there a library implementing this? currently, It is not a matter of dead or live, but I would like to know. I have been trying to run a code in different (bits) systems, and I got the error "Incompatible native format - size of int"
This should only occur when trying to load data which cannot be represented in the loading system. For example suppose one has a value >32 bits on a 64 bit machine. No problem. Then it is saved to a portable binary archive. Still no problem. Then it is loaded by a mache with 32 bit integers. Uh-oh - the information can't be represented and an exception is thrown.
I believe that the only think pending is a more general representation of floating point values. Apparently that hasn't been an issue for people that use it.
Robert Ramey
Best regards / Cordialmente,
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
William Oquendo wrote:
Hi, thanks for the reply.
In the final version of the program, I needed to manipulate also float values. I was testing on Snow Leopard + gcc 4.5 , then, when running the same code with the same binary data, the program did not run both on Lunix Slackware64 13.1 + gcc 4.4.4, and Linux Slackware 23.0 + gcc 4.4.4 (and gcc 4.3).
SO, temporarily, I had to rewrote everything to handle only text files, and now everything is working. Hmmm - what did you have to re-write? You should only have to specify a different archive type when you invoke serializtion.
I will try to isolate the issue in a smaller code to check if this is a compiler issue, a platform issue, or a boost::binary issue.
I think I took a look at the float which is part of portable binary archive. I don't remember how that got in there. But it doesn't look portable to me. Even assuming that a) all floats were iee754, b) that could trap all Nan's as errors it would require providing conversion amongst 80, 64, 32, 24, 16 and 8 bit floats. This is quite doable, but also a significant effort to build, test and integrate to boost standards. Robert Ramey
Hi, Yes, I only needed to replace calls for binary files with calls for text files. Maybe, it is better for me to stick with text files for now. Thanks again. Best regards / Cordialmente, William
participants (2)
-
Robert Ramey
-
William Oquendo