[Ipopt-tickets] [Ipopt] #186: Preprocessor flag to use long ints in MA57 interface
Ipopt
coin-trac at coin-or.org
Tue Nov 27 14:04:46 EST 2012
#186: Preprocessor flag to use long ints in MA57 interface
--------------------------+-------------------------
Reporter: guest | Owner: ipopt-team
Type: enhancement | Status: closed
Priority: normal | Component: Ipopt
Version: | Severity: normal
Resolution: fixed | Keywords: MA57 Matlab
--------------------------+-------------------------
Comment (by guest):
Since size_t is unsigned, it won't work properly for ma57int. See lines
638, 664, 691 of IpMa57TSolverInterface.cpp, wd_info_ is a ma57int array
with possibly negative values. Maybe ssize_t or ptrdiff_t could serve the
same changes-with-architecture function with a signed type?
I'm also getting compiler errors when I try to use -DFUNNY_MA57_FINT, it
chokes on the const_cast at compile time when sizeof(ma57int) !=
sizeof(Index), not realizing it won't go down that branch.
Ipopt/src/Algorithm/LinearSolvers/IpMa57TSolverInterface.cpp:560:48:
error: invalid const_cast from type 'const Index* {aka const int*}' to
type 'ma57int* {aka long unsigned int*}'
-Tony
--
Ticket URL: <https://projects.coin-or.org/ticket/186#comment:2>
Ipopt <http://projects.coin-or.org/Ipopt>
Interior-point optimizer for nonlinear programs.
More information about the Ipopt-tickets
mailing list