coin-or / Cgl

Cut Generator Library
Other
24 stars 16 forks source link

Some issues on Windows [Cgl-0.59.10] #41

Closed svigerske closed 5 years ago

svigerske commented 5 years ago

Issue created by migration from Trac.

Original creator: niuys

Original creation time: 2017-07-25 23:31:56

Assignee: somebody

Version:

Keywords: Crashed, VS 2017, Cgl

There are some issues I've encountered, fixed or still unfixed during my test with VS 2017. Here are some issues:

  1. Some header files are not included in unitTest.cpp The following two files CglRedSplit2.hpp and CglZeroHalf.hpp can not be located. This can be fixed by adding in including path of the project CglUnitTest: ......\src\CglRedSplit2 and ......\src\CglZeroHalf

  2. "CglLandPUnitTest" crashed It is crashed at line 144 in CglLandPTest.cpp

test.generateCuts(*siP,cuts);

Debug of the issue gives the following call stack:

    CglUnitTest.exeCoinIndexedVector::clear() line 40   C++
    CglUnitTest.exeOsiClpSolverInterface::getBInvARow(int row, double * z, double * slack) line 6981    C++
    CglUnitTest.exe!LAP::CglLandPSimplex::pullTableauRow(LAP::TabRow & row) line 3131   C++
    CglUnitTest.exe!LAP::CglLandPSimplex::optimize(int row, OsiRowCut & cut, const CglLandP::CachedData & cached, const CglLandP::Parameters & params) line 674 C++
>   CglUnitTest.exeCglLandP::generateCuts(const OsiSolverInterface & si, OsiCuts & cs, const CglTreeInfo info) line 622 C++
    CglUnitTest.exeCglLandPUnitTest(OsiSolverInterface * si, const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & mpsDir) line 145  C++
    CglUnitTest.exe!main(int argc, const char * * argv) line 240    C++

But it works fine on Linux or with MinGW.

  1. CglZeroHalfUnitTest crashed It is also crashed when calling generateCuts at line 57 in CglZeroHalfTest.cpp
    cg.generateCuts(*siP,cuts);

Here is the debug call stack:

>   CglUnitTest.exe!std::_Debug_heap<cgl_node * __ptr64 * __ptr64,bool (__cdecl*)(cgl_node * __ptr64,cgl_node * __ptr64)>(cgl_node * * _First, cgl_node * * _Last, bool(*)(cgl_node *, cgl_node *) & _Pred) line 2096   C++
    CglUnitTest.exe!std::pop_heap<std::_Vector_iterator<std::_Vector_val<std::_Simple_types<cgl_node * __ptr64> > >,bool (__cdecl*)(cgl_node * __ptr64,cgl_node * __ptr64)>(std::_Vector_iterator<std::_Vector_val<std::_Simple_types<cgl_node *> > > _First, std::_Vector_iterator<std::_Vector_val<std::_Simple_types<cgl_node *> > > _Last, bool(*)(cgl_node *, cgl_node *) _Pred) line 2226 C++
    CglUnitTest.exe!cglShortestPath(auxiliary_graph * graph, int source, int maximumLength) line 544    C++
    CglUnitTest.exe!get_shortest_odd_cycle_list(int j, separation_graph * s_graph, auxiliary_graph * a_graph) line 1238 C++
    CglUnitTest.exeCgl012Cut::basic_separation() line 2233  C++
    CglUnitTest.exeCgl012Cut::sep_012_cut(int mr, int mc, int mnz, int * mtbeg, int * mtcnt, int * mtind, int * mtval, int * vlb, int * vub, int * mrhs, char * msense, const double * xstar, bool aggressive, int * cnum, int * cnzcnt, int * * cbeg, int * * ccnt, int * * cind, int * * cval, int * * crhs, char * * csense) line 3630   C++
    CglUnitTest.exeCglZeroHalf::generateCuts(const OsiSolverInterface & si, OsiCuts & cs, const CglTreeInfo info) line 57   C++
    CglUnitTest.exeCglZeroHalfUnitTest(const OsiSolverInterface * baseSiP, const std::basic_string<char,std::char_traits<char>,std::allocator<char> > mpsDir) line 61   C++
    CglUnitTest.exe!main(int argc, const char * * argv) line 305    C++

It works also on Linux and MinGW.

Concerning on the last two issues, I still have no idea why it crashed on Windows with VS 2017. I would appreciate any suggestion. Thanks in advance!

svigerske commented 5 years ago

For 1) I edited v{9,10}/CglUnitTest/CglUnitTest.vcxproj and added the include paths. I'm guessing that these are the files you meant that should be edited. I didn't test this.

Regaring 2) and 3), there seems to be noone developing Cgl on this platform who could help on debugging this.