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.

  • 1
    $\begingroup$ @OleksandrR. You should post this as an answer, preferably with links to the relevant docs. $\endgroup$
    – jVincent
    Dec 10 '12 at 11:27
  • $\begingroup$ @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. $\endgroup$ Dec 10 '12 at 11:52
  • 1
    $\begingroup$ @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. $\endgroup$
    – jVincent
    Dec 10 '12 at 12:13
  • 3
    $\begingroup$ 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. $\endgroup$
    – Mr.Wizard
    Dec 10 '12 at 13:49
  • $\begingroup$ 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. $\endgroup$ Dec 10 '12 at 22:49

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.

  • $\begingroup$ Or read them in in v8 again and Save them. This format is compatible. $\endgroup$ Dec 11 '12 at 6:27
  • $\begingroup$ @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. $\endgroup$ Dec 22 '12 at 1:50
  • $\begingroup$ True, but conversion is a one-time operation. After carrying them over to v9 using Save, you can DumpSave them again. $\endgroup$ Dec 22 '12 at 7:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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