Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Threading error using Atlas in numpy under Linux

I have a multi-process (not multi-thread!) application using the multiprocess module running on a Linux box. This application uses the numpy.linalg.solve function, and if I try to create to many processes, then I get the error:

assertion !pthread_create( &(ROOT->pid), ATTR, ROOT->fun, ROOT ) failed, line 84 of file /build/buildd-atlas_3.8.4-9-amd64-jk6dgk/atlas-3.8.4/build/atlas-base/../..//src/pthreads/misc/ATL_thread_tree.c

Note that before I started using functions from numpy.linalg, I haven't had any problem.

Any idea what the problem may be?

Edit: I tried to use scipy.linalg.solve and the problem is the same!

Edit: By replacing atlas with blas, the problem disappears. So it really seems the issue is within atlas

like image 722
PierreBdR Avatar asked Oct 21 '22 20:10

PierreBdR


1 Answers

It just happens that the ATLAS developer recently answered that question here: http://sourceforge.net/p/math-atlas/support-requests/873/

Note: I'm assuming you have ATLAS 3.10 installed.

This one has been bugging me for a while too. And if you have the same problem as mine, then it's highly likely that:

  1. ATLAS was built on another machine than the one you're running this on
  2. This build machine has more cores than your machine
  3. ATLAS 3.10 doesn't know how to handle a lower number of cores than the number it had at build time and generate an exception.

The solution is to build ATLAS on a machine with a number of core lower or equal than your current machine.

Hope this helps,

like image 91
LeSchef Avatar answered Oct 24 '22 15:10

LeSchef