Re: [Numpy-discussion] [ANN] MATLAB ODE solvers - now available in Python

2013-10-04 Thread Eric Carlson
Hello, Does this require a MATLAB install, or are these equivalent routines? Thanks, Eric ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Sources more confusing in Python

2013-04-07 Thread Eric Carlson
Hello, For most people who want to be doing amazing things through python with little fuss, you'd probably be better off downloading a comprehensive distribution that includes many useful modules. Some examples of several - For windows: Pythonxy - http://code.google.com/p/pythonxy/wiki/Downloads

[Numpy-discussion] some vectorization help

2012-09-16 Thread Eric Carlson
return the_result else: return reshape(the_result,[the_shape[0],the_shape[1],2]) fxy = lambda x,y: sin(x*y) #just a little test x,y=mgrid[0:5,0:4] the_gradient = gradient2D_vect(fxy, x,y) Cheers, Eric Carlson ___ NumPy-Discussion mailing

Re: [Numpy-discussion] Vectorizing!!!!

2011-11-19 Thread Eric Carlson
I'm not sure if I am addressing your question on vectorizing directly, but consider the following code, which does (maybe?) what your asking. import scipy from numpy import reshape,ones, zeros, arange, array A=reshape(arange(100),[10,10]) nr,nc=A.shape B=zeros(A.shape) #initialize array #calcu

Re: [Numpy-discussion] OT: performance in C extension; OpenMP, or SSE ?

2011-02-17 Thread Eric Carlson
For 4 cores, on your system, your conclusion makes some sense. That said, I played around with this on both a core 2 duo and the 12 core system. For the 12-core system, on my tests the 0 case ran extremely close to the 2-thread case for all my sizes. The core 2 duo runs windows 7, and after dow

Re: [Numpy-discussion] Python ctypes and OpenMP mystery

2011-02-16 Thread Eric Carlson
Hello Francesc, The problem appears to related to my lack of optimization in the compilation. If I use gcc -O3 -c my_lib.c -fPIC -fopenmp -ffast-math the C executable and ctypes/python versions behave almost identically. Getting decent behavior takes some thought, though, far from the incredi

Re: [Numpy-discussion] OT: performance in C extension; OpenMP, or SSE ?

2011-02-16 Thread Eric Carlson
Sebastian, Optimization appears to be important here. I used no optimization in my previous post, so you could try the -O3 compile option: gcc -O3 -c my_lib.c -fPIC -fopenmp -ffast-math for na=329 and nb=340 I get (about 7.5 speedup) c_threads 1 time 0.00103106021881 c_threads 2 time 0.000

Re: [Numpy-discussion] OT: performance in C extension; OpenMP, or SSE ?

2011-02-15 Thread Eric Carlson
I don't have the slightest idea what I'm doing, but file name - the_lib.c ___ #include #include #include #include void dists2d( double *a_ps, int na, double *b_ps, int nb, double *dist, int num_threads) { int i, j; int dynamic=0;

[Numpy-discussion] Python ctypes and OpenMP mystery

2011-02-12 Thread Eric Carlson
Hello All, I have been toying with OpenMP through f2py and ctypes. On the whole, the results of my efforts have been very encouraging. That said, some results are a bit perplexing. I have written identical routines that I run directly as a C-derived executable, and through ctypes as a shared li

[Numpy-discussion] Postdoctoral Positions at Univ of Alabama

2011-02-01 Thread Eric Carlson
last until at least 12/8/2012, with a good chance for extension for a few months after that. Regards, Eric Carlson, Associate Professor University of Alabama ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/list

Re: [Numpy-discussion] OpenMP-fication of loops.

2011-01-23 Thread Eric Carlson
>On 1/23/2011 2:57 PM, Vladimir Voznesensky wrote: > > Sure, I will give you my code, but who will "follow this up"? > Hey Vladimir, A good question. At this point, I am most curious about the difficulties of using this as a standard built into numpy. EC ___

Re: [Numpy-discussion] OpenMP-fication of loops.

2011-01-23 Thread Eric Carlson
On 1/23/2011 10:36 AM, Vladimir Voznesensky wrote: > My computer has 12 hyperthreaded cores. > My application uses dot multiplication from Intel MKL, that accelerated > it by ~ 5 times. > After OpenMP-fication of loops.c.src, my app was accelerated by ~12-15 > times. > I was greatly disappointed i

Re: [Numpy-discussion] OpenMP-fication of loops.

2011-01-23 Thread Eric Carlson
As a user, I am very interested. That said, do you any tests or examples or benchmarks that give a ballpark estimate of performance improvements? ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-d