Loïc Grenié on Thu, 24 Oct 2013 17:53:27 +0200
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: parallel pari: parfirst
|
- To: pari-dev@pari.math.u-bordeaux.fr
- Subject: Re: parallel pari: parfirst
- From: Loïc Grenié <loic.grenie@gmail.com>
- Date: Thu, 24 Oct 2013 17:53:15 +0200
- Delivery-date: Thu, 24 Oct 2013 17:53:27 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=E+sz3wrIA3f98uCm3M7GsJPbL+BlDiF67YezM687yOE=; b=h/3vGHZwQ2CDPygHEjDI01PJv3bi+pvrNULlWOZEeTKaIDhN6Z3QXCfstxlXSO5TzD nrQQhJQBO9soXtRYbrnB0mr8dRuYjHeSoS2lUblrfdJN5of533s+CBSVHOtONtIt85lJ m3wSPhmGOuw3cI6iIeJeruDsXKMmn0PvB8pVPWZp19URPtqUOKUJc8ovnJEZGlbyijf0 fS0l6nzygZsERbazqyEKUansjld5YTYxFEuG6faUlGbGdIVVXWFTEHrbfrhnUhva69bS mfsYBRWIdBkUoZR3r2UZE4KAE+D/dztB/0f0v/Weu0LQ2hd6HDTYASvEmiCchTxRQEsw n6kA==
- In-reply-to: <20131024153359.GB10842@yellowpig>
- References: <20131023211658.GB8496@yellowpig> <CAMLkfFRzmv5RuzhjjP5GYsxYzR6B+amMrkNUNA7Nossp5wSjmw@mail.gmail.com> <20131024153359.GB10842@yellowpig>
2013/10/24 Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>:
> On Thu, Oct 24, 2013 at 09:16:31AM +0200, Loďc Grenié wrote:
>> A "parbreak()"-like would be a little bit more general. You add a
>> conditional
>> part to pareval
>>
>> pareval(vector(10000,i,chkell(p)),(i,r)->test(i,r)))
>>
>> where i is the input of the function called in parallel and r its output.
>> Then test would return 0 (go on) or !0 (stop) (in your example,
>> test(i,r)=r). test() is evaluated in the main pari, so it can use/modify
>> global variables.
>
> Or even a
> parfor(i=a,b,j,f(i),g(i,j))
> which compute the f(i) in parallel and compute the g(i,f(i)) sequentially
> but in random order. Eventually g(i,f(i)) can call break, which will stop
> parfor.
Indeed !
Thanks,
Loïc