Brereton, Ashley on Tue, 20 Oct 2020 17:25:04 +0200


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

parallel gp in windows


Hi there,


I was wondering if somebody knew how to make a simple parfor loop work on my windows computer.


I'm trying to execute the following Euler product


func1(a,b)= count=0; while (abs(  prodeuler(X=2,10000,1/( 1-1/X^(1+(a+count)*2*Pi*I/log(2))))  ) < b,count=count+1 ); print(count)


func1(1e35,5)


this takes about 15 seconds on my machine. Now when I tried to use the parfor loop to do this:


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)))  


it also takes 15 seconds to execute - indicating that the workers aren't being initialised (or I'm doing something fundamentally wrong!)


Does anyone have any tips to do this?


All the best,

Ash