Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/v90-bugfix'
Browse files Browse the repository at this point in the history
  • Loading branch information
scip-ci committed Jan 30, 2024
2 parents 9ce3c88 + 976cf0b commit cf0147d
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 22 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Features
- when parsing nonlinear constraints from CIP files, the * after the number in a term is now optional if followed by a variable,
i.e., instead of 3*<x>*<y>, now also 3<x>*<y> can be read, but 3<x><y> is not supported;
this allows to read some CIP files that were written with SCIP < 8
- when running bliss, we now limit the number of actually created generators and not the ones considered by bliss

Performance improvements
------------------------
Expand Down Expand Up @@ -240,6 +241,7 @@ Fixed bugs
- add safeguard for number of selected cuts
- use double double precision for delta in activity updates of cons_linear.c
- sort constraints in checkSolOrig() to keep the logic of constraint handlers intact
- fixed make install when SHARED=no and make uninstall

Miscellaneous
-------------
Expand Down
19 changes: 17 additions & 2 deletions make/make.install
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,12 @@ installlibs: libs
ifneq ($(INSTALLDIR),)
@echo "-> install SCIP libraries into INSTALLDIR <$(INSTALLDIR)>"
@-install -m 755 -d $(INSTALLDIR)/$(LIBDIR)/
@-install -m 644 -p $(LPILIBFILE) $(TPILIBFILE) $(SCIPLIBFILE) $(OBJSCIPLIBFILE) $(INSTALLDIR)/$(LIBDIR)/
@-install -m 644 -p $(LPILIBFILE) $(TPILIBFILE) $(OBJSCIPLIBFILE) $(INSTALLDIR)/$(LIBDIR)/
ifeq ($(SHARED),true)
@-install -m 644 -p $(SCIPLIBFILE) $(INSTALLDIR)/$(LIBDIR)/
else
@-install -m 644 -p $(SCIPLIBBASEFILE) $(INSTALLDIR)/$(LIBDIR)/
endif
ifeq ($(SHARED)$(OSTYPE),truedarwin)
@install_name_tool -id $(realpath $(INSTALLDIR)/$(LIBDIR)/$(notdir $(LPILIBFILE))) $(INSTALLDIR)/$(LIBDIR)/$(notdir $(LPILIBFILE))
@install_name_tool -id $(realpath $(INSTALLDIR)/$(LIBDIR)/$(notdir $(TPILIBFILE))) $(INSTALLDIR)/$(LIBDIR)/$(notdir $(TPILIBFILE))
Expand All @@ -68,8 +73,13 @@ ifeq ($(SHARED)$(OSTYPE),truedarwin)
endif
@-(cd $(INSTALLDIR)/$(LIBDIR)/ && rm -f $(notdir $(LPILIBLINK)) && $(LN_s) $(notdir $(LPILIBFILE)) $(notdir $(LPILIBLINK)));
@-(cd $(INSTALLDIR)/$(LIBDIR)/ && rm -f $(notdir $(LPILIBSHORTLINK)) && $(LN_s) $(notdir $(LPILIBLINK)) $(notdir $(LPILIBSHORTLINK)));
ifeq ($(SHARED),true)
@-(cd $(INSTALLDIR)/$(LIBDIR)/ && rm -f $(notdir $(SCIPLIBLINK)) && $(LN_s) $(notdir $(SCIPLIBFILE)) $(notdir $(SCIPLIBLINK)));
@-(cd $(INSTALLDIR)/$(LIBDIR)/ && rm -f $(notdir $(SCIPLIBSHORTLINK)) && $(LN_s) $(notdir $(SCIPLIBLINK)) $(notdir $(SCIPLIBSHORTLINK)));
else
@-(cd $(INSTALLDIR)/$(LIBDIR)/ && rm -f $(notdir $(SCIPLIBBASELINK)) && $(LN_s) $(notdir $(SCIPLIBBASEFILE)) $(notdir $(SCIPLIBBASELINK)));
@-(cd $(INSTALLDIR)/$(LIBDIR)/ && rm -f $(notdir $(SCIPLIBBASESHORTLINK)) && $(LN_s) $(notdir $(SCIPLIBBASELINK)) $(notdir $(SCIPLIBBASESHORTLINK)));
endif
@-(cd $(INSTALLDIR)/$(LIBDIR)/ && rm -f $(notdir $(OBJSCIPLIBLINK)) && $(LN_s) $(notdir $(OBJSCIPLIBFILE)) $(notdir $(OBJSCIPLIBLINK)));
@-(cd $(INSTALLDIR)/$(LIBDIR)/ && rm -f $(notdir $(OBJSCIPLIBSHORTLINK)) && $(LN_s) $(notdir $(OBJSCIPLIBLINK)) $(notdir $(OBJSCIPLIBSHORTLINK)));
endif
Expand Down Expand Up @@ -99,7 +109,12 @@ ifneq ($(INSTALLDIR),)
@echo "-> remove binary from INSTALLDIR <$(INSTALLDIR)>"
@-(cd $(INSTALLDIR) && rm -vf $(MAINFILE) $(MAINLINK) $(MAINSHORTLINK));
@echo "-> remove libraries from INSTALLDIR <$(INSTALLDIR)>"
@-(cd $(INSTALLDIR) && rm -vf $(LPILIBFILE) $(LPILIBLINK) $(LPILIBSHORTLINK) $(SCIPLIBFILE) $(SCIPLIBLINK) $(SCIPLIBSHORTLINK) $(OBJSCIPLIBFILE) $(OBJSCIPLIBLINK) $(OBJSCIPLIBSHORTLINK));
-(cd $(INSTALLDIR)/$(LIBDIR) && rm -vf $(notdir $(LPILIBFILE)) $(notdir $(LPILIBLINK)) $(notdir $(LPILIBSHORTLINK)) $(notdir $(TPILIBFILE)) $(notdir $(OBJSCIPLIBFILE)) $(notdir $(OBJSCIPLIBLINK)) $(notdir $(OBJSCIPLIBSHORTLINK)));
ifeq ($(SHARED),true)
@-(cd $(INSTALLDIR)/$(LIBDIR) && rm -vf $(notdir $(SCIPLIBFILE)) $(notdir $(SCIPLIBLINK)) $(notdir $(SCIPLIBSHORTLINK)));
else
@-(cd $(INSTALLDIR)/$(LIBDIR) && rm -vf $(notdir $(SCIPLIBBASEFILE)) $(notdir $(SCIPLIBBASELINK)) $(notdir $(SCIPLIBBASESHORTLINK)));
endif
ifeq ($(DELHEADERS), true)
@echo "-> remove scip headers from INSTALLDIR <$(INSTALLDIR)>"
@-mkdir -p $(INSTALLDIR)/$(INCLUDEDIR)/scip
Expand Down
1 change: 1 addition & 0 deletions src/lpi/lpi_spx2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
/* compile the SoPlex header with visibility=default because the SoPlex lib has been compiled that way */
#ifdef __GNUC__
#pragma GCC visibility push(default)
#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
#endif

/* include SoPlex solver */
Expand Down
21 changes: 11 additions & 10 deletions src/symmetry/compute_symmetry_bliss.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,29 +345,30 @@ SCIP_RETCODE computeAutomorphisms(
/* disable component recursion as advised by Tommi Junttila from bliss */
G->set_component_recursion(false);

/* do not use a node limit, but set generator limit */
#ifdef BLISS_PATCH_PRESENT
G->set_search_limits(0, (unsigned) maxgenerators);
#endif

oldtime = SCIPgetSolvingTime(scip);
#if BLISS_VERSION_MAJOR >= 1 || BLISS_VERSION_MINOR >= 76
/* lambda function to have access to data and pass it to the blisshook above */
auto reportglue = [&](unsigned int n, const unsigned int* aut) {
blisshook((void*)&data, n, aut);
};

/* lambda function to have access to stats and terminate the search if maxgenerators are reached */
long unsigned int terminatesearch = INT_MAX;
if ( maxgenerators != 0 )
terminatesearch = (long unsigned int) maxgenerators;
/* lambda function to have access to data and terminate the search if maxgenerators are reached */
auto term = [&]() {
return (stats.get_nof_generators() >= terminatesearch);
return (maxgenerators != 0 && data.nperms >= maxgenerators); /* check the number of generators that we have created so far */
};

/* start search */
G->find_automorphisms(stats, reportglue, term);
#else

/* Older bliss versions do not allow to terminate with a limit on the number of generators unless patched. */
#ifdef BLISS_PATCH_PRESENT
/* If patch is present, do not use a node limit, but set generator limit. This approach is not very accurate, since
* it limits the generators considered in bliss and not the ones that we generate (the ones that work on the variable
* set). */
G->set_search_limits(0, (unsigned) maxgenerators);
#endif

/* start search */
G->find_automorphisms(stats, blisshook, (void*) &data);
#endif
Expand Down
21 changes: 11 additions & 10 deletions src/symmetry/compute_symmetry_sassy_bliss.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,18 +312,10 @@ SCIP_RETCODE computeAutomorphisms(
/* disable component recursion as advised by Tommi Junttila from bliss */
blissgraph.set_component_recursion(false);

/* do not use a node limit, but set generator limit */
#ifdef BLISS_PATCH_PRESENT
blissgraph.set_search_limits(0, (unsigned) maxgenerators);
#endif

#if BLISS_VERSION_MAJOR >= 1 || BLISS_VERSION_MINOR >= 76
/* lambda function to have access to stats and terminate the search if maxgenerators are reached */
long unsigned int terminatesearch = INT_MAX;
if ( maxgenerators != 0 )
terminatesearch = (long unsigned int) maxgenerators;
/* lambda function to have access to data and terminate the search if maxgenerators are reached */
auto term = [&]() {
return (stats.get_nof_generators() >= terminatesearch);
return (maxgenerators != 0 && data.nperms >= maxgenerators); /* check the number of generators that we have created so far */
};

auto hook = [&](unsigned int n, const unsigned int* aut) {
Expand All @@ -333,6 +325,15 @@ SCIP_RETCODE computeAutomorphisms(
/* start search */
blissgraph.find_automorphisms(stats, hook, term);
#else

/* Older bliss versions do not allow to terminate with a limit on the number of generators unless patched. */
#ifdef BLISS_PATCH_PRESENT
/* If patch is present, do not use a node limit, but set generator limit. This approach is not very accurate, since
* it limits the generators considered in bliss and not the ones that we generate (the ones that work on the variable
* set). */
G->set_search_limits(0, (unsigned) maxgenerators);
#endif

/* start search */
blissgraph.find_automorphisms(stats, sassy::preprocessor::bliss_hook, (void*) &sassy);
#endif
Expand Down

0 comments on commit cf0147d

Please sign in to comment.