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

Configure test for BG/P fails to identify need for _FILE_OFFSET_BITS. #28

Closed
shanedsnyder opened this issue May 13, 2021 · 3 comments
Closed

Comments

@shanedsnyder
Copy link
Contributor

In GitLab by @shanedsnyder on Sep 24, 2015, 16:24

The configure test on BG will result in the _LARGEFILE64_SOURCE macro being set but not the _FILE_OFFSET_BITS=64 macro. This results in off_t being defined as 32 bits instead of 64. This means the CP_MAX_BYTE_WRITTEN and CP_MAX_BYTE_READ can not be larger than 32 bits.

@shanedsnyder
Copy link
Contributor Author

In GitLab by @shanedsnyder on Sep 24, 2015, 16:24

I think we need to leave the file_offset_bits undefined so that we can still support 32 bit applications that aren't promoting off_t. The 64 bit wrappers use explicit off64_t types so that we can handle both cases.

The main problem is probably just that we have used the wrong type in the CP_RECORD_READ and CP_RECORD_WRITE macros? I'll make a test case to confirm and work on a fix.

@shanedsnyder
Copy link
Contributor Author

In GitLab by @shanedsnyder on Sep 24, 2015, 16:24

Confirmed MAX_BYTE_WRITTEN counter problem using the existing darshan-test/seek-test.c program (compiled with -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE).

Those macros use one variable local to the macro, and several variables stored in the runtime file record struct. The latter variables are all int64_t, while the former is an off_t. We can probably just change the local variable to an int64_t as well to fix the problem. Will confirm and test.

@shanedsnyder
Copy link
Contributor Author

In GitLab by @shanedsnyder on Sep 24, 2015, 16:24

Fixed in r483.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant