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

Multiprocessing #83

Closed
oleksis opened this issue Mar 4, 2020 · 2 comments
Closed

Multiprocessing #83

oleksis opened this issue Mar 4, 2020 · 2 comments

Comments

@oleksis
Copy link

oleksis commented Mar 4, 2020

When I use multiprocessing module I get this error:

/var/mobile/Containers/Data/Application/6ACBAC54-A47E-4DBF-A175-8CB3E8E8AC20/Library/lib/python3.7/multiprocessing/queues.py in
20 from queue import Empty, Full
21
---> 22 import _multiprocessing
23
24 from . import connection

ModuleNotFoundError: No module named '_multiprocessing'

I use this notebook in Colaboratory https://colab.research.google.com/github/oleksis/notebooks/blob/master/pool_multiprocess_fib.ipynb and all work OK

What I need in Carnets for working with Multiprocessing CPU?

@holzschu
Copy link
Owner

holzschu commented Mar 4, 2020

The short answer is: "you can't use multiprocessing with Carnets". I'm sorry about that, but it is really too difficult to support.

The long answer is: multiprocessing in Python relies on multiple calls to fork(), with a pool of process and a queue for tasks to be executed. iOS does not have the fork() system call, so there is no way to make this work, and I don't think there is one.

Since most iPads have only 4 cores anyway (and some cores are already used by the system and the Jupyter server), I am not certain we would gain much processing power anyway.

@oleksis
Copy link
Author

oleksis commented Mar 4, 2020

Thanks for help @holzschu and for Carnets

@oleksis oleksis closed this as completed Mar 4, 2020
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