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

Avoid "Error: symbol `fatbinData' is already defined" caused by LTO when compiling with CUDA #342

Closed
wants to merge 5 commits into from

Conversation

WEIXUEP
Copy link

@WEIXUEP WEIXUEP commented Mar 8, 2025

Refer to the issue at #256, #340.

When attempting to build the palace application with CUDA support on Ubuntu 22.04, I encountered the same problem on two separate occasions:

  1. In the test step of MFEM.
  2. At the final build stage of palace

This issue can be resolved by taking two specific actions. First, when building with CUDA, I disable the test step of MFEM. Second, I add the appropriate CMake option during the final build step.
The following code snippet demonstrates how to add the necessary CMake option:

if(PALACE_WITH_CUDA)
  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-lto")
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-lto")
endif()

@hughcars hughcars closed this Mar 19, 2025
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

Successfully merging this pull request may close these issues.

2 participants