Re: [Numpy-discussion] Cython-based OpenMP-accelerated quartic polynomial solver

2015-10-06 Thread Juha Jeronen
t 7:05 AM, mailto:numpy-discussion-requ...@scipy.org>> wrote: From: Juha Jeronen mailto:juha.jero...@jyu.fi>> To: Discussion of Numerical Python mailto:numpy-discussion@scipy.org>> Cc: Date: Fri, 2 Oct 2015 13:31:47 +0300 Subje

Re: [Numpy-discussion] Cython-based OpenMP-accelerated quartic polynomial solver

2015-10-02 Thread Juha Jeronen
On 02.10.2015 13:07, Daπid wrote: On 2 October 2015 at 11:58, Juha Jeronen <mailto:juha.jero...@jyu.fi>> wrote: First version done and uploaded: https://yousource.it.jyu.fi/jjrandom2/miniprojects/trees/master/misc/polysolve_for_numpy Small comment: now you are checki

Re: [Numpy-discussion] Cython-based OpenMP-accelerated quartic polynomial solver

2015-10-02 Thread Juha Jeronen
On 01.10.2015 03:52, Sturla Molden wrote: On 01/10/15 02:32, Juha Jeronen wrote: Sounds good. Out of curiosity, are there any standard fork-safe threadpools, or would this imply rolling our own? You have to roll your own. Basically use pthreads_atfork to register a callback that shuts down

Re: [Numpy-discussion] Cython-based OpenMP-accelerated quartic polynomial solver

2015-10-02 Thread Juha Jeronen
On 01.10.2015 03:32, Sturla Molden wrote: On 01/10/15 02:20, Juha Jeronen wrote: Then again, the matter is further complicated by considering codes that run on a single machine, versus codes that run on a cluster.Threads being local to each node in a cluster, You can run MPI programs on a

Re: [Numpy-discussion] Cython-based OpenMP-accelerated quartic polynomial solver

2015-09-30 Thread Juha Jeronen
On 01.10.2015 01:04, Sturla Molden wrote: There are two principal problems with using OpenMP in NumPy: One is that the GNU OpenMP threadpool is not fork-safe, and can break multiprocessing on some platforms (e.g. when using Python 2.7 on Linux). Anything that uses GCD has this nasty effect on

Re: [Numpy-discussion] Cython-based OpenMP-accelerated quartic polynomial solver

2015-09-30 Thread Juha Jeronen
On 30.09.2015 19:20, Nathaniel Smith wrote: The challenges to providing transparent multithreading in numpy generally are: - gcc + OpenMP on linux still breaks multiprocessing. There's a patch to fix this but they still haven't applied it; alternatively there's a workaround you can use in mul

Re: [Numpy-discussion] Cython-based OpenMP-accelerated quartic polynomial solver

2015-09-30 Thread Juha Jeronen
On 30.09.2015 13:21, Pauli Virtanen wrote: Juha Jeronen jyu.fi> writes: I recently developed a Cython-based, OpenMP-accelerated quartic (and cubic, quadratic) polynomial solver to address a personal research need for quickly solving a very large number of independent low-degree polynom

Re: [Numpy-discussion] Cython-based OpenMP-accelerated quartic polynomial solver

2015-09-30 Thread Juha Jeronen
On 30.09.2015 19:20, Chris Barker wrote: On Wed, Sep 30, 2015 at 6:57 AM, Nathan Goldbaum mailto:nathan12...@gmail.com>> wrote: Note however that with the current version of the code, not having OpenMP will severely limit the performance, especially on quad-core machines

Re: [Numpy-discussion] Cython-based OpenMP-accelerated quartic polynomial solver

2015-09-30 Thread Juha Jeronen
-J - Juha Jeronen, Ph.D. juha.jero...@jyu.fi University of Jyväskylä Department of Mathematical Information Technology - On 30.09.2015 12:35, Matthieu Brucher wrote: Yes, obviously, the code has NR parts, so it can't be licensed as BS

Re: [Numpy-discussion] Cython-based OpenMP-accelerated quartic polynomial solver

2015-09-30 Thread Juha Jeronen
stable solvers for cubics and quadratics.) -J --------- Juha Jeronen, Ph.D. juha.jero...@jyu.fi University of Jyväskylä Department of Mathematical Information Technology - ___ NumPy-Discu

Re: [Numpy-discussion] Cython-based OpenMP-accelerated quartic polynomial solver

2015-09-30 Thread Juha Jeronen
cient C loop if some simple compile-time conditions are fulfilled.) Are we putting Cuthon in Numpy now? I lost track. I thought so? But then again, I'm just a user :) -J --------- Juha Jeronen, Ph.D. juha.jero...@jyu.fi University of Jyv

Re: [Numpy-discussion] Cython-based OpenMP-accelerated quartic, polynomial solver

2015-09-29 Thread Juha Jeronen
n any public server, or distributed with any freeware or shareware package." Matti Yes, the code is original (written from scratch), only the algorithms come from the book. -J - Juha Jeronen, Ph.D. juha.jero...@jyu.fi University of Jyväskylä

[Numpy-discussion] Cython-based OpenMP-accelerated quartic polynomial solver

2015-09-29 Thread Juha Jeronen
my solver for the Ziegler problem; basically, the "tworods" module can be ignored. I apologize for the inconvenience.) Thoughts? Best regards, -J --------- Juha Jeronen, Ph.D. juha.jero...@jyu.fi University of Jyväskylä Department of Math