Skip to content

Auto-build missing/incompatible MEX binaries #1763

@iok-ui

Description

@iok-ui

On macOS, prebuilt MEX binaries may be unrecognised (e.g., arch/version mismatch). Users currently have to compile manually if the provied mex is not recognised. Please add an automatic check-and-build step that compiles required MEX files when they’re missing or incompatible.

When attempting to run binary MEX files for MATLAB on macOS, which is generated from the included .cpp files (e.g. test_MultilayerCommunity), MATLAB does not recognize them by default.
image

To resolve this, the following commands must be executed:

mex metanetwork_reduce.cpp group_index.cpp full.cpp sparse.cpp
mex group_handler.cpp group_index.cpp full.cpp sparse.cpp

Steps to Reproduce

  • Navigate to the folder: BRAPH-2/braph2/measures/MEX_SRC.
  • Execute the commands listed above.

Output

After running the first command:

mex metanetwork_reduce.cpp group_index.cpp full.cpp sparse.cpp

A new file is generated:
/Users/iok-ui/OnDevice/GitHub/BRAPH-2/braph2/measures/MEX_SRC/metanetwork_reduce.mexmaca64

image

After running the second command:

mex group_handler.cpp group_index.cpp full.cpp sparse.cpp

Another file is generated:
/Users/iok-ui/OnDevice/GitHub/BRAPH-2/braph2/measures/MEX_SRC/group_handler.mexmaca64

image

After these steps, the function test_MultilayerCommunity works successfully
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    utilissue related to package util

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions