Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: use different seed for github actions #1456

Closed
wants to merge 1 commit into from

Conversation

benlorenz
Copy link
Collaborator

@benlorenz benlorenz commented Oct 2, 2023

I did a few experiments with different seeds to get a very crude memory estimate and using 22 as a seed seems better suited for the github runners than 42 where we did see some failures already. Test-run with seed 22.
I also changed it to use that seed only on CI and always print the seed value, opinions?
I can also add code to parse the seed from ARGS or an environment variable?

PS: The output of the random number generator seems identical for 1.9-1.11 on the supported platforms. Only 1.6 gives different values for a given seed.

Details

A test run with a very bad seed (8764): https://github.com/benlorenz/AbstractAlgebra.jl/actions/runs/6371995051
(This failed even with julia 1.9 on linux and windows, and succeeded after 3 hours on macos with julia 1.9)

The following tests were done locally with a lot of free memory so there is basically no GC pressure and the new GC code (1.10+1.11) does a lot less collections (except during the Weak* tests with the explicit GC calls). Still the difference in memory usage is quite significant.

(At the beginning I did three runs per seed to make sure the values are somewhat consistent)

Max-RSS values at the end of the test-suite for julia-nightly:

SEED: 1 : 6.140 GiB
SEED: 1 : 7.081 GiB
SEED: 1 : 6.859 GiB
SEED: 2 : 5.764 GiB
SEED: 2 : 5.710 GiB
SEED: 2 : 5.663 GiB
SEED: 3 : 11.784 GiB
SEED: 3 : 11.466 GiB
SEED: 3 : 13.562 GiB
SEED: 4 : 6.465 GiB
SEED: 4 : 6.348 GiB
SEED: 4 : 6.207 GiB
SEED: 5 : 9.122 GiB
SEED: 5 : 9.110 GiB
SEED: 5 : 9.031 GiB
SEED: 6 : 6.951 GiB
SEED: 6 : 6.162 GiB
SEED: 6 : 6.870 GiB
SEED: 7 : 5.295 GiB
SEED: 7 : 5.418 GiB
SEED: 7 : 5.577 GiB
SEED: 8 : 9.157 GiB
SEED: 8 : 11.020 GiB
SEED: 8 : 9.418 GiB
SEED: 9 : 11.315 GiB
SEED: 9 : 11.388 GiB
SEED: 9 : 10.097 GiB
SEED: 10 : 5.511 GiB
SEED: 10 : 5.155 GiB
SEED: 10 : 5.696 GiB
SEED: 11 : 9.687 GiB
SEED: 11 : 9.575 GiB
SEED: 11 : 8.681 GiB
SEED: 12 : 15.815 GiB
SEED: 12 : 13.002 GiB
SEED: 12 : 14.007 GiB
SEED: 13 : 6.645 GiB
SEED: 13 : 6.712 GiB
SEED: 13 : 6.474 GiB
SEED: 14 : 6.779 GiB
SEED: 14 : 6.924 GiB
SEED: 14 : 7.764 GiB
SEED: 15 : 6.013 GiB
SEED: 15 : 6.484 GiB
SEED: 15 : 5.826 GiB
SEED: 16 : 8.121 GiB
SEED: 16 : 8.624 GiB
SEED: 16 : 8.539 GiB
SEED: 17 : 5.274 GiB
SEED: 17 : 5.212 GiB
SEED: 17 : 5.183 GiB
SEED: 18 : 5.264 GiB
SEED: 18 : 5.585 GiB
SEED: 18 : 5.267 GiB
SEED: 19 : 12.551 GiB
SEED: 19 : 11.388 GiB
SEED: 19 : 12.208 GiB
SEED: 20 : 6.471 GiB
SEED: 20 : 6.306 GiB
SEED: 20 : 6.531 GiB
SEED: 20 : 6.097 GiB
SEED: 20 : 5.786 GiB
SEED: 21 : 5.956 GiB
SEED: 21 : 6.904 GiB
SEED: 21 : 5.786 GiB
SEED: 22 : 5.192 GiB
SEED: 22 : 4.966 GiB
SEED: 22 : 5.246 GiB
SEED: 23 : 8.326 GiB
SEED: 23 : 6.547 GiB
SEED: 23 : 6.511 GiB
SEED: 24 : 8.958 GiB
SEED: 24 : 7.929 GiB
SEED: 24 : 7.819 GiB
SEED: 25 : 8.673 GiB
SEED: 25 : 9.922 GiB
SEED: 25 : 9.792 GiB
SEED: 26 : 8.027 GiB
SEED: 26 : 9.328 GiB
SEED: 26 : 9.589 GiB
SEED: 27 : 5.252 GiB
SEED: 27 : 6.153 GiB
SEED: 27 : 5.470 GiB
SEED: 28 : 6.419 GiB
SEED: 28 : 6.373 GiB
SEED: 28 : 6.323 GiB
SEED: 29 : 5.972 GiB
SEED: 29 : 5.811 GiB
SEED: 29 : 5.860 GiB
SEED: 30 : 7.288 GiB
SEED: 30 : 7.459 GiB
SEED: 30 : 7.168 GiB
SEED: 31 : 7.145 GiB
SEED: 31 : 6.868 GiB
SEED: 31 : 5.606 GiB
SEED: 32 : 7.159 GiB
SEED: 32 : 7.410 GiB
SEED: 32 : 7.026 GiB
SEED: 33 : 13.600 GiB
SEED: 33 : 14.831 GiB
SEED: 33 : 13.584 GiB
SEED: 34 : 5.870 GiB
SEED: 34 : 5.867 GiB
SEED: 34 : 5.541 GiB
SEED: 35 : 5.637 GiB
SEED: 35 : 5.309 GiB
SEED: 35 : 5.365 GiB
SEED: 36 : 7.999 GiB
SEED: 36 : 8.309 GiB
SEED: 36 : 7.318 GiB
SEED: 37 : 5.598 GiB
SEED: 37 : 5.684 GiB
SEED: 37 : 5.777 GiB
SEED: 38 : 5.591 GiB
SEED: 38 : 5.613 GiB
SEED: 38 : 5.471 GiB
SEED: 39 : 11.607 GiB
SEED: 39 : 10.529 GiB
SEED: 39 : 9.550 GiB
SEED: 40 : 7.256 GiB
SEED: 40 : 5.727 GiB
SEED: 40 : 6.636 GiB
SEED: 41 : 7.581 GiB
SEED: 41 : 7.905 GiB
SEED: 41 : 7.628 GiB
SEED: 42 : 11.480 GiB
SEED: 42 : 8.513 GiB
SEED: 42 : 10.954 GiB
SEED: 43 : 6.280 GiB
SEED: 43 : 5.634 GiB
SEED: 43 : 5.607 GiB
SEED: 44 : 9.234 GiB
SEED: 44 : 9.040 GiB
SEED: 44 : 10.878 GiB
SEED: 45 : 8.124 GiB
SEED: 45 : 8.308 GiB
SEED: 45 : 7.904 GiB
SEED: 46 : 5.555 GiB
SEED: 46 : 5.873 GiB
SEED: 46 : 5.964 GiB
SEED: 47 : 9.144 GiB
SEED: 47 : 7.789 GiB
SEED: 47 : 7.238 GiB
SEED: 48 : 8.366 GiB
SEED: 48 : 8.177 GiB
SEED: 48 : 7.736 GiB
SEED: 49 : 5.872 GiB
SEED: 49 : 5.588 GiB
SEED: 49 : 5.453 GiB
SEED: 50 : 7.953 GiB
SEED: 50 : 6.379 GiB
SEED: 50 : 6.447 GiB
SEED: 51 : 7.006 GiB
SEED: 51 : 7.225 GiB
SEED: 51 : 7.781 GiB
SEED: 52 : 12.322 GiB
SEED: 52 : 11.197 GiB
SEED: 52 : 10.238 GiB
SEED: 53 : 9.387 GiB
SEED: 53 : 9.088 GiB
SEED: 53 : 10.554 GiB
SEED: 54 : 6.385 GiB
SEED: 54 : 5.976 GiB
SEED: 54 : 5.922 GiB
SEED: 55 : 5.294 GiB
SEED: 55 : 5.541 GiB
SEED: 55 : 5.565 GiB
SEED: 50 : 7.678 GiB
SEED: 51 : 7.815 GiB
SEED: 52 : 9.982 GiB
SEED: 53 : 8.457 GiB
SEED: 54 : 5.918 GiB
SEED: 55 : 5.733 GiB
SEED: 56 : 6.737 GiB
SEED: 57 : 10.571 GiB
SEED: 58 : 8.635 GiB
SEED: 59 : 6.267 GiB
SEED: 60 : 5.401 GiB
SEED: 61 : 6.134 GiB
SEED: 62 : 10.482 GiB
SEED: 63 : 5.314 GiB
SEED: 64 : 7.187 GiB
SEED: 65 : 6.778 GiB
SEED: 66 : 5.782 GiB
SEED: 67 : 8.465 GiB
SEED: 68 : 5.509 GiB
SEED: 69 : 6.426 GiB
SEED: 70 : 5.653 GiB
SEED: 71 : 5.621 GiB
SEED: 72 : 12.110 GiB
SEED: 73 : 10.795 GiB
SEED: 74 : 14.111 GiB
SEED: 75 : 4.920 GiB
SEED: 76 : 6.068 GiB
SEED: 77 : 5.522 GiB
SEED: 78 : 5.669 GiB
SEED: 79 : 5.755 GiB
SEED: 80 : 8.589 GiB
SEED: 81 : 6.098 GiB
SEED: 82 : 7.110 GiB
SEED: 83 : 8.995 GiB
SEED: 84 : 8.628 GiB
SEED: 85 : 7.663 GiB
SEED: 86 : 7.436 GiB
SEED: 87 : 5.725 GiB
SEED: 88 : 5.644 GiB
SEED: 89 : 7.018 GiB
SEED: 90 : 8.908 GiB
SEED: 91 : 13.405 GiB
SEED: 92 : 6.676 GiB
SEED: 93 : 10.485 GiB
SEED: 94 : 6.931 GiB
SEED: 95 : 5.976 GiB
SEED: 96 : 5.493 GiB
SEED: 97 : 6.021 GiB
SEED: 98 : 9.675 GiB
SEED: 99 : 8.740 GiB
SEED: 100 : 5.651 GiB

