vermaseren / form

The FORM project for symbolic manipulation of very big expressions
GNU General Public License v3.0
1.15k stars 136 forks source link

"Please increase SmallExtension in form.set" #375

Open jodavies opened 3 years ago

jodavies commented 3 years ago

In what circumstances should I expect to see this error? It occurs sometimes in programs with heavy use of polyratfun with the default sizes and also with, for example, SmallSize 1200M, SmallExtension 2500M or 4G/6G.

I understand the purpose of the SmallExtension, but I don't understand the mechanism with regards to this text from the manual,

If, during the sort, the extension space becomes exhausted, FORM will make a garbage collection of the entire extended small
buffer. This will always result in the extension space becoming empty again, because the notation of the terms in FORM is such
the new combined term will at most occupy an amount of space equal to the sum of the spaces of the original two terms.

which seems to suggest there should be no issues.

Thanks, Josh.

vermaseren commented 3 years ago

Hi Josh,

What happens here is that that part of the manual was written before PolyRatFun existed. With regular coefficients and with PolyFun, it can be shown that the manual is correct. With PolyRatFun unfortunately the sum of two PolyRatFuns can take more space than the sum of the individuals and hence there can be an increased need for space, resulting in a greater and greater need for a larger SmallExtension. Usually this does not cause problems when there are also enough terms getting a smaller PolyRatFun, but sometimes this can run out of hand. You will have to experiment a bit. You may also have to look at the settings for the sorting of function arguments. Often the problem is actually there. This is discussed in one of the newer chapters of the Form course in which the T1 two-loop topology is broken down when all powers are noninteger. This ran into the same problem. It is chapter six in https://www.nikhef.nl/~form/maindir/courses/uam2020/uam2020.html https://www.nikhef.nl/~form/maindir/courses/uam2020/uam2020.html

Jos

On 28 Jan 2021, at 14:35, jodavies notifications@github.com wrote:

In what circumstances should I expect to see this error? It occurs sometimes in programs with heavy use of polyratfun with the default sizes and also with, for example, SmallSize 1200M, SmallExtension 2500M or 4G/6G.

I understand the purpose of the SmallExtension, but I don't understand the mechanism with regards to this text from the manual,

If, during the sort, the extension space becomes exhausted, FORM will make a garbage collection of the entire extended small buffer. This will always result in the extension space becoming empty again, because the notation of the terms in FORM is such the new combined term will at most occupy an amount of space equal to the sum of the spaces of the original two terms. which seems to suggest there should be no issues.

Thanks, Josh.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/vermaseren/form/issues/375, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJPCESQZO6ZHM7UOV54HJLS4FRYJANCNFSM4WXCFD7A.

jodavies commented 3 years ago

Right, indeed, presumably with polyratfuns one can trivially construct a case where the sorted small buffer exceeds the size of smallextension entirely. In which case there is nothing any garbage collection can do. I always use similarly larger subsmallbuffer/subsmallextension ratios, but I will look into if it can be these ones that are at fault in my computations.

Thanks!