Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MEX of MATLAB R2023b provided by setup-matlab@v2 does not work with Xcode 15 and Intel oneAPI 2023 #96

Closed
zaikunzhang opened this issue Feb 15, 2024 · 10 comments

Comments

@zaikunzhang
Copy link

zaikunzhang commented Feb 15, 2024

Hi @mcafaro ,

I am not sure whether this is an issue with MEX of MATLAB R2023b or with setup-matlab@v2.

MEX of MATLAB R2023b (update 6 as of Feb 15, 2024) provided by setup-matlab@v2 does not work with Xcode 15.0 and Intel oneAPI 2023, but it should according to https://www.mathworks.com/support/requirements/supported-compilers-mac.html.

See the workflow run at https://github.com/zequipe/test_matlab/actions/runs/7910874522/job/21594149098. It complains about undefined symbols, e.g., ___power4i8.

N.B.:

  1. For the configurations of the macOS-13 runner, see https://github.com/actions/runner-images/blob/macos-13/20240204.1/images/macos/macos-13-Readme.md. In particular, it has Xcode Command Line Tools 15.1.0.0.1.1700200546 with Clang/LLVM 15.0.0.

  2. The version of Intel oneAPI is 2023, which is installed by https://github.com/equipez/github_actions_scripts/blob/de1b45b9fd667a9fe42cd7d5ecec4318f60d9117/install_oneapi_macos.sh

  3. The testing code:
    https://github.com/zequipe/test_matlab/actions/runs/7910874522/workflow
    https://github.com/zequipe/test_matlab/blob/master/test_mac/test_pow.m
    https://github.com/zequipe/test_matlab/blob/master/test_mac/pow.F
    The Fortran code is a modification of the official timestwo.F. It is modified to calculate the power $x^{[x]}$.

  4. It does not work with oneAPI 2022 either. However, oneAPI 2021 is fine:
    https://github.com/zequipe/test_matlab/actions/runs/7910874522/job/21594149278
    https://github.com/zequipe/test_matlab/actions/runs/7910874522/job/21594149356

Thank you for taking a look.

Best regards,
Zaikun

@zaikunzhang zaikunzhang changed the title MEX of MATLAB R2023b provided by setup-matlab@v2 does not work with Xcode 15.0 and Intel oneAPI 2023 MEX of MATLAB R2023b provided by setup-matlab@v2 does not work with Xcode 15 and Intel oneAPI 2023 Feb 15, 2024
@zaikunzhang
Copy link
Author

zaikunzhang commented Feb 16, 2024

I am almost sure that this is a bug of MATLAB R2023b.

The default MEX options are wrongly specified. They are incompatible with the new linker in Xcode 15.

See my GitHub repo for the fix.

See PRIMA for more explanations.

@mcafaro
Copy link
Member

mcafaro commented Feb 16, 2024

Hi @zaikunzhang, thank you for the detailed report. I will inform the MEX team and have them take a look.

@zaikunzhang
Copy link
Author

zaikunzhang commented Feb 16, 2024

Hi @zaikunzhang, thank you for the detailed report. I will inform the MEX team and have them take a look.

Thank you very much @mcafaro . I have indeed submitted a bug report (ref 06811363) to MathWorks but received no response after two days ...

@zaikunzhang
Copy link
Author

zaikunzhang commented Feb 20, 2024

Hi @mcafaro ,

Have your MEX colleagues provided any updates? My bug report has not been answered.

Indeed, I do not need a fix, because I know how to fix it ( https://github.com/zequipe/test_matlab/blob/master/test_mac/test_pow.m ). I only need them to confirm that

  • it has been reproduced on local machines,
  • it is a bug,
  • it will be fixed later.

If this is confirmed, then my fix above is sufficient for my project.

Many thanks.

Best regards,
Zaikun

@zaikunzhang
Copy link
Author

zaikunzhang commented Feb 29, 2024

Any update from the mex team about this problem ? Thank you.

@mcafaro
Copy link
Member

mcafaro commented Feb 29, 2024

The MEX team informed me that they are currently working with you through another channel (perhaps your bug report?). Have they been in touch with you?

@zaikunzhang
Copy link
Author

zaikunzhang commented Feb 29, 2024

Hi @mcafaro ,

Yes, but it has been an extremely slow and frustrating communication, since everything is forwarded through a MATLAB support person in China. Being a nice person, he does not know MEX, Fortran, github, or Mac. In addition, there is a time difference of 12 hours between him and the MEX team in the US. You can imagine how efficient the process would be.

Could by any chance the MEX team respond to this issue here?

Many thanks,
Zaikun

@zaikunzhang
Copy link
Author

zaikunzhang commented Feb 29, 2024

As mentioned, I do not need a fix, because I know why the error occurs and how to fix it. See

https://github.com/libprima/prima/blob/27b4771b31a32dd00fed9745f340b18d838d7a48/matlab/setup_tools/compile.m#L97-L106

https://github.com/zequipe/test_matlab/blob/master/test_mac/test_pow.m

I only need them to confirm that

  • it has been reproduced on local machines,
  • it is a bug,
  • it will be fixed later.

If this is confirmed, then my fix above is sufficient for my project.

@mcafaro
Copy link
Member

mcafaro commented Feb 29, 2024

@zaikunzhang I understand. However because this is an issue with MEX and not setup-matlab, there is a preference to continue to work through the traditional support channels, sorry. I am closing this issue for now in favor of allowing that process to play out. Feel free to reopen if it becomes apparent that setup-matlab is part of the issue.

@mcafaro mcafaro closed this as completed Feb 29, 2024
@zaikunzhang
Copy link
Author

Update: the issue remains in MATLAB R2024a. Fortunately, your colleague @srirams1987 is investigating this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants