Uploaded image for project: 'OptaPlanner'
  1. OptaPlanner
  2. PLANNER-2414

Multi threaded solution hangs with empty MoveIteratorFactory

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Critical Critical
    • None
    • 8.6.0.Final
    • optaplanner-core
    • None
    • 2021 Week 40-42 (from Oct 4)
    • Hide

      MCVE is here, forked from the nqueens example: https://github.com/vilmosnagy/optaplanner/tree/mcve/multi-threaded-solution-hangs

      If you start the example app and try to run the NQueens example, it'll hang.
      But if you set this property to true, then the custom MoveIteratorFactory will generate an Iterator with some NoOpMoves (instead of the empty iterator; the NoOpMove is an empty AbstractMove, which does nothing)  and the first localSearchPhase ends normally.

      Or if you set the moveThreadCount to NONE, then the first localSearchPhase ends normally as well.

      Show
      MCVE is here, forked from the nqueens example: https://github.com/vilmosnagy/optaplanner/tree/mcve/multi-threaded-solution-hangs If you start the example app and try to run the NQueens example, it'll hang. But if you set this property to true, then the custom MoveIteratorFactory will generate an Iterator with some NoOpMoves (instead of the empty iterator; the NoOpMove is an empty AbstractMove , which does nothing)  and the first localSearchPhase  ends normally. Or if you set the moveThreadCount to NONE, then the first localSearchPhase ends normally as well.
    • Undefined
    • NEW
    • NEW

      This issue is created from this thread on the mailing list.

      Having a multi-threaded solver config with a custom MoveIteratorFactory, if the MoveIteratorFactory returns an empty iterator, the solution will hang.

      The searchPhase with the given MoveIteratorFactory won't terminate after the termination condition is met (eg.: the given amount of minutes is spent).

            gdesmet@redhat.com Geoffrey De Smet (Inactive)
            vilmos.nagy Vilmos Nagy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: