It seems like a bug in modp1(('Rem')(...)) with large polynomials with large coefficients.
Please look at the file:
It needs the file polys.m there:
File polys.m too big for this forum so I used dropmefiles.
Polys.m contain two polynomials x and f_t with large degrees: degree(f_t) = m = 50021, degree(x) = 2*m - 2 = 100040 and large coefficients up to 2^N, where N = ceil(m / 2)+2 = 25013.
I just compute rem(x,f_t) mod 2^N.
As you can see in the first part of doc bug_rem.mw I decreased coefficients of polynomials by additional mod 2^N (with Embed function), where N = floor(N / 2) = 12506. WIth these decreased polynomials and decreased N modp1(('Rem')(...)) function works well and use maximum about 2.5 Gb of RAM.
But in the second part of doc bug_rem.mw with original polynomials and N = 25013 modp1(('Rem')(...)) use maximum about 3.5 Gb of RAM and crash with error:
Error, Maple was unable to allocate enough memory to complete this computation. Please see ?alloc
This is strange and looks like a bug considering that the test server has 48 Gb of RAM.
Is it a bug or modp1(('Rem')(...)) just need more than 48 Gb of RAM?
How many RAM it needs for this computation?