Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Having written a lot of code on M8, I recently switched to M9 and tried to run the code on M9, the code starts by loading an .mx file written by M8, but M9 wouldn't read the .mx file saying that it was written on another machine. This is a major incompatibility issue between M8 and M9. Fortunately, I kept my M8 installation, so for now, M9 is useless to me. Please a solution.

share|improve this question
1  
@OleksandrR. You should post this as an answer, preferably with links to the relevant docs. –  jVincent Dec 10 '12 at 11:27
    
@jVincent I don't think it really matters in this case since nothing more can be said on this question than is written in the documentation, ergo it will sooner or later be closed as TL (and I will vote as such as soon as the OP acknowledges the response). However, I've now given an answer as you suggest. –  Oleksandr R. Dec 10 '12 at 11:52
1  
@OleksandrR. I believe the documentation is lacking in this regard in that .mx files are mentioned in several locations without mention of the non-compatibility with version changes. While it's true that there are also locations that do mention it, I believe that this question has value in directing users who for instance read the DumpSave documentation which states only machine dependence. –  jVincent Dec 10 '12 at 12:13
3  
This question should remain open as a visible warning to new users. This is a bad mistake to make if proper back-ups were not kept. –  Mr.Wizard Dec 10 '12 at 13:49
    
Just curious -- given that versions get updated and hardware gets updated from time to time, why do people use *.mx files? ...I guess I can see the usefulness for shorter term storage. –  Mike Honeychurch Dec 10 '12 at 22:49

1 Answer 1

Unfortunately, there is no solution. Dump (.mx) files are explicitly documented as being non-portable between different versions, and even between different builds of the same version (e.g. 32- and 64-bit versions for a given platform, or those for two different platforms). As such, you must re-generate your .mx files for version 9 either from the original source or by reading them in on version 8 and then saving them in a different, portable format, such as WDX.

share|improve this answer
    
Or read them in in v8 again and Save them. This format is compatible. –  Sjoerd C. de Vries Dec 11 '12 at 6:27
    
@Sjoerd yes, but this is not a serialized format. If one has saved large numerical arrays, for example (a likely use case for dump files), reading and writing them using expressions represented as strings in text files is likely to be very inefficient. One also loses representational details such as whether the array is packed. –  Oleksandr R. Dec 22 '12 at 1:50
    
True, but conversion is a one-time operation. After carrying them over to v9 using Save, you can DumpSave them again. –  Sjoerd C. de Vries Dec 22 '12 at 7:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.