Bill Allombert on Fri, 11 Sep 2020 10:18:57 +0200


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

Re: gp2c question


On Fri, Sep 11, 2020 at 08:42:48AM +0100, John Cremona wrote:
> Thanks Bill.  As a follow-up question, is it possible to use the
> parallel computation system with gp2c?  

Of course! In fact it is sometime a bit easier than with GP.
However parfor is only available for GP2C in the master PARI branch.

> I have a very simple script
> which is doing a Monte Carlo sampling, and obviously I want to sample
> as many points as I can.  The script takes 28m7s  for 10^9 samples and
> 10x that (actually 4h27m20s) for 10^10.  If I could run it in parallel
> x10 then I could get to 10^11 without waiting too long.  Of course I
> can also run the script I have 10 times in parallel using gnu parallel
> or similar -- perhaps that is easier anyway.

Try to use parapply in GP, and then compile with GP2C.
See
https://pari.math.u-bordeaux.fr/Events/PARI2019/talks/parallel.pdf

Cheers,
Bill.