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

Platform-dependent subt/tsub bug when compiling with -flto #111

Open
mattsignorelli opened this issue May 17, 2024 · 4 comments
Open

Platform-dependent subt/tsub bug when compiling with -flto #111

mattsignorelli opened this issue May 17, 2024 · 4 comments

Comments

@mattsignorelli
Copy link
Contributor

mattsignorelli commented May 17, 2024

Nasty bug, only seen when specifically using the Mac and Windows platforms in Docker within BinaryBuilder (cannot reproduce when compiling on my Mac), but the binaries are made within the Docker so this is a real problem

@mattsignorelli mattsignorelli changed the title Platform-dependent incorrectness when compiling with -flto Platform-dependent subt bug when compiling with -flto May 17, 2024
@mattsignorelli mattsignorelli changed the title Platform-dependent subt bug when compiling with -flto Platform-dependent subt/tsub bug when compiling with -flto May 17, 2024
@mattsignorelli
Copy link
Contributor Author

Possibly other incorrectness, this is with DESC_USE_TMP=1, haven't tried DESC_USE_TMP=0

@mattsignorelli
Copy link
Contributor Author

confirm bug goes away at least in Mac when excluding flto but including all other flags

@mattsignorelli
Copy link
Contributor Author

mattsignorelli commented May 17, 2024

flto is safe (all tests pass) when DESC_USE_TMP=0. Therefore the bug is related to how link-time optimization handles getting/using/releasing permanent temporaries in the descriptor

For now I will compile without lto, but the long term solution is DESC_USE_TMP=0 and use a thread-safe allocator as Laurent has implemented

mattsignorelli added a commit to mattsignorelli/Yggdrasil that referenced this issue May 17, 2024
@mattsignorelli
Copy link
Contributor Author

Even with lowest optimization levels and no vectorization, bug appears with LTO

giordano pushed a commit to JuliaPackaging/Yggdrasil that referenced this issue May 19, 2024
* [GTPSA] bump patch

I get a very strange bug on windows and mac when compiling with BinaryBuilder, but compiling on my own mac does not show the bug. This appeared with using CMAKE_C_FLAGS (probably something related to O3 or some optimization) so for now because no time I am just going back to the original CMakeLists.txt which has worked so far

* Remove lto flag which is causing some problems

See bmad-sim/GTPSA.jl#111
amontoison pushed a commit to JuliaPackaging/Yggdrasil that referenced this issue Jun 22, 2024
* [GTPSA] bump patch

I get a very strange bug on windows and mac when compiling with BinaryBuilder, but compiling on my own mac does not show the bug. This appeared with using CMAKE_C_FLAGS (probably something related to O3 or some optimization) so for now because no time I am just going back to the original CMakeLists.txt which has worked so far

* Remove lto flag which is causing some problems

See bmad-sim/GTPSA.jl#111
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