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

unable to get Ipopt on Arch Linux #665

Closed
BrannonKing opened this issue Apr 29, 2023 · 10 comments
Closed

unable to get Ipopt on Arch Linux #665

BrannonKing opened this issue Apr 29, 2023 · 10 comments

Comments

@BrannonKing
Copy link

BrannonKing commented Apr 29, 2023

I'm unable to install Ipopt with mumps on Arch these days. It's in the AUR, but the build in the AUR fails with a broken unit test. It's current code, too. If I try to compile it manually, it won't find mumps, even though mumps is installed. If I specify blank linker flags for mumps, it does find it, but the build then fails with incompatible MPI libraries, with or without openMPI installed. It should not be this painful. Can we ditch the mumps and MPI dependencies? The only reason I'm trying to install this is for SCIP to build; SCIP says it needs Ipopt with mumps.

@svigerske
Copy link
Member

The build from AUR seems to run through on my system, including tests.

Running unitTests...
 
Testing AMPL Solver Executable...
    Test passed!
Testing C++ Example...
    Test passed!
Testing C Example...
    Test passed!
Testing Fortran Example...
    Test passed!
Skip testing Java Example (Java interface not build)
Testing sIpopt Example parametric_cpp...
    Test passed!
Testing sIpopt Example redhess_cpp...
    Test passed!
Testing EmptyNLP Example...
    Test passed!
Testing GetCurr Example...
    Test passed!

If building Ipopt from source, I would suggest to also build Mumps from source using https://github.com/coin-or-tools/ThirdParty-Mumps/.
However, using the right one from AUR should also work.

  • mumps is a parallel version with a MPI dependency. I think it will work if you also use MPI compilers for Ipopt. I think I had this working once with CC=mpicc CXX=mpic++ F77=mpif77 FC=mpif90 --with-mumps-lflags=-ldmumps. But you'll probably then have to also change how SCIP is build to use this Ipopt.
  • mumps-seq-shared is a sequential version of MUMPS without MPI dependency. Sounds promising.
  • coin-or-coinmumps uses the buildsystem from https://github.com/coin-or-tools/ThirdParty-Mumps/ to build a variant of Mumps without MPI. This is the buildsystem that is also suggested in the Ipopt installation instructions

SCIP does not require that Ipopt uses MUMPS. Any linear solver supported by Ipopt will be ok. The HSL solvers are usually a good option, but they aren't free to redistribute.

@BrannonKing
Copy link
Author

BrannonKing commented May 2, 2023

Here's my test log (that shows with AUR and with local build of current source):

./run_unitTests
 
Running unitTests...
 
Testing AMPL Solver Executable...
./run_unitTests: line 21: 237263 Segmentation fault      (core dumped) $@ > tmpfile 2>&1
0 
 ---- 8< ---- Start of test program output ---- 8< ----
 ---- 8< ----  End of test program output  ---- 8< ----
 
    ******** Test FAILED! ********
Test program existed with nonzero status.
Testing C++ Example...
./run_unitTests: line 21: 237284 Segmentation fault      (core dumped) $@ > tmpfile 2>&1
0 
 ---- 8< ---- Start of test program output ---- 8< ----
 ---- 8< ----  End of test program output  ---- 8< ----
 
    ******** Test FAILED! ********
Test program existed with nonzero status.
Testing C Example...
./run_unitTests: line 21: 237305 Segmentation fault      (core dumped) $@ > tmpfile 2>&1
0 
 ---- 8< ---- Start of test program output ---- 8< ----
 ---- 8< ----  End of test program output  ---- 8< ----
 
    ******** Test FAILED! ********
Test program existed with nonzero status.
Testing Fortran Example...
./run_unitTests: line 21: 237331 Segmentation fault      (core dumped) $@ > tmpfile 2>&1
0 
 ---- 8< ---- Start of test program output ---- 8< ----

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x7f968a051f4f in ???
#1  0x7f96881c3f1a in ???
#2  0x7f9689d00d2c in ???
#3  0x7f9689d0ae2c in ???
#4  0x7f9689d3a089 in ???
#5  0x7f9689ceaf35 in ???
#6  0x7f9689cfcc39 in ???
#7  0x7f9689d85990 in ???
#8  0x7f9689d8b633 in ???
#9  0x7f9689c5328e in ???
#10  0x7f968a75d4bc in ???
#11  0x7f968a764254 in ???
#12  0x7f968a725ed1 in ???
#13  0x7f968a714ddc in ???
#14  0x7f968a68de50 in ???
#15  0x7f968a6d30eb in ???
#16  0x7f968a69fd2b in ???
#17  0x7f968a6a30ce in ???
#18  0x7f968a6b1fb7 in ???
#19  0x7f968a6b31c9 in ???
#20  0x7f968a734100 in ???
#21  0x7f968a7361d7 in ???
#22  0x7f968a72f32b in ???
#23  0x7f968a732cb0 in ???
#24  0x5570b4c30886 in ???
#25  0x5570b4c3017e in ???
#26  0x7f968a03c78f in ???
#27  0x7f968a03c849 in ???
#28  0x5570b4c301a4 in ???
#29  0xffffffffffffffff in ???
 ---- 8< ----  End of test program output  ---- 8< ----
 
    ******** Test FAILED! ********
Test program existed with nonzero status.
Skip testing Java Example (Java interface not build)
Testing sIpopt Example parametric_cpp...
./run_unitTests: line 21: 237355 Segmentation fault      (core dumped) $@ > tmpfile 2>&1
0 
 ---- 8< ---- Start of test program output ---- 8< ----
 ---- 8< ----  End of test program output  ---- 8< ----
 
    ******** Test FAILED! ********
Test program existed with nonzero status.
Testing sIpopt Example redhess_cpp...
./run_unitTests: line 21: 237376 Segmentation fault      (core dumped) $@ > tmpfile 2>&1
0 
 ---- 8< ---- Start of test program output ---- 8< ----
 ---- 8< ----  End of test program output  ---- 8< ----
 
    ******** Test FAILED! ********
Test program existed with nonzero status.
Testing EmptyNLP Example...
./run_unitTests: line 21: 237399 Segmentation fault      (core dumped) $@ > tmpfile 2>&1
0 
 ---- 8< ---- Start of test program output ---- 8< ----

*** Solve for 0 variables, 0 feasible constraint, feasible bounds

******************************************************************************
This program contains Ipopt, a library for large-scale nonlinear optimization.
 Ipopt is released as open source code under the Eclipse Public License (EPL).
         For more information visit https://github.com/coin-or/Ipopt
******************************************************************************

This is Ipopt version 3.14.12, running with linear solver MUMPS 5.5.1.

Number of nonzeros in equality constraint Jacobian...:        0
Number of nonzeros in inequality constraint Jacobian.:        0
Number of nonzeros in Lagrangian Hessian.............:        0

Total number of variables............................:        0
                     variables with only lower bounds:        0
                variables with lower and upper bounds:        0
                     variables with only upper bounds:        0
Total number of equality constraints.................:        0
Total number of inequality constraints...............:        0
        inequality constraints with only lower bounds:        0
   inequality constraints with lower and upper bounds:        0
        inequality constraints with only upper bounds:        0

iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
   0  0.0000000e+00 0.00e+00 0.00e+00  -1.0 0.00e+00    -  0.00e+00 0.00e+00   0

Number of Iterations....: 0

                                   (scaled)                 (unscaled)
Objective...............:   0.0000000000000000e+00    0.0000000000000000e+00
Dual infeasibility......:   0.0000000000000000e+00    0.0000000000000000e+00
Constraint violation....:   0.0000000000000000e+00    0.0000000000000000e+00
Variable bound violation:   0.0000000000000000e+00    0.0000000000000000e+00
Complementarity.........:   0.0000000000000000e+00    0.0000000000000000e+00
Overall NLP error.......:   0.0000000000000000e+00    0.0000000000000000e+00


Number of objective function evaluations             = 1
Number of objective gradient evaluations             = 1
Number of equality constraint evaluations            = 0
Number of inequality constraint evaluations          = 0
Number of equality constraint Jacobian evaluations   = 0
Number of inequality constraint Jacobian evaluations = 0
Number of Lagrangian Hessian evaluations             = 0
Total seconds in IPOPT                               = 0.000

EXIT: Optimal Solution Found.
Finalize called
x =
z_L =
z_U =
lambda =


The problem solved in 0 iterations!


The final value of the objective function is 0.

*** Solve for 0 variables, 1 feasible constraint, feasible bounds
This is Ipopt version 3.14.12, running with linear solver MUMPS 5.5.1.

Number of nonzeros in equality constraint Jacobian...:        0
Number of nonzeros in inequality constraint Jacobian.:        0
Number of nonzeros in Lagrangian Hessian.............:        0

Total number of variables............................:        0
                     variables with only lower bounds:        0
                variables with lower and upper bounds:        0
                     variables with only upper bounds:        0
Total number of equality constraints.................:        0
Total number of inequality constraints...............:        1
        inequality constraints with only lower bounds:        1
   inequality constraints with lower and upper bounds:        0
        inequality constraints with only upper bounds:        0

iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
   0  0.0000000e+00 0.00e+00 1.00e+00  -1.0 0.00e+00    -  0.00e+00 0.00e+00   0

Number of Iterations....: 0

                                   (scaled)                 (unscaled)
Objective...............:   0.0000000000000000e+00    0.0000000000000000e+00
Dual infeasibility......:   1.0000000000000000e+00    1.0000000000000000e+00
Constraint violation....:   0.0000000000000000e+00    0.0000000000000000e+00
Variable bound violation:   0.0000000000000000e+00    0.0000000000000000e+00
Complementarity.........:   1.0000000000000000e-02    1.0000000000000000e-02
Overall NLP error.......:   1.0000000000000000e+00    1.0000000000000000e+00


Number of objective function evaluations             = 1
Number of objective gradient evaluations             = 1
Number of equality constraint evaluations            = 0
Number of inequality constraint evaluations          = 1
Number of equality constraint Jacobian evaluations   = 0
Number of inequality constraint Jacobian evaluations = 1
Number of Lagrangian Hessian evaluations             = 0
Total seconds in IPOPT                               = 0.000

EXIT: Optimal Solution Found.
Finalize called
x =
z_L =
z_U =
lambda = 0


The problem solved in 0 iterations!


The final value of the objective function is 0.

*** Solve for 5 variables, 1 feasible constraint, feasible bounds
This is Ipopt version 3.14.12, running with linear solver MUMPS 5.5.1.

Number of nonzeros in equality constraint Jacobian...:        0
Number of nonzeros in inequality constraint Jacobian.:        0
Number of nonzeros in Lagrangian Hessian.............:        0

Total number of variables............................:        0
                     variables with only lower bounds:        0
                variables with lower and upper bounds:        0
                     variables with only upper bounds:        0
Total number of equality constraints.................:        0
Total number of inequality constraints...............:        1
        inequality constraints with only lower bounds:        1
   inequality constraints with lower and upper bounds:        0
        inequality constraints with only upper bounds:        0

iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
   0  0.0000000e+00 0.00e+00 1.00e+00  -1.0 0.00e+00    -  0.00e+00 0.00e+00   0

Number of Iterations....: 0

                                   (scaled)                 (unscaled)
Objective...............:   0.0000000000000000e+00    0.0000000000000000e+00
Dual infeasibility......:   1.0000000000000000e+00    1.0000000000000000e+00
Constraint violation....:   0.0000000000000000e+00    0.0000000000000000e+00
Variable bound violation:   0.0000000000000000e+00    0.0000000000000000e+00
Complementarity.........:   1.0000000000000000e-02    1.0000000000000000e-02
Overall NLP error.......:   1.0000000000000000e+00    1.0000000000000000e+00


Number of objective function evaluations             = 1
Number of objective gradient evaluations             = 1
Number of equality constraint evaluations            = 0
Number of inequality constraint evaluations          = 1
Number of equality constraint Jacobian evaluations   = 0
Number of inequality constraint Jacobian evaluations = 1
Number of Lagrangian Hessian evaluations             = 0
Total seconds in IPOPT                               = 0.000

EXIT: Optimal Solution Found.
Finalize called
x = 0 0 0 0 0
z_L = 1 1 1 1 1
z_U = 0 0 0 0 0
lambda = 0


The problem solved in 0 iterations!


The final value of the objective function is 0.

*** Solve for 0 variables, 1 infeasible constraint, feasible bounds
This is Ipopt version 3.14.12, running with linear solver MUMPS 5.5.1.

Number of nonzeros in equality constraint Jacobian...:        0
Number of nonzeros in inequality constraint Jacobian.:        0
Number of nonzeros in Lagrangian Hessian.............:        0

Total number of variables............................:        0
                     variables with only lower bounds:        0
                variables with lower and upper bounds:        0
                     variables with only upper bounds:        0
Total number of equality constraints.................:        0
Total number of inequality constraints...............:        1
        inequality constraints with only lower bounds:        1
   inequality constraints with lower and upper bounds:        0
        inequality constraints with only upper bounds:        0


Number of Iterations....: 0

                                   (scaled)                 (unscaled)
Objective...............:   0.0000000000000000e+00    0.0000000000000000e+00
Dual infeasibility......:   1.0000000000000000e+00    1.0000000000000000e+00
Constraint violation....:   9.9999998999999995e-01    9.9999998999999995e-01
Variable bound violation:   0.0000000000000000e+00    0.0000000000000000e+00
Complementarity.........:   9.9999999999998979e-03    9.9999999999998979e-03
Overall NLP error.......:   1.0000000000000000e+00    1.0000000000000000e+00


Number of objective function evaluations             = 1
Number of objective gradient evaluations             = 1
Number of equality constraint evaluations            = 0
Number of inequality constraint evaluations          = 1
Number of equality constraint Jacobian evaluations   = 0
Number of inequality constraint Jacobian evaluations = 1
Number of Lagrangian Hessian evaluations             = 0
Total seconds in IPOPT                               = 0.000

EXIT: Converged to a point of local infeasibility. Problem may be infeasible.
Finalize called
x =
z_L =
z_U =
lambda = 0


The problem solved in 0 iterations!


The final value of the objective function is 0.

*** Solve for 5 variables, 1 infeasible constraint, feasible bounds
This is Ipopt version 3.14.12, running with linear solver MUMPS 5.5.1.

Number of nonzeros in equality constraint Jacobian...:        0
Number of nonzeros in inequality constraint Jacobian.:        0
Number of nonzeros in Lagrangian Hessian.............:        0

Total number of variables............................:        0
                     variables with only lower bounds:        0
                variables with lower and upper bounds:        0
                     variables with only upper bounds:        0
Total number of equality constraints.................:        0
Total number of inequality constraints...............:        1
        inequality constraints with only lower bounds:        1
   inequality constraints with lower and upper bounds:        0
        inequality constraints with only upper bounds:        0


Number of Iterations....: 0

                                   (scaled)                 (unscaled)
Objective...............:   0.0000000000000000e+00    0.0000000000000000e+00
Dual infeasibility......:   1.0000000000000000e+00    1.0000000000000000e+00
Constraint violation....:   9.9999998999999995e-01    9.9999998999999995e-01
Variable bound violation:   0.0000000000000000e+00    0.0000000000000000e+00
Complementarity.........:   9.9999999999998979e-03    9.9999999999998979e-03
Overall NLP error.......:   1.0000000000000000e+00    1.0000000000000000e+00


Number of objective function evaluations             = 1
Number of objective gradient evaluations             = 1
Number of equality constraint evaluations            = 0
Number of inequality constraint evaluations          = 1
Number of equality constraint Jacobian evaluations   = 0
Number of inequality constraint Jacobian evaluations = 1
Number of Lagrangian Hessian evaluations             = 0
Total seconds in IPOPT                               = 0.000

EXIT: Converged to a point of local infeasibility. Problem may be infeasible.
Finalize called
x = 0 0 0 0 0
z_L = 1 1 1 1 1
z_U = 0 0 0 0 0
lambda = 0


The problem solved in 0 iterations!


The final value of the objective function is 0.

*** Solve for 5 variables, 1 feasible constraint, infeasible bounds
This is Ipopt version 3.14.12, running with linear solver MUMPS 5.5.1.


EXIT: Problem has inconsistent variable bounds or constraint sides.

*** Solve with 2 variables and rhs=0.
This is Ipopt version 3.14.12, running with linear solver MUMPS 5.5.1.

Number of nonzeros in equality constraint Jacobian...:        3
Number of nonzeros in inequality constraint Jacobian.:        0
Number of nonzeros in Lagrangian Hessian.............:        0

Total number of variables............................:        2
                     variables with only lower bounds:        0
                variables with lower and upper bounds:        2
                     variables with only upper bounds:        0
Total number of equality constraints.................:        2
Total number of inequality constraints...............:        0
        inequality constraints with only lower bounds:        0
   inequality constraints with lower and upper bounds:        0
        inequality constraints with only upper bounds:        0

iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
   0  1.9800000e+00 1.98e+00 1.00e+00  -1.0 0.00e+00    -  0.00e+00 0.00e+00   0
 ---- 8< ----  End of test program output  ---- 8< ----
 
    ******** Test FAILED! ********
Test program existed with nonzero status.
Testing GetCurr Example...
./run_unitTests: line 21: 237422 Segmentation fault      (core dumped) $@ > tmpfile 2>&1
0 
 ---- 8< ---- Start of test program output ---- 8< ----
 ---- 8< ----  End of test program output  ---- 8< ----
 
    ******** Test FAILED! ********
Test program existed with nonzero status.
make[1]: *** [Makefile:818: test] Error 1
make[1]: Leaving directory '/home/brannon/.cache/yay/coin-or-ipopt/src/build/test'
make: *** [Makefile:849: test] Error 2
==> ERROR: A failure occurred in check().
    Aborting...
 -> error making: coin-or-ipopt-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
coin-or-ipopt - exit status 4

@svigerske
Copy link
Member

svigerske commented May 2, 2023

Difficult for me to say why this goes wrong. If you can reproduce via

cd /home/brannon/.cache/yay/coin-or-ipopt/src/build/test
./hs071_cpp

then that brings you closer to something you can debug.

Sometimes, these kind of problems occur when the wrong variant of a library is loaded, e.g., not the Ipopt library from /home/brannon/.cache/yay/coin-or-ipopt/src/build/src/.libs, but from somewhere else in the system.
LD_DEBUG=libs ./hs071_cpp may give some clue.

@BrannonKing
Copy link
Author

It looks like an OpenBLAS issue. I got a backtrace:

Program received signal SIGSEGV, Segmentation fault.
dgemmt_ (UPLO=0x7ffff7a60ad0 "U", TRANSA=0x7ffff7a51562 "N", TRANSB=0x7ffff7a51562 "N", M=<optimized out>, N=<optimized out>, K=0x7ffff7a572c8, 
    Alpha=0x7ffff77d3018, a=0x7fffffff93c0, ldA=0x7ffff77d3020, b=0x7fffffff93c0, ldB=0x7fffffff90c0, Beta=0x7ffff77d3028, c=0x7fffffff93c0, ldC=0x1)
    at /usr/src/debug/openblas/OpenBLAS-0.3.23/interface/gemmt.c:112
Downloading source file /usr/src/debug/openblas/OpenBLAS-0.3.23/interface/gemmt.c
112             ldc = *ldC;                                                                                                                                        
(gdb) bt
#0  dgemmt_ (UPLO=0x7ffff7a60ad0 "U", TRANSA=0x7ffff7a51562 "N", TRANSB=0x7ffff7a51562 "N", M=<optimized out>, N=<optimized out>, K=0x7ffff7a572c8, 
    Alpha=0x7ffff77d3018, a=0x7fffffff93c0, ldA=0x7ffff77d3020, b=0x7fffffff93c0, ldB=0x7fffffff90c0, Beta=0x7ffff77d3028, c=0x7fffffff93c0, ldC=0x1)
    at /usr/src/debug/openblas/OpenBLAS-0.3.23/interface/gemmt.c:112
#1  0x00007ffff7900d2d in __dmumps_fac_front_aux_m_MOD_dmumps_fac_t_ldlt () from /usr/lib/libcoinmumps.so.3
#2  0x00007ffff790ae2d in __dmumps_fac1_ldlt_m_MOD_dmumps_fac1_ldlt () from /usr/lib/libcoinmumps.so.3
#3  0x00007ffff793a08a in __dmumps_fac_par_m_MOD_dmumps_fac_par () from /usr/lib/libcoinmumps.so.3
#4  0x00007ffff78eaf36 in dmumps_fac_b_ () from /usr/lib/libcoinmumps.so.3
#5  0x00007ffff78fcc3a in dmumps_fac_driver_ () from /usr/lib/libcoinmumps.so.3
#6  0x00007ffff7985991 in dmumps_ () from /usr/lib/libcoinmumps.so.3
#7  0x00007ffff798b634 in dmumps_f77_ () from /usr/lib/libcoinmumps.so.3
#8  0x00007ffff785328f in dmumps_c () from /usr/lib/libcoinmumps.so.3
#9  0x00007ffff7dc945e in Ipopt::MumpsSolverInterface::Factorization(bool, int) () from /usr/lib/libipopt.so.3
#10 0x00007ffff7dc8db6 in Ipopt::MumpsSolverInterface::MultiSolve(bool, int const*, int const*, int, double*, bool, int) () from /usr/lib/libipopt.so.3
#11 0x00007ffff7d773ad in Ipopt::TSymLinearSolver::MultiSolve(Ipopt::SymMatrix const&, std::vector<Ipopt::SmartPtr<Ipopt::Vector const>, std::allocator<Ipopt::SmartPtr<Ipopt::Vector const> > >&, std::vector<Ipopt::SmartPtr<Ipopt::Vector>, std::allocator<Ipopt::SmartPtr<Ipopt::Vector> > >&, bool, int) ()
   from /usr/lib/libipopt.so.3
#12 0x00007ffff7d6ae2f in Ipopt::StdAugSystemSolver::MultiSolve(Ipopt::SymMatrix const*, double, Ipopt::Vector const*, double, Ipopt::Vector const*, double, Ipopt::Matrix const*, Ipopt::Vector const*, double, Ipopt::Matrix const*, Ipopt::Vector const*, double, std::vector<Ipopt::SmartPtr<Ipopt::Vector const>, std::allocator<Ipopt::SmartPtr<Ipopt::Vector const> > >&, std::vector<Ipopt::SmartPtr<Ipopt::Vector const>, std::allocator<Ipopt::SmartPtr<Ipopt::Vector const> > >&, std::vector<Ipopt::SmartPtr<Ipopt::Vector const>, std::allocator<Ipopt::SmartPtr<Ipopt::Vector const> > >&, std::vector<Ipopt::SmartPtr<Ipopt::Vector const>, std::allocator<Ipopt::SmartPtr<Ipopt::Vector const> > >&, std::vector<Ipopt::SmartPtr<Ipopt::Vector>, std::allocator<Ipopt::SmartPtr<Ipopt::Vector> > >&, std::vector<Ipopt::SmartPtr<Ipopt::Vector>, std::allocator<Ipopt::SmartPtr<Ipopt::Vector> > >&, std::vector<Ipopt::SmartPtr<Ipopt::Vector>, std::allocator<Ipopt::SmartPtr<Ipopt::Vector> > >&, std::vector<Ipopt::SmartPtr<Ipopt::Vector>, std::allocator<Ipopt::SmartPtr<Ipopt::Vector> > >&, bool, int) () from /usr/lib/libipopt.so.3
#13 0x00007ffff7cce109 in Ipopt::AugSystemSolver::Solve(Ipopt::SymMatrix const*, double, Ipopt::Vector const*, double, Ipopt::Vector const*, double, Ipopt::Matrix const*, Ipopt::Vector const*, double, Ipopt::Matrix const*, Ipopt::Vector const*, double, Ipopt::Vector const&, Ipopt::Vector const&, Ipopt::Vector const&, Ipopt::Vector const&, Ipopt::Vector&, Ipopt::Vector&, Ipopt::Vector&, Ipopt::Vector&, bool, int) () from /usr/lib/libipopt.so.3
#14 0x00007ffff7d12ba8 in Ipopt::LeastSquareMultipliers::CalculateMultipliers(Ipopt::Vector&, Ipopt::Vector&) () from /usr/lib/libipopt.so.3
#15 0x00007ffff7cdd2a7 in Ipopt::DefaultIterateInitializer::least_square_mults(Ipopt::Journalist const&, Ipopt::IpoptNLP&, Ipopt::IpoptData&, Ipopt::IpoptCalculatedQuantities&, Ipopt::SmartPtr<Ipopt::EqMultiplierCalculator> const&, double) () from /usr/lib/libipopt.so.3
#16 0x00007ffff7cde995 in Ipopt::DefaultIterateInitializer::SetInitialIterates() () from /usr/lib/libipopt.so.3
#17 0x00007ffff7cef784 in Ipopt::IpoptAlgorithm::InitializeIterates() () from /usr/lib/libipopt.so.3
#18 0x00007ffff7cf408c in Ipopt::IpoptAlgorithm::Optimize(bool) () from /usr/lib/libipopt.so.3
#19 0x00007ffff7d8d5d7 in Ipopt::IpoptApplication::call_optimize() () from /usr/lib/libipopt.so.3
#20 0x00007ffff7d8f8da in Ipopt::IpoptApplication::OptimizeNLP(Ipopt::SmartPtr<Ipopt::NLP> const&, Ipopt::SmartPtr<Ipopt::AlgorithmBuilder>&) ()
   from /usr/lib/libipopt.so.3
#21 0x00007ffff7d8b762 in Ipopt::IpoptApplication::OptimizeNLP(Ipopt::SmartPtr<Ipopt::NLP> const&) () from /usr/lib/libipopt.so.3
#22 0x0000555555558a58 in run(bool, bool, bool, bool) ()
#23 0x0000555555558cea in main ()

@BrannonKing
Copy link
Author

pacman -Q | grep -i blas
cblas 3.11.0-2
openblas 0.3.23-1

I'm not sure why I need or have both cblas and openblas. I doubt I need two. Maybe OpenBLAS requires more/separate initialization/cleanup?

@svigerske
Copy link
Member

svigerske commented May 2, 2023

cblas is just a C wrapper for blas. It's not used by Mumps or Ipopt.

It's confusing that gdb says the libs are in /usr/lib/, when the problem was with the not-yet-installed build in /home/brannon/.cache/yay/coin-or-ipopt/src/build

I have only package blas and not openblas on my system. So maybe that's why I couldn't reproduce.

@BrannonKing
Copy link
Author

It's confusing that gdb says the libs are in /usr/lib/...

I do have Ipopt installed. I guess when you run the .libs/getcurr out of context (via gdb) it doesn't know where to pull shared libs from. I just ran it again with the correct LD_LIBRARY_PATH for the Ipopt debug build. It still calls out to the installed /usr/lib/libcoinmumps and fails in the same place.

@mmuetzel
Copy link

mmuetzel commented May 2, 2023

The last argument of dgemmt_ is a blasint *. The address that seems to be passed is 0x1.
You are likely passing an integer by value (instead of by address) in __dmumps_fac_front_aux_m_MOD_dmumps_fac_t_ldlt () from /usr/lib/libcoinmumps.so.3 (or somewhere further down the stack).

@mmuetzel
Copy link

mmuetzel commented May 2, 2023

Nevermind. This is OpenMathLib/OpenBLAS#4005.
A fixed version hasn't been released yet afaict.

@svigerske
Copy link
Member

Yes, I can reproduce with openblas 0.3.23.

The dgemmt call in __dmumps_fac_front_aux_m_MOD_dmumps_fac_t_ldlt is

         CALL dgemmt('U', 'N', 'N', NFRONT-NASS, NPIV,
     &                ALPHA, A( UPOS ), LDA,
     &                A( LPOS ), LDA,
     &                BETA,
     &                A( APOS ), LDA )

So there are only two integers between the first three char* and the double* (ALPHA). But openblas expects three.

So one workaround would be to switch to package blas until a fixed openblas is available.

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

3 participants