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

fortran:fix integer kind=8 problem #13160

Closed

Conversation

hppritcha
Copy link
Member

user reported problem on the ompi-users mail list.

https://www.mail-archive.com/[email protected]//msg35382.html

Signed-off-by: Howard Pritchard [email protected]
(cherry picked from commit 32db65f)

user reported problem on the ompi-users mail list.

https://www.mail-archive.com/[email protected]//msg35382.html

Signed-off-by: Howard Pritchard <[email protected]>
(cherry picked from commit 32db65f)
@github-actions github-actions bot added this to the v5.0.8 milestone Mar 24, 2025
@hppritcha hppritcha requested a review from janjust March 24, 2025 19:43
@jsquyres
Copy link
Member

@hppritcha Giles noted in 32db65f#commitcomment-154262549 that this might not be right -- the implicit string length argument is passed as an int, not an MPI_Fint.

Can you dig a little deeper and see if this is actually correct?

@janjust
Copy link
Contributor

janjust commented Mar 25, 2025

I'm adding this label until @jsquyres comment is resolved.

@jsquyres
Copy link
Member

@hppritcha Is the problem that the result from calling len()

call ompi_session_get_nth_pset_f(session%MPI_VAL, MPI_INFO_NULL%MPI_VAL, n, &
pset_len, pset_name, c_ierror, len(pset_name))

is an 8 byte integer (e.g., someone compiled with fortran -i8), but the C int is only 4 bytes?

If so, that sounds like a correct compiler error to me. Can we cast the return of the len() down to 4 bytes or something? If someone is passing a string that is longer than 2^31 bytes long, we have other problems. 😄

@jsquyres
Copy link
Member

@hppritcha Is the problem that the result from calling len()

Actually, have a look at what @ggouaillardet posted on the original PR to main: #13159 (comment)

@hppritcha
Copy link
Member Author

I was following how ompi_comm_get_name_f etc were handling this.

@hppritcha hppritcha closed this Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants