Skip to content

Fix reader write #1015

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 2, 2025
Merged

Fix reader write #1015

merged 1 commit into from
Jul 2, 2025

Conversation

DominikKamp
Copy link
Contributor

This resolves

      src/pyscipopt/scip.c:191580:235: error: incompatible function pointer types passing 'SCIP_RETCODE (SCIP *, SCIP_READER *, FILE *, const char *, SCIP_PROBDATA *, unsigned int, SCIP_OBJSENSE, double, double, SCIP_VAR **, int, int, int, int, int, SCIP_VAR **, int, int, SCIP_CONS **, int, int, int, unsigned int, SCIP_RESULT *)' (aka 'enum SCIP_Retcode (struct Scip *, struct SCIP_Reader *, struct __sFILE *, const char *, struct SCIP_ProbData *, unsigned int, enum SCIP_Objsense, double, double, struct SCIP_Var **, int, int, int, int, int, struct SCIP_Var **, int, int, struct SCIP_Cons **, int, int, int, unsigned int, enum SCIP_Result *)') to parameter of type 'SCIP_RETCODE (*)(SCIP *, SCIP_READER *, FILE *, const char *, SCIP_PROBDATA *, unsigned int, SCIP_OBJSENSE, double, double, SCIP_RATIONAL *, SCIP_RATIONAL *, SCIP_VAR **, int, int, int, int, int, SCIP_VAR **, int, int, SCIP_CONS **, int, int, int, unsigned int, SCIP_RESULT *)' (aka 'enum SCIP_Retcode (*)(struct Scip *, struct SCIP_Reader *, struct __sFILE *, const char *, struct SCIP_ProbData *, unsigned int, enum SCIP_Objsense, double, double, struct SCIP_Rational *, struct SCIP_Rational *, struct SCIP_Var **, int, int, int, int, int, struct SCIP_Var **, int, int, struct SCIP_Cons **, int, int, int, unsigned int, enum SCIP_Result *)') [-Wincompatible-function-pointer-types]
       191580 |   __pyx_t_8 = __Pyx_PyLong_From_SCIP_RETCODE(SCIPincludeReader(__pyx_v_self->_scip, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_f_9pyscipopt_4scip_PyReaderCopy, __pyx_f_9pyscipopt_4scip_PyReaderFree, __pyx_f_9pyscipopt_4scip_PyReaderRead, __pyx_f_9pyscipopt_4scip_PyReaderWrite, ((SCIP_READERDATA *)__pyx_v_reader))); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 7973, __pyx_L1_error)
              |                                                                                                                                                                                                                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /usr/local/include/scip/scip_reader.h:84:29: note: passing argument to parameter 'readerwrite' here
         84 |    SCIP_DECL_READERWRITE ((*readerwrite)),   /**< write method */
            |                             ^

failing with Clang >= 16 and SCIP >= 10 by adapting to SCIP API 145 and adding a todo to handle exact objectives.

@DominikKamp
Copy link
Contributor Author

DominikKamp commented Jul 2, 2025

Actually the build fix is already in #1009 but the argument fix is missing so changing the target branch.

@DominikKamp DominikKamp changed the base branch from master to scip10 July 2, 2025 07:33
@DominikKamp DominikKamp changed the base branch from scip10 to SCIP10 July 2, 2025 07:38
@DominikKamp
Copy link
Contributor Author

Having scip10 and SCIP10 is rather confusing, is one of them a regular SCIP master branch?

@Joao-Dionisio
Copy link
Member

Hey @DominikKamp thank you for this. Mo and I rushed a bit because of the tuning competition, hence the two branches. scip10 contains only the minimal stuff to be able to use SCIP10, plus the json statistics. SCIP10 is the one which will be merged in the end.

@Joao-Dionisio Joao-Dionisio merged commit dc08654 into SCIP10 Jul 2, 2025
1 check failed
@Joao-Dionisio Joao-Dionisio deleted the fix-reader-write branch July 2, 2025 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants