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 hangs in iterative solver #24

Open
bonfus opened this issue Jan 5, 2023 · 0 comments
Open

multiprocessing hangs in iterative solver #24

bonfus opened this issue Jan 5, 2023 · 0 comments

Comments

@bonfus
Copy link

bonfus commented Jan 5, 2023

For some reason, the second time (?!) the code hits this line:

https://github.com/stefanch/sGDML/blob/master/sgdml/utils/desc.py#L345

during sgdml all, multiprocessing imap blocks the execution and ctrl+c gives this backtrace:

^C[CRIT] Traceback (most recent call last):
         File "/usr/lib/python3.9/multiprocessing/pool.py", line 853, in next
           item = self._items.popleft()
       IndexError: pop from an empty deque

       During handling of the above exception, another exception occurred:

       Traceback (most recent call last):
         File "/home/pie/Venvs/sgdmlenv/lib/python3.9/site-packages/sgdml/cli.py", line 1083, in train
           model = gdml_train.train(
         File "/home/pie/Venvs/sgdmlenv/lib/python3.9/site-packages/sgdml/train.py", line 927, in train
           R_desc, R_d_desc = desc.from_R(
         File "/home/pie/Venvs/sgdmlenv/lib/python3.9/site-packages/sgdml/utils/desc.py", line 345, in from_R
           map_func(partial(_from_r, lat_and_inv=lat_and_inv), R)
         File "/usr/lib/python3.9/multiprocessing/pool.py", line 858, in next
           self._cond.wait(timeout)
         File "/usr/lib/python3.9/threading.py", line 312, in wait
           waiter.acquire()
       KeyboardInterrupt

Disabling parallelism in this function is an acceptable workaround (not much time spent here).

Using numpy compiled with MKL support and 12 cores.

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

1 participant