Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad error for small time limit #240

Closed
joaquimg opened this issue Oct 22, 2024 · 3 comments
Closed

Bad error for small time limit #240

joaquimg opened this issue Oct 22, 2024 · 3 comments

Comments

@joaquimg
Copy link
Member

Probably upstream...

But running this

import PowerModels
import HiGHS
import JuMP

out = PowerModels.solve_dc_opf(
    "pglib_opf_case2000_goc.m",
    JuMP.optimizer_with_attributes(HiGHS.Optimizer, "time_limit" => 0.1),
)

with this case: https://github.com/power-grid-lib/pglib-opf/blob/master/pglib_opf_case2000_goc.m
(it fails with others)

We get the error:

Running HiGHS 1.7.2 (git hash: 5ce7a2753): Copyright (c) 2024 HiGHS under MIT licence terms
Coefficient ranges:
  Matrix [2e-01, 1e+03]
  Cost   [8e+02, 7e+03]
  Bound  [4e-03, 1e+03]
  RHS    [2e-03, 1e+00]
  Iteration        Objective     NullspaceDim

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x2e9ebfc -- _ZN7HFactor11buildSimpleEv at C:\JG\Julia\artifacts\f54ce0478a78b7350869c753bcc0da4fef7ab901\bin\libhighs.dll (unknown line)
in expression starting at C:\Users\joaquimgarcia\Desktop\BT\sketch\powermodels\opf_dc__.jl:57
_ZN7HFactor11buildSimpleEv at C:\JG\Julia\artifacts\f54ce0478a78b7350869c753bcc0da4fef7ab901\bin\libhighs.dll (unknown line)
_ZN7HFactor5buildEP15HighsTimerClock at C:\JG\Julia\artifacts\f54ce0478a78b7350869c753bcc0da4fef7ab901\bin\libhighs.dll (unknown line)
_ZN5Basis5buildEv at C:\JG\Julia\artifacts\f54ce0478a78b7350869c753bcc0da4fef7ab901\bin\libhighs.dll (unknown line)
_ZN5BasisC1ER7RuntimeSt6vectorIiSaIiEES2_I11BasisStatusSaIS5_EES4_ at C:\JG\Julia\artifacts\f54ce0478a78b7350869c753bcc0da4fef7ab901\bin\libhighs.dll (unknown line)
_Z14solveqp_actualR8InstanceR8SettingsR21QpHotstartInformationR10StatisticsR13QpModelStatusR10QpSolutionR10HighsTimer at C:\JG\Julia\artifacts\f54ce0478a78b7350869c753bcc0da4fef7ab901\bin\libhighs.dll (unknown line)
_Z7solveqpR8InstanceR8SettingsR10StatisticsR16HighsModelStatusR10HighsBasisR13HighsSolutionR10HighsTimer at C:\JG\Julia\artifacts\f54ce0478a78b7350869c753bcc0da4fef7ab901\bin\libhighs.dll (unknown line)
_ZN5Highs11callSolveQpEv at C:\JG\Julia\artifacts\f54ce0478a78b7350869c753bcc0da4fef7ab901\bin\libhighs.dll (unknown line)
_ZN5Highs3runEv at C:\JG\Julia\artifacts\f54ce0478a78b7350869c753bcc0da4fef7ab901\bin\libhighs.dll (unknown line)
Highs_run at C:\JG\Julia\packages\HiGHS\Sufzi\src\gen\libhighs.jl:320 [inlined]
optimize! at C:\JG\Julia\packages\HiGHS\Sufzi\src\MOI_wrapper.jl:1990
optimize! at C:\JG\Julia\packages\MathOptInterface\1fRdT\src\Bridges\bridge_optimizer.jl:367 [inlined]
optimize! at C:\JG\Julia\packages\MathOptInterface\1fRdT\src\MathOptInterface.jl:122 [inlined]
optimize! at C:\JG\Julia\packages\MathOptInterface\1fRdT\src\Utilities\cachingoptimizer.jl:321
jfptr_optimizeNOT._10533 at C:\JG\Julia\compiled\v1.10\HiGHS\WFic5_2fuWB_1.dll (unknown line)
#optimize!#108 at C:\JG\Julia\packages\JuMP\6RAQ9\src\optimizer_interface.jl:595
optimize! at C:\JG\Julia\packages\JuMP\6RAQ9\src\optimizer_interface.jl:546
jfptr_optimizeNOT._13897 at C:\JG\Julia\compiled\v1.10\JuMP\DmXqY_2fuWB.dll (unknown line)
macro expansion at .\timing.jl:503 [inlined]
#optimize_model!#24 at C:\JG\Julia\packages\InfrastructureModels\C2xBM\src\core\base.jl:397
optimize_model! at C:\JG\Julia\packages\InfrastructureModels\C2xBM\src\core\base.jl:378
unknown function (ip: 000001dcfcbc093f)
#solve_model#297 at C:\JG\Julia\packages\PowerModels\Dhfhc\src\core\base.jl:37
unknown function (ip: 000001dcfcb6b7d9)
solve_model at C:\JG\Julia\packages\PowerModels\Dhfhc\src\core\base.jl:22
unknown function (ip: 000001dcfcb67a17)
#solve_model#296 at C:\JG\Julia\packages\PowerModels\Dhfhc\src\core\base.jl:18
unknown function (ip: 000001dcfcb319e8)
solve_model at C:\JG\Julia\packages\PowerModels\Dhfhc\src\core\base.jl:16 [inlined]
#solve_opf#1042 at C:\JG\Julia\packages\PowerModels\Dhfhc\src\prob\opf.jl:13 [inlined]
solve_opf at C:\JG\Julia\packages\PowerModels\Dhfhc\src\prob\opf.jl:12 [inlined]
#solve_dc_opf#1041 at C:\JG\Julia\packages\PowerModels\Dhfhc\src\prob\opf.jl:8 [inlined]
solve_dc_opf at C:\JG\Julia\packages\PowerModels\Dhfhc\src\prob\opf.jl:7
unknown function (ip: 000001dcfcaf610f)
jl_apply at C:/workdir/src\julia.h:1982 [inlined]
do_call at C:/workdir/src\interpreter.c:126
eval_value at C:/workdir/src\interpreter.c:223
eval_stmt_value at C:/workdir/src\interpreter.c:174 [inlined]
eval_body at C:/workdir/src\interpreter.c:635
jl_interpret_toplevel_thunk at C:/workdir/src\interpreter.c:775
jl_toplevel_eval_flex at C:/workdir/src\toplevel.c:934
jl_toplevel_eval_flex at C:/workdir/src\toplevel.c:877
ijl_toplevel_eval at C:/workdir/src\toplevel.c:943 [inlined]
ijl_toplevel_eval_in at C:/workdir/src\toplevel.c:985
eval at .\boot.jl:385 [inlined]
include_string at .\loading.jl:2076
_include at .\loading.jl:2136
include at .\client.jl:489
unknown function (ip: 000001dcfcaf03db)
jl_apply at C:/workdir/src\julia.h:1982 [inlined]
do_call at C:/workdir/src\interpreter.c:126
eval_value at C:/workdir/src\interpreter.c:223
eval_stmt_value at C:/workdir/src\interpreter.c:174 [inlined]
eval_body at C:/workdir/src\interpreter.c:635
jl_interpret_toplevel_thunk at C:/workdir/src\interpreter.c:775
jl_toplevel_eval_flex at C:/workdir/src\toplevel.c:934
jl_toplevel_eval_flex at C:/workdir/src\toplevel.c:877
ijl_toplevel_eval at C:/workdir/src\toplevel.c:943 [inlined]
ijl_toplevel_eval_in at C:/workdir/src\toplevel.c:985
eval at .\boot.jl:385 [inlined]
eval_user_input at C:\workdir\usr\share\julia\stdlib\v1.10\REPL\src\REPL.jl:150
repl_backend_loop at C:\workdir\usr\share\julia\stdlib\v1.10\REPL\src\REPL.jl:246
#start_repl_backend#46 at C:\workdir\usr\share\julia\stdlib\v1.10\REPL\src\REPL.jl:231
start_repl_backend at C:\workdir\usr\share\julia\stdlib\v1.10\REPL\src\REPL.jl:228
#run_repl#59 at C:\workdir\usr\share\julia\stdlib\v1.10\REPL\src\REPL.jl:389
run_repl at C:\workdir\usr\share\julia\stdlib\v1.10\REPL\src\REPL.jl:375
jfptr_run_repl_95862.1 at C:\JG\Julia\juliaup\julia-1.10.5+0.x64.w64.mingw32\lib\julia\sys.dll (unknown line)
#1013 at .\client.jl:432
jfptr_YY.1013_86638.1 at C:\JG\Julia\juliaup\julia-1.10.5+0.x64.w64.mingw32\lib\julia\sys.dll (unknown line)
jl_apply at C:/workdir/src\julia.h:1982 [inlined]
jl_f__call_latest at C:/workdir/src\builtins.c:812
#invokelatest#2 at .\essentials.jl:892 [inlined]
invokelatest at .\essentials.jl:889 [inlined]
run_main_repl at .\client.jl:416
exec_options at .\client.jl:333
_start at .\client.jl:552
jfptr__start_86663.1 at C:\JG\Julia\juliaup\julia-1.10.5+0.x64.w64.mingw32\lib\julia\sys.dll (unknown line)
jl_apply at C:/workdir/src\julia.h:1982 [inlined]
true_main at C:/workdir/src\jlapi.c:582
jl_repl_entrypoint at C:/workdir/src\jlapi.c:731
mainCRTStartup at C:/workdir/cli\loader_exe.c:58
BaseThreadInitThunk at C:\WINDOWS\System32\KERNEL32.DLL (unknown line)
RtlUserThreadStart at C:\WINDOWS\SYSTEM32\ntdll.dll (unknown line)
Allocations: 26827043 (Pool: 26805920; Big: 21123); GC: 37
@odow
Copy link
Member

odow commented Oct 23, 2024

I can reproduce with [email protected]

Running HiGHS 1.8.0 (git hash: fcfb53414): Copyright (c) 2024 HiGHS under MIT licence terms
Coefficient ranges:
  Matrix [2e-01, 1e+03]
  Cost   [8e+02, 7e+03]
  Bound  [4e-03, 1e+03]
  RHS    [2e-03, 1e+00]
  Iteration        Objective     NullspaceDim

[1610] signal (11.1): Segmentation fault: 11
in expression starting at REPL[6]:1
_ZN7HFactor11buildSimpleEv at /Users/oscar/.julia/artifacts/6c052094bcce703903faeccc27a66f3453fd061e/lib/libhighs.1.8.dylib (unknown line)
_ZN7HFactor5buildEP15HighsTimerClock at /Users/oscar/.julia/artifacts/6c052094bcce703903faeccc27a66f3453fd061e/lib/libhighs.1.8.dylib (unknown line)
_ZN5Basis5buildEv at /Users/oscar/.julia/artifacts/6c052094bcce703903faeccc27a66f3453fd061e/lib/libhighs.1.8.dylib (unknown line)
_ZN5BasisC2ER7RuntimeNSt3__16vectorIiNS2_9allocatorIiEEEENS3_I11BasisStatusNS4_IS7_EEEES6_ at /Users/oscar/.julia/artifacts/6c052094bcce703903faeccc27a66f3453fd061e/lib/libhighs.1.8.dylib (unknown line)
_Z14solveqp_actualR8InstanceR8SettingsR21QpHotstartInformationR10StatisticsR13QpModelStatusR10QpSolutionR10HighsTimer at /Users/oscar/.julia/artifacts/6c052094bcce703903faeccc27a66f3453fd061e/lib/libhighs.1.8.dylib (unknown line)
_Z7solveqpR8InstanceR8SettingsR10StatisticsR16HighsModelStatusR10HighsBasisR13HighsSolutionR10HighsTimer at /Users/oscar/.julia/artifacts/6c052094bcce703903faeccc27a66f3453fd061e/lib/libhighs.1.8.dylib (unknown line)
_ZN5Highs11callSolveQpEv at /Users/oscar/.julia/artifacts/6c052094bcce703903faeccc27a66f3453fd061e/lib/libhighs.1.8.dylib (unknown line)
_ZN5Highs3runEv at /Users/oscar/.julia/artifacts/6c052094bcce703903faeccc27a66f3453fd061e/lib/libhighs.1.8.dylib (unknown line)
Highs_run at /Users/oscar/.julia/packages/HiGHS/Sufzi/src/gen/libhighs.jl:320 [inlined]
optimize! at /Users/oscar/.julia/packages/HiGHS/Sufzi/src/MOI_wrapper.jl:1990
optimize! at /Users/oscar/.julia/packages/MathOptInterface/kRheF/src/Bridges/bridge_optimizer.jl:367 [inlined]
optimize! at /Users/oscar/.julia/packages/MathOptInterface/kRheF/src/MathOptInterface.jl:122 [inlined]
optimize! at /Users/oscar/.julia/packages/MathOptInterface/kRheF/src/Utilities/cachingoptimizer.jl:321
jfptr_optimizeNOT._10500 at /Users/oscar/.julia/compiled/v1.10/HiGHS/WFic5_zCMgQ.dylib (unknown line)
_jl_invoke at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-grannysmith-C07ZQ07FJYVY.0/build/default-grannysmith-C07ZQ07FJYVY-0/julialang/julia-release-1-dot-10/src/gf.c:0 [inlined]

@odow
Copy link
Member

odow commented Oct 23, 2024

Upstream:

import PowerModels
import HiGHS
import JuMP

model = JuMP.Model()
out = PowerModels.solve_dc_opf(
    "pglib_opf_case2000_goc.m",
    HiGHS.Optimizer;
    jump_model = model,
)
HiGHS.Highs_writeModel(JuMP.unsafe_backend(model), "time_crash.mps")

julia> HiGHS_jll.highs() do exe
       run(`$exe time_crash.mps --time_limit 0.1`)
       end
Running HiGHS 1.8.0 (git hash: fcfb53414): Copyright (c) 2024 HiGHS under MIT licence terms
QP   time_crash has 8440 rows; 5871 cols; 24016 matrix nonzeros; 5871 Hessian nonzeros
Coefficient ranges:
  Matrix [2e-01, 1e+03]
  Cost   [8e+02, 7e+03]
  Bound  [4e-03, 1e+03]
  RHS    [2e-03, 1e+00]
  Iteration        Objective     NullspaceDim
ERROR: failed process: Process(`/Users/oscar/.julia/artifacts/6c052094bcce703903faeccc27a66f3453fd061e/bin/highs time_crash.mps --time_limit 0.1`, ProcessSignaled(11)) [0]

Stacktrace:
  [1] pipeline_error
    @ ./process.jl:565 [inlined]
  [2] run(::Cmd; wait::Bool)
    @ Base ./process.jl:480
  [3] run
    @ ./process.jl:477 [inlined]
  [4] (::var"#9#10")(exe::String)
    @ Main ./REPL[22]:2
  [5] (::JLLWrappers.var"#2#3"{var"#9#10", String})()
    @ JLLWrappers ~/.julia/packages/JLLWrappers/jXOYx/src/runtime.jl:49
  [6] withenv(::JLLWrappers.var"#2#3"{var"#9#10", String}, ::Pair{String, String}, ::Vararg{Pair{String, String}})
    @ Base ./env.jl:257
  [7] 
    @ JLLWrappers ~/.julia/packages/JLLWrappers/jXOYx/src/runtime.jl:48
  [8] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::@Kwargs{})
    @ Base ./essentials.jl:892
  [9] invokelatest(::Any, ::Any, ::Vararg{Any})
    @ Base ./essentials.jl:889
 [10] highs(f::Function; adjust_PATH::Bool, adjust_LIBPATH::Bool)
    @ HiGHS_jll ~/.julia/packages/JLLWrappers/jXOYx/src/products/executable_generators.jl:28
 [11] highs(f::Function)
    @ HiGHS_jll ~/.julia/packages/JLLWrappers/jXOYx/src/products/executable_generators.jl:25
 [12] top-level scope
    @ REPL[22]:1
Some type information was truncated. Use `show(err)` to see complete types.

@odow
Copy link
Member

odow commented Oct 23, 2024

Closing in favor of ERGO-Code/HiGHS#1990

@odow odow closed this as completed Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants