M2 icon indicating copy to clipboard operation
M2 copied to clipboard

QthPower fourth test sometimes never finishes

Open mahrud opened this issue 4 years ago • 0 comments

I noticed two recent Github Actions builds, one on autotools and one on cmake, timed out, so I checked to see what was taking so long and realized they both timed out in the same place.

Autotools:

2021-10-23T11:35:52.7082987Z /home/runner/work/M2/M2/M2/BUILD/build/usr-dist/x86_64-Linux-Ubuntu-20.04/bin/M2 -q --no-preload --stop --silent -e "needsPackage(\"QthPower\",LoadDocumentation=>true,DebuggingMode=>true); check(QthPower,UserMode=>false,Verbose=>true); exit 0" 
2021-10-23T11:35:53.7707867Z  -- capturing check(0, "QthPower")                                           -- 0.789007 seconds elapsed
2021-10-23T11:35:55.9064619Z  -- capturing check(1, "QthPower")                                           -- 2.13563 seconds elapsed
2021-10-23T11:35:56.4230467Z  -- capturing check(2, "QthPower")                                           -- 0.516635 seconds elapsed
2021-10-23T15:00:41.6211725Z ##[error]The operation was canceled.

CMake:

2021-10-21T21:19:08.6832331Z QthPower
2021-10-21T21:19:08.6832767Z ********
2021-10-21T21:19:10.2952726Z  -- capturing check(0, "QthPower")                                           -- 1.20264 seconds elapsed
2021-10-21T21:19:13.4542449Z  -- capturing check(1, "QthPower")                                           -- 3.15898 seconds elapsed
2021-10-21T21:19:14.2212433Z  -- capturing check(2, "QthPower")                                           -- 0.766953 seconds elapsed
2021-10-22T00:14:24.2923177Z ##[error]The operation was canceled.

Notice the time jump in both cases, indicating that for the most part nothing else is slowed down, but that this fourth test is never finished or killed. The test itself takes about 16s on my machine and doesn't seem to unusual:


i12 : code (tests("QthPower"))#3

o12 = --/home/linuxbrew/.linuxbrew/share/Macaulay2/QthPower.m2:1254: location of test code

      ------------------------------------------------------------------------------
      --generic example over QQ with moderate coefficients to be reconstructed------
      ------------------------------------------------------------------------------ 
          wtR4 = matrix{{11,6}};
            R0 = QQ[y,x,MonomialOrder=>{Weights=>{11,6},Weights=>{1,0}}];
            GB = {(y^2-3/4*y-15/17*x)^3-9*y*x^4*(y^2-3/4*y-15/17*x)-27*x^11};
      time ic0 = rationalIntegralClosure(wtR4,R0,GB); toString(ic0)
      assert(ic0#3 == matrix{{25,21,20,11,10,6}})

Perhaps in order to finish quickly it needs more memory than is available on Github's machines.

I don't think the solution should be to not use capture, but that the M2 command that runs capture should be time limited by a generous amount. It would also be good to time limit capture, perhaps using alarm and a new thread.

mahrud avatar Oct 24 '21 06:10 mahrud