OpenQL icon indicating copy to clipboard operation
OpenQL copied to clipboard

`test/v1x/python/test_condex.py` doesn't finish too often as part of the `Python/MacOS` job

Open rturrado opened this issue 2 years ago • 4 comments

  • Python/MacOS job is part of the GitHub Actions test workflow.
  • I've observed from a few weeks ago that test/v1x/python/test_condex.py fails to finish very often.
  • I wonder if this has something to do with the refactoring I did for OpenQL tests. But I've checked my changes and I haven't seen any significative modification there.
  • I'm thinking more on the lines that this has to do with some randomness introduced by the OS (and the test feeding itself from that randomness, of course). Something similar happened to us a few weeks ago, where the HiGHS solver was producing two different but perfectly valid solutions depending on the plattorm (x64 and ARM), and our test was expecting only one of them as valid.

rturrado avatar Sep 12 '23 09:09 rturrado

You write:

test/v1x/python/test_condex.py fails to finish very often

Can you be more specific:

  • what is it doing when it doesn't finish, where is it running then?
  • is it always doing the same thing or more or less at the same position in the test then?

jvansomeren avatar Sep 12 '23 09:09 jvansomeren

Many thanks for the comment, Hans.

GitHub Actions don't give much information about what's happening. Since pytest is being run without much verbosity on, you don't even know what test case within test_condex.py is causing the problem. You only know that test_condex.py never finishes. The Test step for the Python/MacOS job simply gets stuck at that point.

Since I don't have a MacOS machine, I will see if I can reproduce this issue by compiling with clang++ on my Linux/x64 machine. If I cannot reproduce it that way, I will add more verbosity to pytest and run this specific job through GitHub Actions to get some more insight.

rturrado avatar Sep 12 '23 09:09 rturrado

I can imagine a lot failing, notably in the mapper. The mapper may depend on a random number taken. But we should only start suspecting the mapper when we know that it is consuming its time there. Because Pablo also took care to take the randomness out of the mapper. Looking forward to the results of your bug hunt.

jvansomeren avatar Sep 12 '23 10:09 jvansomeren

I could reproduce the issue yesterday in my personal laptop. The test case that is never ending sometimes is the last one, the Toffoli one. I haven't dedicated more time yet to debug it.

rturrado avatar Sep 13 '23 10:09 rturrado