Max-RSS values for julia-1.10:

SEED: 1 : 6.162 GiB
SEED: 1 : 5.904 GiB
SEED: 1 : 5.595 GiB
SEED: 2 : 5.568 GiB
SEED: 2 : 5.623 GiB
SEED: 2 : 5.715 GiB
SEED: 3 : 12.843 GiB
SEED: 3 : 11.586 GiB
SEED: 3 : 12.183 GiB
SEED: 4 : 6.136 GiB
SEED: 4 : 6.331 GiB
SEED: 4 : 6.093 GiB
SEED: 5 : 9.148 GiB
SEED: 5 : 9.005 GiB
SEED: 5 : 9.895 GiB
SEED: 6 : 6.138 GiB
SEED: 6 : 6.923 GiB
SEED: 6 : 6.657 GiB
SEED: 7 : 6.051 GiB
SEED: 7 : 5.623 GiB
SEED: 7 : 5.924 GiB
SEED: 8 : 9.001 GiB
SEED: 8 : 9.316 GiB
SEED: 8 : 8.493 GiB
SEED: 9 : 9.482 GiB
SEED: 9 : 11.227 GiB
SEED: 9 : 11.024 GiB
SEED: 10 : 5.713 GiB
SEED: 10 : 5.440 GiB
SEED: 10 : 5.374 GiB
SEED: 11 : 9.896 GiB
SEED: 11 : 10.366 GiB
SEED: 11 : 10.226 GiB
SEED: 12 : 15.061 GiB
SEED: 12 : 13.438 GiB
SEED: 12 : 14.339 GiB
SEED: 13 : 6.837 GiB
SEED: 13 : 6.384 GiB
SEED: 13 : 6.556 GiB
SEED: 14 : 6.852 GiB
SEED: 14 : 7.485 GiB
SEED: 14 : 7.881 GiB
SEED: 15 : 5.556 GiB
SEED: 15 : 5.912 GiB
SEED: 15 : 5.599 GiB
SEED: 16 : 7.559 GiB
SEED: 16 : 8.150 GiB
SEED: 16 : 8.290 GiB
SEED: 17 : 4.929 GiB
SEED: 17 : 5.541 GiB
SEED: 17 : 5.255 GiB
SEED: 18 : 5.343 GiB
SEED: 18 : 4.994 GiB
SEED: 18 : 4.995 GiB
SEED: 19 : 11.506 GiB
SEED: 19 : 12.384 GiB
SEED: 19 : 11.153 GiB
SEED: 20 : 6.136 GiB
SEED: 20 : 5.756 GiB
SEED: 20 : 5.920 GiB
SEED: 21 : 5.917 GiB
SEED: 21 : 6.352 GiB
SEED: 21 : 7.146 GiB
SEED: 22 : 5.469 GiB
SEED: 22 : 5.322 GiB
SEED: 22 : 5.176 GiB
SEED: 23 : 8.651 GiB
SEED: 23 : 9.219 GiB
SEED: 23 : 8.946 GiB
SEED: 24 : 7.835 GiB
SEED: 24 : 9.485 GiB
SEED: 24 : 7.856 GiB
SEED: 25 : 10.005 GiB
SEED: 25 : 9.466 GiB
SEED: 25 : 9.788 GiB
SEED: 26 : 9.083 GiB
SEED: 26 : 7.851 GiB
SEED: 26 : 8.669 GiB
SEED: 27 : 5.349 GiB
SEED: 27 : 5.786 GiB
SEED: 27 : 5.279 GiB
SEED: 28 : 6.107 GiB
SEED: 28 : 6.269 GiB
SEED: 28 : 6.544 GiB
SEED: 29 : 5.539 GiB
SEED: 29 : 5.399 GiB
SEED: 29 : 5.608 GiB
SEED: 30 : 6.764 GiB
SEED: 30 : 6.890 GiB
SEED: 30 : 6.981 GiB
SEED: 31 : 7.844 GiB
SEED: 31 : 8.118 GiB
SEED: 31 : 8.194 GiB
SEED: 32 : 7.217 GiB
SEED: 32 : 9.148 GiB
SEED: 32 : 7.511 GiB
SEED: 33 : 17.228 GiB
SEED: 33 : 13.380 GiB
SEED: 33 : 13.954 GiB
SEED: 34 : 5.743 GiB
SEED: 34 : 5.883 GiB
SEED: 34 : 5.426 GiB
SEED: 35 : 5.679 GiB
SEED: 35 : 5.418 GiB
SEED: 35 : 5.696 GiB
SEED: 36 : 8.797 GiB
SEED: 36 : 8.331 GiB
SEED: 36 : 7.783 GiB
SEED: 37 : 5.588 GiB
SEED: 37 : 5.973 GiB
SEED: 37 : 5.918 GiB
SEED: 38 : 5.533 GiB
SEED: 38 : 5.575 GiB
SEED: 38 : 5.329 GiB
SEED: 39 : 9.754 GiB
SEED: 39 : 10.469 GiB
SEED: 39 : 9.701 GiB
SEED: 40 : 6.407 GiB
SEED: 40 : 6.722 GiB
SEED: 40 : 7.642 GiB
SEED: 41 : 7.253 GiB
SEED: 41 : 7.544 GiB
SEED: 41 : 7.233 GiB
SEED: 42 : 11.151 GiB
SEED: 42 : 10.498 GiB
SEED: 42 : 10.738 GiB
SEED: 43 : 5.452 GiB
SEED: 43 : 5.561 GiB
SEED: 43 : 5.612 GiB
SEED: 44 : 8.025 GiB
SEED: 44 : 10.598 GiB
SEED: 44 : 9.053 GiB
SEED: 45 : 8.250 GiB
SEED: 45 : 7.857 GiB
SEED: 45 : 7.747 GiB
SEED: 46 : 5.630 GiB
SEED: 46 : 5.918 GiB
SEED: 46 : 5.882 GiB
SEED: 47 : 7.589 GiB
SEED: 47 : 7.834 GiB
SEED: 47 : 9.018 GiB
SEED: 48 : 6.835 GiB
SEED: 48 : 6.750 GiB
SEED: 48 : 7.465 GiB
SEED: 49 : 5.999 GiB
SEED: 49 : 6.069 GiB
SEED: 49 : 5.490 GiB
SEED: 50 : 6.765 GiB
SEED: 50 : 8.735 GiB
SEED: 50 : 6.041 GiB
SEED: 51 : 7.586 GiB
SEED: 51 : 6.765 GiB
SEED: 51 : 7.249 GiB
SEED: 52 : 10.668 GiB
SEED: 52 : 12.573 GiB
SEED: 52 : 12.892 GiB
SEED: 53 : 11.359 GiB
SEED: 50 : 8.060 GiB
SEED: 51 : 7.022 GiB
SEED: 52 : 11.308 GiB
SEED: 53 : 8.587 GiB
SEED: 54 : 6.108 GiB
SEED: 55 : 5.856 GiB
SEED: 56 : 6.267 GiB
SEED: 57 : 9.410 GiB
SEED: 58 : 9.599 GiB
SEED: 59 : 6.209 GiB
SEED: 60 : 5.441 GiB
SEED: 61 : 6.413 GiB
SEED: 62 : 10.426 GiB
SEED: 63 : 5.081 GiB
SEED: 64 : 7.751 GiB
SEED: 65 : 6.572 GiB
SEED: 66 : 5.609 GiB
SEED: 67 : 7.082 GiB
SEED: 68 : 5.807 GiB
SEED: 69 : 7.503 GiB
SEED: 70 : 5.294 GiB
SEED: 71 : 5.460 GiB
SEED: 72 : 11.700 GiB
SEED: 73 : 9.796 GiB
SEED: 74 : 14.632 GiB
SEED: 75 : 4.858 GiB
SEED: 76 : 5.944 GiB
SEED: 77 : 5.871 GiB
SEED: 78 : 5.958 GiB
SEED: 79 : 5.165 GiB
SEED: 80 : 8.923 GiB
SEED: 81 : 6.345 GiB
SEED: 82 : 7.797 GiB
SEED: 83 : 9.245 GiB
SEED: 84 : 9.684 GiB
SEED: 85 : 7.458 GiB
SEED: 86 : 6.174 GiB
SEED: 87 : 5.501 GiB
SEED: 88 : 5.504 GiB
SEED: 89 : 6.490 GiB
SEED: 90 : 11.212 GiB
SEED: 91 : 13.501 GiB
SEED: 92 : 6.230 GiB
SEED: 93 : 11.786 GiB
SEED: 94 : 6.466 GiB
SEED: 95 : 6.444 GiB
SEED: 96 : 5.605 GiB
SEED: 97 : 6.149 GiB
SEED: 98 : 8.711 GiB
SEED: 99 : 8.076 GiB
SEED: 100 : 5.620 GiB

