From a8bd9ccb9786365556743d994bd0644f51579e70 Mon Sep 17 00:00:00 2001 From: Jurgen Lentz Date: Tue, 27 Feb 2024 21:05:31 +0100 Subject: [PATCH] init version 0.5.0 --- .../setup-scipoptsuite-action/action.yml | 2 +- CHANGELOG.md | 3 + output.txt | 279 ------------------ src/pygcgopt/__init__.py | 2 +- src/pygcgopt/consclassifier.pxi | 4 +- src/pygcgopt/detector.pxi | 18 +- src/pygcgopt/pricing_solver.pxi | 18 +- src/pygcgopt/score.pxi | 4 +- src/pygcgopt/varclassifier.pxi | 4 +- 9 files changed, 29 insertions(+), 305 deletions(-) delete mode 100644 output.txt diff --git a/.github/actions/setup-scipoptsuite-action/action.yml b/.github/actions/setup-scipoptsuite-action/action.yml index 1de4e4f..f0370f8 100644 --- a/.github/actions/setup-scipoptsuite-action/action.yml +++ b/.github/actions/setup-scipoptsuite-action/action.yml @@ -4,7 +4,7 @@ inputs: version: description: "SCIPOptSuite version to install" required: true - default: "8.1.0" + default: "9.0.0" runs: using: "composite" diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ae08a1..b29712d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ ### Changed ### Removed +## v0.5.0 +### Added + ## v0.3.1 ### Update * support cython 3.0.0 diff --git a/output.txt b/output.txt deleted file mode 100644 index 0cd97bf..0000000 --- a/output.txt +++ /dev/null @@ -1,279 +0,0 @@ - -Error compiling Cython file: ------------------------------------------------------------- -... - return ConsPart.create(conspatitionptr, self) - - def candidatesNBlocks(DetProbData self): - """candidate for the number of blocks, second int indicates how often a candidate was added. - """ - cdef vector[pair[int, int]] result = self.thisptr.candidatesNBlocks - ^ ------------------------------------------------------------- - -src/pygcgopt/detprobdata.pxi:32:57: Object of type 'DETPROBDATA' has no attribute 'candidatesNBlocks' - -Error compiling Cython file: ------------------------------------------------------------- -... - cdef vector[pair[int, int]] result = self.thisptr.candidatesNBlocks - return result - - def candidatesNBlocks(DetProbData self, object candidatesNBlocks): - cdef vector[pair[int, int]] cpp_candidatesNBlocks = candidatesNBlocks - self.thisptr.candidatesNBlocks = cpp_candidatesNBlocks - ^ ------------------------------------------------------------- - -src/pygcgopt/detprobdata.pxi:37:20: Object of type 'DETPROBDATA' has no attribute 'candidatesNBlocks' - -Error compiling Cython file: ------------------------------------------------------------- -... - self.thisptr.candidatesNBlocks = cpp_candidatesNBlocks - - def conspartitioncollection(DetProbData self): - """collection of different constraint class distributions. - """ - cdef vector[ConsPartition *] result = self.thisptr.conspartitioncollection - ^ ------------------------------------------------------------- - -src/pygcgopt/detprobdata.pxi:42:58: Object of type 'DETPROBDATA' has no attribute 'conspartitioncollection' - -Error compiling Cython file: ------------------------------------------------------------- -... - self.thisptr.candidatesNBlocks = cpp_candidatesNBlocks - - def conspartitioncollection(DetProbData self): - """collection of different constraint class distributions. - """ - cdef vector[ConsPartition *] result = self.thisptr.conspartitioncollection - ^ ------------------------------------------------------------- - -src/pygcgopt/detprobdata.pxi:42:58: Cannot convert Python object to 'vector[ConsPartition *]' - -Error compiling Cython file: ------------------------------------------------------------- -... - cdef ConsPartition * conspartitioncollection_ptr = NULL - cdef ConsPart conspartitioncollection_element - for conspartitioncollection_element in conspartitioncollection: - conspartitioncollection_ptr = conspartitioncollection_element.consPartition - cpp_conspartitioncollection.push_back(conspartitioncollection_ptr) - self.thisptr.conspartitioncollection = cpp_conspartitioncollection - ^ ------------------------------------------------------------- - -src/pygcgopt/detprobdata.pxi:54:20: Object of type 'DETPROBDATA' has no attribute 'conspartitioncollection' - -Error compiling Cython file: ------------------------------------------------------------- -... - cdef ConsPartition * conspartitioncollection_ptr = NULL - cdef ConsPart conspartitioncollection_element - for conspartitioncollection_element in conspartitioncollection: - conspartitioncollection_ptr = conspartitioncollection_element.consPartition - cpp_conspartitioncollection.push_back(conspartitioncollection_ptr) - self.thisptr.conspartitioncollection = cpp_conspartitioncollection - ^ ------------------------------------------------------------- - -src/pygcgopt/detprobdata.pxi:54:47: Cannot convert 'vector[ConsPartition *]' to Python object - -Error compiling Cython file: ------------------------------------------------------------- -... - self.thisptr.conspartitioncollection = cpp_conspartitioncollection - - def varpartitioncollection(DetProbData self): - """collection of different variable class distributions. - """ - cdef vector[VarPartition *] result = self.thisptr.varpartitioncollection - ^ ------------------------------------------------------------- - -src/pygcgopt/detprobdata.pxi:59:57: Object of type 'DETPROBDATA' has no attribute 'varpartitioncollection' - -Error compiling Cython file: ------------------------------------------------------------- -... - self.thisptr.conspartitioncollection = cpp_conspartitioncollection - - def varpartitioncollection(DetProbData self): - """collection of different variable class distributions. - """ - cdef vector[VarPartition *] result = self.thisptr.varpartitioncollection - ^ ------------------------------------------------------------- - -src/pygcgopt/detprobdata.pxi:59:57: Cannot convert Python object to 'vector[VarPartition *]' - -Error compiling Cython file: ------------------------------------------------------------- -... - cdef VarPartition * varpartitioncollection_ptr = NULL - cdef VarPart varpartitioncollection_element - for varpartitioncollection_element in varpartitioncollection: - varpartitioncollection_ptr = varpartitioncollection_element.varPartition - cpp_varpartitioncollection.push_back(varpartitioncollection_ptr) - self.thisptr.varpartitioncollection = cpp_varpartitioncollection - ^ ------------------------------------------------------------- - -src/pygcgopt/detprobdata.pxi:71:20: Object of type 'DETPROBDATA' has no attribute 'varpartitioncollection' - -Error compiling Cython file: ------------------------------------------------------------- -... - cdef VarPartition * varpartitioncollection_ptr = NULL - cdef VarPart varpartitioncollection_element - for varpartitioncollection_element in varpartitioncollection: - varpartitioncollection_ptr = varpartitioncollection_element.varPartition - cpp_varpartitioncollection.push_back(varpartitioncollection_ptr) - self.thisptr.varpartitioncollection = cpp_varpartitioncollection - ^ ------------------------------------------------------------- - -src/pygcgopt/detprobdata.pxi:71:46: Cannot convert 'vector[VarPartition *]' to Python object - -Error compiling Cython file: ------------------------------------------------------------- -... - self.thisptr.varpartitioncollection = cpp_varpartitioncollection - - def classificationtime(DetProbData self): - """time that was consumed by the classification of the constraint and variables classifiers. - """ - cdef double result = self.thisptr.classificationtime - ^ ------------------------------------------------------------- - -src/pygcgopt/detprobdata.pxi:76:41: Object of type 'DETPROBDATA' has no attribute 'classificationtime' - -Error compiling Cython file: ------------------------------------------------------------- -... - cdef double result = self.thisptr.classificationtime - return result - - def classificationtime(DetProbData self, double classificationtime): - cdef double cpp_classificationtime = classificationtime - self.thisptr.classificationtime = cpp_classificationtime - ^ ------------------------------------------------------------- - -src/pygcgopt/detprobdata.pxi:81:20: Object of type 'DETPROBDATA' has no attribute 'classificationtime' - -Error compiling Cython file: ------------------------------------------------------------- -... - self.thisptr.classificationtime = cpp_classificationtime - - def nblockscandidatescalctime(DetProbData self): - """time that was used to calulate the candidates of te block number. - """ - cdef double result = self.thisptr.nblockscandidatescalctime - ^ ------------------------------------------------------------- - -src/pygcgopt/detprobdata.pxi:86:41: Object of type 'DETPROBDATA' has no attribute 'nblockscandidatescalctime' - -Error compiling Cython file: ------------------------------------------------------------- -... - cdef double result = self.thisptr.nblockscandidatescalctime - return result - - def nblockscandidatescalctime(DetProbData self, double nblockscandidatescalctime): - cdef double cpp_nblockscandidatescalctime = nblockscandidatescalctime - self.thisptr.nblockscandidatescalctime = cpp_nblockscandidatescalctime - ^ ------------------------------------------------------------- - -src/pygcgopt/detprobdata.pxi:91:20: Object of type 'DETPROBDATA' has no attribute 'nblockscandidatescalctime' - -Error compiling Cython file: ------------------------------------------------------------- -... - self.thisptr.nblockscandidatescalctime = cpp_nblockscandidatescalctime - - def postprocessingtime(DetProbData self): - """time that was spent in postproceesing decomposigtions. - """ - cdef double result = self.thisptr.postprocessingtime - ^ ------------------------------------------------------------- - -src/pygcgopt/detprobdata.pxi:96:41: Object of type 'DETPROBDATA' has no attribute 'postprocessingtime' - -Error compiling Cython file: ------------------------------------------------------------- -... - cdef double result = self.thisptr.postprocessingtime - return result - - def postprocessingtime(DetProbData self, double postprocessingtime): - cdef double cpp_postprocessingtime = postprocessingtime - self.thisptr.postprocessingtime = cpp_postprocessingtime - ^ ------------------------------------------------------------- - -src/pygcgopt/detprobdata.pxi:101:20: Object of type 'DETPROBDATA' has no attribute 'postprocessingtime' - -Error compiling Cython file: ------------------------------------------------------------- -... - self.thisptr.postprocessingtime = cpp_postprocessingtime - - def translatingtime(DetProbData self): - """time that was spent by transforming partialdecs between presolved and orig problem. - """ - cdef double result = self.thisptr.translatingtime - ^ ------------------------------------------------------------- - -src/pygcgopt/detprobdata.pxi:106:41: Object of type 'DETPROBDATA' has no attribute 'translatingtime' - -Error compiling Cython file: ------------------------------------------------------------- -... - cdef double result = self.thisptr.translatingtime - return result - - def translatingtime(DetProbData self, double translatingtime): - cdef double cpp_translatingtime = translatingtime - self.thisptr.translatingtime = cpp_translatingtime - ^ ------------------------------------------------------------- - -src/pygcgopt/detprobdata.pxi:111:20: Object of type 'DETPROBDATA' has no attribute 'translatingtime' - -Error compiling Cython file: ------------------------------------------------------------- -... - self.thisptr.createConssAdjacency() - - def freeTemporaryData(DetProbData self): - """frees temporary data that is only needed during the detection process. - """ - self.thisptr.freeTemporaryData() - ^ ------------------------------------------------------------- - -src/pygcgopt/detprobdata.pxi:202:38: ambiguous overloaded method -Using include path . -Using SCIP library at . -Using GCG library at . -Compiling src/pygcgopt/gcg.pyx because it changed. -[1/1] Cythonizing src/pygcgopt/gcg.pyx -Traceback (most recent call last): - File "/home/lentz/pygcgopt-dev/PyGCGOpt/setup.py", line 98, in - extensions = cythonize(extensions, compiler_directives={'language_level': 3, 'embedsignature': True}) - File "/home/lentz/pygcgopt-dev/lib/python3.9/site-packages/Cython/Build/Dependencies.py", line 1102, in cythonize - cythonize_one(*args) - File "/home/lentz/pygcgopt-dev/lib/python3.9/site-packages/Cython/Build/Dependencies.py", line 1225, in cythonize_one - raise CompileError(None, pyx_file) -Cython.Compiler.Errors.CompileError: src/pygcgopt/gcg.pyx diff --git a/src/pygcgopt/__init__.py b/src/pygcgopt/__init__.py index b3f3f19..a133d62 100644 --- a/src/pygcgopt/__init__.py +++ b/src/pygcgopt/__init__.py @@ -1,4 +1,4 @@ -__version__ = '0.3.1' +__version__ = '0.5.0' # required for Python 3.8 on Windows import os diff --git a/src/pygcgopt/consclassifier.pxi b/src/pygcgopt/consclassifier.pxi index d651159..a5ad9cb 100644 --- a/src/pygcgopt/consclassifier.pxi +++ b/src/pygcgopt/consclassifier.pxi @@ -10,7 +10,7 @@ cdef class ConsClassifier: def classify(self, conss, partition): pass -cdef SCIP_RETCODE PyConsClassifierFree(SCIP* scip, GCG_CONSCLASSIFIER* consclassifier) with gil: +cdef SCIP_RETCODE PyConsClassifierFree(SCIP* scip, GCG_CONSCLASSIFIER* consclassifier) noexcept with gil: cdef GCG_CLASSIFIERDATA* consclassifierdata consclassifierdata = GCGconsClassifierGetData(consclassifier) py_consclassifier = consclassifierdata @@ -18,7 +18,7 @@ cdef SCIP_RETCODE PyConsClassifierFree(SCIP* scip, GCG_CONSCLASSIFIER* consclass Py_DECREF(py_consclassifier) return SCIP_OKAY -cdef SCIP_RETCODE PyConsClassifierClassify(SCIP* scip, GCG_CONSCLASSIFIER* consclassifier, SCIP_Bool transformed) with gil: +cdef SCIP_RETCODE PyConsClassifierClassify(SCIP* scip, GCG_CONSCLASSIFIER* consclassifier, SCIP_Bool transformed) noexcept with gil: cdef GCG_CLASSIFIERDATA* consclassifierdata consclassifierdata = GCGconsClassifierGetData(consclassifier) py_consclassifier = consclassifierdata diff --git a/src/pygcgopt/detector.pxi b/src/pygcgopt/detector.pxi index 33f6406..0ae7702 100644 --- a/src/pygcgopt/detector.pxi +++ b/src/pygcgopt/detector.pxi @@ -75,23 +75,23 @@ cdef wrap_detector_callback_result(Detector detector, PARTIALDEC_DETECTION_DATA* result[0] = result_dict.get("result", result[0]) -cdef SCIP_RETCODE PyDetectorFree (SCIP* scip, GCG_DETECTOR* detector) with gil: +cdef SCIP_RETCODE PyDetectorFree (SCIP* scip, GCG_DETECTOR* detector) noexcept with gil: py_detector = get_py_detector(detector) py_detector.freeDetector() Py_DECREF(py_detector) return SCIP_OKAY -cdef SCIP_RETCODE PyDetectorInit (SCIP* scip, GCG_DETECTOR* detector) with gil: +cdef SCIP_RETCODE PyDetectorInit (SCIP* scip, GCG_DETECTOR* detector) noexcept with gil: py_detector = get_py_detector(detector) py_detector.initDetector() return SCIP_OKAY -cdef SCIP_RETCODE PyDetectorExit (SCIP* scip, GCG_DETECTOR* detector) with gil: +cdef SCIP_RETCODE PyDetectorExit (SCIP* scip, GCG_DETECTOR* detector) noexcept with gil: py_detector = get_py_detector(detector) py_detector.exitDetector() return SCIP_OKAY -cdef SCIP_RETCODE PyDetectorPropagatePartialdec (SCIP* scip, GCG_DETECTOR* detector, PARTIALDEC_DETECTION_DATA* partialdecdetectiondata, SCIP_RESULT* result) with gil: +cdef SCIP_RETCODE PyDetectorPropagatePartialdec (SCIP* scip, GCG_DETECTOR* detector, PARTIALDEC_DETECTION_DATA* partialdecdetectiondata, SCIP_RESULT* result) noexcept with gil: cdef SCIP_CLOCK* clock = start_new_clock(scip) py_detector = get_py_detector(detector) @@ -104,7 +104,7 @@ cdef SCIP_RETCODE PyDetectorPropagatePartialdec (SCIP* scip, GCG_DETECTOR* detec return SCIP_OKAY -cdef SCIP_RETCODE PyDetectorFinishPartialdec (SCIP* scip, GCG_DETECTOR* detector, PARTIALDEC_DETECTION_DATA* partialdecdetectiondata, SCIP_RESULT* result) with gil: +cdef SCIP_RETCODE PyDetectorFinishPartialdec (SCIP* scip, GCG_DETECTOR* detector, PARTIALDEC_DETECTION_DATA* partialdecdetectiondata, SCIP_RESULT* result) noexcept with gil: cdef SCIP_CLOCK* clock = start_new_clock(scip) py_detector = get_py_detector(detector) @@ -117,7 +117,7 @@ cdef SCIP_RETCODE PyDetectorFinishPartialdec (SCIP* scip, GCG_DETECTOR* detector return SCIP_OKAY -cdef SCIP_RETCODE PyDetectorPostprocessPartialdec (SCIP* scip, GCG_DETECTOR* detector, PARTIALDEC_DETECTION_DATA* partialdecdetectiondata, SCIP_RESULT* result) with gil: +cdef SCIP_RETCODE PyDetectorPostprocessPartialdec (SCIP* scip, GCG_DETECTOR* detector, PARTIALDEC_DETECTION_DATA* partialdecdetectiondata, SCIP_RESULT* result) noexcept with gil: cdef SCIP_CLOCK* clock = start_new_clock(scip) py_detector = get_py_detector(detector) @@ -130,19 +130,19 @@ cdef SCIP_RETCODE PyDetectorPostprocessPartialdec (SCIP* scip, GCG_DETECTOR* det return SCIP_OKAY -cdef SCIP_RETCODE PyDetectorSetParamAggressive (SCIP* scip, GCG_DETECTOR* detector, SCIP_RESULT* result) with gil: +cdef SCIP_RETCODE PyDetectorSetParamAggressive (SCIP* scip, GCG_DETECTOR* detector, SCIP_RESULT* result) noexcept with gil: py_detector = get_py_detector(detector) result_dict = py_detector.setParamAggressive() or {} result[0] = result_dict.get("result", result[0]) return SCIP_OKAY -cdef SCIP_RETCODE PyDetectorSetParamDefault (SCIP* scip, GCG_DETECTOR* detector, SCIP_RESULT* result) with gil: +cdef SCIP_RETCODE PyDetectorSetParamDefault (SCIP* scip, GCG_DETECTOR* detector, SCIP_RESULT* result) noexcept with gil: py_detector = get_py_detector(detector) result_dict = py_detector.setParamDefault() or {} result[0] = result_dict.get("result", result[0]) return SCIP_OKAY -cdef SCIP_RETCODE PyDetectorSetParamFast (SCIP* scip, GCG_DETECTOR* detector, SCIP_RESULT* result) with gil: +cdef SCIP_RETCODE PyDetectorSetParamFast (SCIP* scip, GCG_DETECTOR* detector, SCIP_RESULT* result) noexcept with gil: py_detector = get_py_detector(detector) result_dict = py_detector.setParamFast() or {} result[0] = result_dict.get("result", result[0]) diff --git a/src/pygcgopt/pricing_solver.pxi b/src/pygcgopt/pricing_solver.pxi index 18722af..a223fce 100644 --- a/src/pygcgopt/pricing_solver.pxi +++ b/src/pygcgopt/pricing_solver.pxi @@ -29,45 +29,45 @@ cdef class PricingSolver: return {} -cdef PricingSolver get_py_pricing_solver(GCG_SOLVER* pricingSolver) with gil: +cdef PricingSolver get_py_pricing_solver(GCG_SOLVER* pricingSolver) noexcept with gil: cdef GCG_SOLVERDATA* solverdata solverdata = GCGsolverGetData(pricingSolver) py_pricing_solver = solverdata return py_pricing_solver -cdef SCIP_RETCODE PyPricingSolverFree (SCIP* scip, GCG_SOLVER* solver) with gil: +cdef SCIP_RETCODE PyPricingSolverFree (SCIP* scip, GCG_SOLVER* solver) noexcept with gil: py_pricing_solver = get_py_pricing_solver(solver) py_pricing_solver.freeSolver() Py_DECREF(py_pricing_solver) return SCIP_OKAY -cdef SCIP_RETCODE PyPricingSolverInit (SCIP* scip, GCG_SOLVER* solver) with gil: +cdef SCIP_RETCODE PyPricingSolverInit (SCIP* scip, GCG_SOLVER* solver) noexcept with gil: py_pricing_solver = get_py_pricing_solver(solver) py_pricing_solver.initSolver() return SCIP_OKAY -cdef SCIP_RETCODE PyPricingSolverExit (SCIP* scip, GCG_SOLVER* solver) with gil: +cdef SCIP_RETCODE PyPricingSolverExit (SCIP* scip, GCG_SOLVER* solver) noexcept with gil: py_pricing_solver = get_py_pricing_solver(solver) py_pricing_solver.exitSolver() return SCIP_OKAY -cdef SCIP_RETCODE PyPricingSolverInitSol (SCIP* scip, GCG_SOLVER* solver) with gil: +cdef SCIP_RETCODE PyPricingSolverInitSol (SCIP* scip, GCG_SOLVER* solver) noexcept with gil: py_pricing_solver = get_py_pricing_solver(solver) py_pricing_solver.initSolution() return SCIP_OKAY -cdef SCIP_RETCODE PyPricingSolverExitSol (SCIP* scip, GCG_SOLVER* solver) with gil: +cdef SCIP_RETCODE PyPricingSolverExitSol (SCIP* scip, GCG_SOLVER* solver) noexcept with gil: py_pricing_solver = get_py_pricing_solver(solver) py_pricing_solver.exitSolution() return SCIP_OKAY -cdef SCIP_RETCODE PyPricingSolverUpdate (SCIP* pricingprob, GCG_SOLVER* solver, int probnr, SCIP_Bool varobjschanged, SCIP_Bool varbndschanged, SCIP_Bool consschanged) with gil: +cdef SCIP_RETCODE PyPricingSolverUpdate (SCIP* pricingprob, GCG_SOLVER* solver, int probnr, SCIP_Bool varobjschanged, SCIP_Bool varbndschanged, SCIP_Bool consschanged) noexcept with gil: py_pricing_solver = get_py_pricing_solver(solver) py_pricingprob = GCGPricingModel.create(pricingprob) py_pricing_solver.updateSolver(py_pricingprob, probnr, varobjschanged, varbndschanged, consschanged) return SCIP_OKAY -cdef SCIP_RETCODE PyPricingSolverSolve (SCIP* scip, SCIP* pricingprob, GCG_SOLVER* solver, int probnr, SCIP_Real dualsolconv, SCIP_Real* lowerbound, GCG_PRICINGSTATUS* status) with gil: +cdef SCIP_RETCODE PyPricingSolverSolve (SCIP* scip, SCIP* pricingprob, GCG_SOLVER* solver, int probnr, SCIP_Real dualsolconv, SCIP_Real* lowerbound, GCG_PRICINGSTATUS* status) noexcept with gil: py_pricing_solver = get_py_pricing_solver(solver) py_pricingprob = GCGPricingModel.create(pricingprob) result_dict = py_pricing_solver.solve(py_pricingprob, probnr, dualsolconv) @@ -75,7 +75,7 @@ cdef SCIP_RETCODE PyPricingSolverSolve (SCIP* scip, SCIP* pricingprob, GCG_SOLVE status[0] = result_dict.get("status", status[0]) return SCIP_OKAY -cdef SCIP_RETCODE PyPricingSolverSolveHeur (SCIP* scip, SCIP* pricingprob, GCG_SOLVER* solver, int probnr, SCIP_Real dualsolconv, SCIP_Real* lowerbound, GCG_PRICINGSTATUS* status) with gil: +cdef SCIP_RETCODE PyPricingSolverSolveHeur (SCIP* scip, SCIP* pricingprob, GCG_SOLVER* solver, int probnr, SCIP_Real dualsolconv, SCIP_Real* lowerbound, GCG_PRICINGSTATUS* status) noexcept with gil: py_pricing_solver = get_py_pricing_solver(solver) py_pricingprob = GCGPricingModel.create(pricingprob) result_dict = py_pricing_solver.solveHeuristic(py_pricingprob, probnr, dualsolconv) diff --git a/src/pygcgopt/score.pxi b/src/pygcgopt/score.pxi index 230bf97..b2129cd 100644 --- a/src/pygcgopt/score.pxi +++ b/src/pygcgopt/score.pxi @@ -12,7 +12,7 @@ cdef class Score: '''calls calculate method of score''' return {} -cdef SCIP_RETCODE PyScoreFree(SCIP* scip, GCG_SCORE* score) with gil: +cdef SCIP_RETCODE PyScoreFree(SCIP* scip, GCG_SCORE* score) noexcept with gil: cdef GCG_SCOREDATA* scoredata scoredata = GCGscoreGetData(score) py_score = scoredata @@ -20,7 +20,7 @@ cdef SCIP_RETCODE PyScoreFree(SCIP* scip, GCG_SCORE* score) with gil: Py_DECREF(py_score) return SCIP_OKAY -cdef SCIP_RETCODE PyScoreCalculate(SCIP* scip, GCG_SCORE* score, int partialdecid, SCIP_Real* scorevalue) with gil: +cdef SCIP_RETCODE PyScoreCalculate(SCIP* scip, GCG_SCORE* score, int partialdecid, SCIP_Real* scorevalue) noexcept with gil: cdef GCG_SCOREDATA* scoredata scoredata = GCGscoreGetData(score) py_score = scoredata diff --git a/src/pygcgopt/varclassifier.pxi b/src/pygcgopt/varclassifier.pxi index 5a6af13..fa0b054 100644 --- a/src/pygcgopt/varclassifier.pxi +++ b/src/pygcgopt/varclassifier.pxi @@ -10,7 +10,7 @@ cdef class VarClassifier: def classify(self, vars, partition): return {} -cdef SCIP_RETCODE PyVarClassifierFree(SCIP* scip, GCG_VARCLASSIFIER* varclassifier) with gil: +cdef SCIP_RETCODE PyVarClassifierFree(SCIP* scip, GCG_VARCLASSIFIER* varclassifier) noexcept with gil: cdef GCG_CLASSIFIERDATA* varclassifierdata varclassifierdata = GCGvarClassifierGetData(varclassifier) py_varclassifier = varclassifierdata @@ -18,7 +18,7 @@ cdef SCIP_RETCODE PyVarClassifierFree(SCIP* scip, GCG_VARCLASSIFIER* varclassifi Py_DECREF(py_varclassifier) return SCIP_OKAY -cdef SCIP_RETCODE PyVarClassifierClassify(SCIP* scip, GCG_VARCLASSIFIER* varclassifier, SCIP_Bool transformed) with gil: +cdef SCIP_RETCODE PyVarClassifierClassify(SCIP* scip, GCG_VARCLASSIFIER* varclassifier, SCIP_Bool transformed) noexcept with gil: cdef GCG_CLASSIFIERDATA* varclassifierdata varclassifierdata = GCGvarClassifierGetData(varclassifier) py_varclassifier = varclassifierdata