Brereton, Ashley on Tue, 20 Oct 2020 17:41:03 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: parallel gp in windows


Hi Bill,


Here is my output:


(11:18) gp > #
   timer = 0 (off)
(11:19) gp > func1(1e35,5)
1250
(11:19) gp > ##
  ***   last result: cpu time 14,298 ms, real time 14,450 ms.
(11:19) gp > #
   timer = 1 (on)
(11:19) gp > parfor (count=1, , func2(1e35,count)>5 , r, if (r, return (count)))
cpu time = 14,468 ms, real time = 14,599 ms.
%14 = 1250
(11:19) gp > ##
  ***   last result: cpu time 14,468 ms, real time 14,599 ms.
(11:19) gp > \v
                                      GP/PARI CALCULATOR Version 2.13.0 (released)
                              amd64 running mingw (x86-64/GMP-6.1.2 kernel) 64-bit version
                              compiled: Oct 19 2020, gcc version 8.3-posix 20190406 (GCC)
                                                threading engine: single
                                     (readline v8.0 enabled, extended help enabled)
(11:38) gp > default(nbthreads)
%15 = 4

All the best,

Ash


From: Bill Allombert <Bill.Allombert@math.u-bordeaux.fr>
Sent: 20 October 2020 16:37:29
To: Brereton, Ashley
Cc: pari-users@pari.math.u-bordeaux.fr
Subject: Re: parallel gp in windows
 
On Tue, Oct 20, 2020 at 03:24:59PM +0000, Brereton, Ashley wrote:
> Hi there,
>
> I was wondering if somebody knew how to make a simple parfor loop work on my windows computer.

Hello Ashley,
Could you clarify which GP binary you are using and which Windows version
you are using ?

Thread-local variables support on 32bit windows is very slow.

Please tell us what gives
\v
and
default(nbthreads)

> func2(a,b)=  abs(  prodeuler(X=2,10000,1/( 1-1/X^(1+(a+b)*2*Pi*I/log(2))))  )
>
> export(func2)
>
> parfor (count=1, , func2(1e35,count)>5 , r, if (r, return (count)))

Your code seems correct.
What gives
##
after the computation ?

? parfor (count=1, , func2(1e35,count)>5 , r, if (r, return (count)))
%4 = 1250
? ##
  ***   last result: cpu time 35,559 ms, real time 8,911 ms.

Cheers,
Bill