Max-RSS values for julia-1.9:

SEED: 1 : 2.822 GiB
SEED: 1 : 2.949 GiB
SEED: 1 : 2.832 GiB
SEED: 2 : 2.056 GiB
SEED: 2 : 1.941 GiB
SEED: 2 : 2.013 GiB
SEED: 3 : 2.003 GiB
SEED: 3 : 2.144 GiB
SEED: 3 : 2.072 GiB
SEED: 4 : 2.084 GiB
SEED: 4 : 2.134 GiB
SEED: 4 : 2.153 GiB
SEED: 5 : 2.041 GiB
SEED: 5 : 1.780 GiB
SEED: 5 : 2.010 GiB
SEED: 6 : 1.872 GiB
SEED: 6 : 1.965 GiB
SEED: 6 : 1.997 GiB
SEED: 7 : 2.091 GiB
SEED: 7 : 2.044 GiB
SEED: 7 : 2.190 GiB
SEED: 8 : 1.704 GiB
SEED: 8 : 2.099 GiB
SEED: 8 : 1.872 GiB
SEED: 9 : 1.720 GiB
SEED: 9 : 2.072 GiB
SEED: 9 : 2.059 GiB
SEED: 10 : 1.990 GiB
SEED: 10 : 1.677 GiB
SEED: 10 : 2.051 GiB
SEED: 11 : 1.866 GiB
SEED: 11 : 1.873 GiB
SEED: 11 : 2.159 GiB
SEED: 12 : 1.972 GiB
SEED: 12 : 2.037 GiB
SEED: 12 : 1.987 GiB
SEED: 13 : 2.043 GiB
SEED: 13 : 2.171 GiB
SEED: 13 : 2.146 GiB
SEED: 14 : 2.225 GiB
SEED: 14 : 2.286 GiB
SEED: 14 : 1.947 GiB
SEED: 15 : 2.141 GiB
SEED: 15 : 2.195 GiB
SEED: 15 : 2.185 GiB
SEED: 16 : 2.153 GiB
SEED: 16 : 2.134 GiB
SEED: 16 : 2.211 GiB
SEED: 17 : 1.979 GiB
SEED: 17 : 2.055 GiB
SEED: 17 : 2.117 GiB
SEED: 18 : 2.044 GiB
SEED: 18 : 2.019 GiB
SEED: 18 : 1.999 GiB
SEED: 19 : 2.142 GiB
SEED: 19 : 1.978 GiB
SEED: 19 : 2.164 GiB
SEED: 20 : 1.869 GiB
SEED: 20 : 2.296 GiB
SEED: 20 : 2.220 GiB
SEED: 21 : 2.027 GiB
SEED: 21 : 2.063 GiB
SEED: 21 : 2.094 GiB
SEED: 22 : 2.036 GiB
SEED: 22 : 1.868 GiB
SEED: 22 : 2.008 GiB
SEED: 23 : 1.934 GiB
SEED: 23 : 1.750 GiB
SEED: 23 : 2.114 GiB
SEED: 24 : 1.971 GiB
SEED: 24 : 1.912 GiB
SEED: 24 : 2.011 GiB
SEED: 25 : 2.317 GiB
SEED: 25 : 2.381 GiB
SEED: 25 : 2.078 GiB
SEED: 26 : 1.955 GiB
SEED: 26 : 1.981 GiB
SEED: 26 : 1.983 GiB
SEED: 27 : 2.098 GiB
SEED: 27 : 1.903 GiB
SEED: 27 : 2.066 GiB
SEED: 28 : 2.031 GiB
SEED: 28 : 2.384 GiB
SEED: 28 : 2.196 GiB
SEED: 29 : 1.995 GiB
SEED: 29 : 1.990 GiB
SEED: 29 : 2.061 GiB
SEED: 30 : 2.068 GiB
SEED: 30 : 2.104 GiB
SEED: 30 : 2.029 GiB
SEED: 31 : 1.778 GiB
SEED: 31 : 2.119 GiB
SEED: 31 : 1.762 GiB
SEED: 32 : 2.115 GiB
SEED: 32 : 1.758 GiB
SEED: 32 : 2.170 GiB
SEED: 33 : 2.144 GiB
SEED: 33 : 2.187 GiB
SEED: 33 : 2.145 GiB
SEED: 34 : 1.988 GiB
SEED: 34 : 2.144 GiB
SEED: 34 : 2.031 GiB
SEED: 35 : 1.896 GiB
SEED: 35 : 2.092 GiB
SEED: 35 : 2.186 GiB
SEED: 36 : 2.104 GiB
SEED: 36 : 2.073 GiB
SEED: 36 : 2.003 GiB
SEED: 37 : 2.151 GiB
SEED: 37 : 2.017 GiB
SEED: 37 : 2.054 GiB
SEED: 38 : 2.057 GiB
SEED: 38 : 2.044 GiB
SEED: 38 : 2.057 GiB
SEED: 39 : 2.086 GiB
SEED: 39 : 2.273 GiB
SEED: 39 : 2.189 GiB
SEED: 40 : 2.004 GiB
SEED: 40 : 2.037 GiB
SEED: 40 : 1.991 GiB
SEED: 41 : 2.081 GiB
SEED: 41 : 1.851 GiB
SEED: 41 : 2.011 GiB
SEED: 42 : 1.851 GiB
SEED: 42 : 2.111 GiB
SEED: 42 : 2.097 GiB
SEED: 43 : 1.945 GiB
SEED: 43 : 1.925 GiB
SEED: 43 : 1.662 GiB
SEED: 44 : 2.509 GiB
SEED: 44 : 2.361 GiB
SEED: 44 : 2.441 GiB
SEED: 45 : 2.118 GiB
SEED: 45 : 2.215 GiB
SEED: 45 : 1.970 GiB
SEED: 46 : 1.882 GiB
SEED: 46 : 2.087 GiB
SEED: 46 : 2.102 GiB
SEED: 47 : 1.996 GiB
SEED: 47 : 2.049 GiB
SEED: 47 : 2.305 GiB
SEED: 48 : 2.005 GiB
SEED: 48 : 2.105 GiB
SEED: 48 : 1.951 GiB
SEED: 49 : 2.091 GiB
SEED: 49 : 1.909 GiB
SEED: 49 : 2.122 GiB
SEED: 50 : 2.729 GiB
SEED: 50 : 2.888 GiB
SEED: 50 : 2.655 GiB
SEED: 51 : 2.062 GiB
SEED: 51 : 2.002 GiB
SEED: 51 : 2.064 GiB
SEED: 52 : 1.895 GiB
SEED: 52 : 2.030 GiB
SEED: 52 : 2.003 GiB
SEED: 53 : 2.100 GiB
SEED: 53 : 2.039 GiB
SEED: 53 : 1.999 GiB
SEED: 54 : 2.123 GiB
SEED: 54 : 2.173 GiB
SEED: 54 : 2.068 GiB
SEED: 55 : 2.014 GiB
SEED: 55 : 2.078 GiB
SEED: 55 : 2.111 GiB
SEED: 56 : 2.037 GiB
SEED: 56 : 2.081 GiB
SEED: 56 : 2.069 GiB
SEED: 57 : 1.984 GiB
SEED: 57 : 1.949 GiB
SEED: 57 : 2.014 GiB
SEED: 58 : 2.078 GiB
SEED: 58 : 2.050 GiB
SEED: 58 : 1.990 GiB
SEED: 59 : 2.166 GiB
SEED: 59 : 1.712 GiB
SEED: 59 : 1.962 GiB
SEED: 60 : 1.931 GiB
SEED: 60 : 2.040 GiB
SEED: 60 : 2.158 GiB
SEED: 61 : 1.946 GiB
SEED: 61 : 1.861 GiB
SEED: 61 : 1.909 GiB
SEED: 62 : 2.111 GiB
SEED: 62 : 2.251 GiB
SEED: 62 : 2.228 GiB
SEED: 63 : 2.126 GiB
SEED: 63 : 2.079 GiB
SEED: 63 : 1.860 GiB
SEED: 64 : 2.186 GiB
SEED: 64 : 2.147 GiB
SEED: 64 : 2.108 GiB
SEED: 65 : 1.902 GiB
SEED: 65 : 2.064 GiB
SEED: 65 : 2.032 GiB
SEED: 66 : 2.284 GiB
SEED: 66 : 2.354 GiB
SEED: 50 : 2.732 GiB
SEED: 51 : 2.081 GiB
SEED: 52 : 2.063 GiB
SEED: 53 : 2.167 GiB
SEED: 54 : 2.046 GiB
SEED: 55 : 2.071 GiB
SEED: 56 : 2.149 GiB
SEED: 57 : 1.940 GiB
SEED: 58 : 2.049 GiB
SEED: 59 : 1.727 GiB
SEED: 60 : 1.961 GiB
SEED: 61 : 2.067 GiB
SEED: 62 : 1.954 GiB
SEED: 63 : 2.067 GiB
SEED: 64 : 2.056 GiB
SEED: 65 : 2.026 GiB
SEED: 66 : 2.173 GiB
SEED: 67 : 2.242 GiB
SEED: 68 : 2.127 GiB
SEED: 69 : 2.220 GiB
SEED: 70 : 1.837 GiB
SEED: 71 : 1.976 GiB
SEED: 72 : 2.115 GiB
SEED: 73 : 2.325 GiB
SEED: 74 : 2.166 GiB
SEED: 75 : 2.123 GiB
SEED: 76 : 2.046 GiB
SEED: 77 : 2.044 GiB
SEED: 78 : 1.968 GiB
SEED: 79 : 2.068 GiB
SEED: 80 : 2.024 GiB
SEED: 81 : 1.953 GiB
SEED: 82 : 2.047 GiB
SEED: 83 : 1.896 GiB
SEED: 84 : 1.955 GiB
SEED: 85 : 1.880 GiB
SEED: 86 : 2.074 GiB
SEED: 87 : 2.164 GiB
SEED: 88 : 2.004 GiB
SEED: 89 : 2.212 GiB
SEED: 90 : 2.119 GiB
SEED: 91 : 2.190 GiB
SEED: 92 : 2.009 GiB
SEED: 93 : 2.079 GiB
SEED: 94 : 2.308 GiB
SEED: 95 : 2.295 GiB
SEED: 96 : 2.170 GiB
SEED: 97 : 2.124 GiB
SEED: 98 : 2.004 GiB
SEED: 99 : 2.541 GiB
SEED: 100 : 2.191 GiB

