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

Hypre_Int Fortran substitude not clear from documentation #1007

Open
baloe opened this issue Nov 8, 2023 · 0 comments
Open

Hypre_Int Fortran substitude not clear from documentation #1007

baloe opened this issue Nov 8, 2023 · 0 comments

Comments

@baloe
Copy link

baloe commented Nov 8, 2023

I am wondering about the right datatype to use for Hypre routines in a Fortran code.

The Hypre manual provides a conversion table from C to Fortran on page 80,
https://hypre.readthedocs.io/_/downloads/en/latest/pdf/,
but the small example that follows is a bit contradictory.

The table on page 80 says: Instead of C "Hypre_Type" use Fortran "integer*8".

The example on the next page reads

HYPRE_IJMatrixSetValues(HYPRE_IJMatrix matrix, int nrows, ...)

and the corresponding Fortran types are given as

integer*8 :: matrix
integer :: nrows

However, the documentation of HYPRE_IJMatrixSetValues on page 102 actually has the signature

HYPRE_IJMatrixSetValues(HYPRE_IJMatrix matrix, HYPRE_Int nrows, ...)

So apparently "HYPRE_Int" is not to be misunderstood as "Hypre_Type", even though it matches that syntax,
and instead of replacing with an integer*8, a plain integer*4 is needed in Fortran.

It would be helpful if you added a row for HYPRE_Int to the conversion table on page 80.

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

1 participant