Open rppawlo opened 3 years ago
@rppawlo, does nvcc_wrapper not strip out duplicate library symbols?
I could spend some time debugging now this but all of this code is going to rewritten when I get deep into working #63 and #299 next month (assuming I can get off the ATDM Trilinos builds for real).
So you try the workaround for now?
I'm not sure about nvcc, but I verified that manually removing the second include of the library fixed the issue. Workaround is fine for now.
@bartlettroscoe - yesterday you pointed out that if RDC is enabled, tribits should add a flag to nvcc wrapper to remove duplicates. I went back and looked at why this flag was not getting added. From what I can tell, if the user specifies CMAKE_CXX_FLAGS during configure then the addition of the remove duplicates flag gets dropped inside tribits. Is that the intention or is this a bug? It blocks me from adding cuda compiler flags for warnings during debugging. I then have to manually add the remove duplicates flag as well.
yesterday you pointed out that if RDC is enabled, tribits should add a flag to nvcc wrapper to remove duplicates.
@rppawlo, actually, this is added by the ATDM Trilinos configuration system, not TriBITS, that does this as documented at:
and implemented at:
Can you provide reproducability instructions?
just sent you something offline
As described in:
the problem was due to some confusion/missing documentation on how to tweak CMAKE_CXX_FLAGS.
But yet, TriBITS should not produce link lines with duplicate libraries. Hopefully the refactorings for #63 and #299 will resolve that by handing this over to CMake to deal with.
Related to:
On cuda static rdc builds, I'm getting a link failure due to duplicate symbols. The main issue is that a library is being included twice on the link line. In the panzer/stk-adapters Dependencies file I have:
Panzer declares pamgen as a direct TEST dependency in TEST_OPTIONAL_DEP_PACKAGES. Panzer depends directly on SEACASIoss. SEACASIoss has an optional LIB dependency on pamgen. It seems that when duplicate libraries are removed from the link line, the TEST dependencies and the LIB dependencies are handled separately leading to pamgen being included twice - once in the TEST list and once in the LIB list. The error is below - the pamgen library is included twice. Note that this failure only happens with cuda+rdc+static with tests enabled.
Any recomendations? In the short term, I can work around by disabling panzer tests if SEACASIoss_ENABLE_Pamgen is off.