coin-or / SYMPHONY

SYMPHONY is an open-source solver, callable library, and development framework for mixed-integer linear programs (MILPs) written in C with a number of unique features
https://github.com/coin-or/SYMPHONY/wiki
Other
65 stars 18 forks source link

"sym_add_col" works incorrectly (see details) [Okay with 5.5 but not 5.6 or trunk] #136

Open svigerske opened 5 years ago

svigerske commented 5 years ago

Issue created by migration from Trac.

Original creator: anh509

Original creation time: 2014-11-27 00:55:43

Assignee: @tkralphs

Version: stable/5.6 (SVN)

Please see the two attached files "test_milp.MPS" and "milp.c". The c file adds a new column to a very basic problem. The new problem should only have an added "z" variable in the objective. For this particular problem, (after compiling the example and ./exe_name -F test_milp.MPS) symphony terminates with seg fault. For another problem tested, it returns an incorrect problem, mixing up columns and values. The result of valgrind (when failing with seg fault) is

==9799== Invalid read of size 8 ==9799== at 0x4C2A7E8: memcpy (mc_replace_strmem.c:838) ==9799== by 0x4157B6: sym_add_col(SYM_ENVIRONMENT, int, int, double, double, double, double, char, char) (master.c:4129)

This result is obtained by configuring 5.6 stable (or trunk) as follows:

../configure --enable-debug --enable-sensitivity-analysis --with-cplex-lib='-L/usr/local/CPLEX_Studio_125/cplex/lib/x86-64_sles10_4.1/static_pic/ -lcplex -lpthread -lm' --with-cplex-incdir=/usr/local/CPLEX_Studio_125/cplex/include/ilcplex --with-lp-solver=cplex

svigerske commented 5 years ago

Attachment test_milp.MPS by anh509 created at 2014-11-27 00:56:42

svigerske commented 5 years ago

Attachment milp.c by anh509 created at 2014-11-27 00:56:59