cbehan / pycftboot

A free frontend for the conformal bootstrap
MIT License
19 stars 10 forks source link

Question regarding parallelization #6

Open spraharsh opened 7 years ago

spraharsh commented 7 years ago

I have a rather open ended question regarding usage I want to go up to a large number of derivative orders considering that I'm mainly interested in capturing the operator spectra. Here's an example I'm taking for the 2d ising case, dim=2.01, k =26, l =25, n = 30, m = 20. I'm just starting out with testing spectrum extraction with SDP on this case so I'm a bit unsure about how I should manage the parameter besides trying to maximize the number of derivatives. This seems to take quite a bit of time running on a single thread. Is there any way to get the block calculations in PYCFTBoot to use multiple threads. Have there been points identified for parallelizing using say something like the multiprocessing library in python. I know that SDPB can be made faster by specifying the number of threads but that is not my rate limiting step here.

cbehan commented 7 years ago

Hey, sorry for the Github break. For a multi-correlator scan, it is easy to run a separate instance for each table. But if you want to speed up the generation of a single table, it is probably best to look at blocks2.py which uses the Frobenius method. The recursion relation in blocks1.py is not embarrassingly parallel because each spin refers to all other spins.

ConformalBlockTableSeed2() (which is faster anyway) has a main loop that says "while l <= l_max". It seems straightforward to make all iterations of this loop run at the same time. However, the downside is that the polynomials have higher degree. I never got a good sense of how much longer SDPB takes because of this. I also don't know if it needs higher precision for these polynomials to work at all. It may be that the cancel_poles() function I use is too aggressive. This is why the code still uses the recursion relation by default.

Now about your computation, I'd be worried that k=26 is not high enough to be compatible with such a high derivative order. Since you clearly want a very good spectrum, please know that the extremal_dimensions() function I wrote is pretty terrible. Once you find the edge of the bound, keep the XML file and run https://gitlab.com/bootstrapcollaboration/spectrum-extraction instead.