tls icon indicating copy to clipboard operation
tls copied to clipboard

MultiProcessing Bug with M1 Pro chipped Mac books

Open daxfeliz opened this issue 3 years ago • 2 comments

Describe the bug Upon a fresh installation of TLS on a Macbook Pro (Version 12.3 with Apple M1 Pro chip), whenever the transitleastsquares "power" function is ran, a seemingly infinite loop of processes is created. I suspected this is due to how Python tries to handle multi-processing and the newer Mac processor is no longer using a Intel x86_64 processor but instead a ARM-based processor.

To Reproduce Steps to reproduce the behavior: Following the K2-3b tutorial (https://github.com/hippke/tls/blob/master/tutorials/02%20Starter's%20guide%20-%20K2-3b%2C%20a%20red%20dwarf%20with%20a%20planet.ipynb) regularly produces this issue when ran from a command terminal.

Desktop (please complete the following information):

  • OS: MacOS (Version 12.3)
  • Python version 3.9.12
  • TLS Version [1.0.31]

Possible solution? In the "main.py" scripy within transitleastsquares, if importing "multiprocess" (which requires a pip installation) instead of Python's default "multiprocessing", this seems to work without having to change anything else.

daxfeliz avatar Oct 06 '22 19:10 daxfeliz

Sorry for that. I've been struggling with similar incompatibilities in another project. Unfortunately I don't have an M1 Mac (only AMD and Intel) so it's hard for me to find a solution that works on all platforms. Can you check your fix with use_threads=1 and use_threads=10 (or whatever your machine has)? I'd like to make sure that it scales well with that package, before making the change.

hippke avatar Oct 11 '22 11:10 hippke

Hi, I am encountering the same issue. Same TLS version, Python 3.9.16, MacOS 14.1.2 (again M1 chip). Since this issue was opened more than one year ago, I wondered whether a solution has been found or not.

alerogex avatar Dec 19 '23 10:12 alerogex