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

Segfault on Mac #42

Open
kibaekkim opened this issue Jul 24, 2018 · 2 comments
Open

Segfault on Mac #42

kibaekkim opened this issue Jul 24, 2018 · 2 comments

Comments

@kibaekkim
Copy link
Collaborator

When solving the following problem on Mac, PIPS-NLP returns Segfault.

using StructJuMP

m = StructuredModel(num_scenarios=3)
@variable(m, w[i=1:3], start = 0.0)
@NLobjective(m, Min, 1.5 * sum(w[i]^2 for i=1:3))

for j in 1:3
    bl = StructuredModel(parent=m,id=j)
    if j == 1
        @variable(bl, z[i=1:2] >= 0, start = 0.0)
        @NLconstraint(bl, z[1]+z[2]==1)
        @NLobjective(bl, Min,
            - 183*w[1]*z[1] - 67*w[2]*z[1] - 250*w[3]*z[1] + 50239*z[1]^2
            - 67*w[1]*z[2] - 183*w[2]*z[2] - 250*w[3]*z[2] + 87022*z[1]*z[2] + 50239*z[2]^2
            - 56436.5961078333202749*z[1]
            - 55000.9027938333310885*z[2])
    elseif j == 2
        @variable(bl, z[i=1] >= 0, start = 0.0)
        @NLconstraint(bl, z[1]==1)
        @NLobjective(bl, Min,
            - 120*w[1]*z[1] - 80*w[2]*z[1] - 300*w[3]*z[1] + 55400*z[1]^2
            - 39798.0662713333222200*z[1])
    else
        @variable(bl, z[i=1:2] >= 0, start = 0.0)
        @NLconstraint(bl, z[1]+z[2]==1)
        @NLobjective(bl, Min,
            - 100*w[1]*z[1] - 25*w[2]*z[1] - 375*w[3]*z[1] + 75625*z[1]^2
            - 400*w[1]*z[2] - 100*w[2]*z[2] + 42500*z[1]*z[2] + 85000*z[2]^2
            - 17699.9170663333425182*z[1]
            - 8199.6667933333355904*z[2])
    end
end

status = solve(m; solver="PipsNlpSerial")
@show status
@show getObjectiveVal(m)

The PIPS results are

  -----------------------------------------------
  NLP Solver
  Argonne National Laboratory
  Lawrence Livermore National Laboratory
  2010-2018
  -----------------------------------------------
  Variables ================ 8
  Equality Constraints ===== 3
  Inequality Constraints === 0
  Variable Lower Bounds ==== 5
  Variable Upper Bounds ==== 0

  Linear system solver ------	 Ma57.

 Iter	  Objective     Inf_pr	  Inf_du     Comp    lg(mu)   ||d||   lg(PrRg)	 alpha_du   alpha_pr    LS   lg(DuRg)	AugSysErr KKTSysErr    dWd0      dWd       thd0       thd      #RegFact   #KryIt
 0	-1.7267473e+03  9.90e-01  5.46e+04  9.00e-02  -1.0
Segmentation fault: 11

But, it works fine on linux.

@cnpetra
Copy link
Collaborator

cnpetra commented Jul 24, 2018

Can you raise PIPS' print level to 3 ('prtLvl 3' in pips.parameter file) and rerun? I don't have a mac so I'll need some assistance from you in debugging this.

@kibaekkim
Copy link
Collaborator Author

This is the output with the print level 3:

load option file: pipsnlp.parameter
OPTION: Set DoIR_Aug to 1
OPTION: Set DoIR_Full to 0
OPTION: Set printing level to 3
OPTION: Set Iteration Limit to 500
OPTION: Set Convergence Tolerance to 1.00e-06
OPTION: Max Line search step:   50
OPTION: Set Sym linear solver as MA57.
OPTION: MA57 pivot level = 1.00e-04
OPTION: MA57 ordering method = 5, (see doc)
OPTION: Do IR on Aug sys.
OPTION: Set MaxIR to 10
OPTION: Set IRtol to 1.00e-12
OPTION: Require small constraint violation in SWC

  -----------------------------------------------
  NLP Solver
  Argonne National Laboratory
  Lawrence Livermore National Laboratory
  2010-2018
  -----------------------------------------------
  Variables ================ 8
  Equality Constraints ===== 3
  Inequality Constraints === 0
  Variable Lower Bounds ==== 5
  Variable Upper Bounds ==== 0

  Linear system solver ------	 Ma57.

 Iter	  Objective     Inf_pr	  Inf_du     Comp    lg(mu)   ||d||   lg(PrRg)	 alpha_du   alpha_pr    LS   lg(DuRg)	AugSysErr KKTSysErr    dWd0      dWd       thd0       thd      #RegFact   #KryIt
 0	-1.7267473e+03  9.90e-01  5.46e+04  9.00e-02  -1.0
Segmentation fault: 11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants