Bill Allombert on Tue, 30 Sep 2025 10:56:33 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: branch bill-bnfinit-parallel |
On Sun, Sep 21, 2025 at 11:39:44PM +0200, Bill Allombert wrote: > Dear PARI developers, > > I have pushed a branch bill-bnfinit-parallel which an attempt to merge the parallel bnfinit code > to master. > > The branch does not affect bnfinit unless the tech parameter is used. > It adds 2 extra options: > instead of [c_{1}, c_{2}, nrpid ], no the full vector is > [c_{1}, c_{2}, nrpid, maxfact, idex, nbthr ] > > -- maxfact is the maximal number of factorizations to try by ideal. > (500 by default) > > -- idex is the exponent of the ideal to use when searching relation. > The default is 0 which lets PARI pick an exponent depending on the norm of > the ideal. > > -- nbthr is the number of threads to use (1 by default). If set to 0, use default(nbthreads). > When nbthr is not 1, the parallel bnfinit code is used. > > One example when the tuning make a large difference: > > x^28+1154*x^26+489873*x^24+100211629*x^22+11699125060*x^20+854076746718*x^18+40959569036260*x^16+1321233290968720*x^14+28785594434947700*x^12+417246803388550268*x^10+3867079700626715505*x^8+21181990617517025086*x^6+59006973863083141311*x^4+63878093656658485059*x^2+21292697885552828353 An issue with the interface is that 0 cannot stand for the default value for nrpid (and nbthr, but it can be omitted) since 0 is a valid non-default choice. So for testing parallelism while keeping all the default, we have to use [0,0,4,0,0,0]. I have made a new version where nrpid=0 is replaced by nrpid=-1. Probably I should do a similar change for nbthr (0 -> no threads, 1-> use threads) Cheers, Bill