Giter Club home page Giter Club logo

Comments (10)

mwinkel-dev avatar mwinkel-dev commented on July 22, 2024 4

The Apple Silicon MacOS port is now passing ~80% of the test suite. And presently involves ~125 changes spread across ~110 source files. (However, most of the changes are simple edits to extern statements.). Current plan is to achieve ~95% pass rate on the tests, and then submit several PRs to merge the changes into the alpha branch. And of course before submitting the PRs, will also be confirming that the changes don't cause bugs in MDSplus on Windows and Linux.

from mdsplus.

mwinkel-dev avatar mwinkel-dev commented on July 22, 2024 2

Apple Silicon (the M1 and M2 CPUs) are based on the ARM architecture (with customizations made by Apple).

We presently have an experimental build of MDSplus for aarch64 (aka arm64). And that build does work when run in ARM-based Linux VMs (created with VMware Fusion) that are hosted on a Mac with an M2 CPU.

And we have done exploratory work to create a MDSplus build for MacOS running on M1 and M2 CPUs.

However, the initial release probably won't include the interface to LabView because MathWorks has not yet ported their software to Apple Silicon. (Presently, MathWorks uses Apple's Rosetta emulator to run x86 versions of LabView on Apple Silicon.)

Creating a MDSplus build for MacOS on Apple Silicon will be done in phases:

  • finish testing MDSplus on aarch64
  • manually build MDSplus on MacOS for M2 and release that build
  • upgrade the build system to use the new Mac M2, so that builds are done automatically

from mdsplus.

mwinkel-dev avatar mwinkel-dev commented on July 22, 2024 1

An experimental (and incomplete) port to Apple Silicon has bumped into the file locking problem with MacOS Ventura (issue #2599). That is a blocking issue. So now shifting focus to fixing that bug.

from mdsplus.

mwinkel-dev avatar mwinkel-dev commented on July 22, 2024 1

Hi @ModestMC -- The Apple Silicon MacOS Ventura port is still in flux. Likely will be a few more weeks before I am ready to publish a "preview" branch.

Presently, the Apple Silicon port fails 14 tests. After I investigate those issues, I will review the details with Stephen so that we can assess the impact those failures will have on users. After the Apple Silicon port passes muster with the MDSplus team, then I'll make the preview branch so that you (and others) can experiment with the Apple Silicon prototype.

Currently am wrapping up the changes for Intel macOS Ventura so that they get folded into the forthcoming CMake build system. It is important for the Intel macOS Ventura code to be solid, because in some aspects it is a foundation for the Apple Silicon port.

The Apple Silicon port is complicated because macOS uses a different ABI on M1 / M2 CPUs than on Intel CPUs. The new ABI might impose some limitations on a few MDSplus features. (Will know more after I investigate the 14 failing tests.)

from mdsplus.

mwinkel-dev avatar mwinkel-dev commented on July 22, 2024 1

Hi @mrclary -- Unfortunately, the Apple Silicon port has languished for months. It was eclipsed by other "US Priority" bugs that were more urgent (i.e., needed for the upcoming campaign at the DIII-D tokamak). However, now that the urgent bug backlog has been dealt with, I will be resuming work on the Apple Silicon port soon.

Whenever you want to know about the progress, it is A-OK to post here and request a status update.

from mdsplus.

mwinkel-dev avatar mwinkel-dev commented on July 22, 2024

Using the LLDB debugger, have confirmed that segfaults in Apple Silicon MacOS Ventura were caused by va_arg arguments being passed incorrectly. Instead of the variable list of arguments being passed on the stack, they were instead being passed in the registers. (The ABI for Apple Silicon MacOS is a bit different than that for Intel MacOS.) Fix involves changing some extern declarations of various variadic functions.

For example, in TclDecompile.c, the following change eliminated the segfault on mdstcl decompile <node_path>

// extern int TdiCompile(); -- original line commented out
extern int TdiCompile(struct descriptor *, ...);  // corrected line

Based on the number of failing C and Python test cases, there are probably another ~20 extern function declarations that need to be fixed. However, now that the root cause is known, these edits should go quickly.

from mdsplus.

mwinkel-dev avatar mwinkel-dev commented on July 22, 2024

The port to Apple Silicon MacOS will touch many files. (Presently at ~100 changes, with many more still to do.) Although the vast majority of changes are trivial (just editing externs as shown in the previous post), nonetheless touching so many files could affect all platforms. Thus, thorough testing will be needed when the Apple Silicon MacOS changes are eventually merged into the alpha branch.

from mdsplus.

ModestMC avatar ModestMC commented on July 22, 2024

@mwinkel-dev This seems pretty awesome... can I now use macports to try downloading the new build?

from mdsplus.

mwinkel-dev avatar mwinkel-dev commented on July 22, 2024

Accidentally closed this issue on 5-Sep-2023. Still working on the port to Apple Silicon.

from mdsplus.

mrclary avatar mrclary commented on July 22, 2024

@mwinkel-dev, any further progress on this issue? Thanks for all your hard work on this! Looking forward to MDSplus deployment on Apple Silicon.

from mdsplus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.