also use random seed when running the tests manually
@codecov
Copy link

codecov bot commented Oct 2, 2023

Codecov Report

Merging #1456 (7159461) into master (ae4d543) will increase coverage by 0.05%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1456      +/-   ##
==========================================
+ Coverage   84.60%   84.65%   +0.05%     
==========================================
  Files         110      110              
  Lines       29373    29373              
==========================================
+ Hits        24851    24866      +15     
+ Misses       4522     4507      -15     

see 10 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@@ -3,8 +3,11 @@ using AbstractAlgebra.RandomExtensions: RandomExtensions, make

# initialize RNGs to a fixed initial state, to improve reproducibility
# of this test suite.
Random.seed!(42)
const rng = MersenneTwister(42)
# The seed 22 was chosen to make the tests run more reliably on github actions
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But isn't this just a bandaid? We are not closer to understanding what's going on, are we?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but it will at least let the tests succeed in CI so we can detect other issues with nightly or 1.10.

@fingolfin
Copy link
Member

OK with the "very bad seed" it hangs in

Generic.Ideal.comparison | 1000   1000  1.1s
GC: pause 136.19ms. collected 217.232699MB. incr 
Test Summary:             | Pass  Total  Time
Generic.Ideal.containment | 1002   1002  1.1s

And that's doing Gröbner basis computations... with a rather... simple implementation.

These tests look like this:

   # univariate
   R, x = polynomial_ring(ZZ, "x")

   for i = 1:300
      n = rand(0:5)
      m = rand(0:5)
      V = elem_type(R)[rand(R, 0:10, -10:10) for i in 1:n]
      W = elem_type(R)[rand(R, 0:10, -10:10) for i in 1:m]

      I = Generic.Ideal(R, V)
      J = Generic.Ideal(R, vcat(V, W))

      @test contains(J, I)
   end

And then similar for a few other domains.

I think we should radically reduce these tests, and also switch from random ideals to fixed ideals. The "random" test may or may not be great for smoking out bugs in the code, but this is just to expensive if we accidentally choose a bad ideal. Plus we are not going to use this code in Oscar anyway....

@fingolfin
Copy link
Member

The real culprit here seems to be @testset "Generic.Ideal.addition" begin for which I can easily reproduce the "hang" using the "bad seed" @benlorenz found (great catch!):

julia> using AbstractAlgebra, Test, Random

julia> Random.seed!(8764)
TaskLocalRNG()

julia> @time include("test/generic/Ideal-test.jl");
Test Summary:              | Pass  Total  Time
Generic.Ideal.constructors |    7      7  0.0s
Test Summary:                               | Pass  Total  Time
Generic.Ideal.ideal_reduction(multivariate) |  232    232  0.5s
Test Summary:                             | Pass  Total  Time
Generic.Ideal.ideal_reduction(univariate) | 1344   1344  0.1s
Test Summary:                          | Pass  Total  Time
Generic.Ideal.ideal_reduction(integer) | 2161   2161  0.0s
Test Summary:                        | Pass  Total  Time
Generic.Ideal.ideal_reduction(Fp[x]) | 2210   2210  0.0s
Test Summary:            | Pass  Total  Time
Generic.Ideal.comparison | 1000   1000  0.4s
Test Summary:             | Pass  Total  Time
Generic.Ideal.containment | 1002   1002  0.4s
   ...   <-  hangs here, in testset "Generic.Ideal.addition"

@fingolfin
Copy link
Member

I've now made PR #1458 which "solves" the problematic behavior for me, at least for that one bad seed. It would be interesting to know if there are other even worse seeds for this remaining. And also if this solves the memory usage issue or not ... ? I.e. maybe there are more similarly problematic test cases left...

@benlorenz
Copy link
Collaborator Author

benlorenz commented Oct 2, 2023

The bad ideal from seed 8764 seems to be this:

i = 49
I = AbstractAlgebra.Generic.Ideal{AbstractAlgebra.Generic.MPoly{BigInt}}(Multivariate polynomial ring in 2 variables over integers, AbstractAlgebra.Generic.MPoly{BigInt}[250*x^3*y - 100*x^2*y^2 - 200*x*y^3 + 80*y^4 + 100*y^3, 200*x*y^4 - 80*y^5 - 100*y^4 + 250*y^2, 5*x^3*y^2 - 2*x^2*y^3 + 5*y^2, 50*x^4*y - 48*x^2*y^3 + 16*x*y^4 + 20*x*y^3 + 20*y^2, 160*y^6 + 100*x*y^4 + 360*y^5 - 2500*x^2*y^2 + 2200*y^4 - 1250*x*y^2 - 500*y^3 - 500*y^2, 8*x*y^5 + 80*y^6 + 60*x*y^4 + 180*y^5 - 1300*x^2*y^2 + 1140*y^4 - 650*x*y^2 - 250*y^3 - 250*y^2, 4*x^2*y^4 + 100*x^3*y - 50*x^2*y^2 - 80*x*y^3 + 40*y^4 + 40*y^3, x^3*y^3 + 2*x^2*y^4 + 110*x^3*y - 50*x^2*y^2 - 88*x*y^3 + 40*y^4 + 45*y^3])
J = AbstractAlgebra.Generic.Ideal{AbstractAlgebra.Generic.MPoly{BigInt}}(Multivariate polynomial ring in 2 variables over integers, AbstractAlgebra.Generic.MPoly{BigInt}[8*x^3*y - x^2*y + 1])

and then doing contains(I + J, I) and contains(I + J, J), at least this is where my code with the debug statements is now stuck for several minutes (and already at 10GB). (This is with the original code from the tests and #1437).

I also think we should probably use fixed ideals. To reduce the complexity we would need to significantly reduce the degrees.

@benlorenz
Copy link
Collaborator Author

This is obsolete now after #1458.

@benlorenz benlorenz closed this Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants