[sundials-users] cvode 5.8

17 views
Skip to first unread message

James D. Ott

unread,
Sep 22, 2022, 1:12:08 PM9/22/22
to SUNDIAL...@listserv.llnl.gov
Hi all,

I am trying to use cvode from version 5.8.  to interface with a fortran
code (77/90) .


 when I call fcvmalloc,  I get a error in cvodecreate. anyone have any
idea how to fix this?  where do i set this?


FNVINITS          ierr =  0
 FSUNDENSEMATINIT          ierr =  0

  call fcvmalloc

[CVODES ERROR]  CVodeCreate
  Illegal value for iter. The legal values are CV_FUNCTIONAL and CV_NEWTON.

          -1

[CVODES ERROR]  CVode
  cvode_mem = NULL illegal.


Jim

############################

To unsubscribe from the SUNDIALS-USERS list:
write to: mailto:SUNDIALS-USERS-...@LISTSERV.LLNL.GOV

James D. Ott

unread,
Sep 23, 2022, 3:55:25 PM9/23/22
to SUNDIAL...@listserv.llnl.gov
Hi all,

I tried the F2003 way...

no luck.

cvode_mem =  CVodeCreate(CV_BDF)

error is the same as with F77


[CVODES ERROR]  CVodeCreate
  Illegal value for iter. The legal values are CV_FUNCTIONAL and CV_NEWTON.

 ERROR: cvode_mem = NULL

I am pulling my hair out.   where is  CV_FUNCTIONAL  or CV_NEWTON defined???

Jim






old:

Reynolds, Daniel

unread,
Sep 23, 2022, 5:20:20 PM9/23/22
to SUNDIAL...@listserv.llnl.gov
Hi James,

I am somewhat confused.

You say that you are using CVODE, but the error message says "CVODES ERROR".

I just searched through the entire source code for CVODE from the SUNDIALS 5.8.0 release, and although it unfortunately included two "CVODES" typos, neither of which were in the function CVodeCreate. Given that you tried the F77 interface (via fcvmalloc), it is clear that you aren't trying to use CVODES instead.

Could you somehow be accidentally linking to the CVODES library at compile time?


Daniel R. Reynolds (he/him)
Professor and Department Chair
Mathematics @ SMU
214-768-4339
https://urldefense.us/v3/__https://people.smu.edu/dreynolds/__;!!G2kpM7uM-TzIFchu!k-q54KJEGSSq3uhJBKe6_xn6uq5EBV7vufzMBXqbvgxRMjGD2kxfRV3S3u6UP-SjWAEJJw$


On 9/23/22, 2:55 PM, "sundial...@llnl.gov on behalf of James D. Ott" <sundial...@llnl.gov on behalf of ot...@CRAFT-TECH.COM> wrote:

[EXTERNAL SENDER]

James D. Ott

unread,
Sep 23, 2022, 6:06:13 PM9/23/22
to SUNDIAL...@listserv.llnl.gov
Hi,

at the header of my fortran  file  I have :


        use, intrinsic :: iso_c_binding

        use fcvode_mod                 ! Fortran interface to CVODE
        use fnvector_serial_mod        ! Fortran interface to serial
N_Vector
        use fsunmatrix_dense_mod       ! Fortran interface to dense
SUNMatrix
        use fsunlinsol_dense_mod       ! Fortran interface to dense
SUNLinearSolver
        use fsundials_linearsolver_mod ! Fortran interface to generic
SUNLinearSolver
        use fsundials_matrix_mod       ! Fortran interface to generic
SUNMatrix
        use fsundials_nvector_mod      ! Fortran interface to generic
N_Vector


after variable declaration ( type(c_prt):: cvode_mem ) I invoke

cvode_mem = FCVodeCreate( CV_BDF )


code compiles  no errors.   when I run I get the

[CVODES ERROR]  CVodeCreate
  Illegal value for iter. The legal values are CV_FUNCTIONAL and CV_NEWTON.


what you are saying in "CVODES"  refers to the cvodes  not cvode ?

sundials 5.8 compiled with intel fortran 21  & icc.

Jim


On 9/23/2022 5:17 PM, Reynolds, Daniel wrote:
> Hi James,
>
> I am somewhat confused.
>
> You say that you are using CVODE, but the error message says "CVODES ERROR".
>
> I just searched through the entire source code for CVODE from the SUNDIALS 5.8.0 release, and although it unfortunately included two "CVODES" typos, neither of which were in the function CVodeCreate. Given that you tried the F77 interface (via fcvmalloc), it is clear that you aren't trying to use CVODES instead.
>
> Could you somehow be accidentally linking to the CVODES library at compile time?
>
>
> Daniel R. Reynolds (he/him)
> Professor and Department Chair
> Mathematics @ SMU
> 214-768-4339
> https://urldefense.us/v3/__https://people.smu.edu/dreynolds/__;!!G2kpM7uM-TzIFchu!k-q54KJEGSSq3uhJBKe6_xn6uq5EBV7vufzMBXqbvgxRMjGD2kxfRV3S3u6UP-SjWAEJJw$
>
>

--

************************************************************************
*** Dr. James D. Ott Combustion Research and Flow Technology **
*** Senior Research Scientist 6210 Keller's Church Road **
*** ot...@craft-tech.com Pipersville, PA 18947 **
*** Tel : 215-766-1520 X26 **
*** Fax : 215-766-1524 **
************************************************************************

Balos, Cody Joe

unread,
Sep 23, 2022, 6:16:29 PM9/23/22
to SUNDIAL...@listserv.llnl.gov

Hi James,

 

It seems like you are somehow linking to an old CVODE binary (i.e., library file) and possibly even CVODES instead of CVODE (i.e., libsundials_cvodes instead of libsundiuals_cvode).  That error message “Illegal value for iter. The legal values are CV_FUNCTIONAL and CV_NEWTON” was removed in v4.0.0.

 

Cody

Reynolds, Daniel

unread,
Sep 26, 2022, 11:48:54 AM9/26/22
to SUNDIAL...@listserv.llnl.gov
Hi James,

As a quick follow-on to Cody's message, I was also specifically asking about the linking stage (in your Makefile or similar), not your code itself.  If possible, I recommend reinstalling SUNDIALS in a new location on your system and ensuring that you use the corresponding header/library files for that new installation.

Daniel R. Reynolds
Professor and Department Chair
SMU Mathematics
1.214.768.4339
https://people.smu.edu/dreynolds


On 9/23/22 17:15, Balos, Cody Joe wrote:

[EXTERNAL SENDER]

James D. Ott

unread,
Sep 26, 2022, 3:59:36 PM9/26/22
to SUNDIAL...@listserv.llnl.gov

I installed sundials-6.3.0

same issues.  all my csh paths are set correctly to point to 6.3.0     my code linking paths are set.

make test  (with --rerun in place)

[ottjd@craft124]~/SunDials/build-6.3.0 : make test
Running tests...
Test project /home/ottjd/SunDials/build-6.3.0
    Start 21: test_fsunmatrix_dense_mod
1/3 Test #21: test_fsunmatrix_dense_mod ........Subprocess aborted***Exception:   0.16 sec
 Dense SUNMatrix Fortran 2003 interface test
     PASSED test -- SUNMatGetID
forrtl: error (65): floating invalid
Image              PC                Routine            Line        Source
test_fsunmatrix_d  000000000040D97B  for__signal_handl     Unknown  Unknown
libpthread-2.28.s  000014E0C0A4DCE0  Unknown               Unknown  Unknown
test_fsunmatrix_d  000000000040B4EC  Unknown               Unknown  Unknown
test_fsunmatrix_d  000000000040B18B  Unknown               Unknown  Unknown
test_fsunmatrix_d  000000000040BA37  Unknown               Unknown  Unknown
test_fsunmatrix_d  000000000040A4BF  Unknown               Unknown  Unknown
test_fsunmatrix_d  0000000000409E62  Unknown               Unknown  Unknown
libc-2.28.so       000014E0C06B0CF3  __libc_start_main     Unknown  Unknown
test_fsunmatrix_d  0000000000409D6E  Unknown               Unknown  Unknown

    Start 26: test_fsunmatrix_band_mod
2/3 Test #26: test_fsunmatrix_band_mod .........Subprocess aborted***Exception:   0.15 sec
 Band SUNMatrix Fortran 2003 interface test
     PASSED test -- SUNMatGetID
forrtl: error (65): floating invalid
Image              PC                Routine            Line        Source
test_fsunmatrix_b  000000000040DFAB  for__signal_handl     Unknown  Unknown
libpthread-2.28.s  00001525B340CCE0  Unknown               Unknown  Unknown
test_fsunmatrix_b  000000000040BB1C  Unknown               Unknown  Unknown
test_fsunmatrix_b  000000000040B580  Unknown               Unknown  Unknown
test_fsunmatrix_b  000000000040C067  Unknown               Unknown  Unknown
test_fsunmatrix_b  000000000040A65B  Unknown               Unknown  Unknown
test_fsunmatrix_b  000000000040A022  Unknown               Unknown  Unknown
libc-2.28.so       00001525B306FCF3  __libc_start_main     Unknown  Unknown
test_fsunmatrix_b  0000000000409F2E  Unknown               Unknown  Unknown

    Start 33: test_fsunmatrix_sparse_mod
3/3 Test #33: test_fsunmatrix_sparse_mod .......Subprocess aborted***Exception:   0.16 sec
 Sparse SUNMatrix Fortran 2003 interface test
     PASSED test -- SUNMatGetID
     PASSED test -- SUNMatClone
     PASSED test -- SUNMatCopy
     PASSED test -- SUNMatZero
forrtl: error (65): floating invalid
Image              PC                Routine            Line        Source
test_fsunmatrix_s  000000000040EB6B  for__signal_handl     Unknown  Unknown
libpthread-2.28.s  000014EC1F3EBCE0  Unknown               Unknown  Unknown
test_fsunmatrix_s  000000000040C6DC  Unknown               Unknown  Unknown
test_fsunmatrix_s  000000000040C50B  Unknown               Unknown  Unknown
test_fsunmatrix_s  000000000040D0A4  Unknown               Unknown  Unknown
test_fsunmatrix_s  000000000040AA2C  Unknown               Unknown  Unknown
test_fsunmatrix_s  000000000040A1A2  Unknown               Unknown  Unknown
libc-2.28.so       000014EC1F04ECF3  __libc_start_main     Unknown  Unknown
test_fsunmatrix_s  000000000040A0AE  Unknown               Unknown  Unknown


0% tests passed, 3 tests failed out of 3

Total Test time (real) =   0.47 sec

The following tests FAILED:
         21 - test_fsunmatrix_dense_mod (Subprocess aborted)
         26 - test_fsunmatrix_band_mod (Subprocess aborted)
         33 - test_fsunmatrix_sparse_mod (Subprocess aborted)
Errors while running CTest

Balos, Cody Joe

unread,
Sep 26, 2022, 4:04:30 PM9/26/22
to SUNDIAL...@listserv.llnl.gov

Hi James,

 

This is a different error now (in the sundials tests itself obviously), which we can troubleshoot, but does the fresh installation make your original error go away?

 

Can you send your CMakeCache.txt file from the sundials-6.3.0 build (looks like it should be located at /home/ottjd/SunDials/build-6.3.0/CMakeCache.txt)?

 

Thanks,

James D. Ott

unread,
Sep 26, 2022, 4:04:33 PM9/26/22
to SUNDIAL...@listserv.llnl.gov

recompile  sundials 6.3  with -O2 - traceback

----------------------------------------------------------

 Dense SUNMatrix Fortran 2003 interface test
     PASSED test -- SUNMatGetID
forrtl: error (65): floating invalid
Image              PC                Routine            Line        Source
test_fsunmatrix_d  000000000040D81B  Unknown               Unknown  Unknown
libpthread-2.28.s  000015221F8DFCE0  Unknown               Unknown  Unknown
test_fsunmatrix_d  000000000040B434  test_utilities_mp          68  test_utilities.f90
test_fsunmatrix_d  000000000040B0DC  check_matrix_             216  test_fsunmatrix_dense_mod.f90
test_fsunmatrix_d  000000000040B945  test_sunmatrix_mp         162  test_sunmatrix.f90
test_fsunmatrix_d  000000000040A4BF  MAIN__                    172  test_fsunmatrix_dense_mod.f90

test_fsunmatrix_d  0000000000409E62  Unknown               Unknown  Unknown
libc-2.28.so       000015221F33ECF3  __libc_start_main     Unknown  Unknown

test_fsunmatrix_d  0000000000409D6E  Unknown               Unknown  Unknown
<end of output>
Test time =   0.16 sec
----------------------------------------------------------
Test Failed.
"test_fsunmatrix_dense_mod" end time: Sep 26 15:59 EDT
"test_fsunmatrix_dense_mod" time elapsed: 00:00:00
----------------------------------------------------------

James D. Ott

unread,
Sep 26, 2022, 4:11:47 PM9/26/22
to SUNDIAL...@listserv.llnl.gov
original error  still present



On 9/26/2022 4:03 PM, Balos, Cody Joe wrote:

Hi James,

 

This is a different error now (in the sundials tests itself obviously), which we can troubleshoot, but does the fresh installation make your original error go away?

 

Can you send your CMakeCache.txt file from the sundials-6.3.0 build (looks like it should be located at /home/ottjd/SunDials/build-6.3.0/CMakeCache.txt)?

 

Thanks,

Cody

 


-- 

************************************************************************
*** Dr. James D. Ott          Combustion Research and Flow Technology **
*** Senior Research Scientist 6210 Keller's Church Road               **
*** ot...@craft-tech.com      Pipersville, PA 18947                   **
*** Tel : 215-766-1520 X26                                            **
*** Fax : 215-766-1524                                                **
************************************************************************

WARNING: This email violated LLNL's email security policy and has been modified. If you would like a list of blocked file types or for more information please see:

Blocked Email Extensions

An attachment cmakecache.txt.gz was removed from this document as it constituted a security hazard. If you require this document, please contact the sender and arrange an alternate means of receiving it.

Balos, Cody Joe

unread,
Sep 26, 2022, 4:14:40 PM9/26/22
to SUNDIAL...@listserv.llnl.gov

If you could provide a minimal reproducer for the original error that would be very helpful in addition to the CMakeCache.txt for the second error you are seeing with `make test` and SUNDIALS 6.3.0. 

 

Cody

 

From: sundials-users <sundial...@llnl.gov> on behalf of ot...@CRAFT-TECH.COM <ot...@CRAFT-TECH.COM>
Date: Monday, September 26, 2022 at 1:11 PM
To: sundials-users <sundial...@llnl.gov>
Subject: Re: [sundials-users] cvode 5.8

James D. Ott

unread,
Sep 26, 2022, 4:47:06 PM9/26/22
to SUNDIAL...@listserv.llnl.gov

stripped down baby program.
An attachment tester.tar was removed from this document as it constituted a security hazard. If you require this document, please contact the sender and arrange an alternate means of receiving it.
Message has been deleted
Message has been deleted

Balos, Cody Joe

unread,
Sep 27, 2022, 12:23:24 PM9/27/22
to SUNDIAL...@listserv.llnl.gov

Hi Jim,

 

No worries, glad you found the issue.

 

Regards,

Cody

 

From: James D. Ott <ot...@craft-tech.com>
Date: Tuesday, September 27, 2022 at 9:08 AM
To: Balos, Cody Joe <bal...@llnl.gov>
Subject: Sundials 6.3

Hi all,

 

I traced down the culprit on my end.  Our code is compiled with cantera 2.4 .  The cantera version that we have was compiled with a sundial version imbedded in it. That is overridding  the 6.3 (somehow).   I recompiled our code without cantera & I do not get the error anymore. 

 

Sorry for all the mess.

 

Jim

 

 

On 9/26/2022 5:58 PM, Balos, Cody Joe wrote:

Hi James,

 

I

 

-- 
 
************************************************************************
*** Dr. James D. Ott          Combustion Research and Flow Technology **
*** Senior Research Scientist 6210 Keller's Church Road               **
*** ot...@craft-tech.com      Pipersville, PA 18947                   **
*** Tel : 215-766-1520 X26                                            **
*** Fax : 215-766-1524                                                **
************************************************************************
 
Reply all
Reply to author
Forward
0 new messages