Open-TPS for Mac

Hello,

I am currently running OpenTPS on a Mac with Apple Silicon (M1, arm64). The OpenTPS installation itself works correctly, and the GUI launches without issues. However, I am encountering a problem when running MCsquare dose calculations.

The executable provided in the repository (MCsquare_mac) is a Mach-O x86_64 binary, while my system is arm64 (Apple Silicon). When OpenTPS tries to run MCsquare, it fails with the following error:

Illegal instruction: 4

I also tested running it explicitly through Rosetta using:

arch -x86_64 ./MCsquare config.txt

Rosetta is installed and active, but the same Illegal instruction error occurs.

Additionally, I checked the OpenTPS repository and could not find the MCsquare source code (no CMakeLists.txt or build system for MCsquare), only the precompiled binaries.

Could you please clarify:

  1. Is there a native build of MCsquare for Apple Silicon (arm64)?

  2. If not, is there a recommended way to compile MCsquare from source on macOS?

  3. Alternatively, is there a more compatible x86_64 build that works with Rosetta?

Any guidance would be greatly appreciated.

Thank you very much for your work on OpenTPS.

Best regards,
Alejandro Vilar

Hello Alejandro,

You are correct that the provided binary MCsquare_mac is compiled for x86_64.

Unfortunately, we currently do not have binaries compiled for ARM64, although we agree that it would be beneficial in the future.

Regarding the use of Rosetta, we have not tested it yet, but it seems that some CPU instructions used in MCsquare might not be compatible with it.

MCsquare is maintained in a separate repository (Open-MCsquare / MCsquare · GitLab), which is why only the binaries appear in the OpenTPS repository.

For now, as a temporary solution, we recommend using a Linux VM or a Docker container with x86_64 emulation, although this may result in slower performance.

Please do not hesitate to contact us if you have any further questions.

Best regards,
Eliot

Dear Eliot,

Thank you very much for your reply and for the clarification.

I wanted to let you know that I have already managed to run treatments through a remote desktop solution provided by my university, (Universitat Politécnica de Valencia) so for now I am able to continue working without issues.

Thank you again for your help and for taking the time to answer my questions.

Best regards,
Alejandro

1 Like