Skip to content

Incompatible integer kind for cg_coord_read_f range #41

@bmlowe1

Description

@bmlowe1

Hello again,

Small bug at the following lines:

& realDouble, 1, dims(1), coorX, ierr)

& realDouble, 1, dims(1), coorY, ierr)

& realDouble, 1, dims(1), coorZ, ierr)

I believe the starting range should be an integer of kind cgsize_t, where we are currently passing the value 1, which can default to a different integer type depending on the compiler flags.

For example, the call :

 call cg_coord_read_f(cg, base, iZone, "CoordinateZ",&
                                   & realDouble, 1, dims(1), coorZ, ierr)

should be changed to

 call cg_coord_read_f(cg, base, iZone, "CoordinateZ",&
                                   & realDouble, 1_cgsize_t, dims(1), coorZ, ierr)

In the former call, I get the error "Invalid range of data requested" when calling cg_coord_read_f.

I'm compiling with ifort (IFORT) 2021.10.0 20230609, with the default flags:

FF77_FLAGS = -fPIC -r8 -O2 -g
FF90_FLAGS = ${FF77_FLAGS} -std08
C_FLAGS    = -fPIC -O2

Thanks for all your time on this!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions