coin-or / OBOE

OBOE (Oracle Based Optimization Engine) is an open source software for general convex optimization.
Other
0 stars 2 forks source link

--enable-serialization=yes functionality broken in OBOE trunk #1

Closed svigerske closed 5 years ago

svigerske commented 5 years ago

Issue created by migration from Trac.

Original creator: nowozin

Original creation time: 2008-03-23 14:53:12

Assignee: somebody

Version:

When --enable-serialization=yes is used, the SERIALIZATION macro is defined and additional code is included in OBOE.

This code is out of sync with the remaining OBOE code and does not compile. Specifically, line 132 in Manager.h reads:

    AccpmVector *cut = new AccpmVector(_activeCutsM.getColumn(i));
    _cutSet[cut] = ++_currentCutId;

where _cutSet is a CutSet type, defined as

    typedef map<const AccpmVectorIntPair *, int,  ltAccpmVectorPair> CutSet;

Therefore the operator[] call fails and produces the error message:

make[3]: Entering directory `/data/home/scut/projects-coin/oboe/src/AccpmCore'
if g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src/ProblemInput -I../../src/AccpmLA/ -I../../src/Oracle -I../../src/Utilities -I/opt/lapackpp-2.5.2 -I/opt/lapackpp-2.5.2/include/    -O3 -Wall -DSERIALIZATION -MT Manager.o -MD -MP -MF ".deps/Manager.Tpo" -c -o Manager.o Manager.C; \
        then mv -f ".deps/Manager.Tpo" ".deps/Manager.Po"; else rm -f ".deps/Manager.Tpo"; exit 1; fi
Manager.h: In member function ‘virtual void Accpm::Manager::postprocess()’:
Manager.h:132: error: no match for ‘operator[]’ in ‘((Accpm::Manager*)this)->Accpm::Manager::_cutSet[cut]’
/usr/include/c++/4.1.3/bits/stl_map.h:340: note: candidates are: _Tp& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const _Key&) [with _Key = const Accpm::AccpmVectorIntPair*, _Tp = int, _Compare = Accpm::Manager::ltAccpmVectorPair, _Alloc = std::allocator<std::pair<const Accpm::AccpmVectorIntPair* const, int> >]
make[3]: *** [Manager.o] Error 1

For now, one has to disable serialization when compiling OBOE. I think the straight-forward checkpointing functionality is a great advantage of cutting plane methods and therefore a fix would be great.

svigerske commented 5 years ago

Comment by lolow created at 2008-04-03 15:18:03

Changing assignee from somebody to @nsawhney68.

svigerske commented 5 years ago

Comment by @nsawhney68 created at 2008-04-06 21:05:58

This is fixed in the minor release 1.0.1. It has been tested on a small example in OBOE/src/Bennchmard/PMED which tests if the serialization is able to correctly read and write.

svigerske commented 5 years ago

Comment by @nsawhney68 created at 2008-04-06 21:05:58

Resolution: fixed