MPh-py / MPh

Pythonic scripting interface for Comsol Multiphysics
https://mph.readthedocs.io
MIT License
265 stars 67 forks source link

New settings for ARM-based architectures #178

Closed miamvmian closed 1 month ago

miamvmian commented 2 months ago

It works for macOS Sonoma (14.2).

john-hen commented 2 months ago

Hi. According to your notes, that involves quite a bit of manual setup by the user, fiddling with environment variables etc. Which is not what MPh tries to do. We want things to work out of the box. I've put quite a lot of effort into that, shielding the user from these complications, as elaborated in section "Platform differences" of the "Limitations" chapter.

If you want your effort to be to the benefit of other ARM-based Mac users (which I am not one of, so cannot test it), I would suggest that you publish a fork with these changes. Then people can give you direct feedback. You can mention the published fork (or branch of your GitHub fork, if publishing is too much trouble) in the related issue that this PR is trying to solve, which is already linked to from the documentation.

miamvmian commented 2 months ago

Dear John Hennig,

Thank you for the reply. First of all, I would like to express my gratitude for your enormous efforts and contributions to make MPh available to us.

That's correct. To make it work on ARM-based Mac systems, it requires extra tweaking over the Environment variables. I have provided a method to set the environment variable manually. Anyway, I guess it is possible to create a separate python module to deal with Environment Variables with python packages like os.environ, it modifies environment variables temporarily, so that it may extend the versatility for installing the package on different OS.

You really did a great job, thank you again.

Best, Lujiang

john-hen commented 1 month ago

Setting the environment variables for shared libraries from within our own Python process does nothing on macOS or Linux, as explained in #8. That is the main platform difference, compared to Windows. If that's actually necessary on ARM-based Macs (as opposed to Intel-based Macs, where it isn't), then this is a dead end.