Same version unable to load .yade file

Asked by Sacha Duverger

Hello,

I saved a simulation with yadedaily (git revision f3c2fc3) using the ".yade" extension. Immediately after I tried to load it and it worked well. Recently I updated yadedaily and now want to load this simulation, so I compiled yade from the git revision f3c2fc3 but when I tried to load the simulation I get a MemoryError.

Shouldn't it be enough to use the same version of yade to load a ".yade" file?

Thanks in advance,

Sacha

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Bruno Chareyre
Solved:
Last query:
Last reply:
Revision history for this message
Best Bruno Chareyre (bruno-chareyre) said :
#1

Hi,

> Shouldn't it ...

Well... apparently it "doesn't " :)
I don't think we ever anticipated that particular situation so I'm unsure it "should".
You probably need to compile with exactly the same options as the debian build, since many class attributes exist or not depending on compile flags.
Even in that case I'm not sure it is guaranteed to work.
Bruno

Revision history for this message
Sacha Duverger (schmxprr) said :
#2

I tried to compile yade with the default cmake options and this time it worked. So apparently a ".yade" file has to be loaded with the same version of yade but also the same features as the yade used to save it.

Thank you !

Revision history for this message
Sacha Duverger (schmxprr) said :
#3

Thanks Bruno Chareyre, that solved my question.

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#4

Yes.
From the save/load point of view the problem is obvious. Objects are archived in some format (binary or xml) then reloaded. If the archive for one object doesn't have the expected content it can't work.

For instance loading a scene with mpi support implies that each body has an integer "subdomain" defined. If it was saved without mpi support then that attribute doesn't exist in the archive: crash.

Bruno