HiGHS icon indicating copy to clipboard operation
HiGHS copied to clipboard

Can not exit after solve finished when use command line solve on windows

Open S-yangbin opened this issue 11 months ago • 2 comments

I'm using HiGHS 1.8.1 (git hash: 4a7f24ac6): Copyright (c) 2024 HiGHS under MIT licence terms on commandline on Windows server 2019.

If the --time_limit=100 parameter is added, the execution will hang and not exit after solve finished.

Solve without --time_limit=100 param

C:\>bin\highs.exe 10teams.mps.gz
Running HiGHS 1.8.1 (git hash: 4a7f24ac6): Copyright (c) 2024 HiGHS under MIT licence terms
MIP  10teams has 230 rows; 2025 cols; 12150 nonzeros; 1800 integer variables
Coefficient ranges:
  Matrix [1e+00, 1e+00]
  Cost   [2e+00, 9e+01]
  Bound  [1e+00, 1e+00]
  RHS    [1e+00, 2e+00]
Presolving model
210 rows, 1600 cols, 9600 nonzeros  0s
210 rows, 1600 cols, 9600 nonzeros  0s
Objective function is integral with scale 1

Solving MIP model with:
   210 rows
   1600 cols (1600 binary, 0 integer, 0 implied int., 0 continuous)
   9600 nonzeros
MIP-Timing:       0.034 - starting analytic centre calculation

Src: B => Branching; C => Central rounding; F => Feasibility pump; H => Heuristic; L => Sub-MIP;
     P => Empty MIP; R => Randomized rounding; S => Solve LP; T => Evaluate node; U => Unbounded;
     z => Trivial zero; l => Trivial lower; u => Trivial upper; p => Trivial point

        Nodes      |    B&B Tree     |            Objective Bounds              |  Dynamic Constraints |       Work
Src  Proc. InQueue |  Leaves   Expl. | BestBound       BestSol              Gap |   Cuts   InLp Confl. | LpIters     Time

         0       0         0   0.00%   20              inf                  inf        0      0      0         0     0.0s
         0       0         0   0.00%   917             inf                  inf        0      0      4      1560     0.1s
         0       0         0   0.00%   924             inf                  inf      195     17    160     53287    12.3s
 B      19       1         2   0.00%   924             962                3.95%      200     17    672     73773    13.9s
 B      28       1         6   0.00%   924             946                2.33%      206     17   1005    102931    15.3s
 B      94       5        37   0.01%   924             940                1.70%      231     17   3406    167101    19.2s
       313      40       133   0.03%   924             940                1.70%      294     22   6619    215635    24.9s
 B     367       0       161  99.82%   924             924                0.00%      298     22   7210    219335    25.2s
       368       0       161 100.00%   924             924                0.00%      299     22   7233    219591    25.2s

Solving report
  Model             10teams
  Status            Optimal
  Primal bound      924
  Dual bound        924
  Gap               0% (tolerance: 0.01%)
  P-D integral      0.246507883919
  Solution status   feasible
                    924 (objective)
                    0 (bound viol.)
                    2.48689957516e-14 (int. viol.)
                    0 (row viol.)
  Timing            25.25 (total)
                    0.00 (presolve)
                    0.00 (solve)
                    0.00 (postsolve)
  Max sub-MIP depth 5
  Nodes             368
  Repair LPs        0 (0 feasible; 0 iterations)
  LP iterations     219591 (total)
                    116811 (strong br.)
                    1939 (separation)
                    69376 (heuristics)

solve with --time_limit=100 param

C:\>bin\highs.exe --time_limit=100 10teams.mps.gz
Running HiGHS 1.8.1 (git hash: 4a7f24ac6): Copyright (c) 2024 HiGHS under MIT licence terms
MIP  10teams has 230 rows; 2025 cols; 12150 nonzeros; 1800 integer variables
Coefficient ranges:
  Matrix [1e+00, 1e+00]
  Cost   [2e+00, 9e+01]
  Bound  [1e+00, 1e+00]
  RHS    [1e+00, 2e+00]
Presolving model
210 rows, 1600 cols, 9600 nonzeros  0s
210 rows, 1600 cols, 9600 nonzeros  0s
Objective function is integral with scale 1

Solving MIP model with:
   210 rows
   1600 cols (1600 binary, 0 integer, 0 implied int., 0 continuous)
   9600 nonzeros
MIP-Timing:       0.034 - starting analytic centre calculation

Src: B => Branching; C => Central rounding; F => Feasibility pump; H => Heuristic; L => Sub-MIP;
     P => Empty MIP; R => Randomized rounding; S => Solve LP; T => Evaluate node; U => Unbounded;
     z => Trivial zero; l => Trivial lower; u => Trivial upper; p => Trivial point

        Nodes      |    B&B Tree     |            Objective Bounds              |  Dynamic Constraints |       Work
Src  Proc. InQueue |  Leaves   Expl. | BestBound       BestSol              Gap |   Cuts   InLp Confl. | LpIters     Time

         0       0         0   0.00%   20              inf                  inf        0      0      0         0     0.0s
         0       0         0   0.00%   917             inf                  inf        0      0      4      1560     0.1s
         0       0         0   0.00%   924             inf                  inf      195     17    160     53287    12.3s
 B      19       1         2   0.00%   924             962                3.95%      200     17    672     73773    13.9s
 B      28       1         6   0.00%   924             946                2.33%      206     17   1005    102931    15.2s
 B      94       5        37   0.01%   924             940                1.70%      231     17   3406    167101    19.1s
       313      40       133   0.03%   924             940                1.70%      294     22   6619    215635    24.8s
 B     367       0       161  99.82%   924             924                0.00%      298     22   7210    219335    25.1s
       368       0       161 100.00%   924             924                0.00%      299     22   7233    219591    25.2s

Solving report
  Model             10teams
  Status            Optimal
  Primal bound      924
  Dual bound        924
  Gap               0% (tolerance: 0.01%)
  P-D integral      0.244925266385
  Solution status   feasible
                    924 (objective)
                    0 (bound viol.)
                    2.48689957516e-14 (int. viol.)
                    0 (row viol.)
  Timing            25.16 (total)
                    0.00 (presolve)
                    0.00 (solve)
                    0.00 (postsolve)
  Max sub-MIP depth 5
  Nodes             368
  Repair LPs        0 (0 feasible; 0 iterations)
  LP iterations     219591 (total)
                    116811 (strong br.)
                    1939 (separation)
                    69376 (heuristics)


S-yangbin avatar Jan 22 '25 07:01 S-yangbin

Does this happen with v1.9.0, and/or if you set threads=1?

jajhall avatar Jan 22 '25 09:01 jajhall

Does this happen with v1.9.0, and/or if you set threads=1?

Thanks for your reply.

Version 1.9.0 (git hash: 66f735e60) still experiences the same situation, but with a lower probability, occurring approximately once in every ten times.

When the number of threads is set to 1, the hanging issue does not occur again.

S-yangbin avatar Jan 22 '25 11:01 S-yangbin