[sundials-users] Fortran pointer returned by FN_VGetArrayPointer(y_sunvec)

66 views
Skip to first unread message

Ivan GIRAULT

unread,
Jun 15, 2022, 11:21:03 AM6/15/22
to SUNDIAL...@listserv.llnl.gov
Hi,

I am using CVode (Sundials 6.2.0) with the Fortran 2003 interface.

The problem I have is that when accessing the data of a N_Vector through:

y_vec => FN_VGetArrayPointer(y_sunvec)

the returned Fortran pointer y_vec has always size 1, even if the size of the problem neq is bigger.

Practically I can access all elements of y_sunvec through y_vec(2), y_vec(3)… if the code is compiled without debugging flag. However if compile the code with bound checks I logically get a runtime error.

The very same problem exists in the serial F2003 examples furnished with CVode. For instance, if cv_brusselator_dns.f90 is compiled with a flag for bounds check, a runtime error is returned by the program.

I hope I could have some feedback on this, and I thank you in advance for your time.

Kind regards,

Ivan GIRAULT

Envoyé de mon iPhone

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

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

Balos, Cody Joe

unread,
Jun 15, 2022, 11:22:50 AM6/15/22
to SUNDIAL...@listserv.llnl.gov
Hi Ivan,

Yes, this is a known issue with the Fortran interfaces. We will try to include a fix for it as soon as we can.

Cheers,
Cody
Reply all
Reply to author
Forward
0 new messages