[Cython] prange CEP updated

mark florisson markflorisson88 at gmail.com
Wed May 4 20:07:55 CEST 2011


On 4 May 2011 19:44, Dag Sverre Seljebotn <d.s.seljebotn at astro.uio.no> wrote:
> On 05/04/2011 07:03 PM, mark florisson wrote:
>>
>> On 4 May 2011 18:35, Dag Sverre Seljebotn<d.s.seljebotn at astro.uio.no>
>>  wrote:
>>>
>>> Moving pull requestion discussion
>>> (https://github.com/cython/cython/pull/28)
>>> over here:
>>>
>>> First, I got curious why you'd have a strip off "-pthread" from CC. I'd
>>> think you could just execute with it with "-pthread", which seems
>>> simpler.
>>
>> It needs to end up in a list of arguments, and it's not needed at all
>> as I only need the version. I guess I could do (cc + " -v").split()
>> but eh.
>
> OK, that's reassuring, thought perhaps you had encountered a strange gcc
> strain.
>
>>
>>> Second: If parallel.parallel is not callable, how are scheduling
>>> parameters
>>> for parallel blocks handled? Is there a reason to not support that? Do
>>> you
>>> think it should stay this way, or will parallel take parameters in the
>>> future?
>>
>> Well, as I mentioned a while back, you cannot schedule parallel
>> blocks, there is no worksharing involved. All a parallel block does is
>> executed a code block in however many threads there are available. The
>> scheduling parameters are valid for a worksharing for loop only, as
>> you schedule (read "distribute") the work among the threads.
>
> Perhaps I used the wrong terms; but checking the specs, I guess I meant
> "num_threads", which definitely applies to parallel.

Ah, that level of scheduling :) Right, so it doesn't take that, but I
don't think it's a big issue. If dynamic scheduling is enabled, it's
only a suggestion, if dynamic scheduling is disabled (whether it's
turned on or off by default is implementation defined) it will give
the the amount of threads requested, if available.
The user can still use omp_set_num_threads(), although admittedly that
modifies a global setting.

> Dag Sverre
> _______________________________________________
> cython-devel mailing list
> cython-devel at python.org
> http://mail.python.org/mailman/listinfo/cython-devel
>


More information about the cython-devel mailing list