haskell-numerics / hmatrix

Linear algebra and numerical computation
381 stars 104 forks source link

Last versions of SUNDIALS break hmatrix-sundials #297

Closed Magalame closed 5 years ago

Magalame commented 5 years ago

Running stack test --extra-lib-dirs=/home/user/Downloads/sundials-4.1.0/builddir/include --extra-lib-dirs=/home/user/Downloads/sundials-4.1.0/builddir/src/arkode --extra-lib-dirs=/home/user/Downloads/sundials-4.1.0/builddir/src/cvode --extra-include-dirs=/home/user/Downloads/sundials-4.1.0/include --extra-include-dirs=/home/user/Downloads/sundials-4.1.0/builddir/include/sundials/include

give notably:

Configuring hmatrix-sundials-0.19.0.0...
    Preprocessing test suite 'hmatrix-sundials-testsuite' for hmatrix-sundials-0.19.0.0..
    /home/user/Projects/hmatrix/packages/sundials/In file included from .stack-work/dist/x86_64-linux/Cabal-2.0.1.0/build/hmatrix-sundials-testsuite/hmatrix-sundials-testsuite-tmp/Numeric/Sundials/Arkode_hsc_make.c:1:0:
    Arkode.hsc: In function ‘main’:
    /home/user/Projects/hmatrix/packages/sundials/Arkode.hsc:134:16: error: ‘ARK_S_MAX’ undeclared (first use in this function); did you mean ‘ARK_NORMAL’?
    /home/user/.stack/programs/x86_64-linux/ghc-8.2.2/lib/ghc-8.2.2/template-hsc.h:38:10: note: in definition of macro ‘hsc_const’
         if ((x) < 0)                                      \
              ^
    /home/user/Projects/hmatrix/packages/sundials/Arkode.hsc:134:16: note: each undeclared identifier is reported only once for each function it appears in
    /home/user/.stack/programs/x86_64-linux/ghc-8.2.2/lib/ghc-8.2.2/template-hsc.h:38:10: note: in definition of macro ‘hsc_const’
         if ((x) < 0)                                      \
              ^
    /home/user/Projects/hmatrix/packages/sundials/Arkode.hsc:137:16: error: ‘MIN_DIRK_NUM’ undeclared (first use in this function)
    /home/user/.stack/programs/x86_64-linux/ghc-8.2.2/lib/ghc-8.2.2/template-hsc.h:38:10: note: in definition of macro ‘hsc_const’
         if ((x) < 0)                                      \
              ^
    /home/user/Projects/hmatrix/packages/sundials/Arkode.hsc:138:16: error: ‘MAX_DIRK_NUM’ undeclared (first use in this function); did you mean ‘MIN_DIRK_NUM’?
    /home/user/.stack/programs/x86_64-linux/ghc-8.2.2/lib/ghc-8.2.2/template-hsc.h:38:10: note: in definition of macro ‘hsc_const’
         if ((x) < 0)                                      \
              ^
    /home/user/Projects/hmatrix/packages/sundials/Arkode.hsc:144:16: error: ‘SDIRK_2_1_2’ undeclared (first use in this function)
    /home/user/.stack/programs/x86_64-linux/ghc-8.2.2/lib/ghc-8.2.2/template-hsc.h:38:10: note: in definition of macro ‘hsc_const’
         if ((x) < 0)                                      \
              ^
    /home/user/Projects/hmatrix/packages/sundials/Arkode.hsc:146:16: error: ‘BILLINGTON_3_3_2’ undeclared (first use in this function)
    /home/user/.stack/programs/x86_64-linux/ghc-8.2.2/lib/ghc-8.2.2/template-hsc.h:38:10: note: in definition of macro ‘hsc_const’
         if ((x) < 0)                                      \
              ^
    /home/user/Projects/hmatrix/packages/sundials/Arkode.hsc:148:16: error: ‘TRBDF2_3_3_2’ undeclared (first use in this function)
    /home/user/.stack/programs/x86_64-linux/ghc-8.2.2/lib/ghc-8.2.2/template-hsc.h:38:10: note: in definition of macro ‘hsc_const’
         if ((x) < 0)                                      \
              ^
    /home/user/Projects/hmatrix/packages/sundials/Arkode.hsc:150:16: error: ‘KVAERNO_4_2_3’ undeclared (first use in this function)
    /home/user/.stack/programs/x86_64-linux/ghc-8.2.2/lib/ghc-8.2.2/template-hsc.h:38:10: note: in definition of macro ‘hsc_const’
         if ((x) < 0)                                      \
              ^
    /home/user/Projects/hmatrix/packages/sundials/Arkode.hsc:152:16: error: ‘ARK324L2SA_DIRK_4_2_3’ undeclared (first use in this function)
    /home/user/.stack/programs/x86_64-linux/ghc-8.2.2/lib/ghc-8.2.2/template-hsc.h:38:10: note: in definition of macro ‘hsc_const’
         if ((x) < 0)                                      \
              ^
    /home/user/Projects/hmatrix/packages/sundials/Arkode.hsc:154:16: error: ‘CASH_5_2_4’ undeclared (first use in this function)
    /home/user/.stack/programs/x86_64-linux/ghc-8.2.2/lib/ghc-8.2.2/template-hsc.h:38:10: note: in definition of macro ‘hsc_const’
         if ((x) < 0)                                      \
              ^
    /home/user/Projects/hmatrix/packages/sundials/Arkode.hsc:156:16: error: ‘CASH_5_3_4’ undeclared (first use in this function); did you mean ‘CASH_5_2_4’?
    /home/user/.stack/programs/x86_64-linux/ghc-8.2.2/lib/ghc-8.2.2/template-hsc.h:38:10: note: in definition of macro ‘hsc_const’
         if ((x) < 0)                                      \
              ^
    /home/user/Projects/hmatrix/packages/sundials/Arkode.hsc:158:16: error: ‘SDIRK_5_3_4’ undeclared (first use in this function); did you mean ‘SDIRK_2_1_2’?
    /home/user/.stack/programs/x86_64-linux/ghc-8.2.2/lib/ghc-8.2.2/template-hsc.h:38:10: note: in definition of macro ‘hsc_const’
         if ((x) < 0)                                      \
              ^
    /home/user/Projects/hmatrix/packages/sundials/Arkode.hsc:160:16: error: ‘KVAERNO_5_3_4’ undeclared (first use in this function); did you mean ‘KVAERNO_4_2_3’?
    /home/user/.stack/programs/x86_64-linux/ghc-8.2.2/lib/ghc-8.2.2/template-hsc.h:38:10: note: in definition of macro ‘hsc_const’
         if ((x) < 0)                                      \
              ^
    /home/user/Projects/hmatrix/packages/sundials/Arkode.hsc:162:16: error: ‘ARK436L2SA_DIRK_6_3_4’ undeclared (first use in this function); did you mean ‘ARK324L2SA_DIRK_4_2_3’?
    /home/user/.stack/programs/x86_64-linux/ghc-8.2.2/lib/ghc-8.2.2/template-hsc.h:38:10: note: in definition of macro ‘hsc_const’
         if ((x) < 0)                                      \
              ^
    /home/user/Projects/hmatrix/packages/sundials/Arkode.hsc:164:16: error: ‘KVAERNO_7_4_5’ undeclared (first use in this function); did you mean ‘KVAERNO_5_3_4’?
    /home/user/.stack/programs/x86_64-linux/ghc-8.2.2/lib/ghc-8.2.2/template-hsc.h:38:10: note: in definition of macro ‘hsc_const’
         if ((x) < 0)                                      \
              ^
    /home/user/Projects/hmatrix/packages/sundials/Arkode.hsc:166:16: error: ‘ARK548L2SA_DIRK_8_4_5’ undeclared (first use in this function); did you mean ‘ARK436L2SA_DIRK_6_3_4’?
    /home/user/.stack/programs/x86_64-linux/ghc-8.2.2/lib/ghc-8.2.2/template-hsc.h:38:10: note: in definition of macro ‘hsc_const’
         if ((x) < 0)                                      \
              ^
    /home/user/Projects/hmatrix/packages/sundials/Arkode.hsc:175:16: error: ‘HEUN_EULER_2_1_2’ undeclared (first use in this function)
    /home/user/.stack/programs/x86_64-linux/ghc-8.2.2/lib/ghc-8.2.2/template-hsc.h:38:10: note: in definition of macro ‘hsc_const’
         if ((x) < 0)                                      \
              ^
    /home/user/Projects/hmatrix/packages/sundials/Arkode.hsc:177:16: error: ‘BOGACKI_SHAMPINE_4_2_3’ undeclared (first use in this function)
    /home/user/.stack/programs/x86_64-linux/ghc-8.2.2/lib/ghc-8.2.2/template-hsc.h:38:10: note: in definition of macro ‘hsc_const’
         if ((x) < 0)                                      \
              ^
    /home/user/Projects/hmatrix/packages/sundials/Arkode.hsc:179:16: error: ‘ARK324L2SA_ERK_4_2_3’ undeclared (first use in this function); did you mean ‘ARK324L2SA_DIRK_4_2_3’?
    /home/user/.stack/programs/x86_64-linux/ghc-8.2.2/lib/ghc-8.2.2/template-hsc.h:38:10: note: in definition of macro ‘hsc_const’
         if ((x) < 0)                                      \
              ^
    /home/user/Projects/hmatrix/packages/sundials/Arkode.hsc:181:16: error: ‘ZONNEVELD_5_3_4’ undeclared (first use in this function)
    /home/user/.stack/programs/x86_64-linux/ghc-8.2.2/lib/ghc-8.2.2/template-hsc.h:38:10: note: in definition of macro ‘hsc_const’
         if ((x) < 0)                                      \
              ^
    /home/user/Projects/hmatrix/packages/sundials/Arkode.hsc:183:16: error: ‘ARK436L2SA_ERK_6_3_4’ undeclared (first use in this function); did you mean ‘ARK436L2SA_DIRK_6_3_4’?
    /home/user/.stack/programs/x86_64-linux/ghc-8.2.2/lib/ghc-8.2.2/template-hsc.h:38:10: note: in definition of macro ‘hsc_const’
         if ((x) < 0)                                      \
              ^
    /home/user/Projects/hmatrix/packages/sundials/Arkode.hsc:185:16: error: ‘SAYFY_ABURUB_6_3_4’ undeclared (first use in this function)
    /home/user/.stack/programs/x86_64-linux/ghc-8.2.2/lib/ghc-8.2.2/template-hsc.h:38:10: note: in definition of macro ‘hsc_const’
         if ((x) < 0)                                      \
              ^
    /home/user/Projects/hmatrix/packages/sundials/Arkode.hsc:187:16: error: ‘CASH_KARP_6_4_5’ undeclared (first use in this function); did you mean ‘CASH_5_3_4’?
    /home/user/.stack/programs/x86_64-linux/ghc-8.2.2/lib/ghc-8.2.2/template-hsc.h:38:10: note: in definition of macro ‘hsc_const’
         if ((x) < 0)                                      \
              ^
    /home/user/Projects/hmatrix/packages/sundials/Arkode.hsc:189:16: error: ‘FEHLBERG_6_4_5’ undeclared (first use in this function); did you mean ‘CASH_KARP_6_4_5’?
    /home/user/.stack/programs/x86_64-linux/ghc-8.2.2/lib/ghc-8.2.2/template-hsc.h:38:10: note: in definition of macro ‘hsc_const’
         if ((x) < 0)                                      \
              ^
    /home/user/Projects/hmatrix/packages/sundials/Arkode.hsc:191:16: error: ‘DORMAND_PRINCE_7_4_5’ undeclared (first use in this function)
    /home/user/.stack/programs/x86_64-linux/ghc-8.2.2/lib/ghc-8.2.2/template-hsc.h:38:10: note: in definition of macro ‘hsc_const’
         if ((x) < 0)                                      \
              ^
    /home/user/Projects/hmatrix/packages/sundials/Arkode.hsc:193:16: error: ‘ARK548L2SA_ERK_8_4_5’ undeclared (first use in this function); did you mean ‘ARK548L2SA_DIRK_8_4_5’?
    /home/user/.stack/programs/x86_64-linux/ghc-8.2.2/lib/ghc-8.2.2/template-hsc.h:38:10: note: in definition of macro ‘hsc_const’
         if ((x) < 0)                                      \
              ^
    /home/user/Projects/hmatrix/packages/sundials/Arkode.hsc:195:16: error: ‘VERNER_8_5_6’ undeclared (first use in this function)
    /home/user/.stack/programs/x86_64-linux/ghc-8.2.2/lib/ghc-8.2.2/template-hsc.h:38:10: note: in definition of macro ‘hsc_const’
         if ((x) < 0)                                      \
              ^
    /home/user/Projects/hmatrix/packages/sundials/Arkode.hsc:197:16: error: ‘FEHLBERG_13_7_8’ undeclared (first use in this function); did you mean ‘FEHLBERG_6_4_5’?
    /home/user/.stack/programs/x86_64-linux/ghc-8.2.2/lib/ghc-8.2.2/template-hsc.h:38:10: note: in definition of macro ‘hsc_const’
         if ((x) < 0)                                      \
              ^

(include/arkode/arkode.h doesn't export ARK_S_MAX anymore)

Solving this could take time (no idea), but it might be useful to mention the last version the library was tested with.

Edit: it seems last the breaking changes happen in version 4.0.0, so the last good version would be 3.1.1

Magalame commented 5 years ago

With the 3.1.1 version the tests seem to go well:

hmatrix-tests-0.19.0.0: test (suite: hmatrix-base-testsuite)
hmatrix-sundials-0.19.0.0: test (suite: hmatrix-sundials-testsuite)
hmatrix-sundials-0.19.0.0: Test suite hmatrix-sundials-testsuite passed
hmatrix-tests-0.19.0.0: Test suite hmatrix-base-testsuite passed
hmatrix-tests-0.19.0.0: test (suite: hmatrix-gsl-testsuite)
hmatrix-tests-0.19.0.0: Test suite hmatrix-gsl-testsuite passed
Completed 2 action(s).
idontgetoutmuch commented 5 years ago

Thanks I just discovered this myself http://sundials.2283335.n4.nabble.com/ARKodeGetCurrentButcherTables-td4655603.html but haven’t had a response - one thing I could do would be to disable this (hopefully temporarily) until there is a fix from the sundials folks.

Magalame commented 5 years ago

You're very welcome! I think maybe just writing in the doc that it only works up to 3.2.1 would be fine?

idontgetoutmuch commented 5 years ago

I have disabled some of the functionality :( notably the ability to get the tableau for the RK scheme and now we have a "working" version in its on repo: https://github.com/haskell-numerics/hmatrix-sundials.