coin-or / Ipopt

COIN-OR Interior Point Optimizer IPOPT
https://coin-or.github.io/Ipopt
Other
1.41k stars 281 forks source link

MA27 solver interface #738

Closed ingu119 closed 8 months ago

ingu119 commented 8 months ago

Hello, the subroutine MA27CD is defined by SUBROUTINE MA27CD(N,A,LA,IW,LIW,W,MAXFRT,RHS,IW1,NSTEPS,ICNTL,INFO), so the last argument INFO is an integer array with 20 elements. But Ipopt seems to call ma27c with the CNTL double-array as the last argument. See https://github.com/coin-or/Ipopt/blob/stable/3.14/src/Algorithm/LinearSolvers/IpMa27TSolverInterface.hpp#L64 and https://github.com/coin-or/Ipopt/blob/stable/3.14/src/Algorithm/LinearSolvers/IpMa27TSolverInterface.cpp#L695.

With most compilers it works fine, but I got some problems with cross-compiling when I convert MA27 with f2c. In the IpMA57TSolverInterface everything is fine by the way.

Best regards Ingmar

svigerske commented 8 months ago

Oh, that's interesting. Ipopt does not check the result from MA27CD, so at that place it didn't matter, but since we pass cntl_, and cntl_[0] is the pivot tolerance, and MA27CD writes a 0 into INFO(1), it seems very lucky that this seemed to have had no bad consequence.