Just to follow up, Chapel now handles this idiom and this specific example. 
This is available on github and will be available in 1.13.

Vassily

On 07/23/15 04:23, Russel Winder wrote:
>[....]
> I just tried:
>
>    var sum: real = 0.0;
>    forall i in 1..n with (+ reduce sum) { sum += 1.0 / (1.0 + ((i - 0.5)
> * delta) ** 2); }
>    const pi = 4.0 * delta * sum;
>
> but got the error:
>
> $CHPL_HOME/modules/internal/ChapelRange.chpl:1299: In iterator 'these':
> $CHPL_HOME/modules/internal/ChapelRange.chpl:1322: error: yields
> outside of task constructs in the leader or standalone iterator are not
> supported with reduce intents
>
> Does this mean I am not up to date enough (I am using master from the
> Git repository), or is this not working as yet?
>

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Chapel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-users

Reply via email to