Fix Apple Silicon (MACA64) support in GetSystemCommand#22
Open
AmitSubhash wants to merge 1 commit into
Open
Conversation
MATLAB on Apple Silicon reports computer() as 'MACA64', which was not handled alongside 'MACI64'. This caused the mesher to fall back to the 32-bit binary (image2mesh_cgal-mac.exe) instead of the 64-bit one (image2mesh_cgal-mac64.exe). The 32-bit binary cannot run on macOS 11+. Tested on MATLAB R2025b, MacBook Pro M4 Pro, macOS 15.
9af6cf5 to
bb67c60
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GetSystemCommand.mdid not recognizeMACA64(Apple Silicon MATLAB), causing it to select the 32-bitimage2mesh_cgal-mac.exeinstead of the 64-bitimage2mesh_cgal-mac64.exestrcmpi(os,'MACA64')alongside the existingMACI64checkDetails
MATLAB R2023b+ on Apple Silicon reports
computer()asMACA64. The existing code only checked forMACI64when deciding whether to append the64suffix to the binary name. Without this fix, NIRFAST attempts to runimage2mesh_cgal-mac.exe(Mach-O i386), which fails with "bad CPU type in executable".Test plan
computerreturnsMACA64on MATLAB R2025b, MacBook Pro M4 ProGetSystemCommand('image2mesh_cgal')correctly resolves toimage2mesh_cgal-mac64.exeNirfastMesh_Regionsuccessfully generates meshes locally on Apple SiliconMACI64) or other platforms