In[]:=
Needs["SubKernels`LocalKernels`"];Needs["SubKernels`RemoteKernels`"];Block[{$mathkernel=$mathkernel<>" -threadpriority=2"},LaunchKernels[]]
first
.
second
.
Out[]=
{KernelObject[1,local],KernelObject[2,local],KernelObject[3,local],KernelObject[4,local],KernelObject[5,local],KernelObject[7,local],KernelObject[9,local],KernelObject[11,local],KernelObject[17,first],KernelObject[18,first],KernelObject[19,first],KernelObject[20,first],KernelObject[21,first],KernelObject[22,first],KernelObject[23,first],KernelObject[24,first],KernelObject[25,first],KernelObject[26,first],KernelObject[27,first],KernelObject[28,first],KernelObject[29,first],KernelObject[31,first],KernelObject[32,first],KernelObject[33,second],KernelObject[34,second],KernelObject[35,second],KernelObject[36,second],KernelObject[37,second],KernelObject[38,second],KernelObject[39,second],KernelObject[40,second],KernelObject[41,second],KernelObject[42,second],KernelObject[43,second],KernelObject[45,second],KernelObject[46,second],KernelObject[47,second],KernelObject[48,second]}
In[]:=
Print["Start time is ",ds=DateString[],"."];prec=100000;(**Numberofrequireddecimals.*.*)ClearSystemCache[];T0=SessionTime[];expM[pre_]:=Module[{a,d,s,k,bb,c,end,iprec,xvals,x,pc,cores=16(*=4*numberofphysicalcores*),tsize=2^7,chunksize,start=1,ll,ctab,pr=Floor[1.005pre]},chunksize=cores*tsize;n=Floor[1.32pr];end=Ceiling[n/chunksize];Print["Iterations required: ",n];Print["Will give ",end," time estimates, each more accurate than the previous."];Print["Will stop at ",end*chunksize," iterations to ensure precsion of around ",pr," decimal places."];d=ChebyshevT[n,3];{b,c,s}={SetPrecision[-1,1.1*n],-d,0};iprec=Ceiling[pr/6912];Do[xvals=Flatten[Parallelize[Table[Table[ll=start+j*tsize+l;x=N[E^(Log[ll]/(ll)),iprec];pc=iprec;While[pc<pr/1024,pc=Min[3pc,pr/1024];x=SetPrecision[x,pc];y=x^ll-ll;x=x(1-2y/((ll+1)y+2llll));];(**N[Exp[Log[ll]/ll],pr/1024]**)x=SetPrecision[x,pr/256];xll=x^ll;z=(ll-xll)/xll;t=2ll-1;t2=t^2;x=x*(1+SetPrecision[4.5,pr/256](ll-1)/t2+(ll+1)z/(2llt)-SetPrecision[13.5,pr/256]ll(ll-1)1/(3llt2+t^3z));(*N[Exp[Log[ll]/ll],pr/256]*)x=SetPrecision[x,pr/64];xll=x^ll;z=(ll-xll)/xll;t=2ll-1;t2=t^2;x=x*(1+SetPrecision[4.5,pr/64](ll-1)/t2+(ll+1)z/(2llt)-SetPrecision[13.5,pr/64]ll(ll-1)1/(3llt2+t^3z));(**N[Exp[Log[ll]/ll],pr/64]**)x=SetPrecision[x,pr/16];xll=x^ll;z=(ll-xll)/xll;t=2ll-1;t2=t^2;x=x*(1+SetPrecision[4.5,pr/16](ll-1)/t2+(ll+1)z/(2llt)-SetPrecision[13.5,pr/16]ll(ll-1)1/(3llt2+t^3z));(**N[Exp[Log[ll]/ll],pr/16]**)x=SetPrecision[x,pr/4];xll=x^ll;z=(ll-xll)/xll;t=2ll-1;t2=t^2;x=x*(1+SetPrecision[4.5,pr/4](ll-1)/t2+(ll+1)z/(2llt)-SetPrecision[13.5,pr/4]ll(ll-1)1/(3llt2+t^3z));(**N[Exp[Log[ll]/ll],pr/4]**)x=SetPrecision[x,pr];xll=x^ll;z=(ll-xll)/xll;t=2ll-1;t2=t^2;x=x*(1+SetPrecision[4.5,pr](ll-1)/t2+(ll+1)z/(2llt)-SetPrecision[13.5,pr]ll(ll-1)1/(3llt2+t^3z));(*N[Exp[Log[ll]/ll],pr]*)x,{l,0,tsize-1}],{j,0,cores-1}]]];ctab=ParallelTable[Table[c=b-c;ll=start+l-2;b*=2(ll+n)(ll-n)/((ll+1)(2ll+1));c,{l,chunksize}],Method"Automatic"];s+=ctab.(xvals-1);start+=chunksize;st=SessionTime[]-T0;kc=k*chunksize;ti=(st)/(kc+10^-4)*(n)/(3600)/(24);Print[kc," iterations done in ",N[st,4]," seconds."," Should take ",N[ti,4]," days or ",N[ti*24*3600,4],"s, finish ",DatePlus[ds,ti],"."],{k,0,end-1}];N[-s/d,pr]];t2=Timing[MRBtest2=expM[prec];];Print["Finished on ",DateString[],". Proccessor time was ",t2[[1]]," s."];Print["Actual time was ",st];(*Print[*)MRBtest2(*]*)(*Remove(**)orenterMRBtest2toprintoutput*);Print["Enter MRBtest2 to print ",Floor[Precision[MRBtest2]]," digits"];Print["If you saved m3M, the difference between this and 3,014,991 known digits is ",N[MRBtest2-m3M,10]]
Start time is Thu 25 Apr 2024 20:59:48.
Iterations required: 132658
Will give 65 time estimates, each more accurate than the previous.
Will stop at 133120 iterations to ensure precsion of around 100499 decimal places.
0 iterations done in 8.552 seconds. Should take 1.313× days or 1.134×s, finish Mon 24 Oct 2383 00:47:59.
5
10
10
10
2048 iterations done in 17.20 seconds. Should take 0.01289 days or 1114.s, finish Thu 25 Apr 2024 21:18:22.
4096 iterations done in 26.19 seconds. Should take 0.009817 days or 848.2s, finish Thu 25 Apr 2024 21:13:56.
6144 iterations done in 34.95 seconds. Should take 0.008734 days or 754.6s, finish Thu 25 Apr 2024 21:12:22.
8192 iterations done in 43.75 seconds. Should take 0.008200 days or 708.5s, finish Thu 25 Apr 2024 21:11:36.
10240 iterations done in 52.61 seconds. Should take 0.007889 days or 681.6s, finish Thu 25 Apr 2024 21:11:09.
12288 iterations done in 61.51 seconds. Should take 0.007686 days or 664.1s, finish Thu 25 Apr 2024 21:10:52.
14336 iterations done in 70.43 seconds. Should take 0.007543 days or 651.7s, finish Thu 25 Apr 2024 21:10:39.
16384 iterations done in 79.46 seconds. Should take 0.007446 days or 643.4s, finish Thu 25 Apr 2024 21:10:31.
18432 iterations done in 88.51 seconds. Should take 0.007373 days or 637.0s, finish Thu 25 Apr 2024 21:10:25.
20480 iterations done in 97.54 seconds. Should take 0.007313 days or 631.8s, finish Thu 25 Apr 2024 21:10:19.
22528 iterations done in 106.6 seconds. Should take 0.007263 days or 627.5s, finish Thu 25 Apr 2024 21:10:15.
24576 iterations done in 115.4 seconds. Should take 0.007209 days or 622.8s, finish Thu 25 Apr 2024 21:10:10.
26624 iterations done in 124.2 seconds. Should take 0.007160 days or 618.7s, finish Thu 25 Apr 2024 21:10:06.
28672 iterations done in 133.0 seconds. Should take 0.007120 days or 615.1s, finish Thu 25 Apr 2024 21:10:03.
30720 iterations done in 141.9 seconds. Should take 0.007091 days or 612.7s, finish Thu 25 Apr 2024 21:10:00.
32768 iterations done in 150.6 seconds. Should take 0.007059 days or 609.9s, finish Thu 25 Apr 2024 21:09:57.
34816 iterations done in 159.4 seconds. Should take 0.007029 days or 607.3s, finish Thu 25 Apr 2024 21:09:55.
36864 iterations done in 168.4 seconds. Should take 0.007013 days or 605.9s, finish Thu 25 Apr 2024 21:09:53.
38912 iterations done in 177.3 seconds. Should take 0.006995 days or 604.4s, finish Thu 25 Apr 2024 21:09:52.
40960 iterations done in 186.4 seconds. Should take 0.006988 days or 603.8s, finish Thu 25 Apr 2024 21:09:51.
43008 iterations done in 195.5 seconds. Should take 0.006979 days or 603.0s, finish Thu 25 Apr 2024 21:09:51.
45056 iterations done in 204.3 seconds. Should take 0.006963 days or 601.6s, finish Thu 25 Apr 2024 21:09:49.
47104 iterations done in 213.3 seconds. Should take 0.006954 days or 600.8s, finish Thu 25 Apr 2024 21:09:48.
49152 iterations done in 222.1 seconds. Should take 0.006939 days or 599.5s, finish Thu 25 Apr 2024 21:09:47.
51200 iterations done in 230.9 seconds. Should take 0.006924 days or 598.2s, finish Thu 25 Apr 2024 21:09:46.
53248 iterations done in 239.7 seconds. Should take 0.006913 days or 597.3s, finish Thu 25 Apr 2024 21:09:45.
55296 iterations done in 248.6 seconds. Should take 0.006904 days or 596.5s, finish Thu 25 Apr 2024 21:09:44.
57344 iterations done in 257.3 seconds. Should take 0.006890 days or 595.3s, finish Thu 25 Apr 2024 21:09:43.
59392 iterations done in 266.3 seconds. Should take 0.006885 days or 594.8s, finish Thu 25 Apr 2024 21:09:42.
61440 iterations done in 275.1 seconds. Should take 0.006875 days or 594.0s, finish Thu 25 Apr 2024 21:09:41.
63488 iterations done in 284.0 seconds. Should take 0.006869 days or 593.4s, finish Thu 25 Apr 2024 21:09:41.
65536 iterations done in 292.8 seconds. Should take 0.006860 days or 592.7s, finish Thu 25 Apr 2024 21:09:40.
67584 iterations done in 301.7 seconds. Should take 0.006854 days or 592.2s, finish Thu 25 Apr 2024 21:09:40.
69632 iterations done in 310.6 seconds. Should take 0.006850 days or 591.8s, finish Thu 25 Apr 2024 21:09:39.
71680 iterations done in 319.7 seconds. Should take 0.006847 days or 591.6s, finish Thu 25 Apr 2024 21:09:39.
73728 iterations done in 328.3 seconds. Should take 0.006837 days or 590.7s, finish Thu 25 Apr 2024 21:09:38.
75776 iterations done in 337.1 seconds. Should take 0.006830 days or 590.1s, finish Thu 25 Apr 2024 21:09:38.
77824 iterations done in 345.8 seconds. Should take 0.006822 days or 589.4s, finish Thu 25 Apr 2024 21:09:37.
79872 iterations done in 354.6 seconds. Should take 0.006817 days or 589.0s, finish Thu 25 Apr 2024 21:09:36.
81920 iterations done in 363.3 seconds. Should take 0.006809 days or 588.3s, finish Thu 25 Apr 2024 21:09:36.
83968 iterations done in 372.1 seconds. Should take 0.006805 days or 587.9s, finish Thu 25 Apr 2024 21:09:35.
86016 iterations done in 381.0 seconds. Should take 0.006800 days or 587.5s, finish Thu 25 Apr 2024 21:09:35.
88064 iterations done in 389.8 seconds. Should take 0.006797 days or 587.2s, finish Thu 25 Apr 2024 21:09:35.
90112 iterations done in 398.6 seconds. Should take 0.006791 days or 586.7s, finish Thu 25 Apr 2024 21:09:34.
92160 iterations done in 407.4 seconds. Should take 0.006787 days or 586.4s, finish Thu 25 Apr 2024 21:09:34.
94208 iterations done in 416.3 seconds. Should take 0.006785 days or 586.3s, finish Thu 25 Apr 2024 21:09:34.
96256 iterations done in 425.3 seconds. Should take 0.006783 days or 586.1s, finish Thu 25 Apr 2024 21:09:34.
98304 iterations done in 434.0 seconds. Should take 0.006778 days or 585.6s, finish Thu 25 Apr 2024 21:09:33.