Skip to content
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

Documentation regarding breaking changes from 4.0.0 (arkode) #15

Closed
Magalame opened this issue May 9, 2019 · 2 comments
Closed

Documentation regarding breaking changes from 4.0.0 (arkode) #15

Magalame opened this issue May 9, 2019 · 2 comments

Comments

@Magalame
Copy link

Magalame commented May 9, 2019

Hi,

I was trying to run some tests from a library providing bindings to sundials (haskell-numerics/hmatrix#297) which got broken after the change to 4.0.0. Here's the error we get:

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)                                      \
              ^

Where could I find information regarding the transition to this version?
Thanks for your time

@balos1
Copy link
Member

balos1 commented May 9, 2019

Hello,

There is not a specific transitioning guide I can point you to other than the recent changes section in the introduction of the ARKode user guide. Additionally, you may find the “USING ARKSTEP FOR C AND C++ APPLICATIONS” section useful.

In SUNDIALS 4, ARKode was modularized into three time-stepping modules: ARKStep, ERKStep, and MRIStep. The ARKStep module is the Additive Runge-Kutta time-stepping module and provides all of the functionality available in ARKode in SUNDIALS 3. In fact, most of the methods can still be called just by changing the “ARKode” in the function name to “ARKStep”, e.g. ARKodeSStolerances --> ARKStepSStolerances.

To use the ARKStep module, you'll need to include the header file include/arkode/arkode_arkstep.h. This will resolve most of the errors in that output. Additionally, The ARK_S_MAX macro is no longer needed (or provided) - see the ARKodeButcherTable structure and associated functions in the user guide (they are defined in the include/arkode/arkode_butcher.h header file).

@Magalame
Copy link
Author

Thanks!

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

No branches or pull requests

2 participants