Observed increase on successive executions of procedure using parallelized functions
(I have some difficulties with the interface here, no way to edit inside the frame)
Observe the following increase of execution times. In first sage interactive session I execute from D=0 to D=9. Then I quit, relaunch sage, loads my module, and execute from D=9 down to D=0. The executed procedure returns a value, apart from that it is not supposed to alter memory or anything else. It uses auxiliaries declared with @parallel
.
This is on a quite recent macOS.
sage: IrwinOne =[] sage: for D in range(10): ....: print(D) ....: %time IrwinOne.append(irwin(10,D,1,2007)) ....: x=str(IrwinOne[-1]) ....: print(x[:13] + "..." + x[-15:]) ....: print() ....: 0 1.61 s, sys: 2.45 s, total: 4.06 s Wall time: 4.1 s 23.0267353415...183866933692038 1 1.75 s, sys: 2.71 s, total: 4.46 s Wall time: 4.49 s 23.1640185942...839384307418502 2 1.75 s, sys: 3.04 s, total: 4.78 s Wall time: 4.82 s 23.0882606627...445672467548077 3 1.8 s, sys: 3.31 s, total: 5.11 s Wall time: 5.14 s 23.0674108819...116962911045921 4 Wall time: 5.4 s 23.0579924133...907687205593203 5 Wall time: 5.88 s 23.0527288945...676707299833602 6 Wall time: 6.12 s 23.0494099732...328161810844505 7 1.83 s, sys: 4.68 s, total: 6.51 s Wall time: 6.54 s 23.0471461901...417279225135174 8 1.77 s, sys: 4.97 s, total: 6.74 s Wall time: 6.76 s 23.0455139079...497815585860153 9 1.85 s, sys: 5.37 s, total: 7.22 s Wall time: 7.29 s 23.0442870807...618332199587154
And now in reverse in a new Sage interactive session
sage: IrwinOne =[] sage: for D in range(9,-1,-1): ....: print(D) ....: %time IrwinOne.append(irwin(10,D,1,2007)) ....: x=str(IrwinOne[-1]) ....: print(x[:13] + "..." + x[-15:]) ....: print() ....: 9 1.83 s, sys: 2.56 s, total: 4.39 s Wall time: 4.42 s 23.0442870807...618332199587154 8 1.75 s, sys: 2.89 s, total: 4.64 s Wall time: 4.67 s 23.0455139079...497815585860153 7 1.82 s, sys: 3.25 s, total: 5.06 s Wall time: 5.1 s 23.0471461901...417279225135174 6 1.82 s, sys: 4.13 s, total: 5.95 s Wall time: 5.98 s 23.0494099732...328161810844505 5 1.84 s, sys: 4.03 s, total: 5.87 s Wall time: 5.9 s 23.0527288945...676707299833602 4 1.8 s, sys: 4.16 s, total: 5.96 s Wall time: 6 s 23.0579924133...907687205593203 3 1.87 s, sys: 4.73 s, total: 6.6 s Wall time: 6.63 s 23.0674108819...116962911045921 2 1.79 s, sys: 4.86 s, total: 6.65 s Wall time: 6.68 s 23.0882606627...445672467548077 1 1.81 s, sys: 5.26 s, total: 7.07 s Wall time: 7.1 s 23.1640185942...839384307418502 0 1.68 s, sys: 5.43 s, total: 7.11 s Wall time: 7.15 s 23.02673534
See https://gitlab.com/burnolmath/irwin/-/issues/1 (https://gitlab.com/burnolmath/irwin/-...) if you want to reproduce the issue.