HiGHS icon indicating copy to clipboard operation
HiGHS copied to clipboard

bug: segmentation fault

Open kyler1990 opened this issue 4 years ago • 9 comments

when use the ipm, some exception log happended as below:

exception log:

LP       : scpm1_lp
Rows     : 5000
Cols     : 500000
Nonzeros : 6250000
Presolve : Reductions: rows 5000(-0); columns 500000(-0); elements 6250000(-0)
INFO   : Solving the presolved LP
INFO   : IPX model has 5000 rows, 500000 columns and 6250000 nonzeros
Input
    Number of variables:                                500000
    Number of free variables:                           0
    Number of constraints:                              5000
    Number of equality constraints:                     0
    Number of matrix entries:                           6250000
    Matrix range:                                       [1e+00, 1e+00]
    RHS range:                                          [1e+00, 1e+00]
    Objective range:                                    [1e+00, 1e+02]
    Bounds range:                                       [1e+00, 1e+00]
Preprocessing
    Dualized model:                                     no
    Number of dense columns:                            0
    Range of scaling factors:                           [1.00e+00, 1.00e+00]
IPX version 1.0
Interior Point Solve
 Iter     P.res    D.res            P.obj           D.obj        mu     Time
   0   1.76e+00 1.22e+02   1.88315564e+04 -6.01335657e+07  2.75e+02       0s
   1   4.21e-01 7.87e+00  -4.29423998e+04 -2.84760116e+07  6.64e+01       1s
   2   7.30e-02 5.21e+00   1.50500005e+05 -2.08104746e+07  2.73e+01       1s
   3   7.30e-08 4.44e+00   1.17082577e+06 -1.83520070e+07  2.08e+01       2s
   4   3.20e-13 2.83e-01   4.33474449e+05 -1.00919977e+06  1.48e+00       2s
   5   2.31e-13 1.31e-01   8.49038248e+04 -5.18162815e+05  6.08e-01       2s
   6   7.64e-14 7.92e-03   3.31518488e+04 -6.32209947e+04  9.61e-02       3s
   7   7.46e-14 1.48e-03   6.43844068e+03 -1.20950025e+04  1.85e-02       3s
   8   1.90e-14 1.01e-03   4.62931832e+03 -9.32209761e+03  1.39e-02       4s
   9   1.78e-14 6.50e-04   3.26726556e+03 -6.59243879e+03  9.81e-03       5s
  10   6.66e-15 3.36e-04   2.44443824e+03 -3.88469546e+03  6.30e-03       6s
  11   8.44e-15 1.43e-04   1.78678796e+03 -2.04322910e+03  3.81e-03       8s
  12   7.77e-15 5.93e-05   1.15483398e+03 -8.81285015e+02  2.03e-03      10s
  13   8.66e-15 2.01e-05   8.10356898e+02 -1.76171875e+02  9.82e-04      13s
  14   1.02e-14 7.65e-06   6.15161484e+02  1.37023255e+02  4.76e-04      19s
  15   6.66e-15 2.27e-06   5.09146825e+02  2.93570846e+02  2.15e-04      29s
 Constructing starting basis...
[1]    68809 segmentation fault  ./highs --model_file ~/Downloads/scpm1_lp.mps --options_file

kyler1990 avatar Mar 05 '21 08:03 kyler1990

Please provide the MPS file and any options that were set.

odow avatar Mar 05 '21 19:03 odow

Please provide the MPS file and any options that were set.

mps file: http://plato.asu.edu/ftp/lptestset/scpm1_lp.mps.bz2

os: macOS Big Sur

options file:


# Model file
# [type: string, advanced: false, default: ""]
# model_file = 

# Presolve option: "off", "choose" or "on"
# [type: string, advanced: false, default: "choose"]
presolve = choose

# Solver option: "simplex", "choose" or "ipm"
# [type: string, advanced: false, default: "choose"]
solver = ipm

# Parallel option: "off", "choose" or "on"
# [type: string, advanced: false, default: "choose"]
parallel = on

# Time limit
# [type: double, advanced: false, range: [0, inf], default: inf]
time_limit = 9000

# Limit on cost coefficient: values larger than this will be treated as infinite
# [type: double, advanced: false, range: [1e+15, 1e+25], default: 1e+20]
infinite_cost = 1e+20

# Limit on |constraint bound|: values larger than this will be treated as infinite
# [type: double, advanced: false, range: [1e+15, 1e+25], default: 1e+20]
infinite_bound = 1e+20

# Lower limit on |matrix entries|: values smaller than this will be treated as zero
# [type: double, advanced: false, range: [1e-12, inf], default: 1e-09]
small_matrix_value = 1e-09

# Upper limit on |matrix entries|: values larger than this will be treated as infinite
# [type: double, advanced: false, range: [1, 1e+20], default: 1e+15]
large_matrix_value = 1e+15

# Primal feasibility tolerance
# [type: double, advanced: false, range: [1e-10, inf], default: 1e-07]
primal_feasibility_tolerance = 1e-07

# Dual feasibility tolerance
# [type: double, advanced: false, range: [1e-10, inf], default: 1e-07]
dual_feasibility_tolerance = 1e-07

# Upper bound on objective value for dual simplex: algorithm terminates if reached
# [type: double, advanced: false, range: [-inf, inf], default: inf]
dual_objective_value_upper_bound = inf

# Debugging level in HiGHS
# [type: int, advanced: false, range: {0, 3}, default: 0]
highs_debug_level = 0

# Strategy for simplex solver
# [type: int, advanced: false, range: {0, 4}, default: 1]
simplex_strategy = 1

# Strategy for scaling before simplex solver: off / on (0/1)
# [type: int, advanced: false, range: {0, 5}, default: 2]
simplex_scale_strategy = 2

# Strategy for simplex crash: off / LTSSF / Bixby (0/1/2)
# [type: int, advanced: false, range: {0, 9}, default: 0]
simplex_crash_strategy = 0

# Strategy for simplex dual edge weights: Dantzig / Devex / Steepest Edge (0/1/2)
# [type: int, advanced: false, range: {0, 4}, default: 2]
simplex_dual_edge_weight_strategy = 2

# Strategy for simplex primal edge weights: Dantzig / Devex (0/1)
# [type: int, advanced: false, range: {0, 1}, default: 0]
simplex_primal_edge_weight_strategy = 0

# Iteration limit for simplex solver
# [type: int, advanced: false, range: {0, 2147483647}, default: 2147483647]
simplex_iteration_limit = 2147483647

# Limit on the number of simplex UPDATE operations
# [type: int, advanced: false, range: {0, 2147483647}, default: 5000]
simplex_update_limit = 5000

# Iteration limit for IPM solver
# [type: int, advanced: false, range: {0, 2147483647}, default: 2147483647]
ipm_iteration_limit = 2147483647

# Minimum number of threads in parallel execution
# [type: int, advanced: false, range: {1, 8}, default: 1]
highs_min_threads = 1

# Maximum number of threads in parallel execution
# [type: int, advanced: false, range: {1, 8}, default: 8]
highs_max_threads = 8

# HiGHS message level: bit-mask 1 => VERBOSE; 2 => DETAILED 4 => MINIMAL
# [type: int, advanced: false, range: {0, 7}, default: 4]
message_level = 4

# Solution file
# [type: string, advanced: false, default: ""]
solution_file = 

# Write the primal and dual solution to a file
# [type: bool, advanced: false, range: {false, true}, default: false]
write_solution_to_file = false

# Write the primal and dual solution in a pretty (human-readable) format
# [type: bool, advanced: false, range: {false, true}, default: false]
write_solution_pretty = false

# MIP solver max number of nodes
# [type: int, advanced: false, range: {0, 2147483647}, default: 2147483647]
mip_max_nodes = 2147483647

# MIP solver reporting level
# [type: int, advanced: false, range: {0, 2}, default: 1]
mip_report_level = 1

# Run HiGHS simplex solver as if it were hsol
# [type: bool, advanced: true, range: {false, true}, default: false]
# run_as_hsol = false

# Use the free format MPS file reader
# [type: bool, advanced: true, range: {false, true}, default: true]
# mps_parser_type_free = true

# For multiple N-rows in MPS files: delete rows / delete entries / keep rows (-1/0/1)
# [type: int, advanced: true, range: {-1, 1}, default: -1]
keep_n_rows = -1

# Largest power-of-two factor permitted when scaling the constraint matrix for the simplex solver
# [type: int, advanced: true, range: {0, 20}, default: 10]
allowed_simplex_matrix_scale_factor = 10

# Largest power-of-two factor permitted when scaling the costs for the simplex solver
# [type: int, advanced: true, range: {0, 20}, default: 0]
allowed_simplex_cost_scale_factor = 0

# Strategy for dualising before simplex
# [type: int, advanced: true, range: {-1, 1}, default: -1]
simplex_dualise_strategy = -1

# Strategy for permuting before simplex
# [type: int, advanced: true, range: {-1, 1}, default: -1]
simplex_permute_strategy = -1

# Strategy for cleanup in dual simplex solver: none / HPrimal / HQPrimal (0/1/2)
# [type: int, advanced: true, range: {0, 2}, default: 1]
dual_simplex_cleanup_strategy = 1

# Strategy for PRICE in simplex
# [type: int, advanced: true, range: {0, 4}, default: 3]
simplex_price_strategy = 3

# Perform initial basis condition check in simplex
# [type: bool, advanced: true, range: {false, true}, default: true]
simplex_initial_condition_check = true

# Tolerance on initial basis condition in simplex
# [type: double, advanced: true, range: [1, inf], default: 1e+14]
simplex_initial_condition_tolerance = 1e+14

# Threshhold on dual steepest edge weight errors for Devex switch
# [type: double, advanced: true, range: [1, inf], default: 10]
# dual_steepest_edge_weight_log_error_threshhold = 10

# Dual simplex cost perturbation multiplier: 0 => no perturbation
# [type: double, advanced: true, range: [0, inf], default: 1]
dual_simplex_cost_perturbation_multiplier = 1

# Use original HFactor logic for sparse vs hyper-sparse TRANs
# [type: bool, advanced: true, range: {false, true}, default: true]
use_original_HFactor_logic = true

# Check whether LP is candidate for LiDSE
# [type: bool, advanced: true, range: {false, true}, default: true]
less_infeasible_DSE_check = true

# Use LiDSE if LP has right properties
# [type: bool, advanced: true, range: {false, true}, default: true]
less_infeasible_DSE_choose_row = true

# Use mip solver.
# [type: bool, advanced: true, range: {false, true}, default: false]
# mip = false

kyler1990 avatar Mar 06 '21 03:03 kyler1990

When compile HIGHS and use ipm on linux, it works. Then i get the intermediate result about the objective and variable. But the variables all equal to 0.0, the objective not equal to 0.0 and seems normal

kyler1990 avatar Mar 08 '21 09:03 kyler1990

Sorry about this. We struggle to debug issues on Windows (although we do have continuous integration tests for Windows).

Then i get the intermediate result about the objective and variable. But the variables all equal to 0.0, the objective not equal to 0.0 and seems normal

So, what is wrong?

jajhall avatar Mar 09 '21 18:03 jajhall

Sorry about this. We struggle to debug issues on Windows (although we do have continuous integration tests for Windows).

Then i get the intermediate result about the objective and variable. But the variables all equal to 0.0, the objective not equal to 0.0 and seems normal

So, what is wrong?

I'm sorry, I didn't express it clearly。I have three difficulties: 1、The recently released version of HIGHS works well on linux, but works failed on macOs. 2、When ipm solver stop early because of timeout or number of iterators exceeded, how can i get the value of all the variables? 3、When i set ipm_optimality_tolerance=1e-03, it seems not work.

kyler1990 avatar Mar 10 '21 03:03 kyler1990

Sorry about this. We struggle to debug issues on Windows (although we do have continuous integration tests for Windows).

Then i get the intermediate result about the objective and variable. But the variables all equal to 0.0, the objective not equal to 0.0 and seems normal

So, what is wrong?

I'm sorry, I didn't express it clearly。I have three difficulties: 1、The recently released version of HIGHS works well on linux, but works failed on macOs.

Thanks, we will identify MacOS problems

2、When ipm solver stop early because of timeout or number of iterators exceeded, how can i get the value of all the variables?

You can't get the values of the variables at the moment. Other users have commented on this, and it is something that will be possible soon

3、When i set ipm_optimality_tolerance=1e-03, i seems not work.

If the IPM solver is using crossover (as it does by default) to get a basic solution, then the IPM part stops when both the ipm_optimality_tolerance (default 1e-8) and the start_crossover_tolerance (default 1e-8) are both satisfied. If crossover is not used (set run_crossover=false) then the IPM solver will stop according to just ipm_optimality_tolerance.

jajhall avatar Mar 10 '21 09:03 jajhall

I am experiencing a similar problem with the IP solver on MacOS

OMP_NUM_THREADS=1 ./highs dump.mps --presolve on --solver ipm --parallel off
Running HiGHS 1.0.0 [date: 2021-05-17, git hash: cfe064e6]
Copyright (c) 2020 ERGO-Code under MIT licence terms

LP       : dump
Rows     : 111135
Cols     : 72920
Nonzeros : 4619422
Presolve : Reductions: rows 83298(-27837); columns 60606(-12314); elements 3787206(-832216)
INFO   : Solving the presolved LP
INFO   : IPX model has 83298 rows, 60606 columns and 3787206 nonzeros
Input
    Number of variables:                                60606
    Number of free variables:                           0
    Number of constraints:                              83298
    Number of equality constraints:                     7640
    Number of matrix entries:                           3787206
    Matrix range:                                       [1e-05, 1e+05]
    RHS range:                                          [7e-04, 1e+05]
    Objective range:                                    [1e-04, 5e+07]
    Bounds range:                                       [2e-05, 2e+05]
Preprocessing
    Dualized model:                                     no
    Number of dense columns:                            0
    Range of scaling factors:                           [7.81e-03, 6.40e+01]
IPX version 1.0
Interior Point Solve
 Iter     P.res    D.res            P.obj           D.obj        mu     Time
   0   7.58e+04 1.09e+05   6.73415682e+10 -2.84226011e+13  8.45e+09       3s
   1   4.64e+04 3.34e+04   5.68624990e+10 -2.62016103e+13  5.71e+09       9s
   2   2.84e+04 1.01e+04   5.29734543e+10 -2.22628149e+13  4.15e+09      14s
 Constructing starting basis...
Segmentation fault: 11

goghino avatar May 19 '21 07:05 goghino

Please send me the MPS file

jajhall avatar May 19 '21 08:05 jajhall

The MPS file is available here.

On Linux, the IP solver works fine

./highs dump.mps --presolve on --solver ipm --parallel off
Running HiGHS 1.0.0 [date: 2021-05-17, git hash: cfe064e6]
Copyright (c) 2020 ERGO-Code under MIT licence terms

LP       : dump
Rows     : 111135
Cols     : 72920
Nonzeros : 4619422
Presolve : Reductions: rows 83298(-27837); columns 60606(-12314); elements 3787206(-832216)
INFO   : Solving the presolved LP
INFO   : IPX model has 83298 rows, 60606 columns and 3787206 nonzeros
Input
    Number of variables:                                60606
    Number of free variables:                           0
    Number of constraints:                              83298
    Number of equality constraints:                     7640
    Number of matrix entries:                           3787206
    Matrix range:                                       [1e-05, 1e+05]
    RHS range:                                          [7e-04, 1e+05]
    Objective range:                                    [1e-04, 5e+07]
    Bounds range:                                       [2e-05, 2e+05]
Preprocessing
    Dualized model:                                     no
    Number of dense columns:                            0
    Range of scaling factors:                           [7.81e-03, 6.40e+01]
IPX version 1.0
Interior Point Solve
 Iter     P.res    D.res            P.obj           D.obj        mu     Time
   0   7.58e+04 1.09e+05   6.73415682e+10 -2.84226011e+13  8.45e+09       4s
   1   4.64e+04 3.34e+04   5.68624990e+10 -2.62016103e+13  5.71e+09      13s
   2   2.84e+04 1.01e+04   5.29734543e+10 -2.22628149e+13  4.15e+09      21s
 Constructing starting basis...
   3   5.95e+03 2.33e+03   5.06657385e+10 -1.37191502e+13  9.02e+08      31s
   4   1.53e+03 3.93e+02   4.10706748e+10 -7.70684869e+12  2.44e+08      36s
   5   3.78e+02 1.23e+02   3.23862134e+10 -4.81222670e+12  7.08e+07      40s
[...]
Model   status      : Optimal
Primal  status      : Feasible point
Dual    status      : Feasible point
Simplex   iterations: 1793
IPM       iterations: 54
Crossover iterations: 6406
Objective value     :  5.4870556615e+09
HiGHS run time      :        215.06

goghino avatar May 19 '21 08:05 goghino

MPS file no longer available

jajhall avatar Feb 14 '23 21:02 jajhall