| The reason is that while all this work needs to be done, tested
and thought through, the pthreads-based parallel engine is already
being developed and showed encouraging results.
Victor
----- Original Message -----
From: "Michael Gogins"
To: "Developer discussions"
Cc:
Sent: Monday, September 14, 2009 8:46 PM
Subject: Re: [Cs-dev] Another parallel toolkit
> What's the problem with OpenMP? I've used pthreads extensively and
> OpenMP just a bit, but OpenMP is considerably easier to use and to
> read, once you get used to it -- which doesn't take long. I think
> Csound could be made completely parallel during performance AND
> completely thread-safe using OpenMP, without a lot of work. I think
> all that is required is:
>
> (1) Divide up the instrument instance list by instrument template.
>
> (2) Make each group of instances from the same template into a
> parallel block with a wait barrier at the end of each template. Either
> use OpenMP reduction in the output opcodes, or use atomic operations
> for addition to the output buffer (see next item).
>
> (3) Protect all read/write of Csound data by opcodes either with
> critical sections, or with atomic operations.
>
> We already did (1) and (2) with pthreads. The same work would be
> slightly simpler and clearer to read with OpenMP, but the real gain
> comes with (3) which is much easier to do with OpenMP than with
> pthreads. Mostly this is just putting critical sections around the
> work done inside Csound API calls.
>
> The only questions I have about this are:
>
> (1) Would there be any deadlocks? I don't see it, but maybe somebody else
> does?
>
> (2) What is the runtime overhead of (3) above? I expect the cost would
> be outweighed by the performance gain.
>
> Regards,
> Mike
>
> On 9/14/09, victor wrote:
>> I still think we should keep going with pthreads, possibly considering
>> OpenMP in the future. But as the FAUST guys showed, things are not
>> straighforward anyway (although I guess they were aiming at a too fine
>> level of granularity).
>>
>> I have great hopes for the system John's been preparing.
>>
>> Victor
>> ----- Original Message -----
>> From: "Richard Dobson"
>> To: "Developer discussions"
>> Sent: Monday, September 14, 2009 7:57 PM
>> Subject: Re: [Cs-dev] Another parallel toolkit
>>
>>
>>> Felipe Sateler wrote:
>>>> It seems like Apple has developed a rather interesting parallelization
>>>> toolkit called Grand Central Dispatch[1]. Furthermore, it has been
>>>> released as open source[2]. Unfortunately, it has been released under
>>>> the Apache license which is not compatible with the GPL, and it
>>>> requires
>>>> blocks, a compiler feature which is not in gcc yet. It may evolve
>>>> interestingly, or an alternative GPL-compatible implementation may
>>>> appear.
>>>>
>>>
>>> Unfortunately it appears to be rather less exciting that hoped. Ditto
>>> OpenCL (at least, for real-time audio). This is from an Apple developer
>>> on the CoreAudio list:
>>>
>>> "Ehm, you know that GCD is running at the main thread level? Which can
>>> be blocked by UI operations, etc. That doesn't seem like a wise choice
>>> for real-time processing. OpenCL also doesn't have a threading mode, so
>>> you tasks will be shared among all the others and your latency becomes
>>> unpredictable.
>>> "
>>>
>>> So whatever tasks it may be useful for, parallelizing Csound seems
>>> unlikely to be one one of them.
>>>
>>> Richard Dobson
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>>> 30-Day
>>> trial. Simplify your report design, integration and deployment - and
>>> focus
>>>
>>> on
>>> what you do best, core application coding. Discover what's new with
>>> Crystal Reports now. http://p.sf.net/sfu/bobj-july
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>> ------------------------------------------------------------------------------
>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>> 30-Day
>> trial. Simplify your report design, integration and deployment - and
>> focus
>> on
>> what you do best, core application coding. Discover what's new with
>> Crystal Reports now. http://p.sf.net/sfu/bobj-july
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>
>
> --
> Michael Gogins
> Irreducible Productions
> http://www.michael-gogins.com
> Michael dot Gogins at gmail dot com
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |