Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Issue with synth plugin and Apple M1 Max chip

    Hi, all. I have used the -synth- plugin for several years with Stata 13-16 on an Apple Macbook Pro with an Intel chip. I recent upgraded to a new computer with an Apple M1 Max chip, and am now seeing the following error when I run synth:

    Could not load plugin: synthopt.plugin
    (error occurred while loading synth.ado)
    r(9999);

    I have confirmed that the plugin lives at the path given by the error, and tried reinstalling -synth- with no success. I suspect the required plugin has not been written for the new hardware. Wondering if anyone has had success with resolving this.

    Thanks!




  • #2
    Is this the plugin you are referring to?

    My guess is that you are correct and the compiled portion of the code is no longer compatible with your hardware. I'm guessing this is because the macOS version was originally compiled for a 32 bit architecture, which is no longer supported by your M1 chip. I notice the C/C++ source for the plugin is not available on the SCC archive. You might be able to reach out to the original creators of the plugin and ask them to compile the source for your hardware. If they aren't willing to do that, they might be willing to share the source with you, in which case you might be able to compile it yourself with clang.

    Another option might be to try the 64 bit linux version of the plugin. Assuming the 32 bit architecture is the problem, the 64 bit linux version might be compatible.

    Comment


    • #3
      This has been discussed before on Statalist, you may find the following topic helpful

      https://www.statalist.org/forums/for...stalling-synth

      and possibly the alternatives suggested in post #5 at

      https://www.statalist.org/forums/for...01#post1689301

      Let me add that the issue is not 64-bit v. 32-bit Intel architecture, but rather Intel architecture v. ARM (Apple Silicon) architecture, since the native instruction set is entirely different.The plugin that was installed on your MacBook Pro and migrated to your new MacBook M1 is in fact the one intended for what Stata calls the "MACINTEL64" environment; what is needed is one intended for "MACARM64". I learn this by looking "behind the scenes" at SSC at

      http://fmwww.bc.edu/repec/bocode/s/

      - in particular by downloading synth.pkg, changing the extension to .txt, and opening it in a text editor - and from the output of
      Code:
      help usersite
      How to compile a native version of a similar plugin is discussed by Chinh Nguyen (StataCorp) of Stata Technical Services in post #4 at

      https://www.statalist.org/forums/for...53#post1605153
      Last edited by William Lisowski; 21 Nov 2022, 15:06.

      Comment


      • #4
        Let me add that the issue is not 64-bit v. 32-bit Intel architecture, but rather Intel architecture v. ARM (Apple Silicon) architecture, since the native instruction set is entirely different.The plugin that was installed on your MacBook Pro and migrated to your new MacBook M1 is in fact the one intended for what Stata calls the "MACINTEL64" environment; what is needed is one intended for "MACARM64".
        Ah okay, thank you for clarifying. I was under the mistaken impression Rosetta 2 would translate the instruction set in the background. As you point out in the other thread, the entire application needs to be emulated for this to work.

        Comment


        • #5
          Thanks for the input, everyone. I attempted to compile this for the ARM architecture, but unfortunately ran into a bunch of compiler errors that seem to suggest the underlying code may need to be changed to work with the environment. I've reached out to the package author to see if an update is planned.

          Comment

          Working...